Skip to content

Instantly share code, notes, and snippets.

View fishnyc22's full-sized avatar

Dave Fischetti fishnyc22

View GitHub Profile
jQuery(function($) {
var called = 0;
$('#wpcontent').ajaxStop(function() {
if ( 0 == called ) {
$('[value="uploaded"]').attr( 'selected', true ).parent().trigger('change');
called = 1;
}
});
var oldPost = wp.media.view.MediaFrame.Post;
wp.media.view.MediaFrame.Post = oldPost.extend({