\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.

Summary

Methods
Properties
Constants
__construct()
add_action()
add_filter()
remove_action()
remove_filter()
set_scope()
register()
reset()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
initialize()
array_walk_add_filter()
array_walk_remove_filter()
$hooks
$start_hook
$end_hook
N/A

Properties

$hooks

$hooks :

Type

$start_hook

$start_hook :

Type

$end_hook

$end_hook :

Type

Methods

__construct()

__construct(  $start_hook = '',  $end_hook = '')

Parameters

$start_hook
$end_hook

add_action()

add_action(  $tag,  $function,  $priority = 10,  $accepted_args = 1)

Parameters

$tag
$function
$priority
$accepted_args

add_filter()

add_filter(  $tag,  $function,  $priority = 10,  $accepted_args = 1)

Parameters

$tag
$function
$priority
$accepted_args

remove_action()

remove_action(  $tag,  $function,  $priority = 10,  $accepted_args = 1)

Parameters

$tag
$function
$priority
$accepted_args

remove_filter()

remove_filter(  $tag,  $function,  $priority = 10,  $accepted_args = 1)

Parameters

$tag
$function
$priority
$accepted_args

set_scope()

set_scope(  $start_hook,  $end_hook)

Parameters

$start_hook
$end_hook

register()

register()

reset()

reset()

initialize()

initialize()

array_walk_add_filter()

array_walk_add_filter(  $hook)

Parameters

$hook

array_walk_remove_filter()

array_walk_remove_filter(  $hook)

Parameters

$hook