Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/29/2015 03:06:53 PM (10 years ago)
Author:
boonebgorges
Message:

Docblock formatting and codestyling after [9976].

File:
1 edited

Legend:

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

    r9976 r9977  
    305305     * @see BP_User_Query for an in-depth description of parameters.
    306306     *
    307      * @param string       $type            Sort order.
    308      * @param int          $page_number     Page of results.
    309      * @param int          $per_page        Number of results per page.
    310      * @param int          $max             Max number of results to return.
    311      * @param int          $user_id         Limit to friends of a user.
    312      * @param string       $search_terms    Limit to users matching search terms.
    313      * @param array        $include         Limit results by these user IDs.
    314      * @param bool         $populate_extras Fetch optional extras.
    315      * @param array        $exclude         Exclude these IDs from results.
    316      * @param array        $meta_key        Limit to users with a meta_key.
    317      * @param array        $meta_value      Limit to users with a meta_value (with meta_key).
    318      * @param string       $page_arg        Optional. The string used as a query parameter in pagination links.
    319      *                                      Default: 'upage'.
    320      * @param array|string $member_type     Array or comma-separated string of member types to limit results to.
     307     * @param string       $type                Sort order.
     308     * @param int          $page_number         Page of results.
     309     * @param int          $per_page            Number of results per page.
     310     * @param int          $max                 Max number of results to return.
     311     * @param int          $user_id             Limit to friends of a user.
     312     * @param string       $search_terms        Limit to users matching search terms.
     313     * @param array        $include             Limit results by these user IDs.
     314     * @param bool         $populate_extras     Fetch optional extras.
     315     * @param array        $exclude             Exclude these IDs from results.
     316     * @param array        $meta_key            Limit to users with a meta_key.
     317     * @param array        $meta_value          Limit to users with a meta_value (with meta_key).
     318     * @param string       $page_arg            Optional. The string used as a query parameter in pagination links.
     319     *                                          Default: 'upage'.
     320     * @param array|string $member_type         Array or comma-separated string of member types to limit results to.
    321321     * @param array|string $member_type__in     Array or comma-separated string of member types to limit results to.
    322      * @param array|string $member_type__not_in     Array or comma-separated string of member types to exclude from results.
     322     * @param array|string $member_type__not_in Array or comma-separated string of member types to exclude
     323     *                                          from results.
    323324     */
    324325    function __construct( $type, $page_number, $per_page, $max, $user_id, $search_terms, $include, $populate_extras, $exclude, $meta_key, $meta_value, $page_arg = 'upage', $member_type = '', $member_type__in = '', $member_type__not_in = '' ) {
     
    508509 *     string (eg, 'user_id=4&per_page=3').
    509510 *
    510  *     @type int                   $type            Sort order. Accepts 'active', 'random', 'newest', 'popular',
    511  *                                                  'online', 'alphabetical'. Default: 'active'.
    512  *     @type int|bool              $page            Page of results to display. Default: 1.
    513  *     @type int|bool              $per_page        Number of results per page. Default: 20.
    514  *     @type int|bool              $max             Maximum number of results to return. Default: false (unlimited).
    515  *     @type string                $page_arg        The string used as a query parameter in pagination links.
    516  *                                                  Default: 'bpage'.
    517  *     @type array|int|string|bool $include         Limit results by a list of user IDs. Accepts an array, a
    518  *                                                  single integer, a comma-separated list of IDs, or false (to
    519  *                                                  disable this limiting). Accepts 'active', 'alphabetical',
    520  *                                                  'newest', or 'random'. Default: false.
    521  *     @type array|int|string|bool $exclude         Exclude users from results by ID. Accepts an array, a single
    522  *                                                  integer, a comma-separated list of IDs, or false (to disable
    523  *                                                  this limiting). Default: false.
    524  *     @type int                   $user_id         If provided, results are limited to the friends of the specified
    525  *                                                  user. When on a user's Friends page, defaults to the ID of the
    526  *                                                  displayed user. Otherwise defaults to 0.
    527  *     @type string|array          $member_type     Array or comma-separated list of member types to limit results to.
    528  *     @type string|array          $member_type__in     Array or comma-separated list of member types to limit results to.
    529  *     @type string|array          $member_type__not_in     Array or comma-separated list of member types to exclude from results.
    530  *     @type string                $search_terms    Limit results by a search term. Default: null.
    531  *     @type string                $meta_key        Limit results by the presence of a usermeta key.
    532  *                                                  Default: false.
    533  *     @type mixed                 $meta_value      When used with meta_key, limits results by the
    534  *                                                  a matching usermeta value. Default: false.
    535  *     @type bool                  $populate_extras Whether to fetch optional data, such as
    536  *                                                  friend counts. Default: true.
     511 *     @type int                   $type                Sort order. Accepts 'active', 'random', 'newest', 'popular',
     512 *                                                      'online', 'alphabetical'. Default: 'active'.
     513 *     @type int|bool              $page                Page of results to display. Default: 1.
     514 *     @type int|bool              $per_page            Number of results per page. Default: 20.
     515 *     @type int|bool              $max                 Maximum number of results to return. Default: false (unlimited).
     516 *     @type string                $page_arg            The string used as a query parameter in pagination links.
     517 *                                                      Default: 'bpage'.
     518 *     @type array|int|string|bool $include             Limit results by a list of user IDs. Accepts an array, a
     519 *                                                      single integer, a comma-separated list of IDs, or false (to
     520 *                                                      disable this limiting). Accepts 'active', 'alphabetical',
     521 *                                                      'newest', or 'random'. Default: false.
     522 *     @type array|int|string|bool $exclude             Exclude users from results by ID. Accepts an array, a single
     523 *                                                      integer, a comma-separated list of IDs, or false (to disable
     524 *                                                      this limiting). Default: false.
     525 *     @type int                   $user_id             If provided, results are limited to the friends of the specified
     526 *                                                      user. When on a user's Friends page, defaults to the ID of the
     527 *                                                      displayed user. Otherwise defaults to 0.
     528 *     @type string|array          $member_type         Array or comma-separated list of member types to limit
     529 *                                                      results to.
     530 *     @type string|array          $member_type__in     Array or comma-separated list of member types to limit
     531 *                                                      results to.
     532 *     @type string|array          $member_type__not_in Array or comma-separated list of member types to exclude
     533 *                                                      from results.
     534 *     @type string                $search_terms        Limit results by a search term. Default: null.
     535 *     @type string                $meta_key            Limit results by the presence of a usermeta key.
     536 *                                                      Default: false.
     537 *     @type mixed                 $meta_value          When used with meta_key, limits results by the a matching
     538 *                                                      usermeta value. Default: false.
     539 *     @type bool                  $populate_extras     Whether to fetch optional data, such as friend counts.
     540 *                                                      Default: true.
    537541 * }
    538542 * @return bool Returns true when blogs are found, otherwise false.
     
    561565    // type: active ( default ) | random | newest | popular | online | alphabetical
    562566    $r = bp_parse_args( $args, array(
    563         'type'            => 'active',
    564         'page'            => 1,
    565         'per_page'        => 20,
    566         'max'             => false,
    567 
    568         'page_arg'        => 'upage',  // See https://buddypress.trac.wordpress.org/ticket/3679
    569 
    570         'include'         => false,    // Pass a user_id or a list (comma-separated or array) of user_ids to only show these users
    571         'exclude'         => false,    // Pass a user_id or a list (comma-separated or array) of user_ids to exclude these users
    572 
    573         'user_id'         => $user_id, // Pass a user_id to only show friends of this user
    574         'member_type'     => $member_type,
     567        'type'                => 'active',
     568        'page'                => 1,
     569        'per_page'            => 20,
     570        'max'                 => false,
     571
     572        'page_arg'            => 'upage',  // See https://buddypress.trac.wordpress.org/ticket/3679
     573
     574        'include'             => false,    // Pass a user_id or a list (comma-separated or array) of user_ids to only show these users
     575        'exclude'             => false,    // Pass a user_id or a list (comma-separated or array) of user_ids to exclude these users
     576
     577        'user_id'             => $user_id, // Pass a user_id to only show friends of this user
     578        'member_type'         => $member_type,
    575579        'member_type__in'     => '',
    576         'member_type__not_in'     => '',
    577         'search_terms'    => null,     // Pass search_terms to filter users by their profile data
    578 
    579         'meta_key'        => false,    // Only return users with this usermeta
    580         'meta_value'      => false,    // Only return users where the usermeta value matches. Requires meta_key
    581 
    582         'populate_extras' => true      // Fetch usermeta? Friend count, last active etc.
     580        'member_type__not_in' => '',
     581        'search_terms'        => null,     // Pass search_terms to filter users by their profile data
     582
     583        'meta_key'            => false,    // Only return users with this usermeta
     584        'meta_value'          => false,    // Only return users where the usermeta value matches. Requires meta_key
     585
     586        'populate_extras'     => true      // Fetch usermeta? Friend count, last active etc.
    583587    ), 'has_members' );
    584588
Note: See TracChangeset for help on using the changeset viewer.