Class WP_Data_Access_Loader

Adds and activates plugin filters and actions.

author Peter Schulz
since 1.0.0
package plugin\includes

 Methods

Adds an action to the action array

add_action(string $hook, object $component, string $callback, integer $priority = 10, integer $accepted_args = 1

Calls method add the create array element to be added to action array.

see \WP_Data_Access_Loader::add()
since 1.0.0

Parameters

$hook

string

Action name to be registered.

$component

object

Reference to object to which the action will be applied.

$callback

string

Callback function: method of $component object.

$priority

integer

Priority of the action (default = 10).

$accepted_args

integer

Number of accepted arguments of callback (default = 1).

Adds a filter to the filter array

add_filter(string $hook, object $component, string $callback, integer $priority = 10, integer $accepted_args = 1

Calls method add the create array element to be added to filter array.

see \WP_Data_Access_Loader::add()
since 1.0.0

Parameters

$hook

string

Filter name to be registered.

$component

object

Reference to object to which the filter will be applied.

$callback

string

Callback function: method of $component object.

$priority

integer

Priority of the filter (default = 10).

$accepted_args

integer

Number of accepted arguments of callback (default = 1).

Registration of filters and actions

run() 
since 1.0.0

Create action or filter element

add(array $hooks, string $hook, object $component, string $callback, integer $priority, integer $accepted_args) : array

Generic creation of an element that can be added to the action array or filter array.

since 1.0.0

Parameters

$hooks

array

Action or filter array to which the hook is added.

$hook

string

Action or filter name to be registered.

$component

object

Reference to object to which the action or filter will be applied.

$callback

string

Callback function: method of $component object.

$priority

integer

Priority of the action or action.

$accepted_args

integer

Number of accepted arguments of callback.

Returns

array

 Properties

 

Registered plugin actions

$actions : array

Default

array()
 

Registered plugin filters

$filters : array

Default

array()