wp_theme_json_data_user хук-фильтрWP 6.1.0

Filters the data provided by the user for global styles & settings.

Использование

add_filter( 'wp_theme_json_data_user', 'wp_kama_theme_json_data_user_filter' );

/**
 * Function for `wp_theme_json_data_user` 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_user_filter( $theme_json ){

	// filter...
	return $theme_json;
}
$theme_json(WP_Theme_JSON_Data)
Class to access and update the underlying data.

Список изменений

С версии 6.1.0 Введена.

Где вызывается хук

WP_Theme_JSON_Resolver::get_user_data()
wp_theme_json_data_user
wp-includes/class-wp-theme-json-resolver.php 512
$theme_json = apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data( $config, 'custom' ) );
wp-includes/class-wp-theme-json-resolver.php 532
$theme_json   = apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data( $config, 'custom' ) );

Где используется хук в WordPress

Использование не найдено.