Skip to:
Content

BuddyPress.org

Ticket #6770: 6770.01.patch

File 6770.01.patch, 2.5 KB (added by r-a-y, 9 years ago)
  • src/bp-groups/bp-groups-template.php

     
    36313631 * @since 1.0.0
    36323632 */
    36333633function bp_group_hidden_fields() {
    3634         if ( isset( $_REQUEST['s'] ) ) {
    3635                 echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST['s'] ) . '" name="search_terms" />';
     3634        $query_arg = bp_core_get_component_search_query_arg( 'groups' );
     3635
     3636        if ( isset( $_REQUEST[ $query_arg ] ) ) {
     3637                echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST[ $query_arg ] ) . '" name="search_terms" />';
    36363638        }
    36373639
    36383640        if ( isset( $_REQUEST['letter'] ) ) {
  • src/bp-members/bp-members-template.php

     
    13131313 * Output hidden input for preserving member search params on form submit.
    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" />';
     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        }
    13181321
    1319         if ( isset( $_REQUEST['letter'] ) )
     1322        if ( isset( $_REQUEST['letter'] ) ) {
    13201323                echo '<input type="hidden" id="selected_letter" value="' . esc_attr( $_REQUEST['letter'] ) . '" name="selected_letter" />';
     1324        }
    13211325
    1322         if ( isset( $_REQUEST['members_search'] ) )
     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
    13261331/**
  • src/bp-xprofile/bp-xprofile-filters.php

     
    367367
    368368                                // Less than 5 spaces.
    369369                                } else {
    370                                         $search_url   = add_query_arg( array( 's' => urlencode( $value ) ), bp_get_members_directory_permalink() );
     370                                        $query_arg    = bp_core_get_component_search_query_arg( 'members' );
     371                                        $search_url   = add_query_arg( array( $query_arg => urlencode( $value ) ), bp_get_members_directory_permalink() );
    371372                                        $new_values[] = '<a href="' . esc_url( $search_url ) . '" rel="nofollow">' . $value . '</a>';
    372373                                }
    373374                        }