How to bind to load completion of new Wordpress 3.5 Media Manager -
i need modify output of new wordpress 3.5 media manager after has loaded of items browse in library , gallery views cannot life of me find event can bind to...
does know if there 'wpmediaeditorloaded' event triggered when images have been loaded or similar use?
i found utilize this
wp.media.view.attachments.prototype.on('ready',function(){ //this runs 1 time each tab in media editor unbind previous versions jquery(document).unbind('ajaxcomplete', medialibraryloaded); jquery(document).bind('ajaxcomplete', medialibraryloaded); }); var medialibraryloaded = function(e, xhr, options) { jquery(document).unbind('ajaxcomplete', medialibraryloaded); //do stuff here } wordpress media uploader wordpress-3.5
No comments:
Post a Comment