LLMS_Abstract_Admin_Tool::maybe_handle( $tool_id )
Processes the tool if the submitted tool matches the tool’s ID.
Parameters Parameters
-
(string) (Required) tool_id ID of the submitted tool.
Return Return
(mixed|false)
Source Source
File: includes/abstracts/llms-abstract-admin-tool.php
public function maybe_handle( $tool_id ) {
if ( $this->should_load() && $this->id === $tool_id ) {
/**
* Action run prior to running an admin tool's main `handle()` method.
*
* The dynamic portion of this hook `{$tool_id}` refers to the unique ID
* of the admin tool.
*
* @since 5.0.0
*
* @param object $tool_class Instance of the extending tool class.
*/
do_action( "llms_before_handle_tool_{$tool_id}", $this );
$handled = $this->handle();
/**
* Action run prior to running an admin tool's main `handle()` method.
*
* The dynamic portion of this hook `{$tool_id}` refers to the unique ID
* of the admin tool.
*
* @since 5.0.0
*
* @param object $tool_class Instance of the extending tool class.
*/
do_action( "llms_after_handle_tool_{$tool_id}", $this );
return $handled;
}
return false;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 5.0.0 | Add before and after action hooks. |
| 3.37.19 | Introduced. |