Description
Checks whether a theme or its parent has a theme.json file. / function wp_theme_has_theme_json() { static $theme_has_support = array(); $stylesheet = get_stylesheet(); if ( isset( $theme_has_support[ $stylesheet ] ) && /* Ignore static cache when the development mode is set to 'theme', to avoid interfering with the theme developer's workflow.
Occurrences
Filename | Line Number |
---|---|
wp-includes/global-styles-and-settings.php | 434 |
wp-includes/class-wp-theme.php | 1624 |
wp-includes/link-template.php | 4654 |
PHP Doc
/**
* Checks whether a theme or its parent has a theme.json file.
*
* @since 6.2.0
*
* @return bool Returns true if theme or its parent has a theme.json file, false otherwise.
*/
function wp_theme_has_theme_json() {
static $theme_has_support = array();
$stylesheet = get_stylesheet();
if (
isset( $theme_has_support[ $stylesheet ] ) &&
/*
* Ignore static cache when the development mode is set to 'theme', to avoid interfering with
* the theme developer's workflow.
*/