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; }


Top ↑

Parameters

$setting_nodes array Required
Nodes with settings.
$origins string[] Required
List of origins to process presets from.

Top ↑

Return

string The new stylesheet.


Top ↑

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;

Top ↑

Changelog

Changelog
Version Description
5.9.0 Introduced.

Top ↑

User Contributed Notes

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