plugin-icon

Primary Blog Switcher for SuperAdmins

제작자: David Sader·
WordPress multisite network plugin to allow Network Admin to set the "Primary Blog" (aka Primary Site) of a user while editing a profile.
등급
5/5
버전
4.6
활성화된 설치 항목
10
최근 업데이트일
Aug 8, 2016

WordPress Multisite network plugin to allow Network Admin to set the “Primary Blog” (aka Primary Site) of a user while editing a user’s profile.

Well, for whatever reasons (usually users fiddling around – I use WP multisite in a school with students grades 4-12), users aren’t attached(or become unattached) to the correct “Primary Blog”.

This isn’t a deal breaker, but annoying when they login and are redirected to a blog that is not their expected primary. It also is annoying when I use other plugins to list user primary blog for display in a member directory, member profiles, etc.

Telling users to reset their primary blog at their own Dashboard->My Blogs is a fix, but the SuperAdmin(Teacher in my case) can head off the confusion first with this plugin. There is no other way(AFAIK) for the Network Admin to set the “Primary Blog” of a user while editing their profile.

Now, I can quickly scan the Network Admin list of users and edit profiles and set primary blogs of any user correctly.

I can also use my Menus plugin to toggle the My Sites menu item so users can no longer fiddle with the Primary Site switcher at all. Problem solved.

참고

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>
무료Business 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 4.6.30
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.