Make WordPress Core

Ticket #31687: 31687.3.diff

File 31687.3.diff, 1.8 KB (added by mattwiebe, 10 years ago)
  • wp-admin/js/customize-controls.js

     
    19291929
    19301930                        this.query = $.extend( params.query || {}, { customize_messenger_channel: this.channel() });
    19311931
     1932                        // This avoids SecurityErrors when setting a window object in x-origin iframe'd scenarios
     1933                        this.targetWindow.set = function( to ) {
     1934                                var from = this._value;
     1935
     1936                                to = this._setter.apply( this, arguments );
     1937                                to = this.validate( to );
     1938
     1939                                if ( null === to || from === to ) {
     1940                                        return this;
     1941                                }
     1942
     1943                                this._value = to;
     1944                                this._dirty = true;
     1945
     1946                                this.callbacks.fireWith( this, [ to, from ] );
     1947
     1948                                return this;
     1949                        };
     1950
    19321951                        this.run( deferred );
    19331952                },
    19341953
     
    21182137                tmpl = api.settings.documentTitleTmpl;
    21192138                title = tmpl.replace( '%s', documentTitle );
    21202139                document.title = title;
    2121                 if ( window !== window.parent ) {
    2122                         window.parent.document.title = document.title;
    2123                 }
     2140                api.trigger( 'title', title );
    21242141        };
    21252142
    21262143        /**
     
    27992816                                window.location = api.settings.url.activated;
    28002817                });
    28012818
     2819                // Pass titles to the parent
     2820                api.bind( 'title', function( newTitle ) {
     2821                        parent.send( 'title', newTitle );
     2822                });
     2823
    28022824                // Initialize the connection with the parent frame.
    28032825                parent.send( 'ready' );
    28042826
  • wp-includes/js/customize-loader.js

     
    155155                                Loader.saved( false );
    156156                        } );
    157157
     158                        this.messenger.bind( 'title', function( newTitle ){
     159                                window.document.title = newTitle;
     160                        });
     161
    158162                        this.pushState( src );
    159163
    160164                        this.trigger( 'open' );