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
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

version
1.3

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

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

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

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

Search results