[wp-trac] [WordPress Trac] #53616: Registered block styles should only be rendered when the block exists on a page

WordPress Trac noreply at wordpress.org
Wed Aug 11 08:47:30 UTC 2021


#53616: Registered block styles should only be rendered when the block exists on a
page
-----------------------------------+--------------------------
 Reporter:  aristath               |       Owner:  gziolo
     Type:  defect (bug)           |      Status:  reopened
 Priority:  normal                 |   Milestone:  5.8.1
Component:  Script Loader          |     Version:  trunk
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch fixed-major  |     Focuses:  performance
-----------------------------------+--------------------------

Comment (by aristath):

 This was also mentioned prior to merging the PR, in
 https://github.com/WordPress/wordpress-
 develop/pull/1482#pullrequestreview-704072508
 However, it was deemed acceptable because in this scenario, the anonymous
 function enqueues a stylesheet and doesn't do anything else:

 > plugins can still just run `wp_dequeue_style` to remove the styles.
 Since they can remove the styles, removing the hook itself seemed
 inconsequential.

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


More information about the wp-trac mailing list