WP_Theme_JSON_Resolver::get_core_data() WordPress Method
The WP_Theme_JSON_Resolver::get_core_data() method is used to resolve data for a theme from the WordPress core. This is useful for theme developers who need to access data that is not normally exposed to the public.
WP_Theme_JSON_Resolver::get_core_data() #
Returns core’s origin config.
Return
(WP_Theme_JSON) Entity that holds core data.
Source
File: wp-includes/class-wp-theme-json-resolver.php
public static function get_core_data() {
if ( null !== static::$core ) {
return static::$core;
}
$config = static::read_json_file( __DIR__ . '/theme.json' );
$config = static::translate( $config );
static::$core = new WP_Theme_JSON( $config, 'default' );
return static::$core;
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 5.8.0 | Introduced. |