[wp-trac] [WordPress Trac] #58775: Remove usage of outputting styles tags

WordPress Trac noreply at wordpress.org
Tue Sep 19 18:52:46 UTC 2023


#58775: Remove usage of outputting styles tags
-----------------------------------------+---------------------------
 Reporter:  spacedmonkey                 |       Owner:  spacedmonkey
     Type:  enhancement                  |      Status:  assigned
 Priority:  normal                       |   Milestone:  6.4
Component:  Script Loader                |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch close 2nd-opinion  |     Focuses:
-----------------------------------------+---------------------------
Changes (by azaozz):

 * keywords:  has-patch needs-dev-note => has-patch close 2nd-opinion


Comment:

 > is not great. As these values are hard to filter and control the output
 of.

 That's not exactly true. Seems most of these are done from hooks and
 plugins can replace them very easily.

 > These places should all be replaced with wp_add_inline_style or use the
 WP_Style enqueueing system.

 Why? I see two disadvantages to doing this:

 1. It is slower and uses more server resources. Maybe not by much, but
 using Script Loader will make all of these slower.

 2. Seems all of these were intended to work as they do now. What are the
 reasons to change this (other than "lets use the new stuff!"). Unless
 there are some good reasons why these should be changed, I'd consider this
 a "pointless refactor for the sake of refactoring". As such it generally
 goes against the WP best practices.

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


More information about the wp-trac mailing list