Trigger refresh for new media manager in 3.5

I’m trying to figure out how it’s possible to ‘refresh’ the media library in the new media dialogue in 3.5. I’m adding images from an external image library to the WordPress library (via a tab/iFrame combo in the media dialogue) which works ok, but I have to close and reopen the dialogue in order to show the newly added images (which have successfully been aded to the library).

I know there are and methods, but I can’t quite manage to find a sort() or refresh() (or whatever) in the source. Truth be told, the source code is pretty intense reading and console.log doesn’t seemingly help much with backbone.js. Any ideas?


The correct way of refreshing the content of the frame, as found in the WP core, is as below:

if(!==null){{ignore: (+ new Date())});;
}else{{ignore: (+ new Date())});

You should always check of the content is available, else refresh the library.


Leave a Comment