Last active
December 21, 2015 05:59
-
-
Save rohmann/6261455 to your computer and use it in GitHub Desktop.
Change the default role for users when creating a new site. http://git.io/6_L4Bw
This file contains 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 | |
//This will make the user an editor instead of admin for a new site | |
add_action('wpmu_new_blog','change_new_blog_role',100,6); | |
function change_new_blog_role($blog_id, $user_id, $domain, $path, $site_id, $meta) { | |
remove_user_from_blog($blog_id, $user_id); | |
add_user_to_blog($blog_id, $user_id, 'editor'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This can be placed in a network activated plugin or in a plugin in the mu-plugins folder
For quick implementation without coding, use these steps: