Converts each styles section into a list of rulesets to be appended to the stylesheet.
Description
These rulesets contain all the css variables (custom variables and preset variables). See glossary at <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax">https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax</a> For each section this creates a new ruleset such as: block-selector {
--wp--preset--category--slug: value;
--wp--custom--variable: value;
}
Parameters
$nodesarray
Nodes with settings.
$originsstring[]
List of origins to process.
Return
string
The new stylesheet.
Uses · 4
_wp_array_get()Accesses an array in depth based on a path of keys.
static::compute_preset_vars()
static::compute_theme_vars()
static::to_ruleset()
Used by · 1
WP_Theme_JSON::get_stylesheet()Returns the stylesheet that results of processing the theme.json structure this object represents.
Signature, return type and hooks compared across 5 parsed releases.
5.9.0
Added the $origins parameter.from the docblock
5.8.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/class-wp-theme-json.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.