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

WordPress Trac noreply at wordpress.org
Thu Dec 1 16:19:12 UTC 2016


#39007: Impossible to access current priority with WP_Hook
-----------------------------+-----------------------------
 Reporter:  Rarst            |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:  trunk
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 While there was never a public API for it, the specifics of implementation
 had previously allowed to access current priority within a hook via `key(
 $wp_filter[ current_filter() ] )`.

 This seems to no longer be a case with 4.7 implementation based on
 `WP_Hook` which both changes what this expression returns (string
 `callbacks`) and seems to hide priority data in private property.

 Given that implementation both breaks existing way to do it and doesn't
 open a new way to it breaks all code that needs access to current priority
 state without alternative.

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


More information about the wp-trac mailing list