WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Primary Blog Switcher for SuperAdmins

WP3.0 multisite "mu-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: 3.7.1
Last Updated: 2013-11-12
Downloads: 1,379

Ratings

4 stars
4.2 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