From 54d1631126836cbd5b27576f2297fd9849408a76 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 22 Jan 2018 06:32:41 +0000 Subject: [PATCH] Customize: Use changeset-specific "locked" messages when branching is enabled. Props dlh. See #39896. Fixes #42655 for 4.9 branch. Built from https://develop.svn.wordpress.org/branches/4.9@42539 git-svn-id: http://core.svn.wordpress.org/branches/4.9@42368 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 22 ++++++++++++++++++---- wp-includes/version.php | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index b2eee1c8fa..2f828a4ef5 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -3939,6 +3939,22 @@ final class WP_Customize_Manager { * @since 4.1.0 */ public function render_control_templates() { + if ( $this->branching() ) { + $l10n = array( + /* translators: %s: User who is customizing the changeset in customizer. */ + 'locked' => __( '%s is already customizing this changeset. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ), + /* translators: %s: User who is customizing the changeset in customizer. */ + 'locked_allow_override' => __( '%s is already customizing this changeset. Do you want to take over?' ), + ); + } else { + $l10n = array( + /* translators: %s: User who is customizing the changeset in customizer. */ + 'locked' => __( '%s is already customizing this site. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ), + /* translators: %s: User who is customizing the changeset in customizer. */ + 'locked_allow_override' => __( '%s is already customizing this site. Do you want to take over?' ), + ); + } + foreach ( $this->registered_control_types as $control_type ) { $control = new $control_type( $this, 'temp', array( 'settings' => array(), @@ -4101,13 +4117,11 @@ final class WP_Customize_Manager { {{{ data.message }}} <# } else if ( data.allowOverride ) { #> <# } else { #> <# } #>

diff --git a/wp-includes/version.php b/wp-includes/version.php index 0ca3b66f48..825694315b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9.3-alpha-42537'; +$wp_version = '4.9.3-alpha-42539'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.