enqueue_legacy_post_comments_block_styles example



    $wrapper_attributes = get_block_wrapper_attributes(
        array( 'class' => implode( ' ', $classnames ) )
    );

    /* * Enqueues scripts and styles required only for the legacy version. That is * why they are not defined in `block.json`. */
    wp_enqueue_script( 'comment-reply' );
    enqueue_legacy_post_comments_block_styles( $block->name );

    return sprintf( '<div %1$s>%2$s</div>', $wrapper_attributes$output );
}

/** * Registers the `core/comments` block on the server. */
function register_block_core_comments() {
    register_block_type_from_metadata(
        __DIR__ . '/comments',
        array(
            
Home | Imprint | This part of the site doesn't use cookies.