Skip to content

Commit

Permalink
6.2: substitute WP_Theme_JSON_Resolver::theme_has_support
Browse files Browse the repository at this point in the history
by wp_theme_has_theme_json()

#45168
  • Loading branch information
oandregal committed Dec 22, 2022
1 parent f4c6c01 commit fc639bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/class-wp-theme-json-resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public static function get_theme_data( $deprecated = array(), $options = array()
* and merge the static::$theme upon that.
*/
$theme_support_data = WP_Theme_JSON_Gutenberg::get_from_editor_settings( get_default_block_editor_settings() );
if ( ! static::theme_has_support() ) {
if ( ! wp_theme_has_theme_json() ) {
if ( ! isset( $theme_support_data['settings']['color'] ) ) {
$theme_support_data['settings']['color'] = array();
}
Expand Down Expand Up @@ -407,11 +407,11 @@ public static function get_user_data_from_wp_global_styles( $theme, $create_post
/*
* Bail early if the theme does not support a theme.json.
*
* Since WP_Theme_JSON_Resolver::theme_has_support() only supports the active
* Since wp_theme_has_theme_json() only supports the active
* theme, the extra condition for whether $theme is the active theme is
* present here.
*/
if ( $theme->get_stylesheet() === get_stylesheet() && ! static::theme_has_support() ) {
if ( $theme->get_stylesheet() === get_stylesheet() && ! wp_theme_has_theme_json() ) {
return array();
}

Expand Down

0 comments on commit fc639bc

Please sign in to comment.