APP_Listing::add_module( string $handle, string $class, array $deps = array(), mixed $args = array(), array $extra = array() )

Register an item if no item of that name already registered.


Package


Description Description

All modules should be registered before enqueued and instantiated.


Parameters Parameters

$handle

(string) (Required) Unique item name.

$class

(string) (Required) The item object class name.

$deps

(array) (Optional) An array of registered item handles this item depends on. Set to false if there are no dependencies.

Default value: array()

$args

(mixed) (Optional) An array of parameters to be passed in module constructor. Listing object will always be added as a first argument.

Default value: array()

$extra

(array) (Optional) An array of module parameters to be used before class instantiated.

Default value: array()


Top ↑

Return Return

(bool) True on success, false on failure.

Premium WordPress Apps

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.