WordPress.org

Taiwan 正體中文

  • 佈景主題目錄
  • 外掛目錄
  • 最新消息
  • 技術支援
  • 關於我們
  • 團隊
  • 取得 WordPress
取得 WordPress
WordPress.org

Plugin Directory

Remove Dashboard Access

  • 提交外掛
  • 我的最愛
  • 登入
  • 提交外掛
  • 我的最愛
  • 登入

Remove Dashboard Access

由 TrustedLogin 開發
下載
  • 詳細資料
  • 使用者評論
  • 安裝方式
  • 開發資訊
技術支援

外掛說明

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.

螢幕擷圖

  • The Dashboard Access Controls settings in the Settings > Dashboard Access screen.
  • Allow users to access their profile settings (only).
  • Optional login message.

安裝方式

  1. Search ‘Remove Dashboard Access’ from the Install Plugins screen.
  2. Install plugin, click Activate.

常見問題集

What happens to disallowed users who try to access to the Dashboard?

Users lacking the chosen capability or role(s) will be redirected to the URL set in Settings > Dashboard Access.

Why haven’t you added an option to disable the WordPress Toolbar?

The Toolbar contains certain important links (even for disallowed users) such as for accessing to the profile editor and/or logging out. Plus, there are many plugins out there for disabling the Toolbar if you really want to.

Can I disable the redirection/profile-editing controls without disabling the plugin?

No. Disable the plugin if you don’t wish to leverage the functionality.

How do I hide other plugins/themes’ Toolbar menus?

  • Remove Dashboard Access removes some built-in WordPress Toolbar menus by default, but can be extended to hide menus from other plugins or themes via two filters: rda_toolbar_nodes (viewing from the admin), and rda_frontend_toolbar_nodes (viewing from the front-end).

How do I find the menu (node) id?

  • In the HTML page source, look for the <li> container for the menu node you’re targeting. It should take the form of <li id="wp-admin-bar-SOMETHING">
  • In <li id="wp-admin-bar-SOMETHING">, you want the “SOMETHING” part.

How can I allow access to specific pages of the Dashboard?

The function returns an associative array with $pagenow as the key and a nested array of key => value pairs where the key is the $_GET parameter and the value is the allowed value.

Example: If you want to allow a URL of admin.php?page=EXAMPLE, there are three parts to know:

  • The $pagenow global value (tools.php in this case)
  • The $_GET key (page in this case)
  • The $_GET value (EXAMPLE in this case)

Here is how we would add that URL to the allowlist:

/**
 * Allow users to access a page with a URL of tools.php?page=EXAMPLE
 *
 * @param array $pages Allowed Dashboard pages.
 * @return array Filtered allowed Dashboard pages.
 */
function wpdocs_allow_example_dashboard_page( $pages ) {

    // If the $pages array doesn't contain the 'admin.php' key, add it.
    if ( ! isset( $pages['tools.php'] ) ) {
        $pages['tools.php'] = array();
    }

    // Now add ?page=EXAMPLE` combination to the allowed parameter set for that page.
$pages['tools.php'][] = array(
    'page' => 'EXAMPLE'
);

return $pages;

}

add_filter( ‘rda_allowlist’, ‘wpdocs_allow_example_dashboard_page’ );
`

How can I filter the disallowed Toolbar nodes on the front-end?

`
/**
* Filter hidden Toolbar menus on the front-end.
*
* @param array $ids Toolbar menu IDs.
* @return array Filtered front-end Toolbar menu IDs.
*/
function wpdocs_hide_some_toolbar_menu( $ids ) {
$ids[] = ‘SOMETHING’;
return $ids;
}
add_filter( ‘rda_frontend_toolbar_nodes’, ‘wpdocs_hide_some_toolbar_menu’ );

Common plugin Toolbar menus and their ids:

  • Jetpack by WordPress.com (notifications) – ‘notes’
  • WordPress SEO by Yoast – ‘wpseo-menu’
  • W3 Total Cache – ‘w3tc’

How do I enable Debug Mode?

To view debugging information on the Settings > Reading screen, visit:

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

Can I contribute to the plugin?

Yes! This plugin is in active development on GitHub. Pull requests are welcome!

Is the plugin GDPR compliant?

Yes. The plugin does not collect any personal data, nor does it set any cookies.

使用者評論

Very important for safety

dspplug 2025 年 1 月 27 日
Meddling with htaccess always goes south on me unless I use the old notepad. I rarely have time to. This workaround does the same thing; and is just as good. Now, how do I remove access to wp-login.php altogether? 6/5 stars

Does exactly what it says it will do

SmileWP 2023 年 9 月 28 日
Installed, activated, found Settings, set it to allow dashboard for only Admins, Editors, and Authors. Works perfectly right out of the box.

Works Perfectly

Texoma 2023 年 8 月 10 日
Works as it says it will.

Fantastic add on to any LearnDash site

trainingcity 2023 年 5 月 25 日
This easy addon solved the hassle of how to limit access to profiles for students in our online courses. It plays well with a fairly complex wordpress site using LearnDash and allowed us to create a simple “My Locker Room” home page for students to view their course progress.

Avoid

lellojello 2022 年 6 月 16 日
An insidious mess that bricked my entire site as soon as I installed it.

5 Estrellas

