WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #29808, comment 62


Ignore:
Timestamp:
12/08/2014 09:51:56 AM (5 years ago)
Author:
GaryJ
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29808, comment 62

    initial v1  
    66Both of these presumably would have been caught by unit tests had there been any.
    77
     8Something like the following seems to fix it though I've not tested extensively.
     9
     10{{{
     11'total'   => $GLOBALS['wp_query']->max_num_pages,
     12'current' => get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1,
     13}}}
     14
    815Furthermore, 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?