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
This commit is contained in:
parent
bc0cb365a3
commit
6e1fe24284
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue