[wp-trac] [WordPress Trac] #62329: Theme JSON Resolver: remove theme json merge in resolve_theme_file_uri

WordPress Trac noreply at wordpress.org
Fri Nov 1 06:06:46 UTC 2024


#62329: Theme JSON Resolver: remove theme json merge in resolve_theme_file_uri
---------------------------------------+---------------------
 Reporter:  ramonopoly                 |       Owner:  (none)
     Type:  enhancement                |      Status:  new
 Priority:  normal                     |   Milestone:  6.8
Component:  Themes                     |     Version:
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch gutenberg-merge  |     Focuses:
---------------------------------------+---------------------
Description changed by ramonopoly:

Old description:

> A ticket to trac the syncing of Gutenberg PR
> https://github.com/WordPress/gutenberg/pull/66662
>
> This affects `WP_Theme_JSON_Resolver::resolve_theme_file_uris()`.
>
> When setting resolved URIs in incoming theme.json, remove the unnecessary
> merge.
>
> The method only sets values for paths in the raw theme json object.
>
> There's no need for a full and possibly expensive merge.

New description:

 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.

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62329#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list