Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/wp-includes/general-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -4655,8 +4655,8 @@ function language_attributes( $doctype = 'html' ) {
* @type string $before_page_number A string to appear before the page number. Default empty.
* @type string $after_page_number A string to append after the page number. Default empty.
* }
* @return string|string[]|void String of page links or array of page links, depending on 'type' argument.
* Void if total number of pages is less than 2.
* @return string|string[]|null String of page links or array of page links, depending on 'type' argument.
* Null if total number of pages is less than 2.
*/
function paginate_links( $args = '' ) {
global $wp_query, $wp_rewrite;
Expand Down Expand Up @@ -4722,7 +4722,7 @@ function paginate_links( $args = '' ) {
// Who knows what else people pass in $args.
$total = (int) $args['total'];
if ( $total < 2 ) {
return;
return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it raise backward compatibility issue?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
$current = (int) $args['current'];
$end_size = (int) $args['end_size']; // Out of bounds? Make it the default.
Expand Down
Loading