Skip to content

Commit

Permalink
Removes "we" from inline docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hellofromtonya authored and ockham committed Oct 4, 2022
1 parent d255132 commit 29d5956
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2408,12 +2408,13 @@ function wp_enqueue_global_styles() {
return;
}

/**
* If we are loading CSS for each block separately, then we can load the theme.json CSS conditionally.
/*
* If loading the CSS for each block separately, then load the theme.json CSS conditionally.
* 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 wp_get_global_stylesheet();
* This filter must be registered before calling wp_get_global_stylesheet();
*/
add_filter( 'theme_json_get_style_nodes', 'wp_filter_out_block_nodes' );

$stylesheet = wp_get_global_stylesheet();

if ( empty( $stylesheet ) ) {
Expand All @@ -2424,7 +2425,7 @@ function wp_enqueue_global_styles() {
wp_add_inline_style( 'global-styles', $stylesheet );
wp_enqueue_style( 'global-styles' );

// add each block as an inline css.
// Add each block as an inline css.
wp_add_global_styles_for_blocks();
}

Expand Down

0 comments on commit 29d5956

Please sign in to comment.