Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/23/2014 01:00:46 AM (9 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-notifications/bp-notifications-template.php

    r9143 r9260  
    302302
    303303        if ( (int) $this->total_notification_count && (int) $this->pag_num ) {
     304            $add_args = array(
     305                'sort_order' => $this->sort_order,
     306            );
     307
    304308            $this->pag_links = paginate_links( array(
    305309                'base'      => add_query_arg( $this->page_arg, '%#%' ),
     
    310314                'next_text' => _x( '→', 'Notifications pagination next text',     'buddypress' ),
    311315                'mid_size'  => 1,
     316                'add_args'  => $add_args,
    312317            ) );
    313318
Note: See TracChangeset for help on using the changeset viewer.