Last active
December 14, 2015 07:09
-
-
Save kfriend/5048584 to your computer and use it in GitHub Desktop.
WordPress helper for detecting if the current page is the login page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Is Login Page | |
* | |
* Detects if the current request is from the login page. | |
* | |
* Credit: http://stackoverflow.com/questions/5266945/wordpress-how-detect-if-current-page-is-the-login-page#5892694 | |
*/ | |
function isLoginPage() | |
{ | |
return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment