Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#3930 closed enhancement (fixed)

get_pagenum_link() needs some love

Reported by: markjaquith's profile markjaquith Owned by: rob1n's profile rob1n
Milestone: 2.3 Priority: low
Severity: normal Version: 2.1.2
Component: Administration Keywords: has-patch needs-testing
Focuses: Cc:

Description

get_pagenum_link() is fairly Frankenstein's Monster-ish. It isn't even using add_query_arg()

Enclosed patch is just a first attempt... I'll revisit it and clean it up, as well as address XSS-escaping.

Attachments (4)

link-template.php.diff (4.2 KB) - added by markjaquith 17 years ago.
First attempt
link-template.php.002.diff (4.2 KB) - added by markjaquith 17 years ago.
Refresh
3930.diff (4.0 KB) - added by rob1n 17 years ago.
fix.diff (1.7 KB) - added by rob1n 17 years ago.

Download all attachments as: .zip

Change History (19)

@markjaquith
17 years ago

First attempt

#1 @ryan
17 years ago

Looking good so far. It's as ugly as it is because touching it often breaks something, so watch out. :-)

#2 @foolswisdom
17 years ago

  • Milestone changed from 2.2 to 2.3

#3 @rob1n
17 years ago

  • Owner changed from markjaquith to rob1n

Look at all that red...

#4 @rob1n
17 years ago

  • Keywords has-patch needs-testing added

Patch refreshed.

@rob1n
17 years ago

#5 @rob1n
17 years ago

  • Keywords commit added; needs-testing removed
  • Status changed from new to assigned

Patch works fine for me.

#6 @rob1n
17 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [5454]) Bring get_pagenum_link() into this century. Props Mark Jaquith. fixes #3930

#7 @josephscott
17 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This breaks the 'Previous Entries' link paging for categories.

#8 @rob1n
17 years ago

  • Status changed from reopened to new

Breaks author view too.

I think remove_query_arg( 'paged' ) is removing more than paged, but I'm going to keep digging.

#9 @rob1n
17 years ago

  • Keywords has-patch commit removed

#10 @rob1n
17 years ago

Nope. remove_query_arg() works fine. Still digging...

@rob1n
17 years ago

#11 @rob1n
17 years ago

  • Cc rob1n added
  • Keywords has-patch needs-testing added
  • Status changed from new to assigned

Alright, that seems to take care of it. Please test and report back.

#12 @rob1n
17 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [5481]) Fix get_pagenum_link(). fixes #3930

#13 @snakefoot
17 years ago

Just tried this new get_pagenum_link() on a Wordpress 2.0 blog, and it works fine with everything except when doing a search where it adds /page/2/ instead of &paged=2 for the following pages.

Not sure if this is an issue for Wordpress 2.3

#14 @ryan
17 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Yep, it does funky things to paging, especially once you get to page 3.

#15 @rob1n
17 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [5610]) Fix get_pagenum_link() for query strings. fixes #3930

Note: See TracTickets for help on using tickets.