Trait_Restrict_To_Post_Editor uses trait:short
Trait for restricting a block to the post editor context.
Table of Contents
Methods
- init_trait_restrict_to_post_editor() : mixed
- Trait initialization function.
- 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
init_trait_restrict_to_post_editor()
Trait initialization function.
protected
init_trait_restrict_to_post_editor() : mixed
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