Make WordPress Core

Ticket #35320: 35320.diff

File 35320.diff, 1.3 KB (added by celloexpressions, 7 years ago)

Don't auto-close the customizer when a new theme is activated.

  • src/wp-admin/js/customize-controls.js

     
    37323732                        });
    37333733                } );
    37343734
    3735                 /*
    3736                  * When activated, let the loader handle redirecting the page.
    3737                  * If no loader exists, redirect the page ourselves (if a url exists).
    3738                  */
    3739                 api.bind( 'activated', function() {
    3740                         if ( parent.targetWindow() )
    3741                                 parent.send( 'activated', api.settings.url.activated );
    3742                         else if ( api.settings.url.activated )
    3743                                 window.location = api.settings.url.activated;
    3744                 });
    3745 
    37463735                // Pass titles to the parent
    37473736                api.bind( 'title', function( newTitle ) {
    37483737                        parent.send( 'title', newTitle );
  • src/wp-includes/js/customize-loader.js

     
    150150                        // Prompt AYS dialog when navigating away
    151151                        $( window ).on( 'beforeunload', this.beforeunload );
    152152
    153                         this.messenger.bind( 'activated', function( location ) {
    154                                 if ( location ) {
    155                                         window.location = location;
    156                                 }
    157                         });
    158 
    159153                        this.messenger.bind( 'saved', function () {
    160154                                Loader.saved( true );
    161155                        } );