I have a post type which is prepopulated with a Gutenberg block:
function blog_block_template() {
$post_type_event = get_post_type_object( 'event' );
$post_type_event->template = array(
array( 'acf/single-event-meta' ),
);
}
add_action( 'init', 'blog_block_template' );
This certain block should not be deleted or reordered. I don’t want to use a meta box because the meta box would be rendered below all Gutenberg blocks or on the side which would be confusing for the user.
There’s the supports
parameter when registering a Gutenberg block which allows to restrict some functionality but I couldn’t find anything about deleting or reordering.
'supports' => array(
'align' => false,
'customClassName' => false,
'html' => false,
'inserter' => false,
'multiple' => false,
'reusable' => false,
),
Thanks!