[wp-trac] [WordPress Trac] #29808: Post/paging navigation template tags

WordPress Trac noreply at wordpress.org
Mon Dec 8 09:47:37 UTC 2014


#29808: Post/paging navigation template tags
-------------------------------------+-------------------------------------
 Reporter:  obenland                 |       Owner:  johnbillion
     Type:  enhancement              |      Status:  reopened
 Priority:  normal                   |   Milestone:  4.1
Component:  Themes                   |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  twenty-fifteen needs-    |     Focuses:  accessibility,
  patch                              |  template
-------------------------------------+-------------------------------------
Changes (by GaryJ):

 * keywords:  twenty-fifteen has-patch => twenty-fifteen needs-patch
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Now I've had chance to implement the new template tags, I think we have
 problems with `get_the_pagination()`.

 * There's no `total` arg passed through to `paginate_links()` so it always
 returns null. This alone makes it fail.
 * There's no `current` arg pass through to `paginate_links()`, so even if
 there's a total, the function has to assume we're on the first page, so
 fails.

 Both of these presumably would have been caught by unit tests had there
 been any.

 Furthermore, the `get_the_pagination()` function has a non-user-definable
 arg for `type` that is `plain`. The associated comment reads: "`// Make
 sure we get plain links, so we can work with it.`". I'm assuming this
 means that the links are to be returned as a string rather than array?
 Some folks will semantically want their list of page numbers to be
 returned as a set of list item elements (`type` set to `list`, which still
 returns as a string). Can this arg be moved inside `wp_parse_args()` so
 the developer can override it if they want the more convoluted markup?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29808#comment:62>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list