mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Customize: Ensure that WP_Customize_Setting::value() can return a previewed value for aggregated multidimensionals.
Fixes #37294. git-svn-id: https://develop.svn.wordpress.org/trunk@37982 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -711,6 +711,11 @@ class WP_Customize_Setting {
|
||||
} elseif ( $this->is_multidimensional_aggregated ) {
|
||||
$root_value = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'];
|
||||
$value = $this->multidimensional_get( $root_value, $this->id_data['keys'], $this->default );
|
||||
|
||||
// Ensure that the post value is used if the setting is previewed, since preview filters aren't applying on cached $root_value.
|
||||
if ( $this->is_previewed ) {
|
||||
$value = $this->post_value( $value );
|
||||
}
|
||||
} else {
|
||||
$value = $this->get_root_value( $this->default );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user