Skip to:
Content

BuddyPress.org

Changeset 12693


Ignore:
Timestamp:
07/27/2020 07:46:48 PM (6 months ago)
Author:
boonebgorges
Message:

Add user_ids parameter to bp_has_members() and related functions.

Props Mamaduka.

Fixes #7999.

Location:
trunk/src/bp-members
Files:
3 edited

Legend:

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

    r12679 r12693  
    7979 *
    8080 * @since 1.2.0
    81  * @since 7.0.0 Added `xprofile_query` parameter.
     81 * @since 7.0.0 Added `xprofile_query` parameter. Added `user_ids` parameter.
    8282 *
    8383 * @param array|string $args {
     
    9595 *     @type array|string $member_type__not_in Array or comma-separated string of member types to be excluded.
    9696 *     @type mixed        $include             Limit results by user IDs. Default: false.
     97 *     @type mixed        $user_ids            IDs corresponding to the users. Default: false.
    9798 *     @type int          $per_page            Results per page. Default: 20.
    9899 *     @type int          $page                Page of results. Default: 1.
     
    118119        'member_type__not_in' => '',
    119120        'include'             => false,        // Pass comma separated list of user_ids to limit to only these users.
     121        'user_ids'            => false,
    120122        'per_page'            => 20,           // The number of results to return per page.
    121123        'page'                => 1,            // The page to return if limiting per page.
  • trunk/src/bp-members/bp-members-template.php

    r12692 r12693  
    283283 *
    284284 * @since 1.2.0
    285  * @since 7.0.0 Added `xprofile_query` parameter.
     285 * @since 7.0.0 Added `xprofile_query` parameter. Added `user_ids` parameter.
    286286 *
    287287 * @global object $members_template {@link BP_Members_Template}
     
    311311 *                                                      integer, a comma-separated list of IDs, or false (to disable
    312312 *                                                      this limiting). Default: false.
     313 *     @type array|string|bool     $user_ids            An array or comma-separated list of IDs, or false (to
     314 *                                                      disable this limiting). Default: false.
    313315 *     @type int                   $user_id             If provided, results are limited to the friends of the specified
    314316 *                                                      user. When on a user's Friends page, defaults to the ID of the
     
    372374        'include'             => false,    // Pass a user_id or a list (comma-separated or array) of user_ids to only show these users.
    373375        'exclude'             => false,    // Pass a user_id or a list (comma-separated or array) of user_ids to exclude these users.
     376        'user_ids'            => false,
    374377
    375378        'user_id'             => $user_id, // Pass a user_id to only show friends of this user.
  • trunk/src/bp-members/classes/class-bp-core-members-template.php

    r12692 r12693  
    111111     *
    112112     * @since 1.5.0
    113      * @since 7.0.0 Added $xprofile_query parameter.
     113     * @since 7.0.0 Added $xprofile_query parameter. Added $user_ids parameter.
    114114     *
    115115     * @see BP_User_Query for an in-depth description of parameters.
     
    163163            'populate_extras'     => true,
    164164            'exclude'             => false,
     165            'user_ids'            => false,
    165166            'meta_key'            => false,
    166167            'meta_value'          => false,
     
    191192                    'populate_extras'     => $r['populate_extras'],
    192193                    'exclude'             => $r['exclude'],
     194                    'user_ids'            => $r['user_ids'],
    193195                    'meta_key'            => $r['meta_key'],
    194196                    'meta_value'          => $r['meta_value'],
Note: See TracChangeset for help on using the changeset viewer.