do_action

do_action ( $tag, $arg = '' )

Parameters:
  • (string) $tag The name of the action to be executed.
  • (mixed) $arg,... Optional additional arguments which are passed on to the functions hooked to the action.
See:
Returns:
  • (null) Will return null if $tag does not exist in $wp_filter array
Defined at:

Description

Execute functions hooked on a specific action hook.

This function invokes all functions attached to action hook $tag. It is possible to create new action hooks by simply calling this function, specifying the name of the new hook using the $tag parameter.

You can pass extra arguments to the hooks, much like you can with apply_filters().

Related Functions

add_action, did_action, has_action, remove_action, do_action_ref_array

Top Google Results

User discussions

wpseek mobile