render_block_core_comments ( $attributes, $content, $block )
- (array) attributes Block attributes.
- (string) content Block default content.
- (WP_Block) block Block instance.
- (string) Returns the filtered post comments for the current post wrapped inside "p" tags.
- Introduced in WordPress: —
- Deprecated in WordPress: —
Renders the `core/comments` block on the server.This render callback is mainly for rendering a dynamic, legacy version of
this block (the old `core/post-comments`). It uses the `comments_template()`
function to generate the output, in the same way as classic PHP themes.
As this callback will always run during SSR, first we need to check whether
the block is in legacy mode. If not, the HTML generated in the editor is