I'm trying to show my plugin menu / options page for the "Editor" role, but it's not showing up. How to solve this ? Thank you.
Here's my code :
function jowct_add_plugin_for_editors(){
if (!current_user_can('manage_options')) {
add_menu_page(
'Menu Page Title',
'Menu Title',
'delete_others_pages',
'jowct-wpplugin-menu',
'jowct_menu_option_page',
'dashicons-admin-generic',
'3',
);
}
}
if(is_admin()) {
add_action( 'admin_menu', 'jowct_add_plugin_for_editors' );
}