Glossary Term
do_action()
do_action() — Calls the callback functions that have been added to an action hook. This function invokes all functions attached to action hook $hook_name. It is possible to create new action hooks by simply calling this function, specifying the name of the new hook using the $hook_name parameter. You can pass extra arguments to the hooks, much like you can with apply_filters(). Example usage: // The action callback function. function example_callback( $arg1, $arg2 ) { // (maybe) do something with the args. } add_action( ‘example_action’, ‘example_callback’, 10, 2 ); /* Trigger the actions by calling the ‘example_callback()’ function that’s hooked onto example_action above. * – ‘example_action’ is the action hook.
Inputs: $hook_name (string): The name of the action to be executed.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
