Created
May 22, 2018 03:53
-
-
Save davemac/c150fe755a9879b4077d36ec40e8ed43 to your computer and use it in GitHub Desktop.
modify editor user role
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 to manage gravity forms | |
// allow editors to use Appearance menu | |
// allow editors to manage co-authors plus plugin, create guest authors | |
// allow editors to manage Privacy sub-menu under Settings | |
function dmc_modify_editor_role() { | |
$role = get_role( 'editor' ); | |
$capabilities = array( | |
'gform_full_access', | |
'edit_theme_options', | |
'coauthors_guest_author_manage_cap', | |
'manage_privacy_options', | |
); | |
foreach ( $capabilities as $cap ) { | |
$role->add_cap( $cap ); | |
} | |
} | |
add_action( 'admin_init', 'dmc_modify_editor_role' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment