LLMS_Install::install()

Core install function


Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.install.php

		if ( ! llms_verify_nonce( 'llms-db-update', 'do_db_updates', 'GET' ) ) {
			wp_die( __( 'Action failed. Please refresh the page and retry.', 'lifterlms' ) );
		}

		if ( ! current_user_can( 'manage_options' ) ) {
			wp_die( __( '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' ) ) );

	}

	/**
	 * Update the LifterLMS DB record to the latest version
	 *
	 * @since 3.0.0
	 * @since 3.4.3 Unknown.
	 *
	 * @param string $version Version number.
	 * @return void
	 */
	public static function update_db_version( $version = null ) {
		delete_option( 'lifterlms_db_version' );
		add_option( 'lifterlms_db_version', is_null( $version ) ? LLMS()->version : $version );
	}

	/**
	 * Update the LifterLMS version record to the latest version
	 *
	 * @since 3.0.0
	 * @since 3.4.3 Unknown.
	 *
	 * @param string $version Version number.
	 * @return void
	 */
	public static function update_llms_version( $version = null ) {
		delete_option( 'lifterlms_current_version' );
		add_option( 'lifterlms_current_version', is_null( $version ) ? LLMS()->version : $version );
	}

	/**
	 * Redirects users to the setup wizard
	 *
	 * @since 1.0.0
	 * @since 3.0.0 Unknown.
	 * @since 5.2.0 Use strict array comparison and `wp_safe_redirect()` in favor of `wp_redirect()`.
	 *
	 * @return void
	 */
	public static function wizard_redirect() {


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Install forms.
3.13.0 Unknown.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.