LLMS_Install::get_can_install_user_id()

Get the WP User ID of the first available user who can ‘manage_options’


Return Return

(int) Returns the ID of the current user if they can 'manage_options'. Otherwise returns the ID of the first Administrator if they can 'manage_options'. Returns 0 if the first Administrator cannot 'manage_options' or the current site has no Administrators.


Top ↑

Source Source

File: includes/class.llms.install.php

	 */
	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() {

		if ( get_transient( '_llms_first_time_setup_redirect' ) ) {

			delete_transient( '_llms_first_time_setup_redirect' );

			if ( ( ! empty( $_GET['page'] ) && in_array( $_GET['page'], array( 'llms-setup' ), true ) ) || is_network_admin() || isset( $_GET['activate-multi'] ) || apply_filters( 'llms_prevent_automatic_wizard_redirect', false ) ) {


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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