From e7d639345fcec1ef894010bd399ab5644153c816 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 21 Oct 2016 10:45:21 +0000 Subject: [PATCH] Remove an obsolete `1 == $total` check in `paginate_links()`. `$total` cannot be a negative number since [4276]. Props jdgrimes. Fixes #38421. git-svn-id: https://develop.svn.wordpress.org/trunk@38857 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index c6fc86a09d..5174936de1 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -3324,7 +3324,7 @@ function paginate_links( $args = '' ) { endif; endif; endfor; - if ( $args['prev_next'] && $current && ( $current < $total || -1 == $total ) ) : + if ( $args['prev_next'] && $current && $current < $total ) : $link = str_replace( '%_%', $args['format'], $args['base'] ); $link = str_replace( '%#%', $current + 1, $link ); if ( $add_args )