Make WordPress Core

Changeset 31704


Ignore:
Timestamp:
03/10/2015 09:19:14 PM (10 years ago)
Author:
ocean90
Message:

Customizer: Add title attributes to iframes.

props afercia.
fixes #31202.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-controls.js

    r31698 r31704  
    20242024
    20252025                // Create the iframe and inject the html content.
    2026                 self.iframe = $('<iframe />').appendTo( self.container );
     2026                self.iframe = $( '<iframe />', { 'title': api.l10n.previewIframeTitle } ).appendTo( self.container );
    20272027
    20282028                // Bind load event after the iframe has been added to the page;
     
    20562056            };
    20572057
    2058             if ( this.triedLogin )
     2058            if ( this.triedLogin ) {
    20592059                return reject();
     2060            }
    20602061
    20612062            // Check if we have an admin cookie.
     
    20652066                var iframe;
    20662067
    2067                 if ( '1' !== response )
     2068                if ( '1' !== response ) {
    20682069                    reject();
    2069 
    2070                 iframe = $('<iframe src="' + self.previewUrl() + '" />').hide();
     2070                }
     2071
     2072                iframe = $( '<iframe />', { 'src': self.previewUrl(), 'title': api.l10n.previewIframeTitle } ).hide();
    20712073                iframe.appendTo( self.container );
    20722074                iframe.load( function() {
     
    23282330            });
    23292331
    2330             iframe = $('<iframe src="' + api.settings.url.login + '" />').appendTo( this.container );
     2332            iframe = $( '<iframe />', { 'src': api.settings.url.login, 'title': api.l10n.loginIframeTitle } ).appendTo( this.container );
    23312333
    23322334            messenger.targetWindow( iframe[0].contentWindow );
  • trunk/src/wp-admin/theme-install.php

    r31497 r31704  
    261261    </div>
    262262    <div class="wp-full-overlay-main">
    263         <iframe src="{{ data.preview_url }}" />
     263        <iframe src="{{ data.preview_url }}" title="<?php esc_attr_e( 'Preview' ); ?>" />
    264264    </div>
    265265</script>
  • trunk/src/wp-includes/js/customize-loader.js

    r30306 r31704  
    115115            this.saved = new api.Value( true );
    116116
    117             this.iframe = $( '<iframe />', { src: src }).appendTo( this.element );
     117            this.iframe = $( '<iframe />', { 'src': src, 'title': Loader.settings.l10n.mainIframeTitle } ).appendTo( this.element );
    118118            this.iframe.one( 'load', this.loaded );
    119119
  • trunk/src/wp-includes/script-loader.php

    r31597 r31704  
    390390    $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base' ), false, 1 );
    391391    did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array(
    392         'activate'  => __( 'Save &amp; Activate' ),
    393         'save'      => __( 'Save &amp; Publish' ),
    394         'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
    395         'saved'     => __( 'Saved' ),
    396         'cancel'    => __( 'Cancel' ),
    397         'close'     => __( 'Close' ),
    398         'cheatin'   => __( 'Cheatin&#8217; uh?' ),
     392        'activate'           => __( 'Save &amp; Activate' ),
     393        'save'               => __( 'Save &amp; Publish' ),
     394        'saveAlert'          => __( 'The changes you made will be lost if you navigate away from this page.' ),
     395        'saved'              => __( 'Saved' ),
     396        'cancel'             => __( 'Cancel' ),
     397        'close'              => __( 'Close' ),
     398        'cheatin'            => __( 'Cheatin&#8217; uh?' ),
     399        'previewIframeTitle' => __( 'Site Preview' ),
     400        'loginIframeTitle'   => __( 'Session expired' ),
    399401
    400402        // Used for overriding the file types allowed in plupload.
  • trunk/src/wp-includes/theme.php

    r31681 r31704  
    19641964        'browser'       => $browser,
    19651965        'l10n'          => array(
    1966             'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
     1966            'saveAlert'       => __( 'The changes you made will be lost if you navigate away from this page.' ),
     1967            'mainIframeTitle' => __( 'Customizer' ),
    19671968        ),
    19681969    );
Note: See TracChangeset for help on using the changeset viewer.