From 6e1fe24284a1722f85106b0730a14d15b03199cc Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 20 Feb 2017 06:50:50 +0000 Subject: [PATCH] Customize: Ensure root values are accessible in multidimensional custom setting types. Fixes bad conditions in `WP_Customize_Setting::get_root_value()` and `WP_Customize_Setting::set_root_value()`. Props dlh, westonruter. Amends [35007]. Merges [40036] to the 4.7 branch. See #32103. Fixes #36952. Built from https://develop.svn.wordpress.org/branches/4.7@40088 git-svn-id: http://core.svn.wordpress.org/branches/4.7@40025 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-setting.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp-customize-setting.php b/wp-includes/class-wp-customize-setting.php index 7f1f98ac3b..357836afeb 100644 --- a/wp-includes/class-wp-customize-setting.php +++ b/wp-includes/class-wp-customize-setting.php @@ -585,7 +585,7 @@ class WP_Customize_Setting { $id_base = $this->id_data['base']; if ( 'option' === $this->type ) { return get_option( $id_base, $default ); - } else if ( 'theme_mod' ) { + } elseif ( 'theme_mod' === $this->type ) { return get_theme_mod( $id_base, $default ); } else { /* @@ -614,7 +614,7 @@ class WP_Customize_Setting { $autoload = self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['autoload']; } return update_option( $id_base, $value, $autoload ); - } else if ( 'theme_mod' ) { + } elseif ( 'theme_mod' === $this->type ) { set_theme_mod( $id_base, $value ); return true; } else { diff --git a/wp-includes/version.php b/wp-includes/version.php index 4464aca0aa..6a9bb3d3b6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7.3-alpha-40087'; +$wp_version = '4.7.3-alpha-40088'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.