pfeifferNet

Login
in package

Login and login tracking functionality.

  • Modify login form contents.
  • Redirect login to user-only page if not an administrator.
  • Set user login history values for current and previous logins.
Tags
since
1.0.0
since
5.5.0

Inherit standard singleton class.

since
5.11.0

Deprecated global singleton inheritance.

Table of Contents

Constants

LAST_LOGIN_KEY  = 'pnet_login_last'
Metadata key for last login.
LOGIN_NOTICE_CONTAINER  = 'notice.php'
Login notice partial filename.
PREV_LOGIN_KEY  = 'pnet_login_previous'
Metadata key for previous login.
REQUEST_LINK_CONTAINER  = 'lost-password.php'
Request password reset partial filename.

Properties

$instances  : array<string|int, object>
The array of instances of this class and sub-classes.
$login_notice_container  : string
Login notice container path.
$messages  : Messages
The instance of the Messages class.
$progress_container  : string
The progress indicator container markup.
$request_link_container  : string
Request password reset container path.

Methods

add_password_reset()  : void
Render a password reset link on login form.
add_progress_indicator()  : void
Add the progress indicator.
disable_email_check()  : bool
Disable site admin email verification at login.
disable_language_dropdown()  : bool
Remove language selector from login page.
get_error_text()  : string
Override standard error message to not disclose valid username or email.
get_instance()  : object
Creates and/or returns the instance of this class.
get_login_message()  : string
Return a login required notification if login has a redirect.
get_logo_url()  : string
Return site url for login page.
get_logo_url_title()  : string
Return site name for login page.
remove_shake()  : void
Remove shake on login error.
set_last_login()  : void
Updates the latest login by a user.
__construct()  : void
Initialise the class.

Constants

LAST_LOGIN_KEY

Metadata key for last login.

protected string LAST_LOGIN_KEY = 'pnet_login_last'
Tags
since
1.0.0

LOGIN_NOTICE_CONTAINER

Login notice partial filename.

protected string LOGIN_NOTICE_CONTAINER = 'notice.php'
Tags
since
6.4.0

PREV_LOGIN_KEY

Metadata key for previous login.

protected string PREV_LOGIN_KEY = 'pnet_login_previous'
Tags
since
1.0.0

Request password reset partial filename.

protected string REQUEST_LINK_CONTAINER = 'lost-password.php'
Tags
since
5.7.0

Properties

$instances

The array of instances of this class and sub-classes.

protected static array<string|int, object> $instances = array()
Tags
since
5.11.0

$login_notice_container

Login notice container path.

protected string $login_notice_container = ''
Tags
since
6.4.0

$progress_container

The progress indicator container markup.

protected string $progress_container = ''
Tags
since
6.0.0

Request password reset container path.

protected string $request_link_container = ''
Tags
since
5.7.0

Methods

get_instance()

Creates and/or returns the instance of this class.

public static get_instance() : object
Tags
since
5.11.0
Return values
object

The instance of this class.

get_login_message()

Return a login required notification if login has a redirect.

public get_login_message(string $message) : string
Parameters
$message : string

The login message.

Tags
since
5.6.0
since
6.2.0

Use Messages class for login message.

since
6.4.0

Use login notice partial.

uses
HTTP_Handler::get_get_vars()
uses
Messages::get_message()
link
https://developer.wordpress.org/reference/hooks/login_message/
Return values
string

The (maybe) modified login message.

remove_shake()

Remove shake on login error.

public remove_shake() : void
Tags
since
6.2.0

        
On this page

Search results