Title: wp_theme_json_get_style_nodes
Published: November 2, 2022
Last modified: May 20, 2026

---

# apply_filters( ‘wp_theme_json_get_style_nodes’, array $nodes )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#wp--skip-link--target)

Filters the list of style nodes with metadata.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#description)󠁿

This allows for things like loading block CSS independently.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#parameters)󠁿

 `$nodes`array

Style nodes with metadata.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'wp_theme_json_get_style_nodes', $nodes );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-theme-json.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-theme-json.php#L2702)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-theme-json.php#L2702-L2702)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Theme_JSON::get_style_nodes()](https://developer.wordpress.org/reference/classes/wp_theme_json/get_style_nodes/)`wp-includes/class-wp-theme-json.php` |

Builds metadata for the style nodes, which returns in the form of:

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_theme_json_get_style_nodes/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.1.0](https://developer.wordpress.org/reference/since/6.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_theme_json_get_style_nodes%2F)
before being able to contribute a note or feedback.