PHP – WordPress – Change Role Access to Menus and Widgets

WordPress menus and sidebars/widgets are really powerful modules, but unfortunately it requires 
Admin user role to edit them.

If you would like to allow users with Editor user role to edit any of the widgets or menus, 
just paste the code below into your themes functions.php file.

Code Example:

$role_object = get_role('editor'); # get the the role object
$role_object->add_cap('edit_theme_options'); # add cap capability to this role object

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail