Hello,
thank you for this answer.
Yes I use "members" plugin and if I add "mange_options" to the editor role, the editor has access to all the submenus of Settings section.
What I wanted to do is that only "General" submenu would be enable for the Editor. Particurlarly because I want the editor able to edit the site's description.
So I have edited the wp-admin/menu.php file around line 80:
$menu[80] = array( __('Settings'), 8, 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div' );
$submenu['options-general.php'][10] = array(_x('General', 'settings screen'), 8, 'options-general.php');
$submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
I have change the capablity "manage_options" to capability related to level 8 (ediwhich match to my editor level).
Then the editor got access to the General settings page but I met another issue: when I save the changes, I get the message : "Cheatin' Uh?"
So I found that on wp-admin/options.php file there is that piece of code (line 27):
$capability = 'manage_options';
if ( empty($option_page) ) // This is for back compat and will eventually be removed.
$option_page = 'options';
else
$capability = apply_filters( "option_page_capability_{$option_page}", $capability );
if ( !current_user_can( $capability ) )
wp_die(__('Cheatin’ uh?'));
I've just edit like that and what I wanted is working fine.
$capability = 'manage_options';
$level = 'level_8';
if ( empty($option_page) ) // This is for back compat and will eventually be removed.
$option_page = 'options';
else
$capability = apply_filters( "option_page_capability_{$option_page}", $capability );
if ( !current_user_can( $level ) )
wp_die(__('Cheatin’ uh?'));