Created
October 28, 2013 16:29
-
-
Save mannieschumpert/7200062 to your computer and use it in GitHub Desktop.
A quick filter to allow the editor role to edit theme options.
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
<?php | |
/** | |
* Allow editor role to edit theme options | |
*/ | |
add_filter('user_has_cap', | |
function( $caps ){ | |
if (! empty( $caps['edit_pages'] ) ) | |
$caps['edit_theme_options'] = true; | |
return $caps; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment