is it possible to get the hook name in add_action?

The name of the current hook is always current_filter(). Despite its name, this function returns the name of actions too.

Usage example: Move the textarea in a comment form.

The current priority is: key( $GLOBALS['wp_filter'][ $hook ] ).

Leave a Comment