diff --git src/bp-groups/bp-groups-template.php src/bp-groups/bp-groups-template.php
index d074884cc..95cfad88a 100644
|
|
|
function bp_total_group_count_for_user( $user_id = 0 ) { |
| 3864 | 3864 | * {@link BP_User_Query}. Default: 'last_joined'. |
| 3865 | 3865 | * @type string $search_terms Optional. Search terms to match. Pass an |
| 3866 | 3866 | * empty string to force-disable search, even in |
| 3867 | | * the presence of $_REQUEST['s']. Default: null. |
| | 3867 | * the presence of $_REQUEST['s']. Default: false. |
| 3868 | 3868 | * } |
| 3869 | 3869 | * |
| 3870 | 3870 | * @return bool |
| … |
… |
function bp_group_has_members( $args = '' ) { |
| 3878 | 3878 | $exclude_admins_mods = 0; |
| 3879 | 3879 | } |
| 3880 | 3880 | |
| 3881 | | $search_terms_default = null; |
| | 3881 | /* |
| | 3882 | * Use false as the search_terms default so that BP_User_Query |
| | 3883 | * doesn't add a search clause. |
| | 3884 | */ |
| | 3885 | $search_terms_default = false; |
| 3882 | 3886 | $search_query_arg = bp_core_get_component_search_query_arg( 'members' ); |
| 3883 | 3887 | if ( ! empty( $_REQUEST[ $search_query_arg ] ) ) { |
| 3884 | 3888 | $search_terms_default = stripslashes( $_REQUEST[ $search_query_arg ] ); |
| … |
… |
function bp_group_has_members( $args = '' ) { |
| 3897 | 3901 | 'type' => 'last_joined', |
| 3898 | 3902 | ) ); |
| 3899 | 3903 | |
| 3900 | | if ( is_null( $r['search_terms'] ) && ! empty( $_REQUEST['s'] ) ) { |
| | 3904 | /* |
| | 3905 | * If an empty search_terms string has been passed, |
| | 3906 | * the developer is force-disabling search. |
| | 3907 | */ |
| | 3908 | if ( '' === $r['search_terms'] ) { |
| | 3909 | // Set the search_terms to false for BP_User_Query efficiency. |
| | 3910 | $r['search_terms'] = false; |
| | 3911 | } elseif ( ! empty( $_REQUEST['s'] ) ) { |
| 3901 | 3912 | $r['search_terms'] = $_REQUEST['s']; |
| 3902 | 3913 | } |
| 3903 | 3914 | |