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

WordPress Trac noreply at wordpress.org
Mon Feb 27 18:04:52 UTC 2023


#57814: Use `wp_theme_has_theme_json` in `_wp_theme_json_webfonts_handler`
---------------------------+-----------------------------
 Reporter:  spacedmonkey   |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Script Loader  |    Version:  6.0
 Severity:  normal         |   Keywords:
  Focuses:  performance    |
---------------------------+-----------------------------
 Follow on ticket from #56975.

 _wp_theme_json_webfonts_handler is used to register font is theme.json is
 present. However, not all themes have theme.json. Use
 `wp_theme_has_theme_json` function to end processing early if not
 theme.json is present.

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


More information about the wp-trac mailing list