wp_theme_json_data_default
Filter HookDescription
Filters the default data provided by WordPress for global styles & settings.Hook Information
File Location |
wp-includes/class-wp-theme-json-resolver.php
View on GitHub
|
Hook Type | Filter |
Line Number | 175 |
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_default
add_filter('wp_theme_json_data_default', '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:175
- How this hook is used in WordPress core
<?php
170 *
171 * @since 6.1.0
172 *
173 * @param WP_Theme_JSON_Data $theme_json Class to access and update the underlying data.
174 */
175 $theme_json = apply_filters( 'wp_theme_json_data_default', new WP_Theme_JSON_Data( $config, 'default' ) );
176
177 /*
178 * Backward compatibility for extenders returning a WP_Theme_JSON_Data
179 * compatible class that is not a WP_Theme_JSON_Data object.
180 */
PHP Documentation
<?php
/**
* Filters the default data provided by WordPress for global styles & 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.