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 wp.media.editor.open()
and wp.media.editor.close()
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?
wp.media.featuredImage.frame().views.get('.media-frame-content')[0].views.get("")[3].collection.length
but setting that length to 0 doesn't do anything.