WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#3159 closed enhancement (fixed)

Generic page links generating function

Reported by: mdawaffe Owned by: mdawaffe
Milestone: 2.1 Priority: low
Severity: normal Version: 2.1
Component: Template Keywords: pagination has-patch 2nd-opinion
Focuses: Cc:

Description

This has been talked about an hackers a couple times and on at least one bug hunt.

Attached: paginate_links()

  1. 'base' => base link with %_% to be replaced by:
  2. 'format' => format of replacement with %#% to be replaced by page number.
  3. 'total' => total # of pages.
  4. 'current' => current page.
  5. 'show_all' => show all links or just the first, last and those near current?
  6. 'prev_next' => show previous and next links?
  7. 'prev_text' =>, 'next_text' => text for previous and next links.
  8. 'end_size' => how many links to show at the beginning of the range.
  9. 'mid_size' => how many links to show on either side of the current page.
  10. 'type' => 'array', 'list', 'plain'.
  11. 'add_args' => array of args to add with add_query_arg()

Modifies WP_User_Search to use this function. See #2793.

Attachments (2)

3159.diff (4.4 KB) - added by mdawaffe 8 years ago.
3159b.diff (4.4 KB) - added by mdawaffe 8 years ago.
update

Download all attachments as: .zip

Change History (5)

mdawaffe8 years ago

comment:1 mdawaffe8 years ago

masquerade, thoughts?

mdawaffe8 years ago

update

comment:2 mdawaffe8 years ago

  • Keywords has-patch 2nd-opinion added
  • Status changed from new to assigned

3159b.diff

  1. update patch to @4261

comment:3 ryan8 years ago

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

(In [4275]) paginate_links() from mdawaffe. fixes #3159

Note: See TracTickets for help on using tickets.