You appear to be a bot. Output may be restricted
Description
Finds the current hook's priority- Originally implemented with a super hack that relied on the fact that you can define accepted args as a decimal value
- I appended the priority to the accepted args, which is always 9.
- @lgedeon suggested an improvement to this as a solution for TRAC #33886
- But this stopped working for WordPress 4.7
- Now we can just use the method that WordPress provides in the WP_Hook class
Usage
$integer = bw_trace_inspect_current();
Parameters
Returns
integer the priority of the current hookSource
File name: oik-bwtrace/includes/bwtrace-actions.phpLines:
1 to 7 of 7
function bw_trace_inspect_current() { global $wp_filter; $tag = current_filter(); $current = $wp_filter[ $tag ]; $priority = $current->current_priority(); return $priority; }View on GitHub View on Trac