Description
Return the hook typeThis relies on the $wp_actions array being incremented right at the start of do_action() and do_action_ref_array() BUT not to be called for apply_filters() and apply_filters_ref_array()
Usage
$string = genesistant_trace_get_hook_type( $hook );Parameters
- $hook
- ( string ) required –
Returns
string "action" or "filter"Source
File name: genesistant/genesistant.phpLines:
1 to 10 of 10
function genesistant_trace_get_hook_type( $hook ) { global $wp_actions; if ( isset( $wp_actions[ $hook ] ) ){ $type = "action"; } else { $type = "filter"; } return( $type ); }View on GitHub
