public static function hasHookFired($type = 'action', $hook = null)
    {
        if (! in_array($type, ['action', 'filter'], true)) {
            $type = 'action';
        }
        $target = $type === 'filter' ? 'filters' : 'actions';
        if (empty($hook) || ! is_string($hook)) {
            $msg = __METHOD__.' needs a valid hook to check.';
            throw new InvalidArgumentException($msg);
        }

        return array_key_exists($hook, static::$hooks_done[$target]);
    }
public static function hasHookFired($type = 'action', $hook = null)
    {
        if (! in_array($type, ['action', 'filter'], true)) {
            $type = 'action';
        }
        $target = $type === 'filter' ? 'filters' : 'actions';
        if (empty($hook) || ! is_string($hook)) {
            $msg = __METHOD__.' needs a valid hook to check.';
            throw new InvalidArgumentException($msg);
        }

        return array_key_exists($hook, static::$hooks_done[$target]);
    }
public static function hasHookFired ( $ type = 'action' , $ hook = null ) { if ( ! in_array ( $ type , [ 'action' , 'filter' ] , true ) ) { $ type = 'action' ; } $ target = $ type === 'filter' ? 'filters' : 'actions' ; if ( empty ( $ hook ) || ! is_string ( $ hook ) ) { $ msg = __METHOD__ . ' needs a valid hook to check.' ; throw new InvalidArgumentException ( $ msg ) ; } return array_key_exists ( $ hook , static :: $ hooks_done [ $ target ] ) ; }
Check if an hook is was fired.

@param  string  $type Type of hook, 'action' or 'filter'
@param  string  $hook Filter hook to check
@return boolean
Check if an hook is was fired .