I'm currently building a website for a friend and have assigned him the user role of editor. I don't want to give him an administrator role in case he breaks the layout. Anyway, I am using 'add_menu_page()' to add the Appearance > Menus page as an option for the Editor and it is showing up when I log in as an editor role, but when I click on it it says "You do not have sufficient permissions to access this page.
Here is my code:
add_action( 'admin_menu', 'register_my_custom_menu_page' );
function register_my_custom_menu_page(){
add_menu_page( 'custom menu title', 'custom menu', 'edit_others_posts', 'nav-menus.php' );
}
I saw something in the codex that says if you see this message you have hooked in to early. I'm not very familiar with hooks and filters though, so I'm not sure what that means.