mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@40036 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user