diff --git src/bp-blogs/bp-blogs-template.php src/bp-blogs/bp-blogs-template.php
index 1cd4425..80b4e60 100644
|
|
class BP_Blogs_Template { |
224 | 224 | 'current' => (int) $this->pag_page, |
225 | 225 | 'prev_text' => _x( '←', 'Blog pagination previous text', 'buddypress' ), |
226 | 226 | 'next_text' => _x( '→', 'Blog pagination next text', 'buddypress' ), |
227 | | 'mid_size' => 1 |
| 227 | 'mid_size' => 1, |
| 228 | 'add_args' => array(), |
228 | 229 | ) ); |
229 | 230 | } |
230 | 231 | } |
diff --git src/bp-forums/bp-forums-template.php src/bp-forums/bp-forums-template.php
index 5420b34..cf4771f 100644
|
|
class BP_Forums_Template_Forum { |
295 | 295 | 'current' => $this->pag_page, |
296 | 296 | 'prev_text' => _x( '←', 'Forum topic pagination previous text', 'buddypress' ), |
297 | 297 | 'next_text' => _x( '→', 'Forum topic pagination next text', 'buddypress' ), |
298 | | 'mid_size' => 1 |
| 298 | 'mid_size' => 1, |
| 299 | 'add_args' => array(), |
299 | 300 | ) ); |
300 | 301 | } |
301 | 302 | } |
… |
… |
function bp_has_forum_topics( $args = '' ) { |
567 | 568 | 'current' => $forum_template->pag_page, |
568 | 569 | 'prev_text' => _x( '←', 'Forum topic pagination previous text', 'buddypress' ), |
569 | 570 | 'next_text' => _x( '→', 'Forum topic pagination next text', 'buddypress' ), |
570 | | 'mid_size' => 1 |
| 571 | 'mid_size' => 1, |
| 572 | 'add_args' => array(), |
571 | 573 | ) ); |
572 | 574 | |
573 | 575 | } else { |
… |
… |
class BP_Forums_Template_Topic { |
1735 | 1737 | 'current' => $this->pag_page, |
1736 | 1738 | 'prev_text' => _x( '←', 'Forum thread pagination previous text', 'buddypress' ), |
1737 | 1739 | 'next_text' => _x( '→', 'Forum thread pagination next text', 'buddypress' ), |
1738 | | 'mid_size' => 1 |
| 1740 | 'mid_size' => 1, |
| 1741 | 'add_args' => array(), |
1739 | 1742 | ) ); |
1740 | 1743 | |
1741 | 1744 | $this->pag->total_pages = ceil( (int) $this->total_post_count / (int) $this->pag_num ); |
diff --git src/bp-groups/bp-groups-template.php src/bp-groups/bp-groups-template.php
index d487aeb..493d7dd 100644
|
|
class BP_Groups_Template { |
310 | 310 | // Build pagination links |
311 | 311 | if ( (int) $this->total_group_count && (int) $this->pag_num ) { |
312 | 312 | $pag_args = array( |
313 | | $page_arg => '%#%', |
314 | | 'num' => $this->pag_num, |
315 | | 'sortby' => $this->sort_by, |
316 | | 'order' => $this->order, |
| 313 | $page_arg => '%#%' |
317 | 314 | ); |
318 | 315 | |
319 | 316 | if ( defined( 'DOING_AJAX' ) && true === (bool) DOING_AJAX ) { |
… |
… |
class BP_Groups_Template { |
322 | 319 | $base = ''; |
323 | 320 | } |
324 | 321 | |
| 322 | $add_args = array( |
| 323 | 'num' => $this->pag_num, |
| 324 | 'sortby' => $this->sort_by, |
| 325 | 'order' => $this->order, |
| 326 | ); |
| 327 | |
325 | 328 | if ( ! empty( $search_terms ) ) { |
326 | | $pag_args['s'] = $search_terms; |
| 329 | $add_args['s'] = urlencode( $search_terms ); |
327 | 330 | } |
328 | 331 | |
329 | 332 | $this->pag_links = paginate_links( array( |
… |
… |
class BP_Groups_Template { |
333 | 336 | 'current' => $this->pag_page, |
334 | 337 | 'prev_text' => _x( '←', 'Group pagination previous text', 'buddypress' ), |
335 | 338 | 'next_text' => _x( '→', 'Group pagination next text', 'buddypress' ), |
336 | | 'mid_size' => 1 |
| 339 | 'mid_size' => 1, |
| 340 | 'add_args' => $add_args, |
337 | 341 | ) ); |
338 | 342 | } |
339 | 343 | } |
… |
… |
class BP_Groups_Group_Members_Template { |
3028 | 3032 | } |
3029 | 3033 | |
3030 | 3034 | $this->pag_links = paginate_links( array( |
3031 | | 'base' => add_query_arg( array( 'mlpage' => '%#%' ), $base_url ), |
3032 | | 'format' => '', |
3033 | | 'total' => !empty( $this->pag_num ) ? ceil( $this->total_member_count / $this->pag_num ) : $this->total_member_count, |
3034 | | 'current' => $this->pag_page, |
| 3035 | 'base' => add_query_arg( array( 'mlpage' => '%#%' ), $base_url ), |
| 3036 | 'format' => '', |
| 3037 | 'total' => ! empty( $this->pag_num ) ? ceil( $this->total_member_count / $this->pag_num ) : $this->total_member_count, |
| 3038 | 'current' => $this->pag_page, |
3035 | 3039 | 'prev_text' => '←', |
3036 | 3040 | 'next_text' => '→', |
3037 | | 'mid_size' => 1 |
| 3041 | 'mid_size' => 1, |
| 3042 | 'add_args' => array(), |
3038 | 3043 | )); |
3039 | 3044 | } |
3040 | 3045 | |
… |
… |
class BP_Groups_Membership_Requests_Template { |
4059 | 4064 | } |
4060 | 4065 | |
4061 | 4066 | $this->pag_links = paginate_links( array( |
4062 | | 'base' => add_query_arg( 'mrpage', '%#%' ), |
4063 | | 'format' => '', |
4064 | | 'total' => ceil( $this->total_request_count / $this->pag_num ), |
4065 | | 'current' => $this->pag_page, |
| 4067 | 'base' => add_query_arg( 'mrpage', '%#%' ), |
| 4068 | 'format' => '', |
| 4069 | 'total' => ceil( $this->total_request_count / $this->pag_num ), |
| 4070 | 'current' => $this->pag_page, |
4066 | 4071 | 'prev_text' => '←', |
4067 | 4072 | 'next_text' => '→', |
4068 | | 'mid_size' => 1 |
| 4073 | 'mid_size' => 1, |
| 4074 | 'add_args' => array(), |
4069 | 4075 | ) ); |
4070 | 4076 | } |
4071 | 4077 | |
… |
… |
class BP_Groups_Invite_Template { |
4311 | 4317 | 'prev_text' => '←', |
4312 | 4318 | 'next_text' => '→', |
4313 | 4319 | 'mid_size' => 1, |
| 4320 | 'add_args' => array(), |
4314 | 4321 | ) ); |
4315 | 4322 | } else { |
4316 | 4323 | $this->pag_links = ''; |
diff --git src/bp-members/bp-members-template.php src/bp-members/bp-members-template.php
index dbce029..2c75900 100644
|
|
class BP_Core_Members_Template { |
274 | 274 | $base = ''; |
275 | 275 | } |
276 | 276 | |
| 277 | /** |
| 278 | * Defaults to an empty array to make sure paginate_links() |
| 279 | * won't add the $page_arg to the links which would break |
| 280 | * pagination in case javascript is disabled. |
| 281 | */ |
| 282 | $add_args = array(); |
| 283 | |
277 | 284 | if ( ! empty( $search_terms ) ) { |
278 | | $pag_args['s'] = urlencode( $search_terms ); |
| 285 | $add_args['s'] = urlencode( $search_terms ); |
279 | 286 | } |
280 | 287 | |
281 | 288 | $this->pag_links = paginate_links( array( |
… |
… |
class BP_Core_Members_Template { |
285 | 292 | 'current' => (int) $this->pag_page, |
286 | 293 | 'prev_text' => _x( '←', 'Member pagination previous text', 'buddypress' ), |
287 | 294 | 'next_text' => _x( '→', 'Member pagination next text', 'buddypress' ), |
288 | | 'mid_size' => 1 |
| 295 | 'mid_size' => 1, |
| 296 | 'add_args' => $add_args, |
289 | 297 | ) ); |
290 | 298 | } |
291 | 299 | } |
diff --git src/bp-messages/bp-messages-template.php src/bp-messages/bp-messages-template.php
index 90ed2f6..bd7107e 100644
|
|
class BP_Messages_Box_Template { |
183 | 183 | $base = ''; |
184 | 184 | } |
185 | 185 | |
| 186 | $add_args = array(); |
| 187 | |
186 | 188 | if ( ! empty( $this->search_terms ) ) { |
187 | | $pag_args['s'] = $this->search_terms; |
| 189 | $add_args['s'] = $this->search_terms; |
188 | 190 | } |
189 | 191 | |
190 | 192 | $this->pag_links = paginate_links( array( |
… |
… |
class BP_Messages_Box_Template { |
194 | 196 | 'current' => $this->pag_page, |
195 | 197 | 'prev_text' => _x( '←', 'Message pagination previous text', 'buddypress' ), |
196 | 198 | 'next_text' => _x( '→', 'Message pagination next text', 'buddypress' ), |
197 | | 'mid_size' => 1 |
| 199 | 'mid_size' => 1, |
| 200 | 'add_args' => $add_args, |
198 | 201 | ) ); |
199 | 202 | } |
200 | 203 | } |
diff --git src/bp-notifications/bp-notifications-template.php src/bp-notifications/bp-notifications-template.php
index 52f138e..5803409 100644
|
|
class BP_Notifications_Template { |
301 | 301 | } |
302 | 302 | |
303 | 303 | if ( (int) $this->total_notification_count && (int) $this->pag_num ) { |
| 304 | $add_args = array( |
| 305 | 'sort_order' => $this->sort_order, |
| 306 | ); |
| 307 | |
304 | 308 | $this->pag_links = paginate_links( array( |
305 | 309 | 'base' => add_query_arg( $this->page_arg, '%#%' ), |
306 | 310 | 'format' => '', |
… |
… |
class BP_Notifications_Template { |
309 | 313 | 'prev_text' => _x( '←', 'Notifications pagination previous text', 'buddypress' ), |
310 | 314 | 'next_text' => _x( '→', 'Notifications pagination next text', 'buddypress' ), |
311 | 315 | 'mid_size' => 1, |
| 316 | 'add_args' => $add_args, |
312 | 317 | ) ); |
313 | 318 | |
314 | 319 | // Remove first page from pagination |