Make WordPress Core

Ticket #31687: 31687.2.diff

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

     
    21182118                tmpl = api.settings.documentTitleTmpl;
    21192119                title = tmpl.replace( '%s', documentTitle );
    21202120                document.title = title;
    2121                 if ( window !== window.parent ) {
    2122                         window.parent.document.title = document.title;
    2123                 }
     2121                api.trigger( 'title', title );
    21242122        };
    21252123
    21262124        /**
     
    27992797                                window.location = api.settings.url.activated;
    28002798                });
    28012799
     2800                // Pass titles to the parent
     2801                api.bind( 'title', function( newTitle ) {
     2802                        parent.send( 'title', newTitle );
     2803                });
     2804
    28022805                // Initialize the connection with the parent frame.
    28032806                parent.send( 'ready' );
    28042807
  • 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' );