Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove gutenberg_ prefix for theme_json_get_style_nodes filter #44949

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ protected static function get_style_nodes( $theme_json, $selectors = array() ) {
$nodes = array_merge( $nodes, static::get_block_nodes( $theme_json, $selectors ) );

// This filter allows us to modify the output of WP_Theme_JSON so that we can do things like loading block CSS independently.
return apply_filters( 'gutenberg_theme_json_get_style_nodes', $nodes );
return apply_filters( 'wp_theme_json_get_style_nodes', $nodes );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.1/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function gutenberg_enqueue_global_styles() {
* This removes the CSS from the global-styles stylesheet and adds it to the inline CSS for each block.
* This filter has to be registered before we call gutenberg_get_global_stylesheet();
*/
add_filter( 'gutenberg_theme_json_get_style_nodes', 'gutenberg_filter_out_block_nodes', 10, 1 );
add_filter( 'wp_theme_json_get_style_nodes', 'gutenberg_filter_out_block_nodes', 10, 1 );

$stylesheet = gutenberg_get_global_stylesheet();
if ( empty( $stylesheet ) ) {
Expand Down