wp_theme_json_data_theme
Filters the data provided by the theme for global styles and settings.
Usage
add_filter( 'wp_theme_json_data_theme', 'wp_kama_theme_json_data_filter' ); /** * Function for `wp_theme_json_data_theme` filter-hook. * * @param WP_Theme_JSON_Data $theme_json Class to access and update the underlying data. * * @return WP_Theme_JSON_Data */ function wp_kama_theme_json_data_filter( $theme_json ){ // filter... return $theme_json; }
- $theme_json(WP_Theme_JSON_Data)
- Class to access and update the underlying data.
Changelog
Since 6.1.0 | Introduced. |
Where the hook is called
wp_theme_json_data_theme
wp-includes/class-wp-theme-json-resolver.php 292
$theme_json = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) );