[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> global-styles-and-settings.php (summary)

APIs to interact with global settings & styles.

File Size: 613 lines (21 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 12 functions

  wp_get_global_settings()
  wp_get_global_styles()
  wp_get_global_stylesheet()
  wp_get_global_styles_custom_css()
  wp_add_global_styles_for_blocks()
  wp_get_block_name_from_theme_json_path()
  wp_theme_has_theme_json()
  wp_clean_theme_json_cache()
  wp_get_theme_directory_pattern_slugs()
  wp_get_theme_data_custom_templates()
  wp_get_theme_data_template_parts()
  wp_get_block_css_selector()

Functions
Functions that are not part of a class:

wp_get_global_settings( $path = array()   X-Ref
Gets the settings resulting of merging core, theme, and user data.

return: mixed The settings array or individual setting value to retrieve.
param: array $path    Path to the specific setting to retrieve. Optional.
param: array $context {

wp_get_global_styles( $path = array()   X-Ref
Gets the styles resulting of merging core, theme, and user data.

return: mixed The styles array or individual style value to retrieve.
param: array $path    Path to the specific style to retrieve. Optional.
param: array $context {

wp_get_global_stylesheet( $types = array()   X-Ref
Returns the stylesheet resulting of merging core, theme, and user data.

return: string Stylesheet.
param: array $types Optional. Types of styles to load.

wp_get_global_styles_custom_css()   X-Ref
Gets the global styles custom CSS from theme.json.

return: string The global styles custom CSS.

wp_add_global_styles_for_blocks()   X-Ref
Adds global style rules to the inline style for each block.


wp_get_block_name_from_theme_json_path( $path )   X-Ref
Gets the block name from a given theme.json path.

return: string Identified block name, or empty string if none found.
param: array $path An array of keys describing the path to a property in theme.json.

wp_theme_has_theme_json()   X-Ref
No description

wp_clean_theme_json_cache()   X-Ref
Cleans the caches under the theme_json group.


wp_get_theme_directory_pattern_slugs()   X-Ref
Returns the current theme's wanted patterns (slugs) to be
registered from Pattern Directory.

return: string[]

wp_get_theme_data_custom_templates()   X-Ref
Returns the metadata for the custom templates defined by the theme via theme.json.

return: array Associative array of `$template_name => $template_data` pairs,

wp_get_theme_data_template_parts()   X-Ref
Returns the metadata for the template parts defined by the theme.

return: array Associative array of `$part_name => $part_data` pairs,

wp_get_block_css_selector( $block_type, $target = 'root', $fallback = false )   X-Ref
Determines the CSS selector for the block type and property provided,
returning it if available.

return: string|null CSS selector or `null` if no selector available.
param: WP_Block_Type $block_type The block's type.
param: string|array  $target     The desired selector's target, `root` or array path.
param: boolean       $fallback   Whether to fall back to broader selector.



Generated : Wed Apr 24 08:20:01 2024 Cross-referenced by PHPXref