javigandia 2022 年 3 月 8 日
Muchas gracias por este buenísimo plugin. Muy fácil de utilizar y muy efectivo.
閱讀全部 78 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Remove Dashboard Access〉的開發相關工作。

參與者
  • TrustedLogin

〈Remove Dashboard Access〉外掛目前已有 7 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Remove Dashboard Access〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

變更記錄

1.2.1 on November 29, 2024

  • Fixed: Compatibility with WordPress 6.7 (there was a warning that translations were being loaded too soon)
  • Tweak: Sanitized admin menu URL

1.2 on January 29, 2024

  • Confirmed compatibility with WordPress 6.4.2
  • New: Added a new filter, rda_allowlist, to configure pages that should be accessible to all users, regardless of their capabilities or roles (see FAQ for usage)
  • Improved: Added a description that clarifies that the Login Message is only displayed on the WordPress “Log In” screen
  • Improved: The User Profile Access text is now a proper label for the checkbox
  • Fixed: Allow access to the Wordfence 2FA configuration page (#33)
  • Fixed: Text domain not properly set for translations (thanks @fierevere)
  • Tweak: Prevent directly accessing PHP files by checking for ABSPATH (#26)
  • Tweak: Prevent browsing directories on poorly-configured servers by adding index.php files in plugin directories

1.1.4 & 1.1.5 on April 18, 2022

Remove Dashboard Access is now being maintained by TrustedLogin! Remove Dashboard Access aligns with what we do at TrustedLogin: simply making WordPress more secure. Email any questions to support@trustedlogin.com.

  • Fixed: Deactivating and activating the plugin will no longer overwrite plugin settings
  • Fixed: Deprecated function screen_icon() warning
  • Fixed: Issue when front-end editing of profiles when the $pagenow global is not defined (#24)
  • Fixed: Potential Invalid argument supplied for foreach() PHP warning (#22)

1.1.3

  • Fixed a compatibility issue with bbPress and the media grid view.

1.1.2

  • Bump tested-up-to to 4.1.0
  • Miscellaneous readme changes.

1.1.1

Bug Fix:

  • Move options back to Settings > Dashboard Access screen to resolve conflict with page_on_front UI.

1.1

Enhancements:

  • Instantiate as a static instance for better modularity
  • Move Dashboard Access Controls settings to Settings > Dashboard Access
  • Add optional login message option
  • Add better settings sanitization
  • New Filter: rda_default_caps_for_role – Filter default roles for Admins, Editors, and Authors
  • New Debug Mode

Bug Fixes:

  • Remove unnecessarily stringent URL mask on the redirect URL option

1.0

  • Complete rewrite!
  • New: Limit dashboard access for Admins only or by capability
  • New: Allow/disallow edit-profile access
  • New: Choose your own redirect URL
  • New Filter: rda_default_access_cap – Change default access capability
  • New Filter: rda_toolbar_nodes – Filter which back-end Toolbar nodes are hidden
  • New Filter: rda_frontend_toolbar_nodes – Filter which front-end Toolbar nodes are hidden

0.4

  • Refined DOING_AJAX check for logged-out users, props @nacin and @BoiteAWeb

0.3

  • Changed cap to manage_options, replaced PHP_SELF with DOING_AJAX

0.2

  • Replaced preg_match with admin-ajax test. Added compatibility with rewritten dashboard URLs.

0.1

  • Submitted to repository

中繼資料

  • 版本 1.2.1
  • 最後更新 6 個月前
  • 啟用安裝數 40,000+
  • WordPress 版本需求 3.1.0 或更新版本
  • 已測試相容的 WordPress 版本 6.7.2
  • PHP 版本需求 5.3 或更新版本
  • 語言

    Dutch、English (Canada)、English (US)、German、Russian、Spanish (Chile)、Spanish (Spain)、及 Swedish.

    將這個外掛本地化為你的母語版本

  • 標籤
    accessadministrationdashboardloginrestrict
  • 進階檢視

評分

4.6 星,滿分為 5 星
  • 67 個 5 星使用者評論 5 星 67
  • 4 個 4 星使用者評論 4 星 4
  • 1 個 3 星使用者評論 3 星 1
  • 2 個 2 星使用者評論 2 星 2
  • 4 個 1 星使用者評論 1 星 4

新增使用者評論

查看全部使用者評論

參與者

  • TrustedLogin

技術支援

最近 2 個月解決的問題:

總計 3 個問題,已解決 0 個

檢視技術支援論壇

贊助

想要支援這個外掛的發展嗎?

贊助這個外掛

  • 關於我們
  • 最新消息
  • 主機代管
  • 隱私權
  • 展示網站
  • 佈景主題目錄
  • 外掛目錄
  • 區塊版面配置目錄
  • Learn
  • 技術支援
  • 開發者資源
  • WordPress.tv ↗
  • 共同參與
  • 活動
  • 贊助基金會 ↗
  • Five for the Future
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

Taiwan 正體中文

  • 查看我們的 X (之前的 Twitter) 帳號
  • Visit our Bluesky account
  • Visit our Mastodon account
  • Visit our Threads account
  • 造訪我們的 Facebook 粉絲專頁
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Visit our TikTok account
  • Visit our YouTube channel
  • Visit our Tumblr account
程式碼,如詩