| 开发者 |
DrewAPicture
TrustedLogin |
|---|---|
| 更新时间 | 2026年5月23日 03:01 |
| 捐献地址: | 去捐款 |
| PHP版本: | 5.3 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
admin-ajax.php requests for stricter lockdown* as a wildcard inside a query value to match a whole group of pages at once. For example, ?page=tl-* allows tl-secrets, tl-config, and any other page whose slug starts with tl-.
Optionally block AJAX requests too:
By default this plugin doesn't touch requests to admin-ajax.php — most WordPress sites rely on those for legitimate frontend AJAX. If you'd rather the dashboard restriction apply there as well, turn on the "Also block AJAX" checkbox in the Advanced section of the settings page.
Users lacking the chosen capability or role(s) will be redirected to the URL set in Settings > Dashboard Access.
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.
No. Disable the plugin if you don't wish to leverage the functionality.
rda_toolbar_nodes (viewing from the admin), and rda_frontend_toolbar_nodes (viewing from the front-end).<li> container for the menu node you're targeting. It should take the form of <li id="wp-admin-bar-SOMETHING"><li id="wp-admin-bar-SOMETHING">, you want the "SOMETHING" part.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:
$pagenow global value (tools.php in this case)$_GET key (page in this case)$_GET value (EXAMPLE in this case)?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' );
`
` /**
To view debugging information on the Settings > Reading screen, visit:
example.com/options-general.php?page=dashboard-access&rda_debug=1
Yes! This plugin is in active development on GitHub. Pull requests are welcome!
Yes. The plugin does not collect any personal data, nor does it set any cookies.
License headers that the wordpress.org plugin reviewer flagged during the 1.3.0 import. No functional change.
🐛 Fixed
License: GPLv2 or later and License URI: https://www.gnu.org/licenses/gpl-2.0.html headers to readme.txt and normalized the plugin file's License: header to the same canonical form. The plugin has always been GPLv2-licensed; the headers were just missing from the locations wordpress.org's plugin directory parses.* inside a query value to match a group of pages at once. For example, ?page=tl-* lets through tl-secrets, tl-config, and any other page slug that starts with tl-.admin-ajax.php requests too. Most sites should leave this off; turn it on only if you know your AJAX endpoints rely on this plugin to keep them gated.wp_safe_redirect(). Your configured redirect URL still works, including external destinations — but accidental redirects to other hosts are now blocked.admin.php?page=… entry to the allow-list, the plugin now confirms the page is actually registered by another plugin before letting visitors through.admin-post.php is now reachable as the 1.2.2 release notes promised. It had been quietly blocked despite the documentation saying it should be exempt.remove_dashboard_access to remove-dashboard-access-for-non-admins to match the WordPress.org slug. If you maintain custom .po/.mo files in /languages/, rename them to use the new domain.rda_strict_ajax filter mirrors the "Also block AJAX" setting for code-level control on a per-site basis.rda_allowlist filter still works; entries now support * wildcards inside query values.@wordpress/scripts + wp-env + PHPUnit. Run locally with npm test._load_textdomain_just_in_time warningadmin-post.php from being accessible, which broke some expected functionality (thanks @brambil)rda_allowlist, to configure pages that should be accessible to all users, regardless of their capabilities or roles (see FAQ for usage)ABSPATH (#26)index.php files in plugin directoriesscreen_icon() warning$pagenow global is not defined (#24)Invalid argument supplied for foreach() PHP warning (#22)rda_default_caps_for_role - Filter default roles for Admins, Editors, and Authorsrda_default_access_cap - Change default access capabilityrda_toolbar_nodes - Filter which back-end Toolbar nodes are hiddenrda_frontend_toolbar_nodes - Filter which front-end Toolbar nodes are hidden