wp_get_global_styles
wp_get_global_styles ( $path = array(), $context = array() )
Parameters:- (array) path Path to the specific style to retrieve. Optional. If empty, will return all styles.
- (array) context { Metadata to know where to retrieve the $path from. Optional. @type string $block_name Which block to retrieve the styles from. If empty, it'll return the styles for the global context. @type string $origin Which origin to take data from. Valid values are 'all' (core, theme, and user) or 'base' (core and theme). If empty or unknown, 'all' is used. @type array $transforms Which transformation(s) to apply. Valid value is array( 'resolve-variables' ). If defined, variables are resolved to their value in the styles. }
Returns:- (mixed) The styles array or individual style value to retrieve.
Defined at:Change Log: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Gets the styles resulting of merging core, theme, and user data.