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
This commit is contained in:
parent
222ee437fe
commit
e34ee2f25b
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue