W3cubDocs

/WordPress

WP_Theme_JSON::compute_theme_vars( array $settings ): array

Given an array of settings, extracts the CSS Custom Properties for the custom values and adds them to the $declarations array following the format:

Description

array( ‘name’ => ‘property_name’, ‘value’ => ‘property_value, )

Parameters

$settingsarrayrequired
Settings to process.

Return

array The modified $declarations.

Source

							'.%s%s',
							$class_name,
							$base_style_rule['selector']
						);
						$block_rules    .= static::to_ruleset( $layout_selector, $declarations );
					}
				}
			}
		}
	}
	return $block_rules;
}

Changelog

Version Description
5.8.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_theme_json/compute_theme_vars