Hi,
I like to tweak a plugin to be accessable by editors, now it's only accessable by is_admin().
How do i check if a user is an editor???
regards,
Hi,
I like to tweak a plugin to be accessable by editors, now it's only accessable by is_admin().
How do i check if a user is an editor???
regards,
is_admin doesn't determine if a user is an admin, it determines if the currently page is in the administration area..
http://codex.wordpress.org/Function_Reference/is_admin
If you want to determine what role a user has you need to look the current user object or check against what capabilities that user has..
Apparently this works for the role to..
http://codex.wordpress.org/Function_Reference/current_user_can
Some partially related topics.
http://wordpress.org/support/topic/get-a-users-role-by-user-id
http://wordpress.org/support/topic/how-to-get-the-current-logged-in-users-role
Tx Mark,
I realize now, and i have read the part about capabilities and use that. Just by
add_object_page ('ProudThemes » Theme Options', 'Slider fotos', 'edit_posts', 'proud_home', 'proud_page_gen', 'http://www.proudthemes.com/favicon.png');
so if the user can edit posts he/she is also able to change this theme options
Tx
Only users that are Editors and Admins can edit_pages, that might be a more suitable cap to use..
Posts can also be modified by Authors and Contributors.
:)
This topic has been closed to new replies.