[WordPress] 外掛分享: Primary Blog Switcher for SuperAdmins

前言介紹

  • 這款 WordPress 外掛「Primary Blog Switcher for SuperAdmins」是 2010-08-15 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2016-08-08,距離現在已有 3191 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
  • 有 2 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

dsader |

外掛標籤

network | profile | multisite | primary blog | primary site |

內容簡介

WordPress Multisite 網站的外掛,可允許網站管理員在編輯使用者設定檔時設定使用者的主要網誌(即主要網站)。

因為某些原因(通常是使用者節外生枝 - 我在一所學校用 WP Multisite,學生的年級從四年級到十二年級),使用者會沒有連結(或取消連結)到正確的「主要網誌」。

這不是破壞者,但當他們登入並被重新導向到不是他們預期的主要網誌時,這是很煩人的。當我使用其他外掛來列出使用者主要網誌以顯示在會員目錄、會員設定檔等時,它也很煩人。

告訴使用者在他們自己的儀表板 -> 我的網誌中重設他們的主要網誌是解決方法,但是在這個外掛之前,超級管理員(我是老師)可以先解決混淆。在編輯其設定檔案時,沒有其他方法可以讓網站管理員設定使用者的「主要網誌」。

現在,我可以快速瀏覽使用者的網站管理員列表,編輯其設定檔案並正確設定每個使用者的主要網誌。

我也可以使用我的選單外掛,切換「我的網站」選單項目,以便使用者完全無法節外生枝處理主要網站切換器。問題解決了。

註記

原始的主要網站切換器程式碼在 wp-admin-includes/ms.php 中。我基本上複製了它,但將 get_current_user_id() 改為 $edit_user = (int) $_GET['user_id'];,並將其添加到「edit_user_profile」鉤子。

此外掛可用於將使用者新增至「特殊網誌」,方法是取消程式碼中此部分的註解(刪除 /* 和 */),並變更 $special_blog_id:



$special_blog = get_blog_details( $special_blog_id ); ?>

原文外掛簡介

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.
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:


各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Primary Blog Switcher for SuperAdmins」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


最新版本

延伸相關外掛(你可能也想知道)

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon