If you want to allow the editor role to change theme settings in WordPress. Use following code in your theme’s functions.php file OR in site specific plugin.
1 2 3 4 5 6 | <?php // get the the role object $editor = get_role('editor'); // add $cap capability to this role object $editor->add_cap('edit_theme_options'); ?> |
you can also remove capabilities:
1 | $editor->remove_cap('delete_posts'); |
just take a look at the list of capabilities and what each one means.
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.