enqueue_legacy_post_comments_block_styles

The timeline below displays how wordpress function enqueue_legacy_post_comments_block_styles has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Enqueues styles from the legacy `core/post-comments` block. These styles are
 * required only by the block's fallback.
 *
 * @param string $block_name Name of the new block type.
 */
function enqueue_legacy_post_comments_block_styles($block_name)
{
    static $are_styles_enqueued = false;
    if (!$are_styles_enqueued) {
        $handles = array('wp-block-post-comments', 'wp-block-buttons', 'wp-block-button');
        foreach ($handles as $handle) {
            wp_enqueue_block_style($block_name, array('handle' => $handle));
        }
        $are_styles_enqueued = true;
    }
}