Opened 6 years ago
Closed 6 years ago
#3930 closed enhancement (fixed)
get_pagenum_link() needs some love
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | low | Milestone: | 2.3 |
| Component: | Administration | Version: | 2.1.2 |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: | rob1n |
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)
Change History (19)
markjaquith — 6 years ago
Looking good so far. It's as ugly as it is because touching it often breaks something, so watch out. :-)
comment:2
foolswisdom — 6 years ago
- Milestone changed from 2.2 to 2.3
- Keywords commit added; needs-testing removed
- Status changed from new to assigned
Patch works fine for me.
- Resolution set to fixed
- Status changed from assigned to closed
comment:7
josephscott — 6 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
This breaks the 'Previous Entries' link paging for categories.
- 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.
comment:10
rob1n — 6 years ago
Nope. remove_query_arg() works fine. Still digging...
comment:11
rob1n — 6 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.
comment:12
rob1n — 6 years ago
- Resolution set to fixed
- Status changed from assigned to closed
comment:13
snakefoot — 6 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
comment:14
ryan — 6 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.
comment:15
rob1n — 6 years ago
- Resolution set to fixed
- Status changed from reopened to closed

First attempt