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. Default empty.
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

doing_action, add_action, did_action, has_action, remove_action

Top Google Results

User discussions

wpseek mobile