hooks
hooks trait - filters & actions using prefixed name
Tags
Table of Contents
- add_action() : mixed
- add_action with prefixed name
- add_filter() : mixed
- add_filter with prefixed name
- apply_filters() : mixed
- apply_filters with prefixed name
- did_action() : mixed
- did_action with prefixed name
- did_filter() : mixed
- did_filter with prefixed name (WP 6.1)
- do_action() : mixed
- do_action with prefixed name
- has_action() : mixed
- has_action with prefixed name
- has_action_count() : int
- has_action with prefixed name - returns count of filters
- has_filter() : mixed
- has_filter with prefixed name
- has_filter_count() : int
- has_filter with prefixed name - returns count of filters
- prefixHookName() : string
- Get the prefixed version of the hook name
- remove_action() : mixed
- remove_action with prefixed name
- remove_filter() : mixed
- remove_filter with prefixed name
- wp_action_count() : int
- wp has_action - returns count of actions
- wp_filter_count() : int
- wp has_filter - returns count of filters
Methods
add_action()
add_action with prefixed name
public
add_action(string $hookName, mixed ...$args) : mixed
Parameters
- $hookName : string
-
the name of the action
- $args : mixed
-
arguments passed to action
Return values
mixed —add_filter()
add_filter with prefixed name
public
add_filter(string $hookName, mixed ...$args) : mixed
Parameters
- $hookName : string
-
the name of the filter
- $args : mixed
-
arguments passed to filter
Return values
mixed —apply_filters()
apply_filters with prefixed name
public
apply_filters(string $hookName, mixed ...$args) : mixed
Parameters
- $hookName : string
-
the name of the filter
- $args : mixed
-
arguments passed to filter
Return values
mixed —did_action()
did_action with prefixed name
public
did_action(string $hookName) : mixed
Parameters
- $hookName : string
-
the name of the action
Return values
mixed —did_filter()
did_filter with prefixed name (WP 6.1)
public
did_filter(string $hookName) : mixed
Parameters
- $hookName : string
-
the name of the filter
Return values
mixed —do_action()
do_action with prefixed name
public
do_action(string $hookName, mixed ...$args) : mixed
Parameters
- $hookName : string
-
the name of the action
- $args : mixed
-
arguments passed to action
Return values
mixed —has_action()
has_action with prefixed name
public
has_action(string $hookName[, mixed $callback = false ]) : mixed
Parameters
- $hookName : string
-
the name of the action
- $callback : mixed = false
Return values
mixed —has_action_count()
has_action with prefixed name - returns count of filters
public
has_action_count(string $hookName[, mixed $callback = false ]) : int
Parameters
- $hookName : string
-
the name of the action
- $callback : mixed = false
Return values
int —has_filter()
has_filter with prefixed name
public
has_filter(string $hookName[, mixed $callback = false ]) : mixed
Parameters
- $hookName : string
-
the name of the filter
- $callback : mixed = false
Return values
mixed —has_filter_count()
has_filter with prefixed name - returns count of filters
public
has_filter_count(string $hookName[, mixed $callback = false ]) : int
Parameters
- $hookName : string
-
the name of the filter
- $callback : mixed = false
Return values
int —prefixHookName()
Get the prefixed version of the hook name
public
prefixHookName(string $hookName) : string
Parameters
- $hookName : string
-
filter/action name
Return values
string —hookname with prefix
remove_action()
remove_action with prefixed name
public
remove_action(string $hookName, mixed ...$args) : mixed
Parameters
- $hookName : string
-
the name of the action
- $args : mixed
-
arguments passed to action
Return values
mixed —remove_filter()
remove_filter with prefixed name
public
remove_filter(string $hookName, mixed ...$args) : mixed
Parameters
- $hookName : string
-
the name of the filter
- $args : mixed
-
arguments passed to filter
Return values
mixed —wp_action_count()
wp has_action - returns count of actions
public
wp_action_count(string $hookName[, mixed $callback = false ]) : int
Parameters
- $hookName : string
-
the name of the action
- $callback : mixed = false
Return values
int —wp_filter_count()
wp has_filter - returns count of filters
public
wp_filter_count(string $hookName[, mixed $callback = false ]) : int
Parameters
- $hookName : string
-
the name of the filter
- $callback : mixed = false