Skip to content

Instantly share code, notes, and snippets.

@rolandinsh
Created July 11, 2012 09:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rolandinsh/3089191 to your computer and use it in GitHub Desktop.
Save rolandinsh/3089191 to your computer and use it in GitHub Desktop.
WordPress is login or register page
<?php
/**
* Is login or register page
* @author umbrovskis
* @authorlink http://umbrovskis.com
*/
function smc_is_login_page() {
return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'));
}
// hope some day WordPress will make is_login_page() or is_register_page() or similar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment