Blocks

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

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
link

Block context documentation.


        
On this page

Search results