3, 'title' => __( 'Re:Maily Contact Form', 'remaily' ), 'description' => __( 'A form made with Re:Maily.', 'remaily' ), 'category' => 'widgets', 'keywords' => [ 'form', 'contact', 'remaily', 'email', 're', 'cf' ], // The hash finds the form, after an export and import too; the post ID is only for the editor's links 'attributes' => [ 'id' => [ 'type' => 'integer', 'default' => 0 ], 'hash' => [ 'type' => 'string', 'default' => '' ], ], 'supports' => [ 'html' => false, 'align' => [ 'wide', 'full' ], ], 'render_callback' => [ __CLASS__, 'render' ], ] ); } /** * The block's markup, in the block wrapper (alignment, the block's own classes) * * @param array $attributes Block attributes * * @return string */ public static function render( $attributes ) { $html = Renderer::render( (string) ( $attributes['hash'] ?? '' ) ); return '' === $html ? '' : '