Theme Customizer: Do not attempt to grab the contents of the preview iframe to populate the window title. Reverts plugins repo revision 508947. see #19910.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2012-03-22 02:39:03 +00:00
parent 30e00cd456
commit 545d62e5f0
1 changed files with 3 additions and 9 deletions

View File

@ -7,7 +7,6 @@ if ( typeof wp === 'undefined' )
this.body = $( document.body ); this.body = $( document.body );
this.element = $( '#customize-container' ); this.element = $( '#customize-container' );
this.base = $( '.admin-url', this.element ).val(); this.base = $( '.admin-url', this.element ).val();
this.doc_title = $( document ).attr( 'title' );
this.element.on( 'click', '.close-full-overlay', function() { this.element.on( 'click', '.close-full-overlay', function() {
Loader.close(); Loader.close();
@ -22,13 +21,9 @@ if ( typeof wp === 'undefined' )
open: function( params ) { open: function( params ) {
params.customize = 'on'; params.customize = 'on';
this.element.append( '<iframe />' ); this.iframe = $( '<iframe />', {
this.iframe = $( 'iframe' ).attr( 'src', this.base + '?' + jQuery.param( params ) ); src: this.base + '?' + jQuery.param( params )
}).appendTo( this.element );
$('iframe').load( function() {
title = $(this).contents().find( 'title' ).text();
$( document ).attr( 'title', title );
});
this.element.fadeIn( 200, function() { this.element.fadeIn( 200, function() {
Loader.body.addClass( 'customize-active full-overlay-active' ); Loader.body.addClass( 'customize-active full-overlay-active' );
@ -39,7 +34,6 @@ if ( typeof wp === 'undefined' )
Loader.iframe.remove(); Loader.iframe.remove();
Loader.iframe = null; Loader.iframe = null;
Loader.body.removeClass( 'customize-active full-overlay-active' ); Loader.body.removeClass( 'customize-active full-overlay-active' );
$( document ).attr( 'title', Loader.doc_title );
}); });
} }
}; };