From b95a8227d8d77db845d00ffc9b515fb0dfdf477e Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Wed, 1 Apr 2015 11:35:26 +0000 Subject: [PATCH] Customizer Theme Switcher: Fix invalid HTML markup when New Theme control is added. see #31203. Built from https://develop.svn.wordpress.org/trunk@31950 git-svn-id: http://core.svn.wordpress.org/trunk@31929 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-control.php | 7 ++----- wp-includes/class-wp-customize-manager.php | 10 ++++++---- wp-includes/version.php | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/wp-includes/class-wp-customize-control.php b/wp-includes/class-wp-customize-control.php index 46ce984586..de377d8fe2 100644 --- a/wp-includes/class-wp-customize-control.php +++ b/wp-includes/class-wp-customize-control.php @@ -1243,14 +1243,11 @@ class WP_Customize_Theme_Control extends WP_Customize_Control { class WP_Customize_New_Theme_Control extends WP_Customize_Control { /** - * Render the new control. + * Render the control content. * * @since 4.2.0 */ - public function render() { - if ( is_multisite() || ! current_user_can( 'install_themes') ) { - return; - } + public function render_content() { ?>
diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 0f449fc87a..4be5622382 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -1171,10 +1171,12 @@ final class WP_Customize_Manager { ) ) ); } - $this->add_control( new WP_Customize_New_Theme_Control( $this, 'add_theme', array( - 'section' => 'themes', - 'settings' => 'active_theme', - ) ) ); + if ( ! is_multisite() && current_user_can( 'install_themes' ) ) { + $this->add_control( new WP_Customize_New_Theme_Control( $this, 'add_theme', array( + 'section' => 'themes', + 'settings' => 'active_theme', + ) ) ); + } /* Site Title & Tagline */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 37337d00d3..4400ca368e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta3-31949'; +$wp_version = '4.2-beta3-31950'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.