From 026cd70e25b90f04c27a21eaf634048945848398 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 22 Jan 2018 06:48:51 +0000 Subject: [PATCH] Customize: Prevent frontend previewing from causing a customization lock on the changeset. Props dlh. Amends [41839]. See #42024. Fixes #42975. git-svn-id: https://develop.svn.wordpress.org/trunk@42541 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-manager.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index a95085e109..bc215fef56 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -607,8 +607,11 @@ final class WP_Customize_Manager { * enabled, then a new UUID will be generated. * * @since 4.9.0 + * @global string $pagenow */ public function establish_loaded_changeset() { + global $pagenow; + if ( empty( $this->_changeset_uuid ) ) { $changeset_uuid = null; @@ -637,7 +640,9 @@ final class WP_Customize_Manager { $this->_changeset_uuid = $changeset_uuid; } - $this->set_changeset_lock( $this->changeset_post_id() ); + if ( is_admin() && 'customize.php' === $pagenow ) { + $this->set_changeset_lock( $this->changeset_post_id() ); + } } /**