Granting Editor access
-
I wanted to allow Editors to use the plugin. I tried adding this to the functions.php file:
add_action( 'admin_menu', 'seo_menu' ); function seo_menu() { global $current_user; $user_roles = $current_user->roles; $user_role = array_shift($user_roles); if($user_role == 'editor'){ add_menu_page( $user_role, $user_role, 10, 'seo', 'seo_options', '/wp-content/plugins/seo-ultimate/plugin/img/icon.png' ); } }It worked for me when I changed the if operator from ‘==’ to ‘!=’, but not the Editor. So that led me to believe it’s within the plugin. I found this line at 1707:
add_utility_page(__('SEO Ultimate', 'seo-ultimate'), __('SEO', 'seo-ultimate').$main_count_code, 'manage_options', 'seo', array(), 'div');Is there a way I can edit it to display and be used by Editors?
Thank you
The topic ‘Granting Editor access’ is closed to new replies.