AnsPress::add( array $hooks, string $hook, object $component, string $callback, int $priority, int $accepted_args )
Description #
A utility function that is used to register the actions and hooks into a single collection.
Parameters #
- $hooksarray (Required) The collection of hooks that is being registered (that is, actions or filters).
- $hookstring (Required) The name of the WordPress filter that is being registered.
- $componentobject (Required) A reference to the instance of the object on which the filter is defined.
- $callbackstring (Required) The name of the function definition on the $component.
- $priorityint (Required) The priority at which the function should be fired.
- $accepted_argsint (Required) The number of arguments that should be passed to the $callback.
Source #
File: anspress-question-answer.php
private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) { $hooks[] = array( 'hook' => $hook, 'component' => $component, 'callback' => $callback, 'priority' => $priority, 'accepted_args' => $accepted_args, ); return $hooks; }
Expand full source code Collapse full source code View on GitHub: anspress-question-answer.php:454
Add your comment