WordPress.org

Plugin Directory

Test out the new Plugin Directory and let us know what you think.

Primary Blog Switcher for SuperAdmins

WordPress multisite network plugin to allow Network Admin to set the "Primary Blog" (aka Primary Site) of a user while editing a profile.

Notes

The original code for the Primary Site switcher is in wp-admin-includes/ms.php. I've basically copied that, but changed get_current_user_id() to $edit_user = (int) $_GET['user_id']; and added it to the "edit_user_profile" hook.

The plugin can be used to add users to a "Special Blog" by uncomment(remove the /* and */) this section in the plugin code and change the $special_blog_id:

<optgroup label="Other Blogs"></optgroup>
<optgroup label="Special Blog">
<?php $special_blog_id = '63'; //
$special_blog = get_blog_details( $special_blog_id ); ?>
<option value='<?php echo $special_blog_id ?>'>http://<?php echo $special_blog->domain.$special_blog->path ?></option>
</optgroup>

Requires: 3.0 or higher
Compatible up to: 4.6.2
Last Updated: 5 months ago
Active Installs: 30+

Ratings

5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 0,1,0 100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1