LLMS_Install::update_actions()
Handle form submission of update related actions
Return Return
(void)
Source Source
File: includes/class.llms.install.php
public static function update_actions() {
if ( empty( $_GET['llms-db-update'] ) ) {
return;
}
if ( ! isset( $_REQUEST['llms-db-update'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['llms-db-update'] ) ), 'do_db_updates' ) ) {
wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'lifterlms' ) );
}
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( esc_html__( 'You are not allowed to perform the requested action.', 'lifterlms' ) );
}
LLMS_Admin_Notices::delete_notice( 'bg-db-update' );
$upgrader = new LLMS_DB_Upgrader( get_option( 'lifterlms_db_version' ) );
$upgrader->enqueue_updates();
llms_redirect_and_exit( remove_query_arg( array( 'llms-db-update' ) ) );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 5.2.0 | Use LLMS_DB_Upgrader and remove the "force upgrade" action handler. |
| 3.4.3 | Introduced. |