Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Admin_Page_Status::output_tools_content()
Output the HTML for the tools tab
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.page.status.php
private static function output_tools_content() { // Load unclassed core tools at priority 5 to "preserve" their original order before we started classing tools. add_filter( 'llms_status_tools', array( __CLASS__, 'add_core_tools' ), 5 ); /** * Register tools with the LifterLMS core * * When registering a custom tool you should additionally have an action triggered for the tool using the action * `llms_status_tool` which will be called to process or handle the action. * * @since Unknown * * @see llms_status_tool For the action called to handle a tool. * * @param array[] $tools { * Associative array of status tool definitions. * * The array key is a unique "id" for the tool and the array value should be an associative array * as described below: * * @type string $description Description of what the tool does. * @type string $label The title of the tool. * @type string $text The text displayed on the tool's button. * } */ $tools = apply_filters( 'llms_status_tools', array() ); ?> <form action="<?php echo esc_url( self::get_url( 'tools' ) ); ?>" method="POST"> <div class="llms-setting-group top"> <p class="llms-label"><?php esc_html_e( 'Tools & Utilities', 'lifterlms' ); ?></p> <table class="llms-table text-left zebra"> <?php foreach ( $tools as $slug => $data ) : ?> <tr> <th><?php echo $data['label']; ?></th> <td> <p><?php echo $data['description']; ?></p> <button class="llms-button-secondary small" name="llms_tool" type="submit" value="<?php echo $slug; ?>"><?php echo $data['text']; ?></button> </td> </tr> <?php endforeach; ?> </table> <?php wp_nonce_field( 'llms_tool' ); ?> </div> </form>
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.13.0 | Move "unclassed" core actions to be added to the llms_status_tools filter at priority 5 via LLMS_Admin_Page_Status::add_core_tools() . |
4.0.0 | The clear-sessions tool has been moved to LLMS_Admin_Tool_Clear_Sessions . |
3.11.2 | Introduced. |