Register all actions and filters for the plugin.
Maintain a list of all hooks that are registered throughout the plugin, and register them with the WordPress API. Call the run function to execute the list of actions and filters.
| package |
WordPress_Security_Txt |
|---|---|
| subpackage |
WordPress_Security_Txt/includes |
| author |
Austin Heap me@austinheap.com |
__construct()
| since | 1.0.0 |
|---|---|
add(array $hooks, string $hook, object $component, string $callback, integer $priority, integer $accepted_args) : array
| since | 1.0.0 |
|---|---|
| access |
private |
arrayThe collection of hooks that is being registered (that is, actions or filters).
stringThe name of the WordPress filter that is being registered.
objectA reference to the instance of the object on which the filter is defined.
stringThe name of the function definition on the $component.
integerThe priority at which the function should be fired.
integerThe number of arguments that should be passed to the $callback.
arrayThe collection of actions and filters registered with WordPress.
add_action(string $hook, object $component, string $callback, integer $priority = 10, integer $accepted_args = 1)
| since | 1.0.0 |
|---|---|
stringThe name of the WordPress action that is being registered.
objectA reference to the instance of the object on which the action is defined.
stringThe name of the function definition on the $component.
integerOptional. The priority at which the function should be fired. Default is 10.
integerOptional. The number of arguments that should be passed to the $callback. Default is 1.
add_filter(string $hook, object $component, string $callback, integer $priority = 10, integer $accepted_args = 1)
| since | 1.0.0 |
|---|---|
stringThe name of the WordPress filter that is being registered.
objectA reference to the instance of the object on which the filter is defined.
stringThe name of the function definition on the $component.
integerOptional. The priority at which the function should be fired. Default is 10.
integerOptional. The number of arguments that should be passed to the $callback. Default is 1
run()
| since | 1.0.0 |
|---|---|
actions : array
| since | |
|---|---|
| access |
protected |
| var |
The actions registered with WordPress to fire when the plugin loads. |
array
filters : array
| since | |
|---|---|
| access |
protected |
| var |
The filters registered with WordPress to fire when the plugin loads. |
array