From 2cdfbe49273a3a05a7ab7b8f73a080769551cdb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Thu, 15 Sep 2022 14:44:20 +0200 Subject: [PATCH] Add theme_json_ prefix to hook name --- src/wp-includes/class-wp-theme-json.php | 2 +- src/wp-includes/script-loader.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index 4e7c704cce16b..bfb659d2ed583 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -1873,7 +1873,7 @@ protected static function get_style_nodes( $theme_json, $selectors = array() ) { * * @param array $nodes Style nodes with metadata. */ - return apply_filters( 'get_style_nodes', $nodes ); + return apply_filters( 'theme_json_get_style_nodes', $nodes ); } /** diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 129375a098030..5b8a46f550db1 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -2406,7 +2406,7 @@ function wp_enqueue_global_styles() { * This removes the CSS from the global-styles stylesheet and adds it to the inline CSS for each block. */ if ( $separate_assets ) { - add_filter( 'get_style_nodes', 'wp_filter_out_block_nodes' ); + add_filter( 'theme_json_get_style_nodes', 'wp_filter_out_block_nodes' ); // Add each block as an inline css. wp_add_global_styles_for_blocks(); }