is_login(): bool

Determines whether the current request is for the login screen.

Description

See also

Return

bool True if inside WordPress login screen, false otherwise.

Source

function is_login() {
	return false !== stripos( wp_login_url(), $_SERVER['SCRIPT_NAME'] );
}

Changelog

VersionDescription
6.1.0Introduced.

User Contributed Notes

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