I am trying to offer only a couple of options to the admin user of the blog, so not only for the sitewide admin, but also for the admin of one blog.
how can I check if the logged in user is admin?
I tried it with these 3 methods:
get_profile('user_login') == 'admin'
is_site_admin()
$current_user->wp_capabilities['administrator']
That doesn't work. Anyone?
if ( current_user_can('edit_plugins') )
other administrator capabilities(from http://codex.wordpress.org/Roles_and_Capabilities )
switch_themes
edit_themes
activate_plugins
edit_plugins
edit_users
edit_files
manage_options
import
thanks for the help. thanks works. I need to check the blog-admin and now I am able to do this with this:
current_user_can('edit_users')
cool!