mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Block Editor: Fix for theme.json: color.duotone and spacing.units should allow empty sets.
This commit fixes an issue with the color.duotone & spacing.units in which empty values didn't override previous origins, resulting in that a theme couldn't provide an empty set for this via its theme.json. Props nosolosw, youknowriad, aristath. See #53175. git-svn-id: https://develop.svn.wordpress.org/trunk@51383 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1106,8 +1106,8 @@ class WP_Theme_JSON {
|
||||
foreach ( $nodes as $metadata ) {
|
||||
foreach ( $to_replace as $property_path ) {
|
||||
$path = array_merge( $metadata['path'], $property_path );
|
||||
$node = _wp_array_get( $incoming_data, $path, array() );
|
||||
if ( ! empty( $node ) ) {
|
||||
$node = _wp_array_get( $incoming_data, $path, null );
|
||||
if ( isset( $node ) ) {
|
||||
_wp_array_set( $this->theme_json, $path, $node );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user