AR Model Viewer for WooCommerce

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

Tags
subpackage

Ar_Model_Viewer_For_Woocommerce/includes

author

Manuel Ramirez Coronel ra_cm@outlook.com

Table of Contents

Properties

$actions  : array<string|int, mixed>
The array of actions registered with WordPress.
$filters  : array<string|int, mixed>
The array of filters registered with WordPress.
$shortcodes  : array<string|int, mixed>
The array of shortcode registered with WordPress.

Methods

__construct()  : mixed
Initialize the collections used to maintain the actions and filters.
add_action()  : mixed
Add a new action to the collection to be registered with WordPress.
add_filter()  : mixed
Add a new filter to the collection to be registered with WordPress.
add_shortcode()  : mixed
Add a new shortcode to the collection to be registered with WordPress
remove_action()  : mixed
Remove an action from the collection registered with WordPress.
remove_filter()  : mixed
Remove a filter from the collection registered with WordPress.
run()  : mixed
Register the filters and actions with WordPress.
add()  : array<string|int, mixed>
A utility function that is used to register the actions and hooks into a single collection.

Properties

$actions

The array of actions registered with WordPress.

protected array<string|int, mixed> $actions

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

Tags
since
1.0.0
access

protected

$filters

The array of filters registered with WordPress.

protected array<string|int, mixed> $filters

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

Tags
since
1.0.0
access

protected

$shortcodes

The array of shortcode registered with WordPress.

protected array<string|int, mixed> $shortcodes

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

Tags
since
1.0.0
access

protected

Methods

add_action()

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

public add_action(string $hook, object $component, string $callback[, int $priority = 10 ][, int $accepted_args = 1 ]) : mixed
Parameters
$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 : int = 10

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

$accepted_args : int = 1

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

Tags
since
1.0.0

add_filter()

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

public add_filter(string $hook, object $component, string $callback[, int $priority = 10 ][, int $accepted_args = 1 ]) : mixed
Parameters
$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 : int = 10

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

$accepted_args : int = 1

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

Tags
since
1.0.0

add_shortcode()

Add a new shortcode to the collection to be registered with WordPress

public add_shortcode(string $tag, object $component, string $callback[, int $priority = 10 ][, int $accepted_args = 1 ]) : mixed
Parameters
$tag : string

The name of the new shortcode.

$component : object

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

$callback : string

The name of the function that defines the shortcode.

$priority : int = 10

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

$accepted_args : int = 1

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

Tags
since
1.0.0

remove_action()

Remove an action from the collection registered with WordPress.

public remove_action(string $tag[, string $class_name = '' ][, string $method_to_remove = '' ][, int $priority = 10 ]) : mixed
Parameters
$tag : string

The filter hook to which the function to be removed is hooked.

$class_name : string = ''

Class name registering the filter callback.

$method_to_remove : string = ''

Method name for the filter's callback.

$priority : int = 10

The priority of the method (default 10).

Tags
since
1.0.0
@return

$removed bool Whether the function is removed.

remove_filter()

Remove a filter from the collection registered with WordPress.

public remove_filter(string $tag[, string $class_name = '' ][, string $method_to_remove = '' ][, int $priority = 10 ]) : mixed
Parameters
$tag : string

The filter hook to which the function to be removed is hooked.

$class_name : string = ''

Class name registering the filter callback.

$method_to_remove : string = ''

Method name for the filter's callback.

$priority : int = 10

The priority of the method (default 10).

Tags
since
1.0.0
@return

$removed bool Whether the function is removed.

add()

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

private add(array<string|int, mixed> $hooks, string $hook, object $component, string $callback, int $priority, int $accepted_args) : array<string|int, mixed>
Parameters
$hooks : array<string|int, mixed>

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 : int

The priority at which the function should be fired.

$accepted_args : int

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

Tags
since
1.0.0
access

private

Return values
array<string|int, mixed>

The collection of actions and filters registered with WordPress.


        
On this page

Search results