60-modules.php
A list of all the currently loaded modules. Not guaranteed to be populated until an action is executed.
@var array
Table of Contents
- register_module() : mixed
- Registers a module.
- module_exists() : bool
- Checks to see whether a module with the given id exists.
- add_action() : mixed
- Registers a new action handler.
- has_action() : bool
- Figures out whether a given action is currently registered.
- register_save_preprocessor() : mixed
- Register a new proprocessor that will be executed just before an edit is saved.
- add_help_section() : mixed
- Adds a new help section to the help page.
- statistic_add() : mixed
- Registers a statistic calculator against the system.
- has_statistic() : bool
- Checks whether a specified statistic has been registered.
Functions
register_module()
Registers a module.
register_module(array<string|int, mixed> $moduledata) : mixed
Parameters
- $moduledata : array<string|int, mixed>
-
The module data to register.
Return values
mixed —module_exists()
Checks to see whether a module with the given id exists.
module_exists(string $id) : bool
Parameters
- $id : string
-
The id to search for.
Return values
bool —Whether a module is currently loaded with the given id.
add_action()
Registers a new action handler.
add_action(string $action_name, callable $func) : mixed
Parameters
- $action_name : string
-
The action to register.
- $func : callable
-
The function to call when the specified action is requested.
Return values
mixed —has_action()
Figures out whether a given action is currently registered.
has_action(string $action_name) : bool
Only guaranteed to be accurate in inside an existing action function
Parameters
- $action_name : string
-
The name of the action to search for
Return values
bool —Whether an action with the specified name exists.
register_save_preprocessor()
Register a new proprocessor that will be executed just before an edit is saved.
register_save_preprocessor(callable $func) : mixed
Parameters
- $func : callable
-
The function to register.
Return values
mixed —add_help_section()
Adds a new help section to the help page.
add_help_section(string $index, string $title, string $content) : mixed
Parameters
- $index : string
-
The string to index the new section under.
- $title : string
-
The title to display above the section.
- $content : string
-
The content to display.
Return values
mixed —statistic_add()
Registers a statistic calculator against the system.
statistic_add(array<string|int, mixed> $stat_data) : mixed
Parameters
- $stat_data : array<string|int, mixed>
-
The statistic object to register.
Return values
mixed —has_statistic()
Checks whether a specified statistic has been registered.
has_statistic(string $stat_id) : bool
Parameters
- $stat_id : string
-
The id of the statistic to check the existence of.
Return values
bool —Whether the specified statistic has been registered.