render_block_core_comments


render_block_core_comments ( $attributes, $content, $block )

Parameters:
  • (array) attributes Block attributes.
  • (string) content Block default content.
  • (WP_Block) block Block instance.
Returns:
  • (string) Returns the filtered post comments for the current post wrapped inside "p" tags.
Defined at:

Description

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 returned instead.

Related Functions

render_block_core_comments_title, register_block_core_comments, render_block_core_comment_date, render_block_core_latest_comments, render_block_core_cover

Top Google Results

User discussions

wpseek mobile