Edit File by line
/home/barbar84/public_h.../wp-conte.../themes/twentytw.../template...
File: pagination.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* A template partial to output pagination for the Twenty Twenty default theme.
[2] Fix | Delete
*
[3] Fix | Delete
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
[4] Fix | Delete
*
[5] Fix | Delete
* @package WordPress
[6] Fix | Delete
* @subpackage Twenty_Twenty
[7] Fix | Delete
* @since Twenty Twenty 1.0
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* Translators:
[12] Fix | Delete
* This text contains HTML to allow the text to be shorter on small screens.
[13] Fix | Delete
* The text inside the span with the class nav-short will be hidden on small screens.
[14] Fix | Delete
*/
[15] Fix | Delete
[16] Fix | Delete
$prev_text = sprintf(
[17] Fix | Delete
'%s <span class="nav-prev-text">%s</span>',
[18] Fix | Delete
'<span aria-hidden="true">&larr;</span>',
[19] Fix | Delete
__( 'Newer <span class="nav-short">Posts</span>', 'twentytwenty' )
[20] Fix | Delete
);
[21] Fix | Delete
$next_text = sprintf(
[22] Fix | Delete
'<span class="nav-next-text">%s</span> %s',
[23] Fix | Delete
__( 'Older <span class="nav-short">Posts</span>', 'twentytwenty' ),
[24] Fix | Delete
'<span aria-hidden="true">&rarr;</span>'
[25] Fix | Delete
);
[26] Fix | Delete
[27] Fix | Delete
$posts_pagination = get_the_posts_pagination(
[28] Fix | Delete
array(
[29] Fix | Delete
'mid_size' => 1,
[30] Fix | Delete
'prev_text' => $prev_text,
[31] Fix | Delete
'next_text' => $next_text,
[32] Fix | Delete
)
[33] Fix | Delete
);
[34] Fix | Delete
[35] Fix | Delete
// If we're not outputting the previous page link, prepend a placeholder with `visibility: hidden` to take its place.
[36] Fix | Delete
if ( strpos( $posts_pagination, 'prev page-numbers' ) === false ) {
[37] Fix | Delete
$posts_pagination = str_replace( '<div class="nav-links">', '<div class="nav-links"><span class="prev page-numbers placeholder" aria-hidden="true">' . $prev_text . '</span>', $posts_pagination );
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
// If we're not outputting the next page link, append a placeholder with `visibility: hidden` to take its place.
[41] Fix | Delete
if ( strpos( $posts_pagination, 'next page-numbers' ) === false ) {
[42] Fix | Delete
$posts_pagination = str_replace( '</div>', '<span class="next page-numbers placeholder" aria-hidden="true">' . $next_text . '</span></div>', $posts_pagination );
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
if ( $posts_pagination ) { ?>
[46] Fix | Delete
[47] Fix | Delete
<div class="pagination-wrapper section-inner">
[48] Fix | Delete
[49] Fix | Delete
<hr class="styled-separator pagination-separator is-style-wide" aria-hidden="true" />
[50] Fix | Delete
[51] Fix | Delete
<?php echo $posts_pagination; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- already escaped during generation. ?>
[52] Fix | Delete
[53] Fix | Delete
</div><!-- .pagination-wrapper -->
[54] Fix | Delete
[55] Fix | Delete
<?php
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function