1

I've created a custom media manager for a CPT I've created. I have everything functioning properly except an edit function. I want to have an edit button for each attachment that gets added to the media manager from the media library. However I'm unsure of how to accomplish this. I have the attachment ID at my disposal, (I even have the edit attachment link, assuming 'attachment.editLink' is what I need) for when the user clicks on this button, however I'm not sure how to create the modal from there..

I've tried looking at the Media Modal JS in the core (https://core.trac.wordpress.org/browser/tags/4.2.1/src//wp-includes/js/media-models.js#L0)

My code is taken from this page (http://www.lenslider.com/articles/wordpress-3-5-media-uploader-tips-on-using-it-within-plugins/)

I'm going to keep trying to make the edit button open a modal for editing a single attachment, but if anyone can help point me in the right way that would be wonderful!

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.