Check Admin is logged in?
-
I have a wordpress blog and I’m currently in the process of coding things that only I or an admin should have access too. It would be pointless including it in a wordpress plugin or something so I’ve made it external.
The only thing is, I don’t want to use my PHP login script, when I could just use:
if ( current_user_can('manage_options')
My question is – Can I use
if ( current_user_can('manage_options')
in a custom directory like public_html/custom/? If not, how can I perform a check to see that the person accessing the directory is logged is as an admin in WordPress?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Check Admin is logged in?’ is closed to new replies.