Adding menu item to WordPress admin bar for editors to edit one plugin’s settings

I installed the Siteimprove plugin to my client’s WordPress website and I need to provide editor access to the plugin. Editors by default do not have any access to plugins. I tried to add the following to my functions.php:

if (!current_user_can(‘manage_options’)) {
add_menu_page(
‘Siteimprove Plugin’,
‘Siteimprove’,
‘manage_options’,
‘siteimprove’,
‘siteimprove_settings_form’
);
}

This is the code from the Siteimprove plugin that adds it to the menu:

/**
* Register menu for settings form page.
*/
public function register_menu() {
// Add top level menu page.
add_menu_page(
__(‘Siteimprove Plugin’),
__(‘Siteimprove’),
‘manage_options’,
‘siteimprove’,
‘Siteimprove_Admin_Settings::siteimprove_settings_form’
);
}

I created a test editor account and this is not working. Am I missing something to get this working? Thanks for your help!

Read more here:: Adding menu item to WordPress admin bar for editors to edit one plugin’s settings

Leave a Reply

Your email address will not be published. Required fields are marked *