[wp-hackers] Detect if user is viewing login page or wp-admin

Mike Schinkel mikeschinkel at newclarity.net
Wed Mar 9 05:28:05 UTC 2011

On Mar 8, 2011, at 11:28 PM, John 3:16 Media wrote:
> Ok so if you all aren't tired of all my questions yet, I am hooking into
> init, then I need to determine if the user is accessing either wp-login or
> wp-admin, now I can use is_admin() to check for if they are accessing
> wp-admin, but I didn't see any conditional tag in the codex to determine if
> they are accessing wp-login, is there something undocumented or something
> that I'm missing or do I have to reply on using the url the are accessing?

global $pagenow;
if ($pagenow=='wp-login.php') {
   // do stuff...


More information about the wp-hackers mailing list