Hello everyone, thanks for taking the time to read this...
So I decided I wanted to change default role from administrator to editor because I feel like there are too many options for novice users.
I found on line 1305 - 1321 where the code states the following:
// Check if the domain has been used already. We should return an error message.
if ( domain_exists($domain, $path, $site_id) )
return new WP_Error('blog_taken', __('Blog already exists.'));
if ( !defined("WP_INSTALLING") )
define( "WP_INSTALLING", true );
if ( ! $blog_id = insert_blog($domain, $path, $site_id) )
return new WP_Error('insert_blog', __('Could not create blog.'));
switch_to_blog($blog_id);
install_blog($blog_id, $title);
install_blog_defaults($blog_id, $user_id);
add_user_to_blog($blog_id, $user_id, 'administrator');
So I figure if I modify:
add_user_to_blog($blog_id, $user_id, 'administrator');
to something like
add_user_to_blog($blog_id, $user_id, 'editor');
that would do the trick but I am worried because I was told that some plug-ins are dependent on administrator roles and I don't want to break my WPMU development environment.
Could I do something like this instead?
add_user_to_blog($blog_id, WP_ADMIN, 'administrator');
add_user_to_blog($blog_id, $user_id, 'editor');
and it will add both the new user and the primary admin to the blog?
Greatly appreciate any feedback.
- Andrew