On this page
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
File: wp-includes/load.php. View all references
function is_login() {
return false !== stripos( wp_login_url(), $_SERVER['SCRIPT_NAME'] );
}
Related
Uses
| Uses | Description |
|---|---|
| stripos() wp-includes/class-pop3.php | |
| wp_login_url() wp-includes/general-template.php | Retrieves the login URL. |
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_login