Trait_Restrict_To_Editor_Context
Trait for restricting a block to a specific editor context.
Table of Contents
Methods
- restrict_to_editor_context() : mixed
- Will ensure that the block is only available within a specified editor context.
- restrict_to_post_editor() : mixed
- Restrict block availability to the post editor only.
- restrict_to_site_editor() : mixed
- Restrict block availability to the site editor only.
Methods
restrict_to_editor_context()
Will ensure that the block is only available within a specified editor context.
protected
restrict_to_editor_context(string $editor_context_name) : mixed
Parameters
- $editor_context_name : string
-
The name of the editor context.
Tags
restrict_to_post_editor()
Restrict block availability to the post editor only.
protected
restrict_to_post_editor() : mixed
restrict_to_site_editor()
Restrict block availability to the site editor only.
protected
restrict_to_site_editor() : mixed