File: wp-includes/class-wp-theme-json.php
-
Processes a style node and returns the same node without the insecure styles.
-
Checks that a declaration provided by the user is safe.
-
Similar to get_settings_values_by_slug, but doesn’t compute the value.
-
Transforms a slug into a CSS Custom Property.
-
Returns the page templates of the active theme.
-
Returns the template part data of active theme.
-
Converts each style section into a list of rulesets containing the block styles to be appended to the stylesheet.
-
Creates new rulesets as classes for each preset value such as:
-
Function that scopes a selector with another one. This works a bit like SCSS nesting except the `&` operator isn’t supported.
-
Gets preset values keyed by slugs based on settings and metadata.
-
Enables some opt-in settings if theme declared support.
-
Enables some settings.
-
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:
-
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:
-
classWP_Theme_JSON
Class that encapsulates the processing of structures that adhere to the theme.json spec.
-
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.
-
Constructor.
-
Given a settings array, returns the generated rulesets for the preset classes.
-
Sanitizes the input according to the schemas.
-
Given the block settings, extracts the CSS Custom Properties for the presets and adds them to the $declarations array following the format:
-
Returns the metadata for each block.
-
Given a tree, removes the keys that are not present in the schema.