WordPress_Security_Txt_Loader

Register all actions and filters for the plugin.

Maintain a list of all hooks that are registered throughout the plugin, and register them with the WordPress API. Call the run function to execute the list of actions and filters.

package

WordPress_Security_Txt

subpackage

WordPress_Security_Txt/includes

author

Austin Heap me@austinheap.com

Methods

Initialize the collections used to maintain the actions and filters.

__construct() 
since 1.0.0

A utility function that is used to register the actions and hooks into a single collection.

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

private

Arguments

$hooks

array

The collection of hooks that is being registered (that is, actions or filters).

$hook

string

The name of the WordPress filter that is being registered.

$component

object

A reference to the instance of the object on which the filter is defined.

$callback

string

The name of the function definition on the $component.

$priority

integer

The priority at which the function should be fired.

$accepted_args

integer

The number of arguments that should be passed to the $callback.

Response

array

The collection of actions and filters registered with WordPress.

Add a new action to the collection to be registered with WordPress.

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

Arguments

$hook

string

The name of the WordPress action that is being registered.

$component

object

A reference to the instance of the object on which the action is defined.

$callback

string

The name of the function definition on the $component.

$priority

integer

Optional. The priority at which the function should be fired. Default is 10.

$accepted_args

integer

Optional. The number of arguments that should be passed to the $callback. Default is 1.

Add a new filter to the collection to be registered with WordPress.

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

Arguments

$hook

string

The name of the WordPress filter that is being registered.

$component

object

A reference to the instance of the object on which the filter is defined.

$callback

string

The name of the function definition on the $component.

$priority

integer

Optional. The priority at which the function should be fired. Default is 10.

$accepted_args

integer

Optional. The number of arguments that should be passed to the $callback. Default is 1

Register the filters and actions with WordPress.

run() 
since 1.0.0

Properties

The array of actions registered with WordPress.

actions : array
since
access

protected

var

The actions registered with WordPress to fire when the plugin loads.

Type(s)

array

The array of filters registered with WordPress.

filters : array
since
access

protected

var

The filters registered with WordPress to fire when the plugin loads.

Type(s)

array