wp_theme_json_data_theme
Filter HookDescription
Filters the data provided by the theme for global styles and settings.Hook Information
File Location |
wp-includes/class-wp-theme-json-resolver.php
View on GitHub
|
Hook Type | Filter |
Line Number | 292 |
Hook Parameters
Type | Name | Description |
---|---|---|
WP_Theme_JSON_Data
|
$theme_json
|
Class to access and update the underlying data. |
Usage Examples
Basic Usage
<?php
// Hook into wp_theme_json_data_theme
add_filter('wp_theme_json_data_theme', 'my_custom_filter', 10, 1);
function my_custom_filter($theme_json) {
// Your custom filtering logic here
return $theme_json;
}
Source Code Context
wp-includes/class-wp-theme-json-resolver.php:292
- How this hook is used in WordPress core
<?php
287 *
288 * @since 6.1.0
289 *
290 * @param WP_Theme_JSON_Data $theme_json Class to access and update the underlying data.
291 */
292 $theme_json = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) );
293
294 /*
295 * Backward compatibility for extenders returning a WP_Theme_JSON_Data
296 * compatible class that is not a WP_Theme_JSON_Data object.
297 */
PHP Documentation
<?php
/**
* Filters the data provided by the theme for global styles and settings.
*
* @since 6.1.0
*
* @param WP_Theme_JSON_Data $theme_json Class to access and update the underlying data.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/class-wp-theme-json-resolver.php
Related Hooks
Related hooks will be displayed here in future updates.