[wp-trac] [WordPress Trac] #56975: Replace the internal `WP_Theme_JSON_Resolver::theme_has_support()` with a public function
WordPress Trac
noreply at wordpress.org
Tue Feb 14 13:55:15 UTC 2023
#56975: Replace the internal `WP_Theme_JSON_Resolver::theme_has_support()` with a
public function
-------------------------------------------------+-------------------------
Reporter: oandregal | Owner:
| hellofromTonya
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.2
Component: Themes | Version:
Severity: normal | Resolution: fixed
Keywords: gutenberg-merge has-patch has-unit- | Focuses:
tests has-testing-info | performance
-------------------------------------------------+-------------------------
Comment (by hellofromTonya):
Replying to [comment:122 spacedmonkey]:
> Now that we have `wp_theme_has_theme_json` in core, can we use in
`_wp_theme_json_webfonts_handler` and return early and skip this logic? CC
@hellofromTonya
@spacedmonkey @flixos90 if modifying `_wp_theme_json_webfonts_handler()`
provides a significant performance boost, then please open a new Trac
ticket for further discussion and analysis.
That said, I'm hesitant to touch this function. Why?
* The function is a temporary stopgap.
* The function will be deprecated and `add_action( 'plugins_loaded',
'_wp_theme_json_webfonts_handler' );` removed when the Fonts API is
introduced in Core, which is targeted for 6.3.
* The code is a backport from Gutenberg during 6.0.0.
Unless there's a big big performance boost, I'd prefer not to touch
`_wp_theme_json_webfonts_handler()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56975#comment:123>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list