Customizer: Add title attributes to iframes.
props afercia. fixes #31202. git-svn-id: https://develop.svn.wordpress.org/trunk@31704 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2f41519c46
commit
4aeeb0e0f0
@ -2023,7 +2023,7 @@
|
||||
response = response.slice( 0, index ) + response.slice( index + signature.length );
|
||||
|
||||
// Create the iframe and inject the html content.
|
||||
self.iframe = $('<iframe />').appendTo( self.container );
|
||||
self.iframe = $( '<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 = $('<iframe src="' + self.previewUrl() + '" />').hide();
|
||||
iframe = $( '<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 = $('<iframe src="' + api.settings.url.login + '" />').appendTo( this.container );
|
||||
iframe = $( '<iframe />', { 'src': api.settings.url.login, 'title': api.l10n.loginIframeTitle } ).appendTo( this.container );
|
||||
|
||||
messenger.targetWindow( iframe[0].contentWindow );
|
||||
|
||||
|
@ -260,7 +260,7 @@ if ( $tab ) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="wp-full-overlay-main">
|
||||
<iframe src="{{ data.preview_url }}" />
|
||||
<iframe src="{{ data.preview_url }}" title="<?php esc_attr_e( 'Preview' ); ?>" />
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
@ -114,7 +114,7 @@ window.wp = window.wp || {};
|
||||
// Dirty state of Customizer in iframe
|
||||
this.saved = new api.Value( true );
|
||||
|
||||
this.iframe = $( '<iframe />', { src: src }).appendTo( this.element );
|
||||
this.iframe = $( '<iframe />', { 'src': src, 'title': Loader.settings.l10n.mainIframeTitle } ).appendTo( this.element );
|
||||
this.iframe.one( 'load', this.loaded );
|
||||
|
||||
// Create a postMessage connection with the iframe.
|
||||
|
@ -396,6 +396,8 @@ function wp_default_scripts( &$scripts ) {
|
||||
'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' ),
|
||||
|
@ -1964,6 +1964,7 @@ function _wp_customize_loader_settings() {
|
||||
'browser' => $browser,
|
||||
'l10n' => array(
|
||||
'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
|
||||
'mainIframeTitle' => __( 'Customizer' ),
|
||||
),
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user