Skip to content

Commit

Permalink
Theme JSON: replace top-level background style objects on merge (#66656)
Browse files Browse the repository at this point in the history
This commit fixes an omission in the theme json merge logic where top-level background image objects are not replaced, rather they are merged, which was the state of affairs before WordPress/gutenberg#64128

Co-authored-by: ramonjd <[email protected]>
Co-authored-by: andrewserong <[email protected]>

Source: WordPress/gutenberg@11e2d06
  • Loading branch information
ramonjd committed Nov 1, 2024
1 parent 83caf18 commit 9a0d27e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

### BEGIN AUTO-GENERATED DEFINES
define( 'GUTENBERG_VERSION', '19.6.0' );
define( 'GUTENBERG_GIT_COMMIT', '99d22755b4e92b5bc09856b2c14a9564fb6797fc' );
define( 'GUTENBERG_GIT_COMMIT', '11e2d06d86349b3cf4db40ec88988d66647f543a' );
### END AUTO-GENERATED DEFINES
defined( 'GUTENBERG_MINIMUM_WP_VERSION' ) or define( 'GUTENBERG_MINIMUM_WP_VERSION', '6.5' );

Expand Down
4 changes: 4 additions & 0 deletions lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -3297,6 +3297,10 @@ public function merge( $incoming ) {
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'];
/*
Expand Down

0 comments on commit 9a0d27e

Please sign in to comment.