Skip to content

Commit

Permalink
Replace get_theme_file_path in theme_has_support (#36398)
Browse files Browse the repository at this point in the history
* Replace get_theme_file_path in theme_has_support

* Use get_file_path_from_theme method
  • Loading branch information
Mamaduka authored Nov 15, 2021
1 parent ad47f05 commit 79ad6b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,10 @@ public static function get_user_custom_post_type_id() {
*/
public static function theme_has_support() {
if ( ! isset( self::$theme_has_support ) ) {
self::$theme_has_support = is_readable( get_theme_file_path( 'theme.json' ) );
self::$theme_has_support = (
is_readable( self::get_file_path_from_theme( 'theme.json' ) ) ||
is_readable( self::get_file_path_from_theme( 'theme.json', true ) )
);
}

return self::$theme_has_support;
Expand Down

0 comments on commit 79ad6b6

Please sign in to comment.