Skip to main content
The WordPress Block Editor provides extensive customization capabilities, allowing you to tailor the editing experience to your specific needs. You can control which features are available, modify block behavior, and create a curated editing environment.

Editor Settings

The block_editor_settings_all Filter

The block_editor_settings_all PHP filter is your primary tool for modifying editor settings before the editor initializes:
The filter receives two parameters:
  • $settings - Array of configurable editor settings
  • $context - Instance of WP_Block_Editor_Context containing editor information

Common Editor Settings

Controlling Available Blocks

Allow/Deny Lists

You can control which blocks are available in the editor:
When unregistering blocks, ensure your code runs after block registration by specifying wp-edit-post as a dependency and using domReady() to avoid race conditions.

Block Categories

Customize block categories in the inserter:

Client-side Settings Filters

blockEditor.useSetting.before

This powerful filter allows you to modify block-level theme.json settings dynamically:

User-Based Customization

Tailor the editor experience based on user capabilities:

Template Locking

Control which parts of a template users can edit:

Patterns Management

Control block pattern availability:
Control editor UI elements:

Document Settings

Add custom panels to the document settings:

Pre-publish Panel

Add custom checks before publishing:

Color and Typography Controls

Fine-tune design controls:

Context-Aware Customization

Customize based on post type or template:

Best Practices

  1. Test thoroughly: Customizations affect the editing experience - test with different user roles
  2. Document your changes: Explain why certain features are restricted
  3. Consider accessibility: Ensure customizations don’t hinder content creation for users with disabilities
  4. Use progressive enhancement: Start with minimal restrictions and add more as needed
  5. Provide feedback: When restricting features, explain to users why certain options aren’t available
  6. Stay updated: Block editor features evolve - review customizations with each WordPress update

Common Use Cases

Simplified Editor for Contributors

Landing Page Template

Next Steps