|$tag||(string) (Required) The name of the action to which the |
|$function_to_add||(callable) (Required) The function which should be called when the action indicated by |
|$priority||(int) (Optional) Default value: |
|$accepted_args||(int) (Optional) Default value: |
add_action() function creates an Action Hook, associating a PHP function with a particular action "tag" or name. When the action is "triggered" by a call to
do_action_ref_array()) with a specific tag, all functions "hooked" to that tag will be executed.
In most cases, this function should be used in a theme's
functions.php file or a plugin file - or another source file loaded by either.
This function is a part of the Plugin API