Editor Settings
The block_editor_settings_all Filter
Theblock_editor_settings_all PHP filter is your primary tool for modifying editor settings before the editor initializes:
$settings- Array of configurable editor settings$context- Instance ofWP_Block_Editor_Contextcontaining editor information
Common Editor Settings
- Disable Code Editor
- Set Default Image Size
- Disable Font Library
- Disable Inspector Tabs
Controlling Available Blocks
Allow/Deny Lists
You can control which blocks are available in the editor: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:- Restrict by Block Type
- Restrict by Parent Block
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:Sidebar and Panel Customization
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
- Test thoroughly: Customizations affect the editing experience - test with different user roles
- Document your changes: Explain why certain features are restricted
- Consider accessibility: Ensure customizations don’t hinder content creation for users with disabilities
- Use progressive enhancement: Start with minimal restrictions and add more as needed
- Provide feedback: When restricting features, explain to users why certain options aren’t available
- Stay updated: Block editor features evolve - review customizations with each WordPress update
Common Use Cases
Simplified Editor for Contributors
Landing Page Template
Next Steps
- Learn about Filters and Hooks for advanced customization
- Explore Theme.json Configuration for design system control
- Read about Data Management for dynamic features