[wp-trac] [WordPress Trac] #57814: Use `wp_theme_has_theme_json` in `_wp_theme_json_webfonts_handler`

WordPress Trac noreply at wordpress.org
Thu Mar 30 11:06:45 UTC 2023


#57814: Use `wp_theme_has_theme_json` in `_wp_theme_json_webfonts_handler`
------------------------------+---------------------------
 Reporter:  spacedmonkey      |       Owner:  spacedmonkey
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  6.3
Component:  Script Loader     |     Version:  6.0
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:  performance
------------------------------+---------------------------
Changes (by spacedmonkey):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55612" 55612]:
 {{{
 #!CommitTicketReference repository="" revision="55612"
 Script Loader: Return early in _wp_theme_json_webfonts_handler if
 theme.json not present.

 Check to see if the theme.json file exists before processing the rest of
 the code in `_wp_theme_json_webfonts_handler`. This improves performance
 by not trying to parse the theme.json, early in the bootstrap process.

 Props spacedmonkey, hellofromTonya, flixos90.
 Fixes #57814.
 }}}

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


More information about the wp-trac mailing list