# gutenberg/12.7.1/build/block-library/blocks/comments-pagination.php

Gutenberg, version 12.7.1. 40 lines.

- Page: https://pluginprobe.com/plugins/gutenberg/12.7.1/code/build/block-library/blocks/comments-pagination.php
- Raw: https://pluginprobe.com/plugins/gutenberg/12.7.1/raw/build/block-library/blocks/comments-pagination.php
- Modified: 2021-12-08T13:37:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/gutenberg/12.7.1/code/build/block-library/blocks/comments-pagination.php#L10-L20`.

```php
<?php
/**
 * Server-side rendering of the `core/comments-pagination` block.
 *
 * @package WordPress
 */

/**
 * Renders the `core/comments-pagination` block on the server.
 *
 * @param array  $attributes Block attributes.
 * @param string $content    Block default content.
 *
 * @return string Returns the wrapper for the Comments pagination.
 */
function gutenberg_render_block_core_comments_pagination( $attributes, $content ) {
	if ( empty( trim( $content ) ) ) {
		return '';
	}

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

/**
 * Registers the `core/comments-pagination` block on the server.
 */
function gutenberg_register_block_core_comments_pagination() {
	register_block_type_from_metadata(
		__DIR__ . '/comments-pagination',
		array(
			'render_callback' => 'gutenberg_render_block_core_comments_pagination',
		)
	);
}
add_action( 'init', 'gutenberg_register_block_core_comments_pagination', 20 );

```
