Skip to:
Content

BuddyPress.org

Changeset 10452


Ignore:
Timestamp:
01/17/2016 02:54:33 PM (9 years ago)
Author:
dcavins
Message:

Update bp_has_groups() documentation.

Update docblock by adding missing parameters,
updating parameter order and correcting
description of default values.

Fixes #6785.

File:
1 edited

Legend:

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

    r10444 r10452  
    462462 * @param array|string $args {
    463463 *     Array of parameters. All items are optional.
    464  *     @type string       $type            Shorthand for certain orderby/
    465  *                                         order combinations. 'newest',
    466  *                                         'active', 'popular', 'alphabetical',
    467  *                                         'random'. When present, will override
    468  *                                         orderby and order params. Default: null.
    469  *     @type string       $orderby         Property to sort by.
    470  *                                         'date_created', 'last_activity', 'total_member_count',
    471  *                                         'name', 'random'. Default: 'date_created'.
    472  *     @type string       $order           Sort order. 'ASC' or 'DESC'.
    473  *                                         Default: 'DESC'.
    474  *     @type int          $per_page        Number of items to return per page
    475  *                                         of results. Default: null (no limit).
    476  *     @type int          $page            Page offset of results to return.
    477  *                                         Default: null (no limit).
    478  *     @type int          $user_id         If provided, results will be limited
    479  *                                         to groups of which the specified user
    480  *                                         is a member. Default: null.
    481  *     @type string       $search_terms    If provided, only groups whose names or descriptions match the search terms
    482  *                                         will be returned. Default: value of `$_REQUEST['groups_search']` or
    483  *                                         `$_REQUEST['s']`, if present. Otherwise false.
    484  *     @type array        $meta_query      An array of meta_query conditions.
    485  *                                         See {@link WP_Meta_Query::queries} for description.
    486  *     @type array|string $include         Array or comma-separated list of
    487  *                                         group IDs. Results will be limited
    488  *                                         to groups within the list. Default: false.
    489  *     @type bool         $populate_extras Whether to fetch additional information
    490  *                                         (such as member count) about groups.
    491  *                                         Default: true.
    492  *     @type array|string $exclude         Array or comma-separated list of group IDs.
    493  *                                         Results will exclude the listed groups.
    494  *                                         Default: false.
    495  *     @type bool         $show_hidden     Whether to include hidden groups in
    496  *                                         results. Default: false.
     464 *     @type string       $type              Shorthand for certain orderby/
     465 *                                           order combinations. 'newest',
     466 *                                           'active', 'popular', 'alphabetical',
     467 *                                           'random'. When present, will override
     468 *                                           orderby and order params. Default: null.
     469 *     @type string       $order             Sort order. 'ASC' or 'DESC'.
     470 *                                           Default: 'DESC'.
     471 *     @type string       $orderby           Property to sort by.
     472 *                                           'date_created', 'last_activity', 'total_member_count',
     473 *                                           'name', 'random'. Default: 'last_activity'.
     474 *     @type int          $page              Page offset of results to return.
     475 *                                           Default: 1 (first page of results).
     476 *     @type int          $per_page          Number of items to return per page
     477 *                                           of results. Default: 20.
     478 *     @type int          $max               Does NOT affect query. May change the
     479 *                                           reported number of total groups found,
     480 *                                           but not the actual number of found
     481 *                                           groups. Default: false.
     482 *     @type bool         $show_hidden       Whether to include hidden groups in
     483 *                                           results. Default: false.
     484 *     @type string       $page_arg          Query argument used for pagination.
     485 *                                           Default: 'grpage'.
     486 *     @type int          $user_id           If provided, results will be limited
     487 *                                           to groups of which the specified user
     488 *                                           is a member.
     489 *                                           Default: value of bp_displayed_user_id().
     490 *     @type string       $slug              If provided, only the group with the
     491 *                                           matching slug will be returned.
     492 *                                           Default: false.
     493 *     @type string       $search_terms      If provided, only groups whose names or
     494 *                                           descriptions match the search terms will
     495 *                                           be returned. Default: value of
     496 *                                           `$_REQUEST['groups_search']` or
     497 *                                           `$_REQUEST['s']`, if present. Otherwise false.
     498 *     @type array        $meta_query        An array of meta_query conditions.
     499 *                                           See {@link WP_Meta_Query::queries} for description.
     500 *     @type array|string $include           Array or comma-separated list of
     501 *                                           group IDs. Results will be limited
     502 *                                           to groups within the list. Default: false.
     503 *     @type bool         $populate_extras   Whether to fetch additional information
     504 *                                           (such as member count) about groups.
     505 *                                           Default: true.
     506 *     @type array|string $exclude           Array or comma-separated list of group IDs.
     507 *                                           Results will exclude the listed groups.
     508 *                                           Default: false.
     509 *     @type bool         $update_meta_cache Whether to fetch groupmeta for queried groups.
     510 *                                           Default: true.
    497511 * }
    498512 * @return bool True if there are groups to display that match the params
Note: See TracChangeset for help on using the changeset viewer.