[wp-hackers] Detect if user is viewing login page or wp-admin
John 3:16 Media
wp at john316media.com
Wed Mar 9 05:36:36 UTC 2011
That's perfect you also managed to answer my other question which I forgot
to include in my original email, but I was also going to ask about
identifying what admin page the user was on, that does it perfectly. The
only issue is when detecting if the user is accessing a page added by my
plugin all that returns in admin.php not admin.php?page=blah but I can
always gust use $_GET['page'] in addition to get that. Thanks for your help.
On Tue, Mar 8, 2011 at 9:28 PM, Mike Schinkel
<mikeschinkel at newclarity.net>wrote:
> 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...
> }
>
> -Mike
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list