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::do_tool()
Handle tools actions
Description Description
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.page.status.php
private static function do_tool() { if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'llms_tool' ) ) { wp_die( __( 'Action failed. Please refresh the page and retry.', 'lifterlms' ) ); } /** * Custom Tools can hook into this action to do the tool action */ do_action( 'llms_status_tool', $_REQUEST['llms_tool'] ); switch ( $_REQUEST['llms_tool'] ) { case 'automatic-payments': LLMS_Site::clear_lock_url(); update_option( 'llms_site_url_ignore', 'no' ); break; case 'clear-cache': global $wpdb; $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}usermeta WHERE meta_key = %s or meta_key = %s;", 'llms_overall_progress', 'llms_overall_grade' ) ); break; case 'clear-sessions': WP_Session_Utils::delete_all_sessions(); break; case 'reset-tracking': update_option( 'llms_allow_tracking', 'no' ); break; case 'setup-wizard': wp_safe_redirect( esc_url_raw( admin_url( '?page=llms-setup' ) ) ); exit; break; } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.11.2 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: