WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 248 | } |
| 249 | |
| 250 | /** |
| 251 | * Filters the data provided by the theme for global styles and settings. |
| 252 | * |
| 253 | * @since 6.1.0 |
| 254 | * |
| 255 | * @param WP_Theme_JSON_Data $theme_json Class to access and update the underlying data. |
| 256 | */ |
| 257 | $theme_json = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) ); |
| 258 | $theme_json_data = $theme_json->get_data(); |
| 259 | static::$theme = new WP_Theme_JSON( $theme_json_data ); |
| 260 | |
| 261 | if ( $wp_theme->parent() ) { |
| 262 | // Get parent theme.json. |
| 263 | $parent_theme_json_file = $wp_theme->parent()->get_file_path( 'theme.json' ); |
| 264 | if ( $theme_json_file !== $parent_theme_json_file && is_readable( $parent_theme_json_file ) ) { |
| 265 | $parent_theme_json_data = static::read_json_file( $parent_theme_json_file ); |
| 266 | $parent_theme_json_data = static::translate( $parent_theme_json_data, $wp_theme->parent()->get( 'TextDomain' ) ); |