Comment on page
Modal
This block type renders a modal window with inner blocks.
The code below renders a modal window with the "My Custom Text" title and a single inner block of the
content
type that outputs the "Hello World!" text. If you add a link with the #my_custom_modal
URL anywhere on a page, it will open this modal window on click.echo ( new HivePress\Blocks\Modal(
[
'title' => 'My Custom Text',
'name' => 'my_custom_modal',
'blocks' => [
'my_custom_block' => [
'type' => 'content',
'content' => 'Hello World!',
'_order' => 123,
],
],
]
) )->render();
Last modified 1yr ago