wp-includes/class-wp-theme-json.php
Lines:
1 to 81 of 81
<?php /** * WP_Theme_JSON class * * @package WordPress * @subpackage Theme * @since 5.8.0 */ #[AllowDynamicProperties] /* class WP_Theme_JSON */ /* function WP_Theme_JSON::get_element_class_name() – Returns a class name by an element name. */ /* function WP_Theme_JSON::__construct() – Constructor. */ /* function WP_Theme_JSON::maybe_opt_in_into_settings() – Enables some opt-in settings if theme declared support. */ /* function WP_Theme_JSON::do_opt_in_into_settings() – Enables some settings. */ /* function WP_Theme_JSON::sanitize() – Sanitizes the input according to the schemas. */ /* function WP_Theme_JSON::append_to_selector() – Appends a sub-selector to an existing one. */ /* function WP_Theme_JSON::get_blocks_metadata() – Returns the metadata for each block. */ /* function WP_Theme_JSON::remove_keys_not_in_schema() – Given a tree, removes the keys that are not present in the schema. */ /* function WP_Theme_JSON::get_settings() – Returns the existing settings for each block. */ /* function WP_Theme_JSON::get_stylesheet() – Returns the stylesheet that results of processing the theme.json structure this object represents. */ /* function WP_Theme_JSON::get_custom_templates() – Returns the page templates of the current theme. */ /* function WP_Theme_JSON::get_template_parts() – Returns the template part data of current theme. */ /* function 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. */ /* function WP_Theme_JSON::get_layout_styles() – Gets the CSS layout rules for a particular block from theme.json layout definitions. */ /* function WP_Theme_JSON::get_preset_classes() – Creates new rulesets as classes for each preset value such as: */ /* function WP_Theme_JSON::get_css_variables() – Converts each styles section into a list of rulesets to be appended to the stylesheet. */ /* function WP_Theme_JSON::to_ruleset() – Given a selector and a declaration list, creates the corresponding ruleset. */ /* function WP_Theme_JSON::compute_preset_classes() – Given a settings array, it returns the generated rulesets for the preset classes. */ /* function WP_Theme_JSON::scope_selector() – Function that scopes a selector with another one. This works a bit like SCSS nesting except the `&` operator isn’t supported. */ /* function WP_Theme_JSON::get_settings_values_by_slug() – Gets preset values keyed by slugs based on settings and metadata. */ /* function WP_Theme_JSON::get_settings_slugs() – Similar to get_settings_values_by_slug, but doesn’t compute the value. */ /* function WP_Theme_JSON::replace_slug_in_string() – Transform a slug into a CSS Custom Property. */ /* function 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: */ /* function 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: */ /* function 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. */ /* function 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: */ /* function WP_Theme_JSON::get_property_value() – Returns the style property for the given path. */ /* function WP_Theme_JSON::get_setting_nodes() – Builds metadata for the setting nodes, which returns in the form of: */ /* function WP_Theme_JSON::get_style_nodes() – Builds metadata for the style nodes, which returns in the form of: */ /* function WP_Theme_JSON::get_styles_block_nodes() – A public helper to get the block nodes from a theme.json file. */ /* function WP_Theme_JSON::update_separator_declarations */ /* function WP_Theme_JSON::get_block_nodes() – An internal method to get the block nodes from a theme.json file. */ /* function WP_Theme_JSON::get_styles_for_block() – Gets the CSS rules for a particular block from theme.json. */ /* function WP_Theme_JSON::get_root_layout_rules() – Outputs the CSS for layout rules on the root. */ /* function WP_Theme_JSON::get_metadata_boolean() – For metadata values that can either be booleans or paths to booleans, gets the value. */ /* function WP_Theme_JSON::merge() – Merge new incoming data. */ /* function WP_Theme_JSON::get_svg_filters() – Converts all filter (duotone) presets into SVGs. */ /* function WP_Theme_JSON::should_override_preset() – Returns whether a presets should be overridden or not. */ /* function 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. */ /* function WP_Theme_JSON::get_name_from_defaults() – Get a `default`’s preset name by a provided slug. */ /* function WP_Theme_JSON::filter_slugs() – Removes the preset values whose slug is equal to any of given slugs. */ /* function WP_Theme_JSON::remove_insecure_properties() – Removes insecure data from theme.json. */ /* function WP_Theme_JSON::remove_insecure_settings() – Processes a setting node and returns the same node without the insecure settings. */ /* function WP_Theme_JSON::remove_insecure_styles() – Processes a style node and returns the same node without the insecure styles. */ /* function WP_Theme_JSON::is_safe_css_declaration() – Checks that a declaration provided by the user is safe. */ /* function WP_Theme_JSON::get_raw_data() – Returns the raw data. */ /* function WP_Theme_JSON::get_from_editor_settings() – Transforms the given editor settings according the add_theme_support format to the theme.json format. */ /* function WP_Theme_JSON::get_patterns() – Returns the current theme’s wanted patterns(slugs) to be registered from Pattern Directory. */ /* function WP_Theme_JSON::get_data() – Returns a valid theme.json as provided by a theme. */ /* function WP_Theme_JSON::set_spacing_sizes() – Sets the spacingSizes array based on the spacingScale values from theme.json. */