From 5d3bf61e3b7679338534e78dbc1d26c8238f9633 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Sun, 1 May 2016 19:53:13 +0000 Subject: [PATCH] Customize: Don't auto-close the customizer when a new theme is activated. Props celloexpressions. Fixes #35320. git-svn-id: https://develop.svn.wordpress.org/trunk@37339 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/customize-controls.js | 11 ----------- src/wp-includes/js/customize-loader.js | 6 ------ 2 files changed, 17 deletions(-) diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index fad1087b3d..d5f2a0fb04 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -3722,17 +3722,6 @@ }); } ); - /* - * When activated, let the loader handle redirecting the page. - * If no loader exists, redirect the page ourselves (if a url exists). - */ - api.bind( 'activated', function() { - if ( parent.targetWindow() ) - parent.send( 'activated', api.settings.url.activated ); - else if ( api.settings.url.activated ) - window.location = api.settings.url.activated; - }); - // Pass titles to the parent api.bind( 'title', function( newTitle ) { parent.send( 'title', newTitle ); diff --git a/src/wp-includes/js/customize-loader.js b/src/wp-includes/js/customize-loader.js index f853f37d85..e7b411df30 100644 --- a/src/wp-includes/js/customize-loader.js +++ b/src/wp-includes/js/customize-loader.js @@ -150,12 +150,6 @@ window.wp = window.wp || {}; // Prompt AYS dialog when navigating away $( window ).on( 'beforeunload', this.beforeunload ); - this.messenger.bind( 'activated', function( location ) { - if ( location ) { - window.location = location; - } - }); - this.messenger.bind( 'saved', function () { Loader.saved( true ); } );