Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/23/2014 01:00:46 AM (10 years ago)
Author:
imath
Message:

Make sure paginate links are correctly set in case javascript is disabled

Adding extra query arguments to the 'base' parameter of the paginate_links() function when javascript is disabled is preventing the loops to be correctly paginated. In this particular case, the pagination is 'stuck' on the second page. To be sure the pagination is correctly set, we need to pass extra query arguments using the 'add_args' parameter of the paginate_links() function.

Fixes #5967

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-template.php

    r9240 r9260  
    184184            }
    185185
     186            $add_args = array();
     187
    186188            if ( ! empty( $this->search_terms ) ) {
    187                 $pag_args['s'] = $this->search_terms;
     189                $add_args['s'] = $this->search_terms;
    188190            }
    189191
     
    195197                'prev_text' => _x( '←', 'Message pagination previous text', 'buddypress' ),
    196198                'next_text' => _x( '→', 'Message pagination next text', 'buddypress' ),
    197                 'mid_size'  => 1
     199                'mid_size'  => 1,
     200                'add_args'  => $add_args,
    198201            ) );
    199202        }
Note: See TracChangeset for help on using the changeset viewer.