Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I know I can add capabilities to the any role using the role object and add_cap via functions.php

<?php
   // get the the role object
   $editor = get_role('editor');
   // add $cap capability to this role object
   $editor->add_cap('edit_theme_options');
?> 

The list of capabilities shows that "edit_theme_options" allows access to almost all items under Appearance (all but edit theme). What I wold like to do is add capacity to access only Appearance>Menu to a role. Is this possible without modifying the core?

The two most popular ACL editing plugins (Members and User Role Editor) don't allow for this as they only use the default list of capabilities

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It's stupid, but you can't. (Not without editing core, anyway.) Right at the top of the nav-menus.php source code is an edit_theme_options check that's not filterable.

http://core.trac.wordpress.org/browser/tags/3.4.1/wp-admin/nav-menus.php

If you're not concerned about your editors trying anything too shady, you could simply hide the menu items using a plugin like Adminimize or Admin Menu Editor.

Of course, you could also open a ticket at http://core.trac.wordpress.org/ to try to get the core devs to change this.

share|improve this answer
    
Great, thanks! It doesnt bother me to use a plugin... Adminimize together with the "User Role Editor" plugin did it: the newly created role "SuperEditor" has all the permissions given to Editors plus manage APPEARANCE>MENU (if someone can create a page, they should also be able to manage the menu, right:) –  Gaia Aug 26 '12 at 0:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.