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.
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.