Created
April 28, 2014 07:10
-
-
Save certainlyakey/11363872 to your computer and use it in GitHub Desktop.
Wordpress - allow editors edit menus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Allow editors edit menus | |
$role_object = get_role( 'editor' ); | |
$role_object->add_cap( 'edit_theme_options' ); |
suggest looking at https://wordpress.org/plugins/editor-menu-and-widget-access/
Haven't tried the plugin, but both of your points totally make sense, thanks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This approach has two problems: (1) It allows the editor to have access to all theme (Appearance) options, not just widgets and menus. (2) This code only needs to be run once; it shouldn't be in the functions.php file where it will be run every time WordPress runs.
https://www.thewebtaylor.com/articles/wordpress-allow-editors-to-manage-menus offers the ability to allow access only to menus & widgets, but see the comments on that page as it too has some issues.