WP_Theme_JSON
Methods
1 to 30 of 42
- WP_Theme_JSON::append_to_selector() – Function that appends a sub-selector to a existing one.
- WP_Theme_JSON::compute_preset_classes() – Given a settings array, it returns the generated rulesets for the preset classes.
- WP_Theme_JSON::compute_preset_vars() – Given the block settings, it extracts the CSS Custom Properties for the presets and adds them to the $declarations array following the format:
- WP_Theme_JSON::compute_style_properties() – Given a styles array, it extracts the style properties and adds them to the $declarations array following the format:
- WP_Theme_JSON::compute_theme_vars() – Given an array of settings, it extracts the CSS Custom Properties for the custom values and adds them to the $declarations array following the format:
- WP_Theme_JSON::filter_slugs() – Removes the preset values whose slug is equal to any of given slugs.
- WP_Theme_JSON::flatten_tree() – Given a tree, it creates a flattened one by merging the keys and binding the leaf values to the new keys.
- WP_Theme_JSON::get_block_classes() – Converts each style section into a list of rulesets containing the block styles to be appended to the stylesheet.
- WP_Theme_JSON::get_block_styles() – Converts each style section into a list of rulesets containing the block styles to be appended to the stylesheet.
- WP_Theme_JSON::get_blocks_metadata() – Returns the metadata for each block.
- WP_Theme_JSON::get_css_variables() – Converts each styles section into a list of rulesets to be appended to the stylesheet.
- WP_Theme_JSON::get_custom_templates() – Returns the page templates of the current theme.
- WP_Theme_JSON::get_data() – Returns a valid theme.json as provided by a theme.
- WP_Theme_JSON::get_default_slugs() – Returns the default slugs for all the presets in an associative array whose keys are the preset paths and the leafs is the list of slugs.
- WP_Theme_JSON::get_from_editor_settings() – Transforms the given editor settings according the add_theme_support format to the theme.json format.
- WP_Theme_JSON::get_merged_preset_by_slug() – 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.
- WP_Theme_JSON::get_metadata_boolean() – For metadata values that can either be booleans or paths to booleans, gets the value.
- WP_Theme_JSON::get_name_from_defaults() – Get a `default`’s preset name by a provided slug.
- WP_Theme_JSON::get_patterns() – Returns the current theme’s wanted patterns(slugs) to be registered from Pattern Directory.
- WP_Theme_JSON::get_preset_classes() – Creates new rulesets as classes for each preset value such as:
- WP_Theme_JSON::get_property_value() – Returns the style property for the given path.
- WP_Theme_JSON::get_raw_data() – Returns the raw data.
- WP_Theme_JSON::get_setting_nodes() – Builds metadata for the setting nodes, which returns in the form of:
- WP_Theme_JSON::get_settings_slugs() – Similar to get_settings_values_by_slug, but doesn’t compute the value.
- WP_Theme_JSON::get_settings_values_by_slug() – Gets preset values keyed by slugs based on settings and metadata.
- WP_Theme_JSON::get_settings() – Returns the existing settings for each block.
- WP_Theme_JSON::get_style_nodes() – Builds metadata for the style nodes, which returns in the form of:
- WP_Theme_JSON::get_stylesheet() – Returns the stylesheet that results of processing the theme.json structure this object represents.
- WP_Theme_JSON::get_template_parts() – Returns the template part data of current theme.
- WP_Theme_JSON::has_properties() – Whether the metadata contains a key named properties.