src/Pentagonal/Hookable/Hookable.php
public function exists($hookName, $function_to_check = false)
    {
        $hookName = $this->sanitize($hookName);
        if (!$hookName || !isset($this->filters[$hookName])) {
            return false;
        }
        // Don't reset the internal array pointer
        $has    = !empty($this->filters[$hookName]);
        // Make sure at least one priority has a filter callback
        if ($has) {
            $exists = false;
            foreach ($this->filters[$hookName] as $callbacks) {
                if (! empty($callbacks)) {
                    $exists = true;
                    break;
                }
            }

            if (! $exists) {
                $has = false;
            }
        }

        // recheck
        if (false === $function_to_check || false === $has) {
            return $has;
        }

        if (! $id = $this->uniqueId($hookName, $function_to_check, false)) {
            return false;
        }

        foreach (array_keys($this->filters[$hookName]) as $priority) {
            if (isset($this->filters[$hookName][$priority][$id])) {
                return $priority;
            }
        }

        return false;
    }
public function exists($hookName, $function_to_check = false)
    {
        $hookName = $this->sanitize($hookName);
        if (!$hookName || !isset($this->filters[$hookName])) {
            return false;
        }
        // Don't reset the internal array pointer
        $has    = !empty($this->filters[$hookName]);
        // Make sure at least one priority has a filter callback
        if ($has) {
            $exists = false;
            foreach ($this->filters[$hookName] as $callbacks) {
                if (! empty($callbacks)) {
                    $exists = true;
                    break;
                }
            }

            if (! $exists) {
                $has = false;
            }
        }

        // recheck
        if (false === $function_to_check || false === $has) {
            return $has;
        }

        if (! $id = $this->uniqueId($hookName, $function_to_check, false)) {
            return false;
        }

        foreach (array_keys($this->filters[$hookName]) as $priority) {
            if (isset($this->filters[$hookName][$priority][$id])) {
                return $priority;
            }
        }

        return false;
    }
Check if hook name exists

@param  string      $hookName          Hook name
@param  string|mixed $function_to_check Specially Functions on Hook

@return boolean|int