Skip to content

Commit fc639bc

Browse files
committed
6.2: substitute WP_Theme_JSON_Resolver::theme_has_support
by wp_theme_has_theme_json() #45168
1 parent f4c6c01 commit fc639bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/class-wp-theme-json-resolver.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public static function get_theme_data( $deprecated = array(), $options = array()
286286
* and merge the static::$theme upon that.
287287
*/
288288
$theme_support_data = WP_Theme_JSON_Gutenberg::get_from_editor_settings( get_default_block_editor_settings() );
289-
if ( ! static::theme_has_support() ) {
289+
if ( ! wp_theme_has_theme_json() ) {
290290
if ( ! isset( $theme_support_data['settings']['color'] ) ) {
291291
$theme_support_data['settings']['color'] = array();
292292
}
@@ -407,11 +407,11 @@ public static function get_user_data_from_wp_global_styles( $theme, $create_post
407407
/*
408408
* Bail early if the theme does not support a theme.json.
409409
*
410-
* Since WP_Theme_JSON_Resolver::theme_has_support() only supports the active
410+
* Since wp_theme_has_theme_json() only supports the active
411411
* theme, the extra condition for whether $theme is the active theme is
412412
* present here.
413413
*/
414-
if ( $theme->get_stylesheet() === get_stylesheet() && ! static::theme_has_support() ) {
414+
if ( $theme->get_stylesheet() === get_stylesheet() && ! wp_theme_has_theme_json() ) {
415415
return array();
416416
}
417417

0 commit comments

Comments
 (0)