File: wp-includes/class-wp-theme-json.php
-
Function that scopes a selector with another one. This works a bit like SCSS nesting except the `&` operator isn’t supported.
-
Enables some opt-in settings if theme declared support.
-
Enables some settings.
-
Given a tree, it creates a flattened one by merging the keys and binding the leaf values to the new keys.
-
Given a styles array, it extracts the style properties and adds them to the $declarations array following the format:
-
Whether the metadata contains a key named properties.
-
Returns the style property for the given path.
-
Builds metadata for the setting nodes, which returns in the form of:
-
Builds metadata for the style nodes, which returns in the form of:
-
methodWP_Theme_JSON::merge()
Merges new incoming data.
-
Returns the raw data.
-
Transforms the given editor settings according the add_theme_support format to the theme.json format.
-
Given an array of settings, extracts the CSS Custom Properties for the custom values and adds them to the $declarations array following the format:
-
classWP_Theme_JSON
Class that encapsulates the processing of structures that adhere to the theme.json spec.
-
Constructor.
-
Sanitizes the input according to the schemas.
-
Returns the metadata for each block.
-
Given a tree, removes the keys that are not present in the schema.
-
Returns the existing settings for each block.
-
Returns the stylesheet that results of processing the theme.json structure this object represents.
-
Converts each style section into a list of rulesets containing the block styles to be appended to the stylesheet.
-
Converts each styles section into a list of rulesets to be appended to the stylesheet.
-
Given a selector and a declaration list, creates the corresponding ruleset.
-
Appends a sub-selector to an existing one.
-
Given an array of presets keyed by origin and the value key of the preset, it returns an array where each key is the preset slug and each value the preset value.
-
Given a settings array, returns the generated rulesets for the preset classes.
-
Given the block settings, extracts the CSS Custom Properties for the presets and adds them to the $declarations array following the format: