archive.html
WordPress core a2z
WordPress core only
Home
Blocks
Plugins
Themes
Sitemap
Blog
Block news
About
B
G
M
R
W
Home
»
J
API Letter:
J
WP_Theme_JSON::update_separator_declarations() – Returns a filtered declarations array if there is a separator block with only a background style defined in theme.json by adding a color attribute to reflect the changes in the front.
WP_REST_Server::get_json_encode_options() – Gets the encoding options passed to {@see wp_json_encode}.
rest_json_encode_options – filter
WP_Theme_JSON::set_spacing_sizes() – Sets the spacingSizes array based on the spacingScale values from theme.json.
WP_Theme_JSON::get_root_layout_rules() – Outputs the CSS for layout rules on the root.
WP_Theme_JSON::get_styles_for_block() – Gets the CSS rules for a particular block from theme.json.
WP_Theme_JSON::get_styles_block_nodes() – A public helper to get the block nodes from a theme.json file.
WP_Theme_JSON::get_block_nodes() – An internal method to get the block nodes from a theme.json file.
wp_theme_json_get_style_nodes – filter
WP_Theme_JSON::get_layout_styles() – Gets the CSS layout rules for a particular block from theme.json layout definitions.
WP_Theme_JSON::get_element_class_name() – Returns a class name by an element name.
wp_theme_json_data_user – filter
wp_theme_json_data_user – filter
WP_Theme_JSON_Resolver::remove_json_comments() – When given an array, this will remove any keys with the name `//`.
WP_Theme_JSON_Resolver::get_block_data() – Gets the styles for blocks from the block.json file.
wp_theme_json_data_blocks – filter
wp_theme_json_data_theme – filter
WP_Theme_JSON_Resolver::has_same_registered_blocks() – Checks whether the registered blocks were already processed for this origin.
wp_theme_json_data_default – filter
WP_Theme_JSON_Data::get_data() – Returns an array containing the underlying data following the theme.json specification.
WP_Theme_JSON_Data::update_with() – Updates the theme.json with the the given data.
WP_Theme_JSON_Data
WP_Theme_JSON_Data
WP_Theme_JSON_Data::__construct() – Constructor.
Services_JSON
wp-includes/blocks/blocks-json.php
_wp_theme_json_webfonts_handler() – Runs the theme.json webfonts handler.
WP_Theme_JSON::get_data() – Returns a valid theme.json as provided by a theme.
WP_Theme_JSON::get_patterns() – Returns the current theme’s wanted patterns(slugs) to be registered from Pattern Directory.
WP_Theme_JSON::get_metadata_boolean() – For metadata values that can either be booleans or paths to booleans, gets the value.
WP_Theme_JSON_Resolver::get_style_variations() – Returns the style variations defined by the theme.
WP_Theme_JSON::get_svg_filters() – Converts all filter (duotone) presets into SVGs.
wp_json_file_decode() – Reads and decodes a JSON file.
WP_Theme_JSON::is_safe_css_declaration() – Checks that a declaration provided by the user is safe.
WP_Theme_JSON::remove_insecure_styles() – Processes a style node and returns the same node without the insecure styles.
WP_Theme_JSON::remove_insecure_settings() – Processes a setting node and returns the same node without the insecure settings.
WP_Theme_JSON::filter_slugs() – Removes the preset values whose slug is equal to any of given slugs.
WP_Theme_JSON::remove_insecure_properties() – Removes insecure data from theme.json.
WP_Theme_JSON::get_name_from_defaults() – Gets a `default`’s preset name by a provided slug.
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::should_override_preset() – Returns whether a presets should be overridden or not.
WP_Theme_JSON::replace_slug_in_string() – Transform a slug into a CSS Custom Property.
WP_Theme_JSON::get_settings_slugs() – Similar to get_settings_values_by_slug, but doesn’t compute the value.
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.
WP_Theme_JSON::get_settings_values_by_slug() – Gets preset values keyed by slugs based on settings and metadata.
WP_Theme_JSON::get_preset_classes() – Creates new rulesets as classes for each preset value such as:
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_custom_templates() – Returns the page templates of the current theme.
WP_Theme_JSON::get_template_parts() – Returns the template part data of current theme.
WP_Theme_JSON::do_opt_in_into_settings() – Enables some settings.
WP_Theme_JSON::maybe_opt_in_into_settings() – Enables some opt-in settings if theme declared support.
WP_Theme_JSON_Schema::rename_settings() – Processes a settings array, renaming or moving properties.
WP_Theme_JSON_Schema::unset_setting_by_path() – Removes a property from within the provided settings by its path.
WP_Theme_JSON_Schema::migrate_v1_to_v2() – Removes the custom prefixes for a few properties that were part of v1:
WP_Theme_JSON_Schema::rename_paths() – Processes the settings subtree.
WP_Theme_JSON_Schema
WP_Theme_JSON_Schema
WP_Theme_JSON_Schema::migrate() – Function that migrates a given theme.json structure to the last version.
WP_Theme_JSON_Resolver::get_user_global_styles_post_id() – Returns the ID of the custom post type that stores user data.
WP_Theme_JSON_Resolver::get_user_data() – Returns the user’s origin config.
WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles() – Returns the custom post type that contains the user’s origin config for the active theme or a void array if none are found.
Services_JSON_Error
WP_Theme_JSON::get_raw_data() – Returns the raw data.
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::merge() – Merges new incoming data.
WP_Theme_JSON::get_style_nodes() – Builds metadata for the style nodes, which returns in the form of:
WP_Theme_JSON::get_setting_nodes() – Builds metadata for the setting nodes, which returns in the form of:
WP_Theme_JSON::get_property_value() – Returns the style property for the given path.
WP_Theme_JSON::has_properties() – Whether the metadata contains a key named properties.
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::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::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_preset_classes() – Given a settings array, it returns the generated rulesets for the preset classes.
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::append_to_selector() – Appends a sub-selector to an existing one.
WP_Theme_JSON::get_css_variables() – Converts each styles section into a list of rulesets to be appended to the stylesheet.
WP_Theme_JSON::to_ruleset() – Given a selector and a declaration list, creates the corresponding ruleset.
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_stylesheet() – Returns the stylesheet that results of processing the theme.json structure this object represents.
WP_Theme_JSON::remove_keys_not_in_schema() – Given a tree, removes the keys that are not present in the schema.
WP_Theme_JSON::get_settings() – Returns the existing settings for each block.
WP_Theme_JSON::get_blocks_metadata() – Returns the metadata for each block.
WP_Theme_JSON::sanitize() – Sanitizes the input according to the schemas.
WP_Theme_JSON
WP_Theme_JSON
WP_Theme_JSON::__construct() – Constructor.
WP_Theme_JSON_Resolver::clean_cached_data() – Cleans the cached data so it can be recalculated.
WP_Theme_JSON_Resolver::theme_has_support() – Determines whether the active theme has a theme.json file.
WP_Theme_JSON_Resolver::get_file_path_from_theme() – Builds the path to the given file and checks that it is readable.
WP_Theme_JSON_Resolver::get_merged_data() – Returns the data merged from multiple origins.
WP_Theme_JSON_Resolver::get_theme_data() – Returns the theme’s data.
WP_Theme_JSON_Resolver::translate() – Given a theme.json structure modifies it in place to update certain values by its translated strings according to the language set by the user.
WP_Theme_JSON_Resolver::get_core_data() – Returns core’s origin config.
WP_Theme_JSON_Resolver::translate_theme_json_chunk() – Translates a chunk of the loaded theme.json structure.
WP_Theme_JSON_Resolver::extract_paths_to_translate() – Converts a tree as in i18n-theme.json into a linear array containing metadata to translate a theme.json file.
WP_Theme_JSON_Resolver::get_fields_to_translate() – Returns a data structure used in theme.json translation.
WP_Theme_JSON_Resolver
WP_Theme_JSON_Resolver
WP_Theme_JSON_Resolver::read_json_file() – Processes a file that adheres to the theme.json schema and returns an array with its contents, or a void array if none found.
Requests_Cookie_Jar
WP_REST_Request::is_json_content_type() – Checks if the request has specified a JSON content-type.
1
2
3
Next Page
Search
Search