Make WordPress Core

Opened 6 months ago

Closed 6 months ago

Last modified 3 months ago

#62328 closed defect (bug) (fixed)

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

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

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.


6 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
6 months ago

  • Milestone changed from Awaiting Review to 6.8

#3 @ramonopoly
6 months ago

  • Owner set to ramonopoly
  • Resolution set to fixed
  • Status changed from new to closed

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:


6 months ago
#4

Committed in r59335 / b1b5761

#5 @joemcgill
3 months ago

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