WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #53494, comment 14


Ignore:
Timestamp:
06/28/2021 08:54:10 AM (3 months ago)
Author:
aristath
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #53494, comment 14

    initial v1  
    55
    66The code looks good to me, I'm just wondering if we should introduce new `wp_maybe_enqueue_global_styles_in_head` and `wp_maybe_enqueue_global_styles_in_footer` functions, or instead tweak the `wp_enqueue_global_styles` function and add something like this at the top?
    7 {{{php
     7
     8{{{#!php
     9
    810// Enqueue in the footer and early exit if the site is loading separate styles per block.
    911if ( wp_should_load_separate_core_block_assets() && doing_action( 'wp_enqueue_scripts' ) ) {
     
    1113    return;
    1214}
     15
    1316}}}
    1417I think that would have the same result :thinking: