diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 951fb4cfd0..831a46e240 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -2023,7 +2023,7 @@ response = response.slice( 0, index ) + response.slice( index + signature.length ); // Create the iframe and inject the html content. - self.iframe = $('').appendTo( self.container ); + self.iframe = $( '', { 'title': api.l10n.previewIframeTitle } ).appendTo( self.container ); // Bind load event after the iframe has been added to the page; // otherwise it will fire when injected into the DOM. @@ -2055,8 +2055,9 @@ deferred.rejectWith( self, [ 'logged out' ] ); }; - if ( this.triedLogin ) + if ( this.triedLogin ) { return reject(); + } // Check if we have an admin cookie. $.get( api.settings.url.ajax, { @@ -2064,10 +2065,11 @@ }).fail( reject ).done( function( response ) { var iframe; - if ( '1' !== response ) + if ( '1' !== response ) { reject(); + } - iframe = $('').hide(); + iframe = $( '', { 'src': self.previewUrl(), 'title': api.l10n.previewIframeTitle } ).hide(); iframe.appendTo( self.container ); iframe.load( function() { self.triedLogin = true; @@ -2327,7 +2329,7 @@ url: api.settings.url.login }); - iframe = $('').appendTo( this.container ); + iframe = $( '', { 'src': api.settings.url.login, 'title': api.l10n.loginIframeTitle } ).appendTo( this.container ); messenger.targetWindow( iframe[0].contentWindow ); diff --git a/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php index 0443ba854e..73e343a9a9 100644 --- a/src/wp-admin/theme-install.php +++ b/src/wp-admin/theme-install.php @@ -260,7 +260,7 @@ if ( $tab ) {
diff --git a/src/wp-includes/js/customize-loader.js b/src/wp-includes/js/customize-loader.js index 07f21966a9..02ddc67bab 100644 --- a/src/wp-includes/js/customize-loader.js +++ b/src/wp-includes/js/customize-loader.js @@ -114,7 +114,7 @@ window.wp = window.wp || {}; // Dirty state of Customizer in iframe this.saved = new api.Value( true ); - this.iframe = $( '', { src: src }).appendTo( this.element ); + this.iframe = $( '', { 'src': src, 'title': Loader.settings.l10n.mainIframeTitle } ).appendTo( this.element ); this.iframe.one( 'load', this.loaded ); // Create a postMessage connection with the iframe. diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 2c5fa809c3..97fb68183f 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -389,13 +389,15 @@ function wp_default_scripts( &$scripts ) { $scripts->add( 'customize-views', "/wp-includes/js/customize-views.js", array( 'jquery', 'underscore', 'imgareaselect', 'customize-models' ), false, 1 ); $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base' ), false, 1 ); did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array( - 'activate' => __( 'Save & Activate' ), - 'save' => __( 'Save & Publish' ), - 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), - 'saved' => __( 'Saved' ), - 'cancel' => __( 'Cancel' ), - 'close' => __( 'Close' ), - 'cheatin' => __( 'Cheatin’ uh?' ), + 'activate' => __( 'Save & Activate' ), + 'save' => __( 'Save & Publish' ), + 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), + 'saved' => __( 'Saved' ), + 'cancel' => __( 'Cancel' ), + 'close' => __( 'Close' ), + 'cheatin' => __( 'Cheatin’ uh?' ), + 'previewIframeTitle' => __( 'Site Preview' ), + 'loginIframeTitle' => __( 'Session expired' ), // Used for overriding the file types allowed in plupload. 'allowedFiles' => __( 'Allowed Files' ), diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index d2eb765edf..ac52fba757 100644 --- a/src/wp-includes/theme.php +++ b/src/wp-includes/theme.php @@ -1963,7 +1963,8 @@ function _wp_customize_loader_settings() { 'isCrossDomain' => $cross_domain, 'browser' => $browser, 'l10n' => array( - 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), + 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), + 'mainIframeTitle' => __( 'Customizer' ), ), );