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

/**
 * Returns the template part data of active theme.
 *
 * @since 5.9.0
 *
 * @return array
 */
public function get_template_parts() {
	$template_parts = array();
	if ( ! isset( $this->theme_json['templateParts'] ) || ! is_array( $this->theme_json['templateParts'] ) ) {
		return $template_parts;
	}

	foreach ( $this->theme_json['templateParts'] as $item ) {

Changelog

VersionDescription
5.8.0Introduced.

User Contributed Notes

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