[wp-trac] [WordPress Trac] #61965: Provide a way for classic themes to opt into only loading styles for 3rd party blocks that actually render on a page

WordPress Trac noreply at wordpress.org
Fri Aug 30 15:59:42 UTC 2024


#61965: Provide a way for classic themes to opt into only loading styles for 3rd
party blocks that actually render on a page
-------------------------+------------------------------
 Reporter:  fabiankaegy  |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by flixos90):

 @fabiankaegy Thank you for opening the ticket.

 Based on reading the ticket description and our previous conversation on
 Slack, I wonder whether this would be more clear if phrased differently:
 * The ticket title/summary is currently describing something that's
 already possible today, via `wp_should_load_separate_core_block_assets()`.
 * I believe what you're proposing though is more about being able to opt
 in or opt out of using individual core block stylesheets (vs using the one
 `wp-block-library` stylesheet), ''independently'' of whether block assets
 are loaded on demand or not.
 * Related to #61958, I think this conversation is confusing because
 `wp_should_load_separate_core_block_assets()` does not what its name
 indicates. Today it is responsible for opting in to load block assets on
 demand (rather than everywhere unconditionally). By doing that it ''also''
 opts in to using individual core block stylesheets instead of `wp-block-
 library`. So as far as I understand, you'd like to be able to control the
 latter separately.

 Did I get that right?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61965#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list