Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/04/2010 09:10:20 PM (15 years ago)
Author:
chrishajer
Message:

Trying again to fix pagination in search. Fixes #1274. Props GautamGupta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/functions.bb-template.php

    r2437 r2440  
    16431643}
    16441644
    1645 function bb_search_pages() {
    1646     global $page, $search_count;
    1647     echo apply_filters( 'bb_search_pages', get_page_number_links( array( 'page' => $page, 'total' => $search_count, 'per_page' => 5, 'mod_rewrite' => false ) ) );
     1645function bb_search_pages( $args = null ) {
     1646    global $page, $search_count, $per_page;
     1647   
     1648    $defaults = array( 'before' => '', 'after' => '' );
     1649    $args = wp_parse_args( $args, $defaults );
     1650   
     1651    if ( $pages = apply_filters( 'bb_search_pages', get_page_number_links( array( 'page' => $page, 'total' => $search_count, 'per_page' => $per_page, 'mod_rewrite' => false ) ) ) )
     1652        echo $args['before'] . $pages . $args['after'];
    16481653}
    16491654
Note: See TracChangeset for help on using the changeset viewer.