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 |
---|---|
250 | $theme_json_data = static::translate( $theme_json_data, wp_get_theme()->get( 'TextDomain' ) ); |
251 |
|
252 | /** |
253 | * Filters the data provided by the theme for global styles and settings. |
254 | * |
255 | * @since 6.1.0 |
256 | * |
257 | * @param WP_Theme_JSON_Data Class to access and update the underlying data. |
258 | */ |
259 | $theme_json = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) ); |
260 | $theme_json_data = $theme_json->get_data(); |
261 | static::$theme = new WP_Theme_JSON( $theme_json_data ); |
262 | } |
263 |
|
264 | if ( wp_get_theme()->parent() ) { |
265 | // Get parent theme.json. |
266 | $parent_theme_json_data = static::read_json_file( static::get_file_path_from_theme( 'theme.json', true ) ); |
267 | $parent_theme_json_data = static::translate( $parent_theme_json_data, wp_get_theme()->parent()->get( 'TextDomain' ) ); |
268 | $parent_theme = new WP_Theme_JSON( $parent_theme_json_data ); |