wp_theme_json_get_style_nodes
Filter HookDescription
Filters the list of style nodes with metadata. This allows for things like loading block CSS independently.Hook Information
File Location |
wp-includes/class-wp-theme-json.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2640 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$nodes
|
Style nodes with metadata. |
Usage Examples
Basic Usage
<?php
// Hook into wp_theme_json_get_style_nodes
add_filter('wp_theme_json_get_style_nodes', 'my_custom_filter', 10, 1);
function my_custom_filter($nodes) {
// Your custom filtering logic here
return $nodes;
}
Source Code Context
wp-includes/class-wp-theme-json.php:2640
- How this hook is used in WordPress core
<?php
2635 *
2636 * @since 6.1.0
2637 *
2638 * @param array $nodes Style nodes with metadata.
2639 */
2640 return apply_filters( 'wp_theme_json_get_style_nodes', $nodes );
2641 }
2642
2643 /**
2644 * A public helper to get the block nodes from a theme.json file.
2645 *
PHP Documentation
<?php
/**
* Filters the list of style nodes with metadata.
*
* This allows for things like loading block CSS independently.
*
* @since 6.1.0
*
* @param array $nodes Style nodes with metadata.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/class-wp-theme-json.php
Related Hooks
Related hooks will be displayed here in future updates.