diff --git src/bp-members/bp-members-functions.php src/bp-members/bp-members-functions.php
index 85d02d62a..bb235add1 100644
|
|
add_action( 'bp_setup_globals', 'bp_core_define_slugs', 11 ); |
93 | 93 | * `$member_type` takes precedence over this parameter. |
94 | 94 | * @type array|string $member_type__not_in Array or comma-separated string of member types to be excluded. |
95 | 95 | * @type mixed $include Limit results by user IDs. Default: false. |
| 96 | * @type mixed $user_ids IDs corresponding to the users. Default: false. |
96 | 97 | * @type int $per_page Results per page. Default: 20. |
97 | 98 | * @type int $page Page of results. Default: 1. |
98 | 99 | * @type bool $populate_extras Fetch optional extras. Default: true. |
… |
… |
function bp_core_get_users( $args = '' ) { |
114 | 115 | 'member_type__in' => '', |
115 | 116 | 'member_type__not_in' => '', |
116 | 117 | 'include' => false, // Pass comma separated list of user_ids to limit to only these users. |
| 118 | 'user_ids' => false, |
117 | 119 | 'per_page' => 20, // The number of results to return per page. |
118 | 120 | 'page' => 1, // The page to return if limiting per page. |
119 | 121 | 'populate_extras' => true, // Fetch the last active, where the user is a friend, total friend count, latest update. |
diff --git src/bp-members/bp-members-template.php src/bp-members/bp-members-template.php
index 29b1982f3..313d12659 100644
|
|
function bp_activate_slug() { |
309 | 309 | * @type array|int|string|bool $exclude Exclude users from results by ID. Accepts an array, a single |
310 | 310 | * integer, a comma-separated list of IDs, or false (to disable |
311 | 311 | * this limiting). Default: false. |
| 312 | * @type array|string|bool $user_ids An array or comma-separated list of IDs, or false (to |
| 313 | * disable this limiting). Default: false. |
312 | 314 | * @type int $user_id If provided, results are limited to the friends of the specified |
313 | 315 | * user. When on a user's Friends page, defaults to the ID of the |
314 | 316 | * displayed user. Otherwise defaults to 0. |
… |
… |
function bp_has_members( $args = '' ) { |
368 | 370 | |
369 | 371 | 'include' => false, // Pass a user_id or a list (comma-separated or array) of user_ids to only show these users. |
370 | 372 | 'exclude' => false, // Pass a user_id or a list (comma-separated or array) of user_ids to exclude these users. |
| 373 | 'user_ids' => false, |
371 | 374 | |
372 | 375 | 'user_id' => $user_id, // Pass a user_id to only show friends of this user. |
373 | 376 | 'member_type' => $member_type, |
diff --git src/bp-members/classes/class-bp-core-members-template.php src/bp-members/classes/class-bp-core-members-template.php
index 735664e20..2dd14d811 100644
|
|
class BP_Core_Members_Template { |
162 | 162 | 'include' => false, |
163 | 163 | 'populate_extras' => true, |
164 | 164 | 'exclude' => false, |
| 165 | 'user_ids' => false, |
165 | 166 | 'meta_key' => false, |
166 | 167 | 'meta_value' => false, |
167 | 168 | 'page_arg' => 'upage', |
… |
… |
class BP_Core_Members_Template { |
180 | 181 | if ( !empty( $_REQUEST['letter'] ) ) { |
181 | 182 | $this->members = BP_Core_User::get_users_by_letter( $_REQUEST['letter'], $this->pag_num, $this->pag_page, $populate_extras, $exclude ); |
182 | 183 | } else { |
183 | | $this->members = bp_core_get_users( array( 'type' => $this->type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'include' => $include, 'search_terms' => $search_terms, 'populate_extras' => $populate_extras, 'exclude' => $exclude, 'meta_key' => $meta_key, 'meta_value' => $meta_value, 'member_type' => $member_type, 'member_type__in' => $member_type__in, 'member_type__not_in' => $member_type__not_in ) ); |
| 184 | $this->members = bp_core_get_users( array( 'type' => $this->type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'include' => $include, 'user_ids' => $user_ids, 'search_terms' => $search_terms, 'populate_extras' => $populate_extras, 'exclude' => $exclude, 'meta_key' => $meta_key, 'meta_value' => $meta_value, 'member_type' => $member_type, 'member_type__in' => $member_type__in, 'member_type__not_in' => $member_type__not_in ) ); |
184 | 185 | } |
185 | 186 | |
186 | 187 | if ( !$max || $max >= (int) $this->members['total'] ) { |