diff --git a/src/bp-members/bp-members-template.php b/src/bp-members/bp-members-template.php
index 81acf1f..eaf18b3 100644
|
a
|
b
|
class BP_Core_Members_Template { |
| 316 | 316 | $this->pag_arg => '%#%', |
| 317 | 317 | ); |
| 318 | 318 | |
| | 319 | $add_args = array(); |
| | 320 | |
| | 321 | $base = ''; |
| 319 | 322 | if ( defined( 'DOING_AJAX' ) && true === (bool) DOING_AJAX ) { |
| 320 | | $base = remove_query_arg( 's', wp_get_referer() ); |
| 321 | | } else { |
| 322 | | $base = ''; |
| 323 | | } |
| | 323 | $referer_parts = explode( '?', wp_get_referer() ); |
| | 324 | if ( isset( $referer_parts[1] ) ) { |
| | 325 | wp_parse_str( $referer_parts[1], $add_args ); |
| | 326 | if ( isset( $add_args['s'] ) ) { |
| | 327 | unset( $add_args['s'] ); |
| | 328 | } |
| | 329 | } |
| 324 | 330 | |
| 325 | | /** |
| 326 | | * Defaults to an empty array to make sure paginate_links() |
| 327 | | * won't add the $page_arg to the links which would break |
| 328 | | * pagination in case javascript is disabled. |
| 329 | | */ |
| 330 | | $add_args = array(); |
| | 331 | $base = $referer_parts[0]; |
| | 332 | } |
| 331 | 333 | |
| 332 | 334 | if ( ! empty( $search_terms ) ) { |
| 333 | 335 | $add_args['s'] = urlencode( $search_terms ); |