Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#25845 closed defect (bug) (wontfix)

paginate_links() has an incorrect default format

Reported by: Clorith Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.1
Component: Template Keywords: has-patch
Focuses: Cc:


The default format for paginate_links() is ?page=%#%, while pagination uses the query var paged to determine different pages.

Attached patch addresses this issue.

Attachments (1)

25845.patch (580 bytes) - added by Clorith 8 years ago.

Download all attachments as: .zip

Change History (5)

8 years ago

#1 @obenland
8 years ago

  • Keywords has-patch added
  • Version changed from trunk to 2.1

#2 @Clorith
8 years ago

@nofearinc Had a great point on IRC today, as he showed twentyfourteen and how they added in a check against the rewrites to see if there are pretty permalinks in use or not to make the defaults proper in both situations (/page/ vs ?paged).

Would it be an idea to put this in, I know ?paged will work regardless as it's an already familiar query var but a few extra characters to make it look a little nicer to the end user might not be the worst idea in the world, thoughts on that?

#3 @Clorith
8 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

paginate_links() is a helper class and the page query var could be in use by other parts of core (and maybe even existing plugins) and is so by design.

Themes/plugins wanting to use paged can, and should, assign it using the format attribute.

#4 @SergeyBiryukov
8 years ago

  • Component changed from General to Template
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.