WP_Theme_JSON::resolve_variables( WP_Theme_JSON $theme_json ): WP_Theme_JSON

In this article

Resolves the values of CSS variables in the given styles.

Parameters

$theme_jsonWP_Theme_JSONrequired
The theme json resolver.

Return

WP_Theme_JSON The $theme_json with resolved variables.

Source

 * Unlike get_raw_data() this returns the presets flattened, as provided by a theme.
 * This also uses appearanceTools instead of their opt-ins if all of them are true.
 *
 * @since 6.0.0
 *
 * @return array
 */
public function get_data() {
	$output = $this->theme_json;
	$nodes  = static::get_setting_nodes( $output );

	/**
	 * Flatten the theme & custom origins into a single one.
	 *
	 * For example, the following:
	 *
	 * {
	 *   "settings": {

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

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