I am writing a plugin that offers an admin menu item which only a specific, custom user role ("customrole" in the example) can access. I have implemented this as follows, and it works:
function add_admin_menu() {
add_menu_page(
'Custom-Plugin',
'Custom-Plugin',
'customrole',
'custom-plugin',
'init_custom_menu_page'
);
}
The problem is that the administrator does not have the rights to access this menu item anymore; I would like administrators to still be able to access it, however (and the "customrole"-users). How can I achieve this?
I am using the "Members" plugin to create custom user roles if that makes a difference.
Thanks in advance!