| 开发者 | wirecore |
|---|---|
| 更新时间 | 2026年11月10日 03:40 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp/v2/users) to admins, reset custom rules./wp-json/).wp wirecore-rest status|routes|set|default|export|import|log._embed) and sub-requests of the batch endpoint (/batch/v1). Internal rest_do_request() calls made by PHP – for example when the block editor preloads data – are not affected.
Multisite
Settings are stored per site, because every site has its own routes and plugins. The plugin can be network-activated; uninstalling removes the settings of all sites.
For developers
wirecore_rc_error – filters the WP_Error of a blocked request (parameters: error, route pattern, method). Returning true allows the request after all.wirecore_rc_client_ip – filters the client IP, e.g. behind a reverse proxy.wirecore_rc_known_namespaces – filters the plugins offered under "Automatic allowances" (array key => [namespaces]).assets/wirelayer/wirelayer.css is generated from the npm package @wirecore/wirelayer-css with npm run build:css; the source code of the plugin, including package.json, is available at github.com/WireCore/WP-Rest-Control. Bundled with it:
wirelayer.cssassets/wirelayer/fonts/OFL.txt), served from the plugin – no external font service/wp-content/plugins/.composer require wpackagist-plugin/wirecore-rest-control.Add the following line to your wp-config.php. It disables all rules until you remove it again:
define( 'WIRECORE_RC_OFF', true );
Not by default: the option "Never block administrators" is enabled after activation, because the block editor needs the REST API. Deny lists (IP addresses, roles) always apply, also to administrators.
Check Settings → REST API → Settings → Automatic allowances. If the plugin is not listed there, search for its namespace in the route list and set it to "Public".
Yes. The route list contains every registered route and shows which plugin or theme registered it. Some plugins only register routes during REST requests; the list is therefore loaded through the REST API itself so that these routes are included as well.
Use Tools → Self-test on the settings page, or open /wp-json/ in a private browser window.
The plugin ships with German translations (formal and informal). Further translations are welcome on translate.wordpress.org.