Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/14/2015 03:20:30 AM (5 years ago)
Author:
r-a-y
Message:

Use component search parameter instead of hardcoded 's' parameter.

This commit primarily fixes issues with extended profile links using the
older 's' parameter instead of the newer members search query argument.
See #5087.

Props kennibc.

See #6770 (trunk).

File:
1 edited

Legend:

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

    r10378 r10407  
    13141314 */
    13151315function bp_member_hidden_fields() {
    1316     if ( isset( $_REQUEST['s'] ) )
    1317         echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST['s'] ) . '" name="search_terms" />';
    1318 
    1319     if ( isset( $_REQUEST['letter'] ) )
     1316    $query_arg = bp_core_get_component_search_query_arg( 'members' );
     1317
     1318    if ( isset( $_REQUEST[ $query_arg ] ) ) {
     1319        echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST[ $query_arg ] ) . '" name="search_terms" />';
     1320    }
     1321
     1322    if ( isset( $_REQUEST['letter'] ) ) {
    13201323        echo '<input type="hidden" id="selected_letter" value="' . esc_attr( $_REQUEST['letter'] ) . '" name="selected_letter" />';
    1321 
    1322     if ( isset( $_REQUEST['members_search'] ) )
     1324    }
     1325
     1326    if ( isset( $_REQUEST['members_search'] ) ) {
    13231327        echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST['members_search'] ) . '" name="search_terms" />';
     1328    }
    13241329}
    13251330
Note: See TracChangeset for help on using the changeset viewer.