[WordPress] 外掛分享: Remove Dashboard Access

首頁外掛目錄 › Remove Dashboard Access
WordPress 外掛 Remove Dashboard Access 的封面圖片
30,000+
安裝啟用
★★★★
4.6/5 分(78 則評價)
471 天前
最後更新
問題解決
WordPress 3.1.0+ PHP 5.3+ v1.2.1 上架:2011-10-07

內容簡介

僅限管理員、管理員和編輯、管理員和編輯和作者,或者按特定能力限制儀表板訪問權限。
選擇自己的重定向 URL
選擇性允許用戶訪問個人資料
選擇性顯示登錄畫面上的訊息
(更多資訊)

為 RDA 做出貢獻

這個外掛正在GitHub上進行活躍的開發。歡迎提出拉取請求!

能力:

您可以僅限管理員、編輯或以上、作者或以上,或者選擇特定能力來限制儀錶板訪問權限。更多有關WordPress預設角色和功能的資訊可以在這裡找到: https://codex.wordpress.org/Roles_and_Capabilities

用戶訪問個人資料:

您可以選擇性允許所有用戶在儀表板中編輯個人資料。缺乏所選能力的用戶將無法訪問儀錶板的任何其他部分。

登入畫面訊息:

提供在登入畫面上顯示的訊息。留空則停用該訊息。

隱藏其他外掛/佈景主題的工具列選單:

預設情況下,Remove Dashboard Access會移除某些內建的WordPress工具列選單,但可以擴展到通過兩個篩選器隱藏其他外掛或佈景主題的選單:rda_toolbar_nodes(從管理員檢視)和rda_frontend_toolbar_nodes(從前端檢視)。

如何找到選單 (節點) ID:

在HTML頁面源代碼中,尋找您要定位的選單節點的<li>容器。它應該採取<li id="wp-admin-bar-SOMETHING">形式。
在<li id="wp-admin-bar-SOMETHING">中,您需要"SOMETHING"部分。

如何在前端篩選不允許的工具列節點:

/**
* 篩選前端隱藏的工具列選單。
*
* @param array $ids 工具列選單的ID。
* @return array (可能)篩選後的前端工具列選單ID。 */
function wpdocs_hide_some_toolbar_menu( $ids ) {
$ids[] = 'SOMETHING';
return $ids;
}
add_filter( 'rda_frontend_toolbar_nodes', 'wpdocs_hide_some_toolbar_menu' );

常見外掛工具列選單及其id:

Jetpack by WordPress.com(通知)- ‘notes’
WordPress SEO by Yoast - ‘wpseo-menu’
W3 Total Cache - ‘w3tc’

偵錯模式

如果要在「設定 > 閱讀」螢幕上查看除錯資訊,請訪問:

example.com/options-general.php?page=dashboard-access&rda_debug=1

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.2.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Remove Dashboard Access」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

The easiest and safest way to restrict access to your WordPress site’s Dashboard and administrative menus. Remove Dashboard Access is a lightweight plugin that automatically redirects users who shouldn’t have access to the Dashboard to a custom URL of your choosing. Redirects can also be configured on a per-role/per-capability basis, allowing you to keep certain users out of the Dashboard, while retaining access for others.

Limit Dashboard access to user roles:

Admins only
Admins + editors
Admins, editors, and authors
or restrict by specific user capability

Choose your own redirect URL
Optionally allow users to edit their profiles
Display a message on the login screen so users know why they’re being redirected

Blocking access to the Dashboard is a great way to prevent clients from breaking their sites, prevent users from seeing things they shouldn’t, and to keep your site’s backend more secure.
Allow only users with roles or capabilities:
You can restrict Dashboard access to Admins only, Editors or above, Authors or above, or by selecting a specific user capability.
Grant access to user profiles:
Optionally allow all users the ability to edit their profiles in the Dashboard. Users lacking the chosen capability won’t be able to access any other sections of the Dashboard.
Show a custom login message:

Supply a message to display on the login screen. Leaving this blank disables the message.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon