Add your comment
AnsPress::add_action( string $hook, object $component, string $callback, $priority = 10, $accepted_args = 1 )
Add a new action to the collection to be registered with WordPress.
- $hookstring (Required) The name of the WordPress action that is being registered.
- $componentobject (Required) A reference to the instance of the object on which the action is defined.
- $callbackstring (Required) The name of the function definition on the $component.
- int (Optional) $accepted_args The number of arguments that should be passed to the $callback.