[wp-hackers] Admin Action Prior to Headers

Jamie Holly hovercrafter at earthlink.net
Sun Jun 24 15:50:17 GMT 2007


> > On 6/23/07, Bill Smith <ml_wordpress at copperleaf.org> wrote:
> > > If I have to do it with init or
> > > plugins_loaded, is there a clean way to identify that it's an admin
> page
> > > being loaded?

If your wanting to see if the person is an admin then do the is_admin() like other's have suggested. If you are wanting to see if the page being served is from the admin section, then you could always check the request url, something like:


if (strstr($_SERVER['REQUEST_URI'],"/wp-admin/")) {
	[....do the admin section only stuff here...]
}



Jamie Holly
http://www.intoxination.net



More information about the wp-hackers mailing list