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.


Top ↑

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;
	}


Top ↑

Changelog

Changelog
VersionDescription
5.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.