Make WordPress Core

Opened 6 years ago

Last modified 2 months ago

#51227 new enhancement

Update paginate_links dots to account for total pages

Reported by: mikeybinns Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version: 5.5.1
Severity: trivial Keywords: has-patch 2nd-opinion
Cc: Focuses: ui, template

Description

Currently, under certain conditions the pagination shows dots when it would make more sense to show a number.

Example:
If you have the following variables:

Mid size: 2
End size: 1
Total pages: 5
Current page: 1

Then it will visually output as follows:

Prev 1 2 3 ... 5 Next

With current changed to 5 then it will show dots at 2 instead.

In this case, it would make more sense to show the number instead of dots.

Change History (3)

This ticket was mentioned in ​PR #513 on ​WordPress/wordpress-develop by ​mikeybinnswebdesign.


6 years ago
#1

Currently, under certain conditions the pagination shows dots when it would make more sense to show a number.
This change updates such an edge case.

# Example:
If you have the following variables:
Mid size: 2
End size: 1
Total pages: 5
Current page: 1
Then it will visually output as follows:

Prev 1 2 3 ... 5 Next

Trac ticket: https://core.trac.wordpress.org/ticket/51227

#2 @ozgursar
9 months ago

  • Keywords 2nd-opinion needs-refresh added; needs-testing removed

Patch (​https://github.com/WordPress/wordpress-develop/pull/513) is failing to apply to the latest trunk (7.0-alpha-61215-src)

This ticket was mentioned in ​PR #13472 on ​WordPress/wordpress-develop by ​@mikeybinns.


2 months ago
#3

  • Keywords needs-refresh removed

Currently, under certain conditions the pagination shows dots when it would make more sense to show a number.
This change updates such an edge case.

Example:
If you have the following variables:
Mid size: 2
End size: 1
Total pages: 5
Current page: 1
Then it will visually output as follows:

Prev 1 2 3 ... 5 Next

Trac ticket: https://core.trac.wordpress.org/ticket/51227

This PR supersedes PR #513 which was very outdated

## Use of AI Tools
AI assistance: No

Note: See TracTickets for help on using tickets.