I think I got it ,
if (wp.media) {
wp.media.view.Modal.prototype.on('open', function(data) {
console.log(wp.media.frame.modal.clickedOpenerEl);
});
}
let me know if there is better solution.
Related Posts:
- Using the WordPress 3.5 Media Uploader window as a modal popup
- Expanding new Media Uploader in WordPress 3.5
- Change Media modal image size
- How to let a user select a media from the media library
- Media Modal not updating with file upload
- Media modal in IE9 not working when included from plugin with wp admin scripts minified
- Use wp.media templates to create totally custom modal
- Bootstrap Modal isn’t working in WordPress Plugin with Template Avada [closed]
- Media Manager selectection state does not have thumbnail size
- foundation 4 reveal popup pass a variable
- Enhance Media Manager for Gallery
- Trigger refresh for new media manager in 3.5
- Delete an attachment in the WP media modal window
- Add filter function in media modal box
- How to trigger a refresh in the media modal
- List of available events for wp.media
- Add custom Attachment Display Setting for images
- ThickBox replacement
- WordPress 3.5 Media Manager – add a button
- Rendering the uploaded file in a wp.media object
- Adding custom input for data attribute in insert media modal
- Best approach when modifying the Media Manager
- Custom “Uploads” Dir: “Edit Image” in Media Library broken
- Bind event on Media gallery elements WordPress
- Customizing the 3.5 “Add Media” popup (Backbone.js)
- How to restrict images in v3.5 Media Library modal to only those from a specific post id?
- Filter media library items by size
- Modifying the media-template.php file, the right way?
- How could I add button next to “edit image” button in “Attachment Details”
- How can I append custom data to images in the editor?
- Is it possible to trigger some JavaScript when Media Popup is opened?
- Disable media library tab for non admins in uploader screen
- Using Underscore Templates in WordPress
- Refresh wp.media after ajax call
- ‘Add Media’ button doesn’t work when editor is initialized from javascript
- Thickbox hacking – removing fields
- Add control in image detail panel
- Hook for image edit popup
- How do I add the data-toggle=”modal” data-target=”#myModal” attribures to a WP Nav bar?
- Saving Custom Field in Attachment Window in WordPress 3.5
- What type of template are WP media-modal’s templates?
- Add custom field to media attachment image attribute in post editor
- Wp3.5 Media Gallery Edit modal: change captions to title
- Modify Custom Field in Media Library using JavaScript
- Modify the array of selected images in media modal
- Media manager multiple selection
- Looking for a hook to add attachment information to the media library tab
- How to extend Media Library (WP 4.4)
- How to set additional parameter in wp.media?
- Adding fields to the media uploader with jquery listeners
- Official documentation for attachment form fields
- How can I remove the image attachment ALT field?
- Open the attachment details modal
- Trying to add filename over image in Media Browser
- Filter medias from the Media Uploader (wp.media) modal with a post meta
- Run script after clicking Set Featured Image in Media
- How to change the image size in new Media Uploader (ie use medium vs thumbnail)
- Modify how gallery.js builds the shortcode [gallery ...] in tinyMCE?
- Save attachment custom fields on front end
- How to get all attachment image from post ?? WordPress
- Category checkboxes in upload modal
- Upload images from custom plugin using the media modal
- How to set default value for ‘Alt text’ on image upload dialog?
- Make alt text required when setting a featured image
- Restrict file types in the uploader of a wp.media frame
- Adding image to visual editor popup for shortcode with wp.media and wp.mce: changing image duplicates shortcode
- trigger(‘change’) not working
- Perform a custom (bulk) action in media view
- Add guid filter to attachment in media library grid mode
- Edit single attachment on click (WP-admin)
- WordPress 3.5 Media Manager – add a button
- Show selected images on top in Media Manager
- WordPress Built In Dialog Box For My Plugin
- How to check an ajax nonce in PHP
- Only displaying zip files with wp media
- Automatically add image caption with values from a post parent field?
- Lightbox Plus ColorBox plugin and auto playing YouTube video
- Post edit – Media Library – Only get images from current post
- admin_enqueue_scripts not working
- Is it possible to hide media details sidebar when wp.media popup is being opened?
- How do I create a custom add media button modal?
- How to retrieve a value from an input field in a media view template
- Media Manager: refresh library after new selection
- Media upload not working on theme option in WordPress 3.8.1
- Adding Media Upload to Custom Options Panel breaks “Insert into Post”
- Calling WP Gallery Uploader/Selector From Metabox
- Use custom image size in admin panel
- How to enable sorting in custom media uploader in plugin
- Add the description field on the attached media
- Display attachments by the ID of the post being edited in the wp.media frame (frontend)
- Customizing the attachement page to show rest of all images in a gallery from post
- Suggested image dimensions Gutenberg Hook
- How to open default wp image editor screen dynamically?
- WordPress 4.9.8 Trying to add filename over image in Media Browser
- Modal working only on home page
- How to submit data between wp_iframe and backbone.js in media upload
- How to get the return value of wp.media({ frame: ‘post’ }) in all cases?
- Can’t display errors in attachment_fields_to_save
- Unable to upload image using the standard uploader in the WP admin (v4.3)
- How to open the add media dialogue it in a certain state / tab?