WP_Scoped_Hooks
Allows a temporary hook environment to be created for a given timeframe (i.e. scope), where any hooks added or removed will be recognised only during the specified scope. After the given scope, the original WordPress hook environment is restored to its previous state.
Tags
Table of Contents
- $end_hook : mixed
- $hooks : mixed
- $start_hook : mixed
- __construct() : mixed
- add_action() : mixed
- add_filter() : mixed
- register() : mixed
- remove_action() : mixed
- remove_filter() : mixed
- reset() : mixed
- set_scope() : mixed
- array_walk_add_filter() : mixed
- array_walk_remove_filter() : mixed
- initialize() : mixed
Properties
$end_hook
private
mixed
$end_hook
$hooks
private
mixed
$hooks
$start_hook
private
mixed
$start_hook
Methods
__construct()
public
__construct([mixed $start_hook = '' ][, mixed $end_hook = '' ]) : mixed
Parameters
- $start_hook : mixed = ''
- $end_hook : mixed = ''
Return values
mixed —add_action()
public
add_action(mixed $tag, mixed $function[, mixed $priority = 10 ][, mixed $accepted_args = 1 ]) : mixed
Parameters
- $tag : mixed
- $function : mixed
- $priority : mixed = 10
- $accepted_args : mixed = 1
Return values
mixed —add_filter()
public
add_filter(mixed $tag, mixed $function[, mixed $priority = 10 ][, mixed $accepted_args = 1 ]) : mixed
Parameters
- $tag : mixed
- $function : mixed
- $priority : mixed = 10
- $accepted_args : mixed = 1
Return values
mixed —register()
public
register() : mixed
Return values
mixed —remove_action()
public
remove_action(mixed $tag, mixed $function[, mixed $priority = 10 ][, mixed $accepted_args = 1 ]) : mixed
Parameters
- $tag : mixed
- $function : mixed
- $priority : mixed = 10
- $accepted_args : mixed = 1
Return values
mixed —remove_filter()
public
remove_filter(mixed $tag, mixed $function[, mixed $priority = 10 ][, mixed $accepted_args = 1 ]) : mixed
Parameters
- $tag : mixed
- $function : mixed
- $priority : mixed = 10
- $accepted_args : mixed = 1
Return values
mixed —reset()
public
reset() : mixed
Return values
mixed —set_scope()
public
set_scope(mixed $start_hook, mixed $end_hook) : mixed
Parameters
- $start_hook : mixed
- $end_hook : mixed
Return values
mixed —array_walk_add_filter()
private
array_walk_add_filter(mixed $hook) : mixed
Parameters
- $hook : mixed
Return values
mixed —array_walk_remove_filter()
private
array_walk_remove_filter(mixed $hook) : mixed
Parameters
- $hook : mixed
Return values
mixed —initialize()
private
initialize() : mixed