Use wp.media templates to create totally custom modal
A little late but I think Extending the WordPress Media Uploader: Embed Options should work. I’m trying to do the same.
A little late but I think Extending the WordPress Media Uploader: Embed Options should work. I’m trying to do the same.
How to submit data between wp_iframe and backbone.js in media upload
Modal working only on home page
WordPress 4.9.8 Trying to add filename over image in Media Browser
How to open default wp image editor screen dynamically?
Suggested image dimensions Gutenberg Hook
Display attachments by the ID of the post being edited in the wp.media frame (frontend)
How to enable sorting in custom media uploader in plugin
Image sizes are hard-coded throughout WordPress core; Tom’s comment to adjust the dimensions of the built-in image sizes is the best approach.
Figured out the answer to the question. file_frame.on(‘open’, function() { var selection = file_frame.state().get(‘selection’); var library = file_frame.state(‘gallery-edit’).get(‘library’); var ids = jQuery(‘#fg_perm_metadata’).val(); if (ids) { idsArray = ids.split(‘,’); idsArray.forEach(function(id) { attachment = wp.media.attachment(id); attachment.fetch(); selection.add( attachment ? [ attachment ] : [] ); }); file_frame.setState(‘gallery-edit’); idsArray.forEach(function(id) { attachment = wp.media.attachment(id); attachment.fetch(); library.add( attachment ? [ … Read more