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

WordPress Trac noreply at wordpress.org
Mon Nov 4 02:32:41 UTC 2024


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

 * owner:  (none) => ramonopoly
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59338" 59338]:
 {{{
 #!CommitTicketReference repository="" revision="59338"
 Theme JSON Resolver: remove theme json merge in resolve_theme_file_uris

 This commit affects `WP_Theme_JSON_Resolver::resolve_theme_file_uris()`.

 When setting resolved URIs in an incoming theme json object, this commit
 removes 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.

 Follow-up to [61588].

 Props ramonopoly, aaronrobertshaw, andrewserong.
 Fixes #62329.
 }}}

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


More information about the wp-trac mailing list