Skip to:
Content

BuddyPress.org

Changeset 10847


Ignore:
Timestamp:
06/01/2016 12:14:58 PM (7 years ago)
Author:
dcavins
Message:

Improve search query arg handling in bp_group_has_members().

Structure the search term calculation in
bp_group_has_members() to match
the search term handling in
bp_has_members().

Fixes #7093.

Props dcavins, offereins, garrett-eclipse.

File:
1 edited

Legend:

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

    r10825 r10847  
    36213621    }
    36223622
     3623    $search_terms_default = null;
     3624    $search_query_arg = bp_core_get_component_search_query_arg( 'members' );
     3625    if ( ! empty( $_REQUEST[ $search_query_arg ] ) ) {
     3626        $search_terms_default = stripslashes( $_REQUEST[ $search_query_arg ] );
     3627    }
     3628
    36233629    $r = wp_parse_args( $args, array(
    36243630        'group_id'            => bp_get_current_group_id(),
     
    36303636        'exclude_banned'      => 1,
    36313637        'group_role'          => false,
    3632         'search_terms'        => null,
     3638        'search_terms'        => $search_terms_default,
    36333639        'type'                => 'last_joined',
    36343640    ) );
Note: See TracChangeset for help on using the changeset viewer.