From e34ee2f25b69baa36075bc47e853b355e84b5cb3 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 1 Feb 2017 01:40:52 +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. Amends [35007]. See #32103. Fixes #36952. Built from https://develop.svn.wordpress.org/trunk@40036 git-svn-id: http://core.svn.wordpress.org/trunk@39973 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 f89797425c..83a5b76d61 100644 --- a/wp-includes/class-wp-customize-setting.php +++ b/wp-includes/class-wp-customize-setting.php @@ -587,7 +587,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 { /* @@ -616,7 +616,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 0aa5d17d3e..2b338efcd0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40035'; +$wp_version = '4.8-alpha-40036'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.