If an Editor has manage_options capability, they can see Stream settings
-
Hi there,
I have set Stream to administrators only, but on this particular site I needed to give Editors manage_options capability to access a certain plugin.
Now Editors can see and edit the Stream settings in the dashboard, though they can’t see the actual stream.
To simply hide it I tried the following but it didn’t work:
function my_menu_page_removal() { if ( !current_user_can('delete_plugins') ) { remove_menu_page('admin.php?page=wp_stream'); remove_submenu_page( 'admin.php?page=wp_stream', 'admin.php?page=wp_stream_settings'); } } add_action( 'admin_menu', 'my_menu_page_removal', 11 );
and also just:
function my_menu_page_removal() { if ( !current_user_can('delete_plugins') ) { remove_menu_page('admin.php?page=wp_stream_settings'); } } add_action( 'admin_menu', 'my_menu_page_removal', 11 );
Neither worked.
Any suggestions appreciated!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘If an Editor has manage_options capability, they can see Stream settings’ is closed to new replies.