• Resolved shanaaa

    (@shanaaa)


    Hi,

    First, I would like to say thank you for your awesome plugin πŸ™‚

    When I upload a picture with metadatas inside, in the media section, the mapping works perfectly. But I developped my own administration panel, and I would like to have the same result, but I don’t know what function I have to call after my picture is loaded ? I use the wp_handle_upload(); function

    I would like the mapping treatment working when I upload a picture. Currently, I have to upload 30/50 pictures per week, then click “Map All Attachments, Standard Fields Now”. Automate the task would be great πŸ™‚ But I can’t find developper ressources…:/

    Thanks !

    https://ww.wp.xz.cn/plugins/media-library-assistant/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your encouraging words and for your question.

    The wp_handle_upload() function does only part of the job, “sanitizing file names, checking extensions for mime type, and moving the file to the appropriate directory within the uploads directory.” The WordPress Codex function reference suggests that it “… may be used with wp insert attachment(). ” The function reference for wp insert attachment() suggests “To perform the entire attachment upload and insertion process at once, you will want to use media_handle_upload() instead in most cases.

    MLA uses the hooks provided by wp insert attachment() and media_handle_upload() to map metadata automatically as items are uploaded and added to the Media Library. If your administration panel can use those functions instead of or in addition to wp_handle_upload() you shouldn’t have a problem. Would that work in your application?

    If not, I may be able to suggest some code that will run the MLA mapping rules as a part of your upload process. It would be very helpful to see more of the code around your wp_handle_upload() calls to make sure I am on the right track.

    Any additional information you can provide would be most helpful.

    Plugin Author David Lingren

    (@dglingren)

    It has been a month since my last post in this topic and I have seen nothing further. I assume you have found a solution to your uploading/mapping application.

    I am marking this topic resolved, but please update it if there is anything I can do to help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘IPTC/EXIF mapping in custom plugin’ is closed to new replies.