Block Chaperone – Restrict Blocks by Role & Post Type

Description

Block Chaperone adds a settings screen that lists every top-level block on your site — core blocks and blocks from plugins and themes — with these options per block:

  • Hide from inserter — the block can’t be added, but existing content keeps working.
  • Unregister — the block can’t be used in post content: it’s hidden, and existing instances show a placeholder you can remove. Templates that use the block keep working.
  • Post types — choose where those restrictions apply. By default they apply to all post types; pick post types to restrict the block only there, for example hide List in Posts but keep it in Pages.
  • Roles — choose who those restrictions apply to. By default they apply to everyone; pick roles to restrict only those users, for example hide Custom HTML from Editors and Authors while Administrators keep it.

Search the list, filter it by status, category or source plugin, and change many blocks at once with bulk actions.

How it behaves

  • Child blocks (like List items or Columns) follow their parent automatically, so they don’t clutter the list.
  • New blocks from newly activated plugins are allowed by default. Only the blocks you change are stored.
  • Restrictions apply in the post editor only; the Site Editor is left alone.
  • The Paragraph block is protected, because the editor depends on it.
  • If your theme or another plugin already limits the available blocks, Block Chaperone only removes from that list. It never adds blocks back.

For developers

Use the block_chaperone_settings filter to add or override rules in code. A REST API at block-chaperone/v1 powers the settings screen. See the README on GitHub for details.

Screenshots

Installation

  1. Upload the plugin to /wp-content/plugins/ or install it from the Plugins screen.
  2. Activate it.
  3. Go to Settings Block Chaperone.

FAQ

What happens to content that uses a hidden block?

Nothing. Hidden blocks keep rendering on the site and can still be edited. They just can’t be inserted again.

What happens to content that uses an unregistered block?

On the site, it keeps rendering. In the post editor, it shows as a placeholder that can be removed but not edited; its content is kept and saved unchanged. Templates and template parts that use the block are not affected.

Do restrictions apply in the Site Editor?

No. Restrictions only apply where content is written: the post editor for posts, pages and other post types. The Site Editor (including pages opened from it), the widgets editor and the Customizer keep every block available, so building templates isn’t affected.

Why isn’t a block listed?

Only top-level blocks that can be inserted are listed. Blocks registered only in JavaScript, without a PHP or block.json registration, can’t be detected.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Block Chaperone – Restrict Blocks by Role & Post Type” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

View the full changelog on GitHub.