WP_Theme_JSON::to_ruleset( string $selector, array $declarations ): string

In this article

Given a selector and a declaration list, creates the corresponding ruleset.

Parameters

$selectorstringrequired
CSS selector.
$declarationsarrayrequired
List of declarations.

Return

string The resulting CSS ruleset.

Source

		)
	);
}

foreach ( $base_style_rules as $base_style_rule ) {
	$declarations = array();

	if (
		isset( $base_style_rule['selector'] ) &&
		preg_match( $layout_selector_pattern, $base_style_rule['selector'] ) &&
		! empty( $base_style_rule['rules'] )
	) {
		foreach ( $base_style_rule['rules'] as $css_property => $css_value ) {
			if ( static::is_safe_css_declaration( $css_property, $css_value ) ) {

Changelog

VersionDescription
5.8.0Introduced.

User Contributed Notes

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