[wp-trac] [WordPress Trac] #57057: Reduce usage of `wp_get_theme`

WordPress Trac noreply at wordpress.org
Thu Nov 10 22:38:37 UTC 2022


#57057: Reduce usage of `wp_get_theme`
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  6.1.2
Component:  Themes                               |     Version:  6.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-screenshots needs-     |     Focuses:
  unit-tests                                     |  performance
-------------------------------------------------+-------------------------
Changes (by flixos90):

 * keywords:  has-patch has-screenshots => has-patch has-screenshots needs-
     unit-tests


Comment:

 @spacedmonkey Doesn't really need many unit tests, but one unit test to
 cover the change in supported method parameter value would be useful.

 @desrosj For me, most of this is reasonable to land in 6.1.x as it's
 trivial replacements of `wp_get_theme()->get_stylesheet()` with
 `get_stylesheet()` which is good for performance. However, changing the
 supported values for a method parameter, despite being backward
 compatible, strictly speaking would go beyond a 6.1.x. Though I don't have
 a strong opinion either way.

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


More information about the wp-trac mailing list