Make WordPress Core

Opened 22 months ago

Closed 22 months ago

Last modified 18 months ago

#62328 closed defect (bug) (fixed)

Theme JSON: replace top-level background style objects on merge

Reported by: ramonopoly Owned by: ramonopoly
Priority: normal Milestone: 6.8
Component: Themes Version:
Severity: normal Keywords: has-patch, has-unit-tests, gutenberg-merge
Cc: Focuses:

Description

A PR to track the backporting of https://github.com/WordPress/wordpress-develop/pull/7697

The Gutenberg PR 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 https://github.com/WordPress/gutenberg/pull/64128

Blocks are already catered for via ::get_block_nodes().

Change History (5)

This ticket was mentioned in PR #7697 on WordPress/wordpress-develop by @ramonopoly.


22 months ago
#1

A PR that syncs the Gutenberg PR:

This PR fixes an omission in the theme json merge logic where top-level background image objects are not replaced, rather they are merged. Blocks are already catered for via ::get_block_nodes().

To test, run npm run test:php -- --filter=Tests_Theme_wpThemeJson

#2 @ramonopoly
22 months ago

  • Milestone Awaiting Review6.8

#3 @ramonopoly
22 months ago

  • Owner set to ramonopoly
  • Resolutionfixed
  • Status newclosed

In 59335:

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.

@ramonopoly commented on PR #7697:


22 months ago
#4

Committed in r59335 / b1b5761

#5 @joemcgill
18 months ago

  • Keywords has-patch has-unit-tests gutenberg-merge → has-patch, has-unit-tests, gutenberg-merge
Note: See TracTickets for help on using tickets.