[WordPress] 外掛分享: Super Admin All Sites Menu

WordPress 外掛 Super Admin All Sites Menu 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Super Admin All Sites Menu」是 2021-10-13 上架。
  • 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
  • 上一次更新是 2025-03-12,距離現在已有 53 天。
  • 外掛最低要求 WordPress 5.6 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 8.0 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

pers |

外掛標籤

multisite | management | superadmin |

內容簡介

不使用switch_to_blog(),即超級管理員所有網站菜單比 WP 管理工具欄我的網站菜單更快更節省資源。
子站點菜單數據在 IndexedDB 中本地儲存(我說它很快吧?)。當以下情況發生時會更新本地儲存:

啟用此外掛。
添加或刪除網站。
更改網站名稱。
IndexedDB 與網站變更非同步。
Restricted Site Access 已啟用或停用。

當子站點菜單數據更新時,會使用 AJAX 進行增量更新(每次更新 100 個站點)。
列出所有子站點。WP 管理工具欄我的網站僅列出您是本地管理員的站點。
將具有受限制站點訪問的站點用紅色圖示標記。
站點菜單按字母順序排序。
搜尋過濾器。
添加更多菜單選擇項:

在“網絡管理”下:

添加新網站

對於每個子站點:

“新頁面”
“使用者”
“外掛”
“設定”

先決條件

WordPress 多站點
現代瀏覽器,不支援 IE 11。

過濾器

您可以使用以下過濾器覆蓋預設值:

all_sites_menu_order_by

按排序方式排序。默認值為name,接受id、url或name

add_filter( 'all_sites_menu_order_by', function( string $order_by ) : string {
return 'url';
} );

all_sites_menu_load_increments

AJAX 加載增量。預設值為 100。

add_filter( 'all_sites_menu_load_increments', function( int $increments ) : int {
return 300;
} );

all_sites_menu_plugin_trigger

當啟用或停用插件時觸發本地儲存(IndexedDB)的更新。默認值為[ 'restricted-site-access/restricted_site_access.php' ]。

註:必須是數組,數組中的每個元素都必須指向主要的插件檔案。語法為'plugin-dir/plugin-file.php'

add_filter( 'all_sites_menu_plugin_trigger', function( array $plugins ) : array {
return [
'restricted-site-access/restricted_site_access.php',
'myplugin/myplugin.php',
];
} );

all_sites_menu_search_threshold

如果子站點少於 N 個,則不顯示搜索欄。默認值為 20。

add_filter( 'all_sites_menu_search_threshold', function( int $increments ) : int {
return 40;
} );

all_sites_menu_search_threshold

如果子站點少於 N 個,則不顯示搜索欄。默認值為 20。

add_filter( 'all_sites_menu_search_threshold', function( int $increments ) : int {
return 40;
} );

原文外掛簡介

Doesn’t use switch_to_blog(), i.e. Super Admin All Sites Menu is faster and uses less resources than the WP Admin Bar My Sites menu.
Subsite menu data are stored locally in IndexedDB (did I say it’s fast?). The local storage is updated when;

the plugin is activated.
a site is added or deleted.
you change a blog name.
IndexedDB is out of sync with site changes.
Restricted Site Access is activated or deactivated.

When subsite menu data is updated, AJAX is used and it’s done in increments (100 sites per increment).
List all subsites. WP Admin Bar My Sites only list sites you’re a local admin on.
Mark sites that has restricted site access with a red icon.
Sites menu is sorted alphabetically.
Search filter.
Add more menu choices:

Under “Network Admin”

Add New Site

Per subsite.

‘New Page’
‘Users’
‘Plugins’
‘Settings’

Prerequisite

WordPress Multisite
A modern browser, IE 11 isn’t supported.

Demo
A demo is available in WordPress Playground. It’s a bit slow loading, 50 subsites are added.

If you disable Super Admin All Sites Menu in the Main Site plugins menu, you’ll see the WP Admin Bar My Sites menu doesn’t allow you to scroll and see all sites. This is a 14-year-old (!) bug on WordPress.

If you activate the Restricted Site Access plugin (included), you’ll see a red icon next to the site name. ATM, this only works on the main site due to issues with WordPress Playground.

Filters
You can use the following filters to override the defaults:

all_sites_menu_order_by

Sort menu by. Default value is name, accepts id, url or name
add_filter( 'all_sites_menu_order_by', function( string $order_by ) : string {
return 'url';
} );

all_sites_menu_load_increments

AJAX load increments. Default value is 100.
add_filter( 'all_sites_menu_load_increments', function( int $increments ) : int {
return 300;
} );

all_sites_menu_plugin_trigger

Trigger an update of local storage (IndexedDB) when a plugin is (de)activated. Default is [ 'restricted-site-access/restricted_site_access.php' ].

Note: Must be an array and each element in the array must point to the main plugin file. Syntax 'plugin-dir/plugin-file.php'

add_filter( 'all_sites_menu_plugin_trigger', function( array $plugins ) : array {
return [
'restricted-site-access/restricted_site_access.php',
'myplugin/myplugin.php',
];
} );

all_sites_menu_search_threshold

Don’t display search field if there’s less than N subsites. Default value is 20.
add_filter( 'all_sites_menu_search_threshold', function( int $increments ) : int {
return 40;
} );

all_sites_menu_search_threshold

Don’t display search field if there’s less than N subsites. Default value is 20.
add_filter( 'all_sites_menu_search_threshold', function( int $increments ) : int {
return 40;
} );

all_sites_menu_force_refresh_expiration

How often a forced refresh should be taken. Default value is 3600. Set the value to 0 to disable forced refresh.
add_filter( 'all_sites_menu_force_refresh_expiration', function( int $seconds ) : int {
return 3600;
} );

Development

Active development of this plugin is handled on GitHub.

各版本下載點

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

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


1.4.9 | 1.5.0 | 1.6.0 | 1.6.1 | 1.6.2 | 1.6.4 | 1.6.5 | 1.6.6 | 1.6.7 | 1.6.9 | 1.7.2 | 1.7.3 | 1.8.0 | 1.8.1 | 1.8.2 | 1.8.3 | 1.8.4 | 1.8.5 | trunk | 1.4.10 | 1.4.11 | 1.4.12 | 1.4.13 | 1.4.14 | 1.4.15 | 1.4.16 | 1.4.17 | 1.4.18 | 1.4.19 | 1.4.20 | 1.4.21 | 1.4.22 | 1.4.23 | 1.4.24 | 1.4.25 | 1.4.26 | 1.4.27 | 1.4.28 |

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

  • Cornerstone 》Cornerstone 可以增強 WordPress 的內容管理功能,讓它適應任何類型的網站。長久以來,我們只能利用像是將分類加入到選單中,用假的網站結構塑造網站。你知道...。
  • Automattic For Agencies Client 》以下是本文章的摘要:, 新的 Automattic for Agencies 代理計劃整合了 Woo、WordPress.com、Jetpack 和 Pressable 等最佳功能,集合於一倇。學習更多關於 Auto...。
  • Advanced Coupons for WooCommerce 》**總結:**, Advanced Coupons for WooCommerce 是一個針對 WooCommerce 的外掛,能夠根據靈活的規則進行進階的折扣管理。可以根據各種標準配置自訂折扣,例如...。
  • Edit Flow 》Edit Flow 是一個 WordPress 外掛,讓你可以和你的編輯團隊協作。我們設計了模組化功能,讓你可以依據需要自訂:, , 月曆 – 方便地查看你的內容每個月...。
  • WP125 》如果你已放棄了許多新博客使用的低收益和稍有干擾的廣告網絡,轉而直接販售廣告,你可能會對管理廣告所需的過多時間感到失望。你不僅需要尋找贊助你的博客的...。
  • Better Plugin Compatibility Control 》Better Plugin Compatibility Control 讓網誌管理員能輕鬆檢查所有安裝的外掛相容性。該外掛在外掛頁面上新增版本相容性資訊,方便管理員一目了然地知道外掛...。
  • Plugin Compatibility Checker 》一個簡單的外掛程式,可在 WordPress 更新前檢查您的外掛程式是否與該版本的 WordPress 相容。它會顯示當前運行的外掛程式版本、最新版本的釋出以及它們是否...。
  • LeadSnap 》這是LeadSnap的官方外掛程式。此外掛程式可以建立WordPress和您的LeadSnap帳號之間的連接。表單提交會立即生成,並在LeadSnap系統中準備好充分利用我們領先的...。
  • Lead Generated 》這是 Lead Generated 官方的外掛程式,透過此外掛程式,您可以在 WordPress 與您的 Lead Generated 帳戶之間建立連線。表單提交的資料立即可在 Lead Generate...。
  • ThemeKit For WordPress 》ThemeKit 是一款 WordPress 外掛,幫助您透過提供統一的創建選項方式,協助升級自助託管 WordPress 主題和外掛。, 欲獲得更多資訊,請參閱 themekitwp.com。,...。
  • UpStream: a Project Management Plugin for WordPress 》mizable Project Management Plugin - UpStream, UpStream是一個免費的專案管理外掛。, 透過UpStream的功能,使用者可以在WordPress網站內管理任何類型的專案...。
  • Panorama – WordPress Project Management Plugin 》WordPress 專案管理及客戶儀表板外掛, 憑借 Project Panorama,您會愛上專案管理!, 管理專案很困難,使用錯誤的工具可能會使其變得更加困難,而非更簡單。, ,...。
  • Administrator Z 》有時候安裝網站時需要重複的瑣碎工作,因此我撰寫了這個外掛來釋放這些時間。, 功能特色:請至「工具」> 「Administratorz」查看, , 預設功能:, 排程載入...。
  • Library Management System 》購買專業版 | 僅售 $49, 詳細資訊請點擊此處, 圖書館管理系統外掛讓您有彈性地管理部門、使用者、書櫃、書籍等。使用此 LMS 外掛,您可以為使用者管理圖書館...。
  • Clicface Organi 》Clicface Organi 是一個絕佳的 WordPress 外掛程式,可建立員工組織圖表。這是適用於組織、團隊和協會的完美解決方案。, Clicface Organi 與 Clicface Trombi...。

文章
Filter
Apply Filters
Mastodon