Created
November 2, 2013 00:21
-
-
Save whyisjake/7273977 to your computer and use it in GitHub Desktop.
Let an editor add users.
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 | |
/** | |
* Let editor manage users | |
*/ | |
function make_allow_editor_to_add_users() { | |
$edit_editor = get_role( 'editor' ); | |
$edit_editor->add_cap( 'list_users' ); | |
$edit_editor->add_cap( 'create_users' ); | |
$edit_editor->add_cap( 'delete_users' ); | |
} | |
add_action( 'admin_init', 'make_allow_editor_to_add_users' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment