add()
add(string $hook, callback $function_to_add, integer $priority = self::PRIORITY_NEUTRAL, integer $accepted_args = self::ARGUMENT_NEUTRAL)
Registers a filtering function
Parameters
string | $hook | The name of the element to be filtered or action to be triggered |
callback | $function_to_add | The name of the function/method that is to be called. |
integer | $priority | Optional. Used to specify the order in which the functions associated with a particular action are executed (default=10, lower=earlier execution, and functions with the same priority are executed in the order in which they were added to the filter) |
integer | $accepted_args | Optional. The number of arguments the function accept (default is the number provided). |