Skip to content

Commit 9342553

Browse files
Coding Standards: Use strict comparison in paginate_links().
Follow-up to [4275], [28785]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59606 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 48ba7a3 commit 9342553

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wp-includes/general-template.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4579,7 +4579,7 @@ function paginate_links( $args = '' ) {
45794579
$dots = false;
45804580

45814581
if ( $args['prev_next'] && $current && 1 < $current ) :
4582-
$link = str_replace( '%_%', 2 == $current ? '' : $args['format'], $args['base'] );
4582+
$link = str_replace( '%_%', 2 === $current ? '' : $args['format'], $args['base'] );
45834583
$link = str_replace( '%#%', $current - 1, $link );
45844584
if ( $add_args ) {
45854585
$link = add_query_arg( $add_args, $link );
@@ -4601,7 +4601,7 @@ function paginate_links( $args = '' ) {
46014601
endif;
46024602

46034603
for ( $n = 1; $n <= $total; $n++ ) :
4604-
if ( $n == $current ) :
4604+
if ( $n === $current ) :
46054605
$page_links[] = sprintf(
46064606
'<span aria-current="%s" class="page-numbers current">%s</span>',
46074607
esc_attr( $args['aria_current'] ),
@@ -4611,7 +4611,7 @@ function paginate_links( $args = '' ) {
46114611
$dots = true;
46124612
else :
46134613
if ( $args['show_all'] || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) :
4614-
$link = str_replace( '%_%', 1 == $n ? '' : $args['format'], $args['base'] );
4614+
$link = str_replace( '%_%', 1 === $n ? '' : $args['format'], $args['base'] );
46154615
$link = str_replace( '%#%', $n, $link );
46164616
if ( $add_args ) {
46174617
$link = add_query_arg( $add_args, $link );

0 commit comments

Comments
 (0)