Converts each style section into a list of rulesets containing the block styles to be appended to the stylesheet.
Description
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 { style-property-one: value; }
Parameters
$style_nodesarray
Nodes with styles.
Return
string
The new stylesheet.
Uses · 1
static::get_styles_for_block()
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.
6.1.0
Moved most internal logic to get_styles_for_block().from the docblock
5.9.0
Renamed from get_block_styles() to get_block_classes() and no longer returns preset classes. Removed the $setting_nodes parameter.from the docblock
5.8.0
As get_block_styles().from the docblock
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 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.