2, 'editor_script' => 'turquesa-article-section', 'editor_style' => 'turquesa-article-section-editor', 'render_callback' => 'turquesa_render_article_section', 'attributes' => array( 'title' => array( 'type' => 'string', 'default' => '', ), 'imageId' => array( 'type' => 'number', 'default' => 0, ), 'imageUrl' => array( 'type' => 'string', 'default' => '', ), 'imageAlt' => array( 'type' => 'string', 'default' => '', ), ), 'supports' => array( 'html' => false, 'anchor' => true, ), ) ); } add_action( 'init', 'turquesa_register_article_section_block' ); function turquesa_render_article_section( $attributes, $content ) { $title = isset( $attributes['title'] ) ? trim( (string) $attributes['title'] ) : ''; $image_id = isset( $attributes['imageId'] ) ? (int) $attributes['imageId'] : 0; $alt = isset( $attributes['imageAlt'] ) ? (string) $attributes['imageAlt'] : ''; $section_id = ''; if ( $title ) { $section_id = sanitize_title( $title ); } ob_start(); ?>
>

'blog-featured', 'alt' => $alt, 'decoding' => 'async', ) ); } ?>