AnsPress::add_filter( string $hook, object $component, string $callback, $priority = 10, $accepted_args = 1 )
Description #
Add a new filter to the collection to be registered with WordPress.
Parameters #
- $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.
- int (Optional) $accepted_args The number of arguments that should be passed to the $callback.
Source #
File: anspress-question-answer.php
public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) { $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args ); }
Expand full source code Collapse full source code View on GitHub: anspress-question-answer.php:434
Add your comment