Edit File by line
/home/zeestwma/richards.../wp-inclu.../blocks
File: comments-pagination.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Server-side rendering of the `core/comments-pagination` block.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Renders the `core/comments-pagination` block on the server.
[8] Fix | Delete
*
[9] Fix | Delete
* @since 6.0.0
[10] Fix | Delete
*
[11] Fix | Delete
* @param array $attributes Block attributes.
[12] Fix | Delete
* @param string $content Block default content.
[13] Fix | Delete
*
[14] Fix | Delete
* @return string Returns the wrapper for the Comments pagination.
[15] Fix | Delete
*/
[16] Fix | Delete
function render_block_core_comments_pagination( $attributes, $content ) {
[17] Fix | Delete
if ( empty( trim( $content ) ) ) {
[18] Fix | Delete
return '';
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
if ( post_password_required() ) {
[22] Fix | Delete
return;
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
$classes = ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) ? 'has-link-color' : '';
[26] Fix | Delete
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
[27] Fix | Delete
[28] Fix | Delete
return sprintf(
[29] Fix | Delete
'<div %1$s>%2$s</div>',
[30] Fix | Delete
$wrapper_attributes,
[31] Fix | Delete
$content
[32] Fix | Delete
);
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
/**
[36] Fix | Delete
* Registers the `core/comments-pagination` block on the server.
[37] Fix | Delete
*
[38] Fix | Delete
* @since 6.0.0
[39] Fix | Delete
*/
[40] Fix | Delete
function register_block_core_comments_pagination() {
[41] Fix | Delete
register_block_type_from_metadata(
[42] Fix | Delete
__DIR__ . '/comments-pagination',
[43] Fix | Delete
array(
[44] Fix | Delete
'render_callback' => 'render_block_core_comments_pagination',
[45] Fix | Delete
)
[46] Fix | Delete
);
[47] Fix | Delete
}
[48] Fix | Delete
add_action( 'init', 'register_block_core_comments_pagination' );
[49] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function