| 开发者 | markrussellwp |
|---|---|
| 更新时间 | 2026年8月16日 07:00 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp_get_environment_type()), or when you opt in with define( 'BLOCKWRIGHT_WORKBENCH', true ); in wp-config. Every tool is capability-gated and nonce-protected; the one destructive tool requires an explicit confirmation.
Pairs well with the official Create Block Theme plugin: use Create Block Theme to save the changes you want INTO your theme files, and the Workbench to clear out the state you do not want.
Works with any block theme.
local or development (wp_get_environment_type()), the Workbench menu appears in the admin bar right away for users who can edit themes. Anywhere else, nothing is shown until you opt in by adding define( 'BLOCKWRIGHT_WORKBENCH', true ); to wp-config.php.That is the safety gate. It appears only when wp_get_environment_type() is local or development, or when wp-config defines BLOCKWRIGHT_WORKBENCH as true, and only for users with the edit_theme_options capability.
One tool does, on purpose: Reset Site Editor permanently deletes the database rows that override your theme's template, template part and global styles files, so the files win again. It bypasses the trash, so anything customised in the Site Editor and never exported to your theme is gone. It is marked destructive, requires a confirmation click, and never runs on a production site unless you explicitly enabled the Workbench there.