Edit File by line
/home/zeestwma/richards.../wp-inclu.../blocks
File: query-pagination.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Server-side rendering of the `core/query-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/query-pagination` block on the server.
[8] Fix | Delete
*
[9] Fix | Delete
* @since 5.9.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 Query pagination.
[15] Fix | Delete
*/
[16] Fix | Delete
function render_block_core_query_pagination( $attributes, $content ) {
[17] Fix | Delete
if ( empty( trim( $content ) ) ) {
[18] Fix | Delete
return '';
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
$classes = ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) ? 'has-link-color' : '';
[22] Fix | Delete
$wrapper_attributes = get_block_wrapper_attributes(
[23] Fix | Delete
array(
[24] Fix | Delete
'aria-label' => __( 'Pagination' ),
[25] Fix | Delete
'class' => $classes,
[26] Fix | Delete
)
[27] Fix | Delete
);
[28] Fix | Delete
[29] Fix | Delete
return sprintf(
[30] Fix | Delete
'<nav %1$s>%2$s</nav>',
[31] Fix | Delete
$wrapper_attributes,
[32] Fix | Delete
$content
[33] Fix | Delete
);
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
/**
[37] Fix | Delete
* Registers the `core/query-pagination` block on the server.
[38] Fix | Delete
*
[39] Fix | Delete
* @since 5.8.0
[40] Fix | Delete
*/
[41] Fix | Delete
function register_block_core_query_pagination() {
[42] Fix | Delete
register_block_type_from_metadata(
[43] Fix | Delete
__DIR__ . '/query-pagination',
[44] Fix | Delete
array(
[45] Fix | Delete
'render_callback' => 'render_block_core_query_pagination',
[46] Fix | Delete
)
[47] Fix | Delete
);
[48] Fix | Delete
}
[49] Fix | Delete
add_action( 'init', 'register_block_core_query_pagination' );
[50] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function