[wp-trac] [WordPress Trac] #58458: Move the load of `array_keys` to a different level in the `WP_Hook` class

WordPress Trac noreply at wordpress.org
Thu Aug 17 18:04:09 UTC 2023


#58458: Move the load of `array_keys` to a different level in the `WP_Hook` class
-------------------------------------------------+-------------------------
 Reporter:  bor0                                 |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  6.4
Component:  General                              |     Version:  6.3
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-unit-  |     Focuses:
  tests                                          |  performance
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

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


Comment:

 The reasoning for the change makes sense to me, even if the performance
 bump is very very very tiny.

 Let's make sure all instances of where `WP_Hook::$callbacks` is changed
 does indeed refresh the keys property / cache.

 I'm also adding the `needs-unit-test` keyword to flag checking the current
 tests to ensure there's coverage for all of the areas being changed in
 this ticket.

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


More information about the wp-trac mailing list