[wp-trac] [WordPress Trac] #39007: Impossible to access current priority with WP_Hook

WordPress Trac noreply at wordpress.org
Thu Dec 1 22:50:37 UTC 2016


#39007: Impossible to access current priority with WP_Hook
----------------------------------------+-----------------------
 Reporter:  Rarst                       |       Owner:  pento
     Type:  feature request             |      Status:  assigned
 Priority:  normal                      |   Milestone:  4.7
Component:  Plugins                     |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------
Changes (by pento):

 * keywords:  has-patch reporter-feedback needs-unit-tests => has-patch
     needs-unit-tests


Comment:

 Adding a `current_priority()` function seems like it's a bit more than is
 necessary.

 For conditional logic, `class_exists( 'WP_Hook' )` is a reasonable test,
 this is what Batcache uses, for example - it's technically not correct for
 4.7 betas that don't have the `::current_priority()` method, but I don't
 think that should be a big issue. :-)

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


More information about the wp-trac mailing list