WP_Theme_JSON::get_preset_classes( array $setting_nodes, string[] $origins ): string
Creates new rulesets as classes for each preset value such as:
Description
.has-value-color { color: value; }
.has-value-background-color { background-color: value; }
.has-value-font-size { font-size: value; }
.has-value-gradient-background { background: value; }
p.has-value-gradient-background { background: value; }
Parameters
-
$setting_nodes
array Required -
Nodes with settings.
-
$origins
string[] Required -
List of origins to process presets from.
Return
string The new stylesheet.
Source
File: wp-includes/class-wp-theme-json.php
.
View all references
*
* .has-value-color {
* color: value;
* }
*
* .has-value-background-color {
* background-color: value;
* }
*
* .has-value-font-size {
* font-size: value;
* }
*
* .has-value-gradient-background {
* background: value;
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |