#62329 closed enhancement (fixed)
Theme JSON Resolver: remove theme json merge in resolve_theme_file_uri
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-patch, gutenberg-merge |
Focuses: | Cc: |
Description (last modified by )
A ticket to trac the syncing of Gutenberg PR https://github.com/WordPress/gutenberg/pull/66662
The change affects WP_Theme_JSON_Resolver::resolve_theme_file_uris()
.
When setting resolved URIs in an incoming theme json object, remove the unnecessary call to WP_Theme_JSON->merge()
.
Why?
WP_Theme_JSON_Resolver::resolve_theme_file_uris()
only needs to set values for paths in the raw theme json object.
It can then return a new theme object based on the updated JSON source. There's no need for a full and possibly expensive merge.
Change History (5)
This ticket was mentioned in PR #7698 on WordPress/wordpress-develop by @ramonopoly.
6 months ago
#2
#3
@
6 months ago
- Owner set to ramonopoly
- Resolution set to fixed
- Status changed from new to closed
In 59338:
@ramonopoly commented on PR #7698:
6 months ago
#4
Committed in r59338 / b6430c28f7f467d894475e01acf86e8dd8781f86
Note: See
TracTickets for help on using
tickets.
This PR syncs Gutenberg PR https://github.com/WordPress/gutenberg/pull/66662
The change affects
WP_Theme_JSON_Resolver::resolve_theme_file_uris()
.When setting resolved URIs in an incoming theme json object, remove the unnecessary call to
WP_Theme_JSON->merge()
.Why?
WP_Theme_JSON_Resolver::resolve_theme_file_uris()
only needs to set values for paths in the raw theme json object.It can then return a new theme object based on the updated JSON source. There's no need for a full and possibly expensive merge.
### Testing
There is existing test coverage. Tests should pass.
Trac ticket: https://core.trac.wordpress.org/ticket/62329