Theme JSON: replace top-level background style objects on merge
This commit fixes an omission in the logic of `WP_Theme_JSON::merge()` where top-level background image style objects are not replaced, rather they are merged. Because background images are self contained objects, their properties are unique and should not be merged. Blocks are already catered for via `WP_Theme_JSON::get_block_nodes()`. Follow-up to [61858]. Props ramonopoly, andrewserong. Fixes #62328. Built from https://develop.svn.wordpress.org/trunk@59335 git-svn-id: http://core.svn.wordpress.org/trunk@58721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
91822bf70c
commit
3026f3f46d
|
@ -3268,6 +3268,10 @@ class WP_Theme_JSON {
|
|||
array(),
|
||||
array( 'include_node_paths_only' => true )
|
||||
);
|
||||
|
||||
// Add top-level styles.
|
||||
$style_nodes[] = array( 'path' => array( 'styles' ) );
|
||||
|
||||
foreach ( $style_nodes as $style_node ) {
|
||||
$path = $style_node['path'];
|
||||
/*
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59334';
|
||||
$wp_version = '6.8-alpha-59335';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue