- // Enable whole row to be clicked
- $( '.found-posts td' ).on( 'click', function () {
- $( this ).parent().find( '.found-radio input' ).prop( 'checked', true );
- });
- },
-
- error : function(r) {
- var er = r.statusText;
-
- if ( r.responseText ) {
- er = r.responseText.replace( /<.[^<>]*?>/g, '' );
- }
- if ( er ) {
- $('#find-posts-response').html(er);
- }
+ window.wp.media({
+ frame: 'manage',
+ container: $mediaGridWrap,
+ library: settings.queryVars
+ }).open();