render_block_core_query_pagination

函数


render_block_core_query_pagination ( $attributes, $content )
参数
  • (array)
    $attributes
    Block attributes.
    Required:
  • (string)
    $content
    Block default content.
    Required:
返回值
  • (string) Returns the wrapper for the Query pagination.
定义位置
  • wp-includes/blocks/query-pagination.php
    , line 16
引入
弃用

渲染服务器上的`core/query-pagination`区块。

function render_block_core_query_pagination( $attributes, $content ) {
	if ( empty( trim( $content ) ) ) {
		return '';
	}

	$wrapper_attributes = get_block_wrapper_attributes(
		array(
			'aria-label' => __( 'Pagination' ),
		)
	);

	return sprintf(
		'',
		$wrapper_attributes,
		$content
	);
}