Support » Plugin: Media Library Assistant » Auto Assign with Code

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

    (@dglingren)

    Thanks for this question and for the related suggestion in the Reviews section.

    Since you say “with Code” and “where to put the hack” it sounds like you’re comfortable with adding some PHP code to your theme, the ad-upload plugin or a plugin of your own. If that’s true, you can hook the WordPress add_attachment action or the wp_update_attachment_metadata filter. These are called late in the process of uploading an attachment and are the hooks MLA uses to do its IPTC/EXIF and custom field mapping.

    You’ll have to figure out a way to know that the item being uploaded is a banner ad, of course. Without knowing which plugin you use for that I can’t say how you’d do that.

    In MLA, the file that contains the hooks is class-mla-options.php, and the data update is in class-mla-data.php. If all you want to do is add a term to the attachment_category taxonomy, your code can be quite a bit simpler.

    Let me know of I’m on the right track or if you had something else in mind. Thanks again for your interest in the plugin.

    Plugin Author David Lingren

    (@dglingren)

    It has been quite a while since your first post. I hope the suggestions I gave on which WordPress filters to hook were helpful and you’ve found a solution to your needs.

    I’m going to mark this issue resolved for now. Please fell free to re-open it if you have any problems with the plugin or further questions on this topic. Thanks for your interest.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Auto Assign with Code’ is closed to new replies.