[wp-hackers] Detect if user is viewing login page or wp-admin
mikeschinkel at newclarity.net
Wed Mar 9 05:47:56 UTC 2011
On Mar 9, 2011, at 12:36 AM, John 3:16 Media wrote:
> 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.
$pagenow is not supposed to include any GET parameters otherwise someone using it would have to write code to process them which is the antithesis of what $pagenow is used for, especially given that parameters can come in any order.
So yes, if you need to also test for GET parameters, inspect the $_GET array.
More information about the wp-hackers