[wp-hackers] Admin Action Prior to Headers
Peter Westwood
peter.westwood at ftwr.co.uk
Sun Jun 24 16:07:14 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jamie Holly wrote:
>>> 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:
>
Incorrect. is_admin means that you are on a page within wp-admin not
that you are the admin user.
>
> if (strstr($_SERVER['REQUEST_URI'],"/wp-admin/")) {
> [....do the admin section only stuff here...]
> }
>
This check just repeats what is_admin already does.
westi
- --
Peter Westwood
http://blog.ftwr.co.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGfpayVPRdzag0AcURAg/lAJ4hqE3Gozdf8lPiuSz7M0QxDuZ2kgCffJ2Y
cWCODsbdu7m+mX8tzgmHyH0=
=mxKf
-----END PGP SIGNATURE-----
More information about the wp-hackers
mailing list