The WP_Block_Editor_Context
object provides editor name and post information for targeted block control. Use this context to customize block availability per editor type or post type.
Editor names include ‘core/edit-post’ (content editor), ‘core/edit-site’ (site editor), ‘core/edit-widgets’ (widget editor), and ‘core/customize-widgets’ (customizer widgets), enabling editor-specific customization.
The post property appears only in content editors and provides access to the current post object, enabling post-type-specific block restrictions through standard WordPress post data.
This context system enables sophisticated block curation strategies that adapt to different editing contexts while maintaining consistent user experiences within each context.