public static function get_theme_data( $deprecated = array
(),
$options = array
() ) { if ( !
empty( $deprecated ) ) { _deprecated_argument( __METHOD__, '5.9.0'
);
} $options =
wp_parse_args( $options, array
( 'with_supports' => true
) );
if ( null ===
static::
$theme || !
static::
has_same_registered_blocks( 'theme'
) ) { $wp_theme =
wp_get_theme();
$theme_json_file =
$wp_theme->
get_file_path( 'theme.json'
);
if ( is_readable( $theme_json_file ) ) { $theme_json_data =
static::
read_json_file( $theme_json_file );
$theme_json_data =
static::
translate( $theme_json_data,
$wp_theme->
get( 'TextDomain'
) );
} else { $theme_json_data = array
();
} /**
* Filters the data provided by the theme for global styles and settings.
*
* @since 6.1.0
*
* @param WP_Theme_JSON_Data $theme_json Class to access and update the underlying data.
*/