WP_Theme_JSON_Resolver::theme_has_support()

Whether the current theme has a theme.json file.


Return

(bool)


Top ↑

Source

File: wp-includes/class-wp-theme-json-resolver.php

	public static function theme_has_support() {
		if ( ! isset( self::$theme_has_support ) ) {
			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;
	}


Top ↑

Changelog

Changelog
Version Description
5.9.0 Added a check in the parent theme.
5.8.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.