Skip to content

Instantly share code, notes, and snippets.

@glueckpress
Last active December 14, 2015 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glueckpress/2366559 to your computer and use it in GitHub Desktop.
Save glueckpress/2366559 to your computer and use it in GitHub Desktop.
[WordPress] Conditional tag to check whether current page is wp-login.php or wp-register.php.
<?php
/**
* Conditional tag to check whether current page is wp-login.php or wp-register.php.
*/
if( ! function_exists( 'wp_is_login' ) ) {
function wp_is_login() {
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