Skip to:
Content

BuddyPress.org

Changeset 10454


Ignore:
Timestamp:
01/18/2016 05:18:23 AM (9 years ago)
Author:
tw2113
Message:

Some more docs cleanup and plenty of @since tag additions for Groups Component.

See #6401.

Location:
trunk/src/bp-groups
Files:
14 edited

Legend:

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

    r10417 r10454  
    9393/**
    9494 * Catch and process group creation form submissions.
     95 *
     96 * @since 1.2.0
     97 *
     98 * @return bool
    9599 */
    96100function groups_action_create_group() {
     
    357361/**
    358362 * Catch and process "Join Group" button clicks.
     363 *
     364 * @since 1.0.0
     365 *
     366 * @return bool
    359367 */
    360368function groups_action_join_group() {
     
    410418 *
    411419 * @since 1.2.4
     420 *
     421 * @return bool
    412422 */
    413423function groups_action_leave_group() {
     
    453463 * Sort the group creation steps.
    454464 *
     465 * @since 1.1.0
     466 *
    455467 * @return false|null False on failure.
    456468 */
     
    489501/**
    490502 * Catch requests for a random group page (example.com/groups/?random-group) and redirect.
     503 *
     504 * @since 1.2.0
    491505 */
    492506function groups_action_redirect_to_random_group() {
  • trunk/src/bp-groups/bp-groups-activity.php

    r10417 r10454  
    1616/**
    1717 * Register activity actions for the Groups component.
     18 *
     19 * @since 1.1.0
    1820 *
    1921 * @return bool|null False on failure.
     
    270272 * @param array $retval Empty array by default.
    271273 * @param array $filter Current activity arguments.
    272  *
    273274 * @return array
    274275 */
     
    332333 * defaults.
    333334 *
     335 * @since 1.0.0
     336 *
    334337 * @see bp_activity_add() for more detailed description of parameters and
    335338 *      return values.
     
    386389 * Update the last_activity meta value for a given group.
    387390 *
     391 * @since 1.0.0
     392 *
    388393 * @param int $group_id Optional. The ID of the group whose last_activity is
    389394 *                      being updated. Default: the current group's ID.
  • trunk/src/bp-groups/bp-groups-admin.php

    r10417 r10454  
    11331133     *
    11341134     * @since 1.7.0
    1135      *
    11361135     * @var string
    11371136     */
     
    11421141     *
    11431142     * @since 1.7.0
    1144      *
    11451143     * @var int
    11461144     */
  • trunk/src/bp-groups/bp-groups-cache.php

    r10417 r10454  
    2424 * $group_ids and adds it to WP cache. This improves efficiency when using
    2525 * groupmeta within a loop context.
     26 *
     27 * @since 1.6.0
    2628 *
    2729 * @param int|string|array|bool $group_ids Accepts a single group_id, or a
     
    4749 * Clear the cached group count.
    4850 *
     51 * @since 1.0.0
     52 *
    4953 * @param int $group_id Not used.
    5054 */
     
    164168/**
    165169 * Clear a user's cached group count.
     170 *
     171 * @since 1.2.0
    166172 *
    167173 * @param int $group_id The group ID. Not used in this function.
  • trunk/src/bp-groups/bp-groups-filters.php

    r10417 r10454  
    114114/**
    115115 * Filter bbPress query SQL when on group pages or on forums directory.
     116 *
     117 * @since 1.1.0
    116118 */
    117119function groups_add_forum_privacy_sql() {
     
    125127 * Add fields to bbPress query for group-specific data.
    126128 *
     129 * @since 1.1.0
     130 *
    127131 * @param string $sql SQL statement to amend.
    128132 * @return string
     
    136140 * Add JOINed tables to bbPress query for group-specific data.
    137141 *
     142 * @since 1.1.0
     143 *
    138144 * @param string $sql SQL statement to amend.
    139145 * @return string
     
    150156 * Add WHERE clauses to bbPress query for group-specific data and access protection.
    151157 *
     158 * @since 1.1.0
     159 *
    152160 * @param string $sql SQL Statement to amend.
    153  *
    154161 * @return string
    155162 */
     
    202209 * Modify bbPress caps for bp-forums.
    203210 *
     211 * @since 1.1.0
     212 *
    204213 * @param bool   $value Original value for current_user_can check.
    205214 * @param string $cap   Capability checked.
    206215 * @param array  $args  Arguments for the caps.
    207  *
    208216 * @return bool
    209217 */
  • trunk/src/bp-groups/bp-groups-functions.php

    r10453 r10454  
    3535 * of instantiating BP_Groups_Group directly, so that you will inherit cache
    3636 * support and pass through the groups_get_group filter.
     37 *
     38 * @since 1.2.0
    3739 *
    3840 * @param array|string $args {
     
    213215 * section (Name, Description, and "Notify members...").
    214216 *
     217 * @since 1.0.0
     218 *
    215219 * @param int    $group_id       ID of the group.
    216220 * @param string $group_name     Name of the group.
     
    258262 * section (privacy settings, "enable forum", invitation status).
    259263 *
     264 * @since 1.0.0
     265 *
    260266 * @param int         $group_id      ID of the group.
    261267 * @param bool        $enable_forum  Whether to enable a forum for the group.
     
    353359 * Check a group status (eg 'private') against the whitelist of registered statuses.
    354360 *
     361 * @since 1.1.0
     362 *
    355363 * @param string $status Status to check.
    356364 * @return bool True if status is allowed, otherwise false.
     
    364372/**
    365373 * Provide a unique, sanitized version of a group slug.
     374 *
     375 * @since 1.0.0
    366376 *
    367377 * @param string $slug Group slug to check.
     
    390400 * Get a group slug by its ID.
    391401 *
     402 * @since 1.0.0
     403 *
    392404 * @param int $group_id The numeric ID of the group.
    393405 * @return string The group's slug.
     
    414426/**
    415427 * Remove a user from a group.
     428 *
     429 * @since 1.0.0
    416430 *
    417431 * @param int $group_id ID of the group.
     
    454468/**
    455469 * Add a user to a group.
     470 *
     471 * @since 1.0.0
    456472 *
    457473 * @param int $group_id ID of the group.
     
    521537 * Get a list of group administrators.
    522538 *
     539 * @since 1.0.0
     540 *
    523541 * @param int $group_id ID of the group.
    524542 * @return array Info about group admins (user_id + date_modified).
     
    531549 * Get a list of group moderators.
    532550 *
     551 * @since 1.0.0
     552 *
    533553 * @param int $group_id ID of the group.
    534554 * @return array Info about group admins (user_id + date_modified).
     
    546566 * To use the legacy query, filter 'bp_use_legacy_group_member_query',
    547567 * returning true.
     568 *
     569 * @since 1.0.0
    548570 *
    549571 * @param array $args {
     
    647669 * Get the member count for a group.
    648670 *
     671 * @since 1.2.3
     672 *
    649673 * @param int $group_id Group ID.
    650674 * @return int Count of confirmed members for the group.
     
    658682/**
    659683 * Get a collection of groups, based on the parameters passed.
     684 *
     685 * @since 1.2.0
    660686 *
    661687 * @param array|string $args {
     
    720746 * Get the total group count for the site.
    721747 *
     748 * @since 1.2.0
     749 *
    722750 * @return int
    723751 */
     
    735763/**
    736764 * Get the IDs of the groups of which a specified user is a member.
     765 *
     766 * @since 1.0.0
    737767 *
    738768 * @param int $user_id  ID of the user.
     
    757787 * Get the count of groups of which the specified user is a member.
    758788 *
     789 * @since 1.0.0
     790 *
    759791 * @param int $user_id Optional. Default: ID of the displayed user.
    760792 * @return int Group count.
     
    803835/**
    804836 * Generate the avatar upload directory path for a given group.
     837 *
     838 * @since 1.1.0
    805839 *
    806840 * @param int $group_id Optional. ID of the group. Default: ID of the current group.
     
    842876 * Check whether a user is an admin of a given group.
    843877 *
     878 * @since 1.0.0
     879 *
    844880 * @param int $user_id ID of the user.
    845881 * @param int $group_id ID of the group.
     
    853889 * Check whether a user is a mod of a given group.
    854890 *
     891 * @since 1.0.0
     892 *
    855893 * @param int $user_id ID of the user.
    856894 * @param int $group_id ID of the group.
     
    864902 * Check whether a user is a member of a given group.
    865903 *
     904 * @since 1.0.0
     905 *
    866906 * @param int $user_id ID of the user.
    867907 * @param int $group_id ID of the group.
     
    872912}
    873913
     914/**
     915 * Check whether a user is banned from a given group.
     916 *
     917 * @since 1.0.0
     918 *
     919 * @param int $user_id  ID of the user.
     920 * @param int $group_id ID of the group.
     921 *
     922 * @return bool
     923 */
    874924function groups_is_user_banned( $user_id, $group_id ) {
    875925    return BP_Groups_Member::check_is_banned( $user_id, $group_id );
     
    893943/**
    894944 * Post an Activity status update affiliated with a group.
     945 *
     946 * @since 1.2.0
    895947 *
    896948 * @param array|string $args {
     
    9841036 * Get IDs of users with outstanding invites to a given group from a specified user.
    9851037 *
     1038 * @since 1.0.0
     1039 *
    9861040 * @param int               $user_id ID of the inviting user.
    9871041 * @param int|bool          $limit   Limit to restrict to.
     
    10181072/**
    10191073 * Invite a user to a group.
     1074 *
     1075 * @since 1.0.0
    10201076 *
    10211077 * @param array|string $args {
     
    10821138 * Functionally, this is equivalent to removing a user from a group.
    10831139 *
     1140 * @since 1.0.0
     1141 *
    10841142 * @param int $user_id  ID of the user.
    10851143 * @param int $group_id ID of the group.
     
    11081166 *
    11091167 * Returns true if a user is already a member of the group.
     1168 *
     1169 * @since 1.0.0
    11101170 *
    11111171 * @param int $user_id  ID of the user.
     
    11601220 * Reject a group invitation.
    11611221 *
     1222 * @since 1.0.0
     1223 *
    11621224 * @param int $user_id  ID of the user.
    11631225 * @param int $group_id ID of the group.
     
    11841246 * Delete a group invitation.
    11851247 *
     1248 * @since 1.0.0
     1249 *
    11861250 * @param int $user_id  ID of the invited user.
    11871251 * @param int $group_id ID of the group.
     
    12071271/**
    12081272 * Send all pending invites by a single user to a specific group.
     1273 *
     1274 * @since 1.0.0
    12091275 *
    12101276 * @param int $user_id  ID of the inviting user.
     
    12461312 * Get IDs of users with outstanding invites to a given group from a specified user.
    12471313 *
     1314 * @since 1.0.0
     1315 *
    12481316 * @param int $user_id  ID of the inviting user.
    12491317 * @param int $group_id ID of the group.
     
    12611329 * Entering 'all' as the $type parameter will return unsent invitations as
    12621330 * well (useful to make sure AJAX requests are not duplicated).
     1331 *
     1332 * @since 1.0.0
    12631333 *
    12641334 * @param int    $user_id  ID of potential group member.
     
    12751345 * Delete all invitations to a given group.
    12761346 *
     1347 * @since 1.0.0
     1348 *
    12771349 * @param int $group_id ID of the group whose invitations are being deleted.
    12781350 * @return int|null Number of rows records deleted on success, null on failure.
     
    12861358/**
    12871359 * Promote a member to a new status within a group.
     1360 *
     1361 * @since 1.0.0
    12881362 *
    12891363 * @param int    $user_id  ID of the user.
     
    13191393 * Demote a user to 'member' status within a group.
    13201394 *
     1395 * @since 1.0.0
     1396 *
    13211397 * @param int $user_id  ID of the user.
    13221398 * @param int $group_id ID of the group.
     
    13461422 * Ban a member from a group.
    13471423 *
     1424 * @since 1.0.0
     1425 *
    13481426 * @param int $user_id  ID of the user.
    13491427 * @param int $group_id ID of the group.
     
    13731451 * Unban a member from a group.
    13741452 *
     1453 * @since 1.0.0
     1454 *
    13751455 * @param int $user_id  ID of the user.
    13761456 * @param int $group_id ID of the group.
     
    14021482 * Remove a member from a group.
    14031483 *
     1484 * @since 1.2.6
     1485 *
    14041486 * @param int $user_id  ID of the user.
    14051487 * @param int $group_id ID of the group.
     
    14311513/**
    14321514 * Create a group membership request.
     1515 *
     1516 * @since 1.0.0
    14331517 *
    14341518 * @param int $requesting_user_id ID of the user requesting membership.
     
    14901574 * Accept a pending group membership request.
    14911575 *
     1576 * @since 1.0.0
     1577 *
    14921578 * @param int $membership_id ID of the membership object.
    14931579 * @param int $user_id       Optional. ID of the user who requested membership.
     
    15351621 * Reject a pending group membership request.
    15361622 *
     1623 * @since 1.0.0
     1624 *
    15371625 * @param int $membership_id ID of the membership object.
    15381626 * @param int $user_id       Optional. ID of the user who requested membership.
     
    15661654 * Delete a pending group membership request.
    15671655 *
     1656 * @since 1.2.0
     1657 *
    15681658 * @param int $membership_id ID of the membership object.
    15691659 * @param int $user_id       Optional. ID of the user who requested membership.
     
    15901680 * Check whether a user has an outstanding membership request for a given group.
    15911681 *
     1682 * @since 1.0.0
     1683 *
    15921684 * @param int $user_id  ID of the user.
    15931685 * @param int $group_id ID of the group.
     
    16011693 * Accept all pending membership requests to a group.
    16021694 *
     1695 * @since 1.0.2
     1696 *
    16031697 * @param int $group_id ID of the group.
    16041698 * @return bool True on success, false on failure.
     
    16291723/**
    16301724 * Delete metadata for a group.
     1725 *
     1726 * @since 1.0.0
    16311727 *
    16321728 * @param int         $group_id   ID of the group.
     
    16681764 * Get a piece of group metadata.
    16691765 *
     1766 * @since 1.0.0
     1767 *
    16701768 * @param int    $group_id ID of the group.
    16711769 * @param string $meta_key Metadata key.
     
    16851783/**
    16861784 * Update a piece of group metadata.
     1785 *
     1786 * @since 1.0.0
    16871787 *
    16881788 * @param int    $group_id   ID of the group.
  • trunk/src/bp-groups/bp-groups-loader.php

    r10445 r10454  
    1717/**
    1818 * Creates our Groups component.
     19 *
     20 * @since 1.5.0
    1921 */
    2022class BP_Groups_Component extends BP_Component {
     
    689691     * Set up the component entries in the WordPress Admin Bar.
    690692     *
     693     * @since 1.5.0
     694     *
    691695     * @see BP_Component::setup_nav() for a description of the $wp_admin_nav
    692696     *      parameter array.
     
    752756    /**
    753757     * Set up the title for pages and <title>.
     758     *
     759     * @since 1.5.0
    754760     */
    755761    public function setup_title() {
  • trunk/src/bp-groups/bp-groups-screens.php

    r10417 r10454  
    1717/**
    1818 * Handle the display of the Groups directory index.
     19 *
     20 * @since 1.0.0
    1921 */
    2022function groups_directory_groups_setup() {
     
    4345/**
    4446 * Handle the loading of the My Groups page.
     47 *
     48 * @since 1.0.0
    4549 */
    4650function groups_screen_my_groups() {
     
    6569/**
    6670 * Handle the loading of a user's Groups > Invites page.
     71 *
     72 * @since 1.0.0
    6773 */
    6874function groups_screen_group_invites() {
     
    137143/**
    138144 * Handle the loading of a single group's page.
     145 *
     146 * @since 1.0.0
    139147 */
    140148function groups_screen_group_home() {
     
    163171/**
    164172 * This screen function handles actions related to group forums.
     173 *
     174 * @since 1.0.0
    165175 */
    166176function groups_screen_group_forum() {
     
    562572/**
    563573 * Handle the display of a group's Members page.
     574 *
     575 * @since 1.0.0
    564576 */
    565577function groups_screen_group_members() {
     
    594606/**
    595607 * Handle the display of a group's Send Invites page.
     608 *
     609 * @since 1.0.0
    596610 */
    597611function groups_screen_group_invite() {
     
    688702/**
    689703 * Handle the display of a group's Request Membership page.
     704 *
     705 * @since 1.0.0
    690706 */
    691707function groups_screen_group_request_membership() {
     
    772788/**
    773789 * Handle the display of a single group activity item.
     790 *
     791 * @since 1.2.0
    774792 */
    775793function groups_screen_group_activity_permalink() {
     
    787805/**
    788806 * Handle the display of a group's Admin pages.
     807 *
     808 * @since 1.0.0
    789809 */
    790810function groups_screen_group_admin() {
     
    800820/**
    801821 * Handle the display of a group's admin/edit-details page.
     822 *
     823 * @since 1.0.0
    802824 */
    803825function groups_screen_group_admin_edit_details() {
     
    859881/**
    860882 * Handle the display of a group's admin/group-settings page.
     883 *
     884 * @since 1.0.0
    861885 */
    862886function groups_screen_group_admin_settings() {
     
    928952/**
    929953 * Handle the display of a group's Change Avatar page.
     954 *
     955 * @since 1.0.0
    930956 */
    931957function groups_screen_group_admin_avatar() {
     
    10551081/**
    10561082 * This function handles actions related to member management on the group admin.
     1083 *
     1084 * @since 1.0.0
    10571085 */
    10581086function groups_screen_group_admin_manage_members() {
     
    12281256/**
    12291257 * Handle the display of Admin > Membership Requests.
     1258 *
     1259 * @since 1.0.0
    12301260 */
    12311261function groups_screen_group_admin_requests() {
     
    13031333/**
    13041334 * Handle the display of the Delete Group page.
     1335 *
     1336 * @since 1.0.0
    13051337 */
    13061338function groups_screen_group_admin_delete_group() {
     
    13731405/**
    13741406 * Render the group settings fields on the Notification Settings page.
     1407 *
     1408 * @since 1.0.0
    13751409 */
    13761410function groups_screen_notification_settings() {
  • trunk/src/bp-groups/bp-groups-template.php

    r10452 r10454  
    9696 *
    9797 * Responsible for loading a group of groups into a loop for display.
     98 *
     99 * @since 1.2.0
    98100 */
    99101class BP_Groups_Template {
     
    103105     *
    104106     * @var int
     107     * @since 1.2.0
    105108     */
    106109    public $current_group = -1;
     
    110113     *
    111114     * @var int
     115     * @since 1.2.0
    112116     */
    113117    public $group_count;
     
    117121     *
    118122     * @var array
     123     * @since 1.2.0
    119124     */
    120125    public $groups;
     
    124129     *
    125130     * @var object
     131     * @since 1.2.0
    126132     */
    127133    public $group;
     
    131137     *
    132138     * @var bool
     139     * @since 1.2.0
    133140     */
    134141    public $in_the_loop;
     
    138145     *
    139146     * @var string
     147     * @since 1.2.0
    140148     */
    141149    public $pag_page;
     
    145153     *
    146154     * @var string
     155     * @since 1.2.0
    147156     */
    148157    public $pag_num;
     
    152161     *
    153162     * @var string
     163     * @since 1.2.0
    154164     */
    155165    public $pag_links;
     
    159169     *
    160170     * @var int
     171     * @since 1.2.0
    161172     */
    162173    public $total_group_count;
     
    166177     *
    167178     * @var bool
     179     * @since 1.2.0
    168180     */
    169181    public $single_group = false;
     
    173185     *
    174186     * @var string
     187     * @since 1.2.0
    175188     */
    176189    public $sort_by;
     
    180193     *
    181194     * @var string
     195     * @since 1.2.0
    182196     */
    183197    public $order;
     
    366380     * Whether there are groups available in the loop.
    367381     *
     382     * @since 1.2.0
     383     *
    368384     * @see bp_has_groups()
    369385     *
     
    381397     * Set up the next group and iterate index.
    382398     *
     399     * @since 1.2.0
     400     *
    383401     * @return object The next group to iterate over.
    384402     */
     
    392410    /**
    393411     * Rewind the groups and reset member index.
     412     *
     413     * @since 1.2.0
    394414     */
    395415    function rewind_groups() {
     
    406426     * that controls iteration inside the groups loop, eg:
    407427     *     while ( bp_groups() ) { ...
     428     *
     429     * @since 1.2.0
    408430     *
    409431     * @see bp_groups()
     
    436458     * while looping, so that template tags used during that iteration make
    437459     * reference to the current member.
     460     *
     461     * @since 1.2.0
    438462     *
    439463     * @see bp_the_group()
     
    605629 * Check whether there are more groups to iterate over.
    606630 *
     631 * @since 1.0.0
     632 *
    607633 * @return bool
    608634 */
     
    615641 * Set up the current group inside the loop.
    616642 *
     643 * @since 1.0.0
     644 *
    617645 * @return object
    618646 */
     
    624652/**
    625653 * Is the group visible to the currently logged-in user?
     654 *
     655 * @since 1.0.0
    626656 *
    627657 * @param object|bool $group Optional. Group object. Default: current group in loop.
     
    653683 * Output the ID of the current group in the loop.
    654684 *
     685 * @since 1.0.0
     686 *
    655687 * @param object|bool $group Optional. Group object. Default: current group in loop.
    656688 */
     
    660692    /**
    661693     * Get the ID of the current group in the loop.
     694     *
     695     * @since 1.0.0
    662696     *
    663697     * @param object|bool $group Optional. Group object.
     
    761795 * Output the name of the current group in the loop.
    762796 *
     797 * @since 1.0.0
     798 *
    763799 * @param object|bool $group Optional. Group object.
    764800 *                           Default: current group in loop.
     
    769805    /**
    770806     * Get the name of the current group in the loop.
     807     *
     808     * @since 1.0.0
    771809     *
    772810     * @param object|bool $group Optional. Group object.
     
    796834 * Output the type of the current group in the loop.
    797835 *
     836 * @since 1.0.0
     837 *
    798838 * @param object|bool $group Optional. Group object.
    799839 *                           Default: current group in loop.
     
    805845/**
    806846 * Get the type of the current group in the loop.
     847 *
     848 * @since 1.0.0
    807849 *
    808850 * @param object|bool $group Optional. Group object.
     
    841883 * Output the status of the current group in the loop.
    842884 *
     885 * @since 1.1.0
     886 *
    843887 * @param object|bool $group Optional. Group object.
    844888 *                           Default: current group in loop.
     
    849893    /**
    850894     * Get the status of the current group in the loop.
     895     *
     896     * @since 1.1.0
    851897     *
    852898     * @param object|bool $group Optional. Group object.
     
    10261072 * Output the 'last active' string for the current group in the loop.
    10271073 *
     1074 * @since 1.0.0
     1075 *
    10281076 * @param object|bool $group Optional. Group object.
    10291077 *                           Default: current group in loop.
     
    10341082    /**
    10351083     * Return the 'last active' string for the current group in the loop.
     1084     *
     1085     * @since 1.0.0
    10361086     *
    10371087     * @param object|bool $group Optional. Group object.
     
    10721122 * Output the permalink for the current group in the loop.
    10731123 *
     1124 * @since 1.0.0
     1125 *
    10741126 * @param object|bool $group Optional. Group object.
    10751127 *                           Default: current group in loop.
     
    10801132    /**
    10811133     * Return the permalink for the current group in the loop.
     1134     *
     1135     * @since 1.0.0
    10821136     *
    10831137     * @param object|bool $group Optional. Group object.
     
    11071161 * Output the permalink for the admin section of the current group in the loop.
    11081162 *
     1163 * @since 1.0.0
     1164 *
    11091165 * @param object|bool $group Optional. Group object.
    11101166 *                           Default: current group in loop.
     
    11151171    /**
    11161172     * Return the permalink for the admin section of the current group in the loop.
     1173     *
     1174     * @since 1.0.0
    11171175     *
    11181176     * @param object|bool $group Optional. Group object.
     
    11421200 * Return the slug for the current group in the loop.
    11431201 *
     1202 * @since 1.0.0
     1203 *
    11441204 * @param object|bool $group Optional. Group object.
    11451205 *                           Default: current group in loop.
     
    11501210    /**
    11511211     * Return the slug for the current group in the loop.
     1212     *
     1213     * @since 1.0.0
    11521214     *
    11531215     * @param object|bool $group Optional. Group object.
     
    11771239 * Output the description for the current group in the loop.
    11781240 *
     1241 * @since 1.0.0
     1242 *
    11791243 * @param object|bool $group Optional. Group object.
    11801244 *                           Default: current group in loop.
     
    11851249    /**
    11861250     * Return the description for the current group in the loop.
     1251     *
     1252     * @since 1.0.0
    11871253     *
    11881254     * @param object|bool $group Optional. Group object.
     
    12121278 * Output the description for the current group in the loop, for use in a textarea.
    12131279 *
     1280 * @since 1.0.0
     1281 *
    12141282 * @param object|bool $group Optional. Group object.
    12151283 *                           Default: current group in loop.
     
    12251293     * appropriate for "raw" editing.
    12261294     *
     1295     * @since 1.0.0
     1296     *
    12271297     * @param object|bool $group Optional. Group object.
    12281298     *                           Default: current group in loop.
     
    12541324 * Output an excerpt of the group description.
    12551325 *
     1326 * @since 1.0.0
     1327 *
    12561328 * @param object|bool $group Optional. The group being referenced.
    12571329 *                           Defaults to the group currently being
     
    12631335    /**
    12641336     * Get an excerpt of a group description.
     1337     *
     1338     * @since 1.0.0
    12651339     *
    12661340     * @param object|bool $group Optional. The group being referenced.
     
    12921366 * Either 'Public' or 'Private'.
    12931367 *
     1368 * @since 1.0.0
     1369 *
    12941370 * @param object|bool $group Optional. Group object.
    12951371 *                           Default: current group in loop.
     
    13021378     *
    13031379     * Either 'Public' or 'Private'.
     1380     *
     1381     * @since 1.0.0
    13041382     *
    13051383     * @param object|bool $group Optional. Group object.
     
    13621440 * Output the created date of the current group in the loop.
    13631441 *
     1442 * @since 1.0.0
     1443 *
    13641444 * @param object|bool $group Optional. Group object.
    13651445 *                           Default: current group in loop.
     
    13701450    /**
    13711451     * Return the created date of the current group in the loop.
     1452     *
     1453     * @since 1.0.0
    13721454     *
    13731455     * @param object|bool $group Optional. Group object.
     
    13971479 * Output the username of the creator of the current group in the loop.
    13981480 *
     1481 * @since 1.7.0
     1482 *
    13991483 * @param object|bool $group Optional. Group object.
    14001484 *                           Default: current group in loop.
     
    14051489    /**
    14061490     * Return the username of the creator of the current group in the loop.
     1491     *
     1492     * @since 1.7.0
    14071493     *
    14081494     * @param object|bool $group Optional. Group object.
     
    14321518 * Output the user ID of the creator of the current group in the loop.
    14331519 *
     1520 * @since 1.7.0
     1521 *
    14341522 * @param object|bool $group Optional. Group object.
    14351523 *                           Default: current group in loop.
     
    14401528    /**
    14411529     * Return the user ID of the creator of the current group in the loop.
     1530     *
     1531     * @since 1.7.0
    14421532     *
    14431533     * @param object|bool $group Optional. Group object.
     
    14671557 * Output the permalink of the creator of the current group in the loop.
    14681558 *
     1559 * @since 1.7.0
     1560 *
    14691561 * @param object|bool $group Optional. Group object.
    14701562 *                           Default: current group in loop.
     
    14751567    /**
    14761568     * Return the permalink of the creator of the current group in the loop.
     1569     *
     1570     * @since 1.7.0
    14771571     *
    14781572     * @param object|bool $group Optional. Group object.
     
    15011595/**
    15021596 * Determine whether a user is the creator of the current group in the loop.
     1597 *
     1598 * @since 1.7.0
    15031599 *
    15041600 * @param object|bool $group   Optional. Group object.
     
    15231619/**
    15241620 * Output the avatar of the creator of the current group in the loop.
     1621 *
     1622 * @since 1.7.0
    15251623 *
    15261624 * @param object|bool $group Optional. Group object.
     
    15361634    /**
    15371635     * Return the avatar of the creator of the current group in the loop.
     1636     *
     1637     * @since 1.7.0
    15381638     *
    15391639     * @param object|bool $group Optional. Group object.
     
    15901690 * Alias of {@link bp_is_item_admin()}.
    15911691 *
     1692 * @since 1.1.0
     1693 *
    15921694 * @return bool
    15931695 */
     
    16011703 * Alias of {@link bp_is_item_mod()}.
    16021704 *
     1705 * @since 1.1.0
     1706 *
    16031707 * @return bool
    16041708 */
     
    16091713/**
    16101714 * Output markup listing group admins.
     1715 *
     1716 * @since 1.0.0
    16111717 *
    16121718 * @param object|bool $group Optional. Group object.
     
    16501756 * Output markup listing group mod.
    16511757 *
     1758 * @since 1.0.0
     1759 *
    16521760 * @param object|bool $group Optional. Group object.
    16531761 *                           Default: current group in loop.
     
    17851893/**
    17861894 * Output the permalink of the current group's Members page.
     1895 *
     1896 * @since 1.0.0
    17871897 */
    17881898function bp_group_all_members_permalink() {
     
    17911901    /**
    17921902     * Return the permalink of the Members page of the current group in the loop.
     1903     *
     1904     * @since 1.0.0
    17931905     *
    17941906     * @param object|bool $group Optional. Group object.
     
    18751987/**
    18761988 * Output the pagination HTML for a group loop.
     1989 *
     1990 * @since 1.2.0
    18771991 */
    18781992function bp_groups_pagination_links() {
     
    18821996     * Get the pagination HTML for a group loop.
    18831997     *
     1998     * @since 1.2.0
     1999     *
    18842000     * @return string
    18852001     */
     
    18992015/**
    19002016 * Output the "Viewing x-y of z groups" pagination message.
     2017 *
     2018 * @since 1.2.0
    19012019 */
    19022020function bp_groups_pagination_count() {
     
    19052023    /**
    19062024     * Generate the "Viewing x-y of z groups" pagination message.
     2025     *
     2026     * @since 1.5.0
    19072027     *
    19082028     * @return string
     
    19412061 * public group automatically when creating content in that group.
    19422062 *
     2063 * @since 1.2.6
     2064 *
    19432065 * @return bool
    19442066 */
     
    19482070     * Filters whether groups auto-join is enabled.
    19492071     *
    1950      * @since BuddyPres (1.2.6)
     2072     * @since 1.2.6
    19512073     *
    19522074     * @param bool $value Enabled status.
     
    19572079/**
    19582080 * Output the total member count for a group.
     2081 *
     2082 * @since 1.0.0
    19592083 *
    19602084 * @param object|bool $group Optional. Group object. Default: current group in loop.
     
    19652089    /**
    19662090     * Get the total member count for a group.
     2091     *
     2092     * @since 1.0.0
    19672093     *
    19682094     * @param object|bool $group Optional. Group object.
     
    19912117/**
    19922118 * Output the "x members" count string for a group.
     2119 *
     2120 * @since 1.2.0
    19932121 */
    19942122function bp_group_member_count() {
     
    19972125    /**
    19982126     * Generate the "x members" count string for a group.
     2127     *
     2128     * @since 1.2.0
    19992129     *
    20002130     * @return string
     
    20232153/**
    20242154 * Output the URL of the Forum page of the current group in the loop.
     2155 *
     2156 * @since 1.0.0
    20252157 */
    20262158function bp_group_forum_permalink() {
     
    20292161    /**
    20302162     * Generate the URL of the Forum page of a group.
     2163     *
     2164     * @since 1.0.0
    20312165     *
    20322166     * @param object|bool $group Optional. Group object.
     
    20562190 * Output the topic count for a group forum.
    20572191 *
     2192 * @since 1.2.0
     2193 *
    20582194 * @param array|string $args See {@link bp_get_group_forum_topic_count()}.
    20592195 */
     
    20632199    /**
    20642200     * Generate the topic count string for a group forum.
     2201     *
     2202     * @since 1.2.0
    20652203     *
    20662204     * @param array|string $args {
     
    21182256 * Output the post count for a group forum.
    21192257 *
     2258 * @since 1.2.0
     2259 *
    21202260 * @param array|string $args See {@link bp_get_group_forum_post_count()}.
    21212261 */
     
    21252265    /**
    21262266     * Generate the post count string for a group forum.
     2267     *
     2268     * @since 1.2.0
    21272269     *
    21282270     * @param array|string $args {
     
    21802322 * Determine whether forums are enabled for a group.
    21812323 *
     2324 * @since 1.0.0
     2325 *
    21822326 * @param object|bool $group Optional. Group object. Default: current group in loop.
    2183  *
    21842327 * @return bool
    21852328 */
     
    22012344 * Output the 'checked' attribute for the group forums settings UI.
    22022345 *
     2346 * @since 1.0.0
     2347 *
    22032348 * @param object|bool $group Optional. Group object. Default: current group in loop.
    22042349 */
     
    22172362/**
    22182363 * Output the 'checked' attribute for a given status in the settings UI.
     2364 *
     2365 * @since 1.0.0
    22192366 *
    22202367 * @param string      $setting Group status. 'public', 'private', 'hidden'.
     
    25332680 * Determine whether a group has moderators.
    25342681 *
     2682 * @since 1.0.0
     2683 *
    25352684 * @param object|bool $group Optional. Group object. Default: current group in loop.
    25362685 * @return array Info about group admins (user_id + date_modified).
     
    25582707 * Output a URL for promoting a user to moderator.
    25592708 *
     2709 * @since 1.1.0
     2710 *
    25602711 * @param array|string $args See {@link bp_get_group_member_promote_mod_link()}.
    25612712 */
     
    25652716    /**
    25662717     * Generate a URL for promoting a user to moderator.
     2718     *
     2719     * @since 1.1.0
    25672720     *
    25682721     * @param array|string $args {
     
    25972750 * Output a URL for promoting a user to admin.
    25982751 *
     2752 * @since 1.1.0
     2753 *
    25992754 * @param array|string $args See {@link bp_get_group_member_promote_admin_link()}.
    26002755 */
     
    26042759    /**
    26052760     * Generate a URL for promoting a user to admin.
     2761     *
     2762     * @since 1.1.0
    26062763     *
    26072764     * @param array|string $args {
     
    26362793 * Output a URL for demoting a user to member.
    26372794 *
     2795 * @since 1.0.0
     2796 *
    26382797 * @param int $user_id ID of the member to demote. Default: current member in
    26392798 *                     a member loop.
     
    26502809    /**
    26512810     * Generate a URL for demoting a user to member.
     2811     *
     2812     * @since 1.0.0
    26522813     *
    26532814     * @param int         $user_id ID of the member to demote. Default: current
     
    26822843 * Output a URL for banning a member from a group.
    26832844 *
     2845 * @since 1.0.0
     2846 *
    26842847 * @param int $user_id ID of the member to ban.
    26852848 *                     Default: current member in a member loop.
     
    26962859    /**
    26972860     * Generate a URL for banning a member from a group.
     2861     *
     2862     * @since 1.0.0
    26982863     *
    26992864     * @param int         $user_id ID of the member to ban.
     
    27222887 * Output a URL for unbanning a member from a group.
    27232888 *
     2889 * @since 1.0.0
     2890 *
    27242891 * @param int $user_id ID of the member to unban.
    27252892 *                     Default: current member in a member loop.
     
    27362903    /**
    27372904     * Generate a URL for unbanning a member from a group.
     2905     *
     2906     * @since 1.0.0
    27382907     *
    27392908     * @param int         $user_id ID of the member to unban.
     
    27662935 * Output a URL for removing a member from a group.
    27672936 *
     2937 * @since 1.2.6
     2938 *
    27682939 * @param int $user_id ID of the member to remove.
    27692940 *                     Default: current member in a member loop.
     
    27802951    /**
    27812952     * Generate a URL for removing a member from a group.
     2953     *
     2954     * @since 1.2.6
    27822955     *
    27832956     * @param int         $user_id ID of the member to remove.
     
    28082981 * HTML admin subnav items for group pages.
    28092982 *
     2983 * @since 1.0.0
     2984 *
    28102985 * @param object|bool $group Optional. Group object.
    28112986 *                           Default: current group in the loop.
     
    28343009 * BackCompat for plugins/themes directly hooking groups_admin_tabs
    28353010 * without using the Groups Extension API.
     3011 *
     3012 * @since 2.2.0
    28363013 *
    28373014 * @param  string $subnav_output Subnav item output.
     
    28643041/**
    28653042 * Output the group count for the displayed user.
     3043 *
     3044 * @since 1.1.0
    28663045 */
    28673046function bp_group_total_for_member() {
     
    28713050     * Get the group count for the displayed user.
    28723051     *
     3052     * @since 1.1.0
     3053     *
    28733054     * @return string
    28743055     */
     
    28873068/**
    28883069 * Output the 'action' attribute for a group form.
     3070 *
     3071 * @since 1.0.0
    28893072 *
    28903073 * @param string $page Page slug.
     
    28953078    /**
    28963079     * Generate the 'action' attribute for a group form.
     3080     *
     3081     * @since 1.0.0
    28973082     *
    28983083     * @param string      $page  Page slug.
     
    29233108 * Output the 'action' attribute for a group admin form.
    29243109 *
     3110 * @since 1.0.0
     3111 *
    29253112 * @param string|bool $page Optional. Page slug.
    29263113 */
     
    29303117    /**
    29313118     * Generate the 'action' attribute for a group admin form.
     3119     *
     3120     * @since 1.0.0
    29323121     *
    29333122     * @param string|bool $page  Optional. Page slug.
     
    29623151 * Determine whether the logged-in user has requested membership to a group.
    29633152 *
     3153 * @since 1.0.0
     3154 *
    29643155 * @param object|bool $group Optional. Group object.
    29653156 *                           Default: current group in the loop.
     
    29833174 * Check if current user is member of a group.
    29843175 *
     3176 * @since 1.0.0
     3177 *
    29853178 * @global object $groups_template
    29863179 *
     
    30153208/**
    30163209 * Check whether the current user has an outstanding invite to the current group in the loop.
     3210 *
     3211 * @since 2.1.0
    30173212 *
    30183213 * @param object|bool $group Optional. Group data object.
     
    31053300/**
    31063301 * Output the URL for accepting an invitation to the current group in the loop.
     3302 *
     3303 * @since 1.0.0
    31073304 */
    31083305function bp_group_accept_invite_link() {
     
    31113308    /**
    31123309     * Generate the URL for accepting an invitation to a group.
     3310     *
     3311     * @since 1.0.0
    31133312     *
    31143313     * @param object|bool $group Optional. Group object.
     
    31393338/**
    31403339 * Output the URL for accepting an invitation to the current group in the loop.
     3340 *
     3341 * @since 1.0.0
    31413342 */
    31423343function bp_group_reject_invite_link() {
     
    31453346    /**
    31463347     * Generate the URL for rejecting an invitation to a group.
     3348     *
     3349     * @since 1.0.0
    31473350     *
    31483351     * @param object|bool $group Optional. Group object.
     
    31733376/**
    31743377 * Output the URL for confirming a request to leave a group.
     3378 *
     3379 * @since 1.0.0
    31753380 */
    31763381function bp_group_leave_confirm_link() {
     
    31793384    /**
    31803385     * Generate the URL for confirming a request to leave a group.
     3386     *
     3387     * @since 1.0.0
    31813388     *
    31823389     * @param object|bool $group Optional. Group object.
     
    32053412/**
    32063413 * Output the URL for rejecting a request to leave a group.
     3414 *
     3415 * @since 1.0.0
    32073416 */
    32083417function bp_group_leave_reject_link() {
     
    32113420    /**
    32123421     * Generate the URL for rejecting a request to leave a group.
     3422     *
     3423     * @since 1.0.0
    32133424     *
    32143425     * @param object|bool $group Optional. Group object.
     
    32373448/**
    32383449 * Output the 'action' attribute for a group send invite form.
     3450 *
     3451 * @since 1.0.0
    32393452 */
    32403453function bp_group_send_invite_form_action() {
     
    32433456    /**
    32443457     * Output the 'action' attribute for a group send invite form.
     3458     *
     3459     * @since 1.0.0
    32453460     *
    32463461     * @param object|bool $group Optional. Group object.
     
    32693484/**
    32703485 * Determine whether the current user has friends to invite to a group.
     3486 *
     3487 * @since 1.0.0
    32713488 *
    32723489 * @param object|bool $group Optional. Group object.
     
    37563973/* Group Members *************************************************************/
    37573974
     3975/**
     3976 * Class BP_Groups_Group_Members_Template
     3977 *
     3978 * @since 1.0.0
     3979 */
    37583980class BP_Groups_Group_Members_Template {
     3981
     3982    /**
     3983     * @since 1.0.0
     3984     * @var int
     3985     */
    37593986    public $current_member = -1;
     3987
     3988    /**
     3989     * @since 1.0.0
     3990     * @var int
     3991     */
    37603992    public $member_count;
     3993
     3994    /**
     3995     * @since 1.0.0
     3996     * @var array
     3997     */
    37613998    public $members;
     3999
     4000    /**
     4001     * @since 1.0.0
     4002     * @var object
     4003     */
    37624004    public $member;
    37634005
     4006    /**
     4007     * @since 1.0.0
     4008     * @var bool
     4009     */
    37644010    public $in_the_loop;
    37654011
     4012    /**
     4013     * @since 1.0.0
     4014     * @var int
     4015     */
    37664016    public $pag_page;
     4017
     4018    /**
     4019     * @since 1.0.0
     4020     * @var int
     4021     */
    37674022    public $pag_num;
     4023
     4024    /**
     4025     * @since 1.0.0
     4026     * @var array|string|void
     4027     */
    37684028    public $pag_links;
     4029
     4030    /**
     4031     * @since 1.0.0
     4032     * @var int
     4033     */
    37694034    public $total_group_count;
    37704035
    37714036    /**
    37724037     * Constructor.
     4038     *
     4039     * @since 1.5.0
    37734040     *
    37744041     * @param array $args {
     
    38774144    }
    38784145
     4146    /**
     4147     * Whether or not there are members to display.
     4148     *
     4149     * @since 1.0.0
     4150     *
     4151     * @return bool
     4152     */
    38794153    public function has_members() {
    38804154        if ( ! empty( $this->member_count ) ) {
     
    38854159    }
    38864160
     4161    /**
     4162     * Increments to the next member to display.
     4163     *
     4164     * @since 1.0.0
     4165     *
     4166     * @return object
     4167     */
    38874168    public function next_member() {
    38884169        $this->current_member++;
     
    38924173    }
    38934174
     4175    /**
     4176     * Rewinds to the first member to display.
     4177     *
     4178     * @since 1.0.0
     4179     */
    38944180    public function rewind_members() {
    38954181        $this->current_member = -1;
     
    38994185    }
    39004186
     4187    /**
     4188     * Finishes up the members for display.
     4189     *
     4190     * @since 1.0.0
     4191     *
     4192     * @return bool
     4193     */
    39014194    public function members() {
    39024195        $tick = intval( $this->current_member + 1 );
     
    39234216    }
    39244217
     4218    /**
     4219     * Sets up the member to display.
     4220     *
     4221     * @since 1.0.0
     4222     */
    39254223    public function the_member() {
    39264224        $this->in_the_loop = true;
     
    39454243/**
    39464244 * Initialize a group member query loop.
     4245 *
     4246 * @since 1.0.0
    39474247 *
    39484248 * @param array|string $args {
     
    40094309}
    40104310
     4311/**
     4312 * @since 1.0.0
     4313 *
     4314 * @return mixed
     4315 */
    40114316function bp_group_members() {
    40124317    global $members_template;
     
    40154320}
    40164321
     4322/**
     4323 * @since 1.0.0
     4324 *
     4325 * @return mixed
     4326 */
    40174327function bp_group_the_member() {
    40184328    global $members_template;
     
    41424452    }
    41434453
     4454/**
     4455 * @since 1.0.0
     4456 */
    41444457function bp_group_member_name() {
    41454458    echo bp_get_group_member_name();
    41464459}
     4460
     4461    /**
     4462     * @since 1.0.0
     4463     *
     4464     * @return mixed|void
     4465     */
    41474466    function bp_get_group_member_name() {
    41484467        global $members_template;
     
    41584477    }
    41594478
     4479/**
     4480 * @since 1.0.0
     4481 */
    41604482function bp_group_member_url() {
    41614483    echo bp_get_group_member_url();
    41624484}
     4485
     4486    /**
     4487     * @since 1.0.0
     4488     *
     4489     * @return mixed|void
     4490     */
    41634491    function bp_get_group_member_url() {
    41644492        global $members_template;
     
    41744502    }
    41754503
     4504/**
     4505 * @since 1.0.0
     4506 */
    41764507function bp_group_member_link() {
    41774508    echo bp_get_group_member_link();
    41784509}
     4510
     4511    /**
     4512     * @since 1.0.0
     4513     *
     4514     * @return mixed|void
     4515     */
    41794516    function bp_get_group_member_link() {
    41804517        global $members_template;
     
    41904527    }
    41914528
     4529/**
     4530 * @since 1.2.0
     4531 */
    41924532function bp_group_member_domain() {
    41934533    echo bp_get_group_member_domain();
    41944534}
     4535
     4536    /**
     4537     * @since 1.2.0
     4538     *
     4539     * @return mixed|void
     4540     */
    41954541    function bp_get_group_member_domain() {
    41964542        global $members_template;
     
    42064552    }
    42074553
     4554/**
     4555 * @since 1.2.0
     4556 */
    42084557function bp_group_member_is_friend() {
    42094558    echo bp_get_group_member_is_friend();
    42104559}
     4560
     4561    /**
     4562     * @since 1.2.0
     4563     *
     4564     * @return mixed|void
     4565     */
    42114566    function bp_get_group_member_is_friend() {
    42124567        global $members_template;
     
    42304585    }
    42314586
     4587/**
     4588 * @since 1.0.0
     4589 */
    42324590function bp_group_member_is_banned() {
    42334591    echo bp_get_group_member_is_banned();
    42344592}
     4593
     4594    /**
     4595     * @since 1.0.0
     4596     *
     4597     * @return mixed|void
     4598     */
    42354599    function bp_get_group_member_is_banned() {
    42364600        global $members_template;
     
    42464610    }
    42474611
     4612/**
     4613 * @since 1.2.6
     4614 */
    42484615function bp_group_member_css_class() {
    42494616    global $members_template;
     
    42624629}
    42634630
     4631/**
     4632 * @since 1.0.0
     4633 */
    42644634function bp_group_member_joined_since() {
    42654635    echo bp_get_group_member_joined_since();
    42664636}
     4637
     4638    /**
     4639     * @since 1.0.0
     4640     *
     4641     * @return mixed|void
     4642     */
    42674643    function bp_get_group_member_joined_since() {
    42684644        global $members_template;
     
    42784654    }
    42794655
     4656/**
     4657 * @since 1.0.0
     4658 */
    42804659function bp_group_member_id() {
    42814660    echo bp_get_group_member_id();
    42824661}
     4662
     4663    /**
     4664     * @since 1.0.0
     4665     *
     4666     * @return mixed|void
     4667     */
    42834668    function bp_get_group_member_id() {
    42844669        global $members_template;
     
    42944679    }
    42954680
     4681/**
     4682 * @since 1.0.0
     4683 *
     4684 * @return bool
     4685 */
    42964686function bp_group_member_needs_pagination() {
    42974687    global $members_template;
     
    43044694}
    43054695
     4696/**
     4697 * @since 1.0.0
     4698 */
    43064699function bp_group_pag_id() {
    43074700    echo bp_get_group_pag_id();
    43084701}
     4702
     4703    /**
     4704     * @since 1.0.0
     4705     *
     4706     * @return mixed|void
     4707     */
    43094708    function bp_get_group_pag_id() {
    43104709
     
    43194718    }
    43204719
     4720/**
     4721 * @since 1.0.0
     4722 */
    43214723function bp_group_member_pagination() {
    43224724    echo bp_get_group_member_pagination();
    43234725    wp_nonce_field( 'bp_groups_member_list', '_member_pag_nonce' );
    43244726}
     4727
     4728    /**
     4729     * @since 1.0.0
     4730     *
     4731     * @return mixed|void
     4732     */
    43254733    function bp_get_group_member_pagination() {
    43264734        global $members_template;
     
    43364744    }
    43374745
     4746/**
     4747 * @since 1.0.0
     4748 */
    43384749function bp_group_member_pagination_count() {
    43394750    echo bp_get_group_member_pagination_count();
    43404751}
     4752
     4753    /**
     4754     * @since 1.0.0
     4755     *
     4756     * @return mixed|void
     4757     */
    43414758    function bp_get_group_member_pagination_count() {
    43424759        global $members_template;
     
    43664783    }
    43674784
     4785/**
     4786 * @since 1.0.0
     4787 */
    43684788function bp_group_member_admin_pagination() {
    43694789    echo bp_get_group_member_admin_pagination();
    43704790    wp_nonce_field( 'bp_groups_member_admin_list', '_member_admin_pag_nonce' );
    43714791}
     4792
     4793    /**
     4794     * @since 1.0.0
     4795     *
     4796     * @return mixed
     4797     */
    43724798    function bp_get_group_member_admin_pagination() {
    43734799        global $members_template;
     
    45634989}
    45644990
     4991/**
     4992 * @since 1.0.0
     4993 *
     4994 * @return bool
     4995 */
    45654996function bp_group_creation_tabs() {
    45664997    $bp = buddypress();
     
    45945025}
    45955026
     5027/**
     5028 * @since 1.0.0
     5029 */
    45965030function bp_group_creation_stage_title() {
    45975031    $bp = buddypress();
     
    46075041}
    46085042
     5043/**
     5044 * @since 1.1.0
     5045 */
    46095046function bp_group_creation_form_action() {
    46105047    echo bp_get_group_creation_form_action();
    46115048}
     5049
     5050/**
     5051 * @since 1.1.0
     5052 *
     5053 * @return mixed|void
     5054 */
    46125055    function bp_get_group_creation_form_action() {
    46135056        $bp = buddypress();
     
    46285071    }
    46295072
     5073/**
     5074 * @since 1.1.0
     5075 *
     5076 * @param string $step_slug
     5077 *
     5078 * @return bool
     5079 */
    46305080function bp_is_group_creation_step( $step_slug ) {
    46315081
     
    46595109}
    46605110
     5111/**
     5112 * @since 1.1.0
     5113 *
     5114 * @param array $step_slugs
     5115 *
     5116 * @return bool
     5117 */
    46615118function bp_is_group_creation_step_complete( $step_slugs ) {
    46625119    $bp = buddypress();
     
    46835140}
    46845141
     5142/**
     5143 * @since 1.1.0
     5144 *
     5145 * @param string $step_slug
     5146 *
     5147 * @return bool
     5148 */
    46855149function bp_are_previous_group_creation_steps_complete( $step_slug ) {
    46865150    $bp = buddypress();
     
    47085172}
    47095173
     5174/**
     5175 * @since 1.1.0
     5176 */
    47105177function bp_new_group_id() {
    47115178    echo bp_get_new_group_id();
    47125179}
     5180
     5181    /**
     5182     * @since 1.1.0
     5183     *
     5184     * @return mixed|void
     5185     */
    47135186    function bp_get_new_group_id() {
    47145187        $bp           = buddypress();
     
    47275200    }
    47285201
     5202/**
     5203 * @since 1.1.0
     5204 */
    47295205function bp_new_group_name() {
    47305206    echo bp_get_new_group_name();
    47315207}
     5208
     5209    /**
     5210     * @since 1.1.0
     5211     *
     5212     * @return mixed|void
     5213     */
    47325214    function bp_get_new_group_name() {
    47335215        $bp   = buddypress();
     
    47465228    }
    47475229
     5230/**
     5231 * @since 1.1.0
     5232 */
    47485233function bp_new_group_description() {
    47495234    echo bp_get_new_group_description();
    47505235}
     5236
     5237    /**
     5238     * @since 1.1.0
     5239     *
     5240     * @return mixed|void
     5241     */
    47515242    function bp_get_new_group_description() {
    47525243        $bp          = buddypress();
     
    47655256    }
    47665257
     5258/**
     5259 * @since 1.1.0
     5260 */
    47675261function bp_new_group_enable_forum() {
    47685262    echo bp_get_new_group_enable_forum();
    47695263}
     5264
     5265    /**
     5266     * @since 1.1.0
     5267     *
     5268     * @return int
     5269     */
    47705270    function bp_get_new_group_enable_forum() {
    47715271        $bp    = buddypress();
     
    47845284    }
    47855285
     5286/**
     5287 * @since 1.1.0
     5288 */
    47865289function bp_new_group_status() {
    47875290    echo bp_get_new_group_status();
    47885291}
     5292
     5293    /**
     5294     * @since 1.1.0
     5295     *
     5296     * @return mixed|void
     5297     */
    47895298    function bp_get_new_group_status() {
    47905299        $bp     = buddypress();
     
    51025611    }
    51035612
     5613/**
     5614 * @since 1.0.0
     5615 */
    51045616function bp_directory_groups_search_form() {
    51055617
     
    51305642/**
    51315643 * Displays group header tabs.
     5644 *
     5645 * @since 1.0.0
    51325646 *
    51335647 * @todo Deprecate?
     
    51495663/**
    51505664 * Displays group filter titles.
     5665 *
     5666 * @since 1.0.0
    51515667 *
    51525668 * @todo Deprecate?
     
    52955811}
    52965812
     5813/**
     5814 * @since 1.1.0
     5815 */
    52975816function bp_group_avatar_delete_link() {
    52985817    echo bp_get_group_avatar_delete_link();
    52995818}
     5819
     5820    /**
     5821     * @since 1.1.0
     5822     *
     5823     * @return mixed|void
     5824     */
    53005825    function bp_get_group_avatar_delete_link() {
    53015826        $bp = buddypress();
     
    53115836    }
    53125837
     5838/**
     5839 * @since 1.0.0
     5840 */
    53135841function bp_custom_group_boxes() {
    53145842    do_action( 'groups_custom_group_boxes' );
    53155843}
    53165844
     5845/**
     5846 * @since 1.0.0
     5847 */
    53175848function bp_custom_group_admin_tabs() {
    53185849    do_action( 'groups_custom_group_admin_tabs' );
    53195850}
    53205851
     5852/**
     5853 * @since 1.0.0
     5854 */
    53215855function bp_custom_group_fields_editable() {
    53225856    do_action( 'groups_custom_group_fields_editable' );
    53235857}
    53245858
     5859/**
     5860 * @since 1.0.0
     5861 */
    53255862function bp_custom_group_fields() {
    53265863    do_action( 'groups_custom_group_fields' );
     
    53295866/* Group Membership Requests *************************************************/
    53305867
     5868/**
     5869 * Class BP_Groups_Membership_Requests_Template
     5870 *
     5871 * @since 1.0.0
     5872 */
    53315873class BP_Groups_Membership_Requests_Template {
     5874
     5875    /**
     5876     * @since 1.0.0
     5877     * @var int
     5878     */
    53325879    public $current_request = -1;
     5880
     5881    /**
     5882     * @since 1.0.0
     5883     * @var int
     5884     */
    53335885    public $request_count;
     5886
     5887    /**
     5888     * @since 1.0.0
     5889     * @var array
     5890     */
    53345891    public $requests;
     5892
     5893    /**
     5894     * @since 1.0.0
     5895     * @var object
     5896     */
    53355897    public $request;
    53365898
     5899    /**
     5900     * @sine 1.0.0
     5901     * @var bool
     5902     */
    53375903    public $in_the_loop;
    53385904
     5905    /**
     5906     * @since 1.0.0
     5907     * @var int
     5908     */
    53395909    public $pag_page;
     5910
     5911    /**
     5912     * @since 1.0.0
     5913     * @var int
     5914     */
    53405915    public $pag_num;
     5916
     5917    /**
     5918     * @since 1.0.0
     5919     * @var array|string|void
     5920     */
    53415921    public $pag_links;
     5922
     5923    /**
     5924     * @since 1.0.0
     5925     * @var int
     5926     */
    53425927    public $total_request_count;
    53435928
    53445929    /**
    53455930     * Constructor method.
     5931     *
     5932     * @since 1.5.0
    53465933     *
    53475934     * @param array $args {
     
    54336020    }
    54346021
     6022    /**
     6023     * Whether or not there are requests to show.
     6024     *
     6025     * @since 1.0.0
     6026     *
     6027     * @return bool
     6028     */
    54356029    public function has_requests() {
    54366030        if ( ! empty( $this->request_count ) ) {
     
    54416035    }
    54426036
     6037    /**
     6038     * Moves up to the next request.
     6039     *
     6040     * @since 1.0.0
     6041     *
     6042     * @return object
     6043     */
    54436044    public function next_request() {
    54446045        $this->current_request++;
     
    54486049    }
    54496050
     6051    /**
     6052     * Rewinds the requests to the first in the list.
     6053     *
     6054     * @since 1.0.0
     6055     */
    54506056    public function rewind_requests() {
    54516057        $this->current_request = -1;
     
    54566062    }
    54576063
     6064    /**
     6065     * Finishes up the requests to display.
     6066     *
     6067     * @since 1.0.0
     6068     *
     6069     * @return bool
     6070     */
    54586071    public function requests() {
    54596072        $tick = intval( $this->current_request + 1 );
     
    54766089    }
    54776090
     6091    /**
     6092     * Sets up the request to display.
     6093     *
     6094     * @since 1.0.0
     6095     */
    54786096    public function the_request() {
    54796097        $this->in_the_loop = true;
     
    54956113/**
    54966114 * Initialize a group membership request template loop.
     6115 *
     6116 * @since 1.0.0
    54976117 *
    54986118 * @param array|string $args {
     
    55296149}
    55306150
     6151/**
     6152 * @since 1.0.0
     6153 *
     6154 * @return mixed
     6155 */
    55316156function bp_group_membership_requests() {
    55326157    global $requests_template;
     
    55356160}
    55366161
     6162/**
     6163 * @since 1.0.0
     6164 *
     6165 * @return mixed
     6166 */
    55376167function bp_group_the_membership_request() {
    55386168    global $requests_template;
     
    55416171}
    55426172
     6173/**
     6174 * @since 1.0.0
     6175 */
    55436176function bp_group_request_user_avatar_thumb() {
    55446177    global $requests_template;
     
    55546187}
    55556188
     6189/**
     6190 * @since 1.0.0
     6191 */
    55566192function bp_group_request_reject_link() {
    55576193    echo bp_get_group_request_reject_link();
    55586194}
     6195
     6196    /**
     6197     * @since 1.2.6
     6198     *
     6199     * @return mixed|void
     6200     */
    55596201    function bp_get_group_request_reject_link() {
    55606202        global $requests_template;
     
    55706212    }
    55716213
     6214/**
     6215 * @since 1.0.0
     6216 */
    55726217function bp_group_request_accept_link() {
    55736218    echo bp_get_group_request_accept_link();
    55746219}
     6220
     6221    /**
     6222     * @since 1.2.6
     6223     * @return mixed|void
     6224     */
    55756225    function bp_get_group_request_accept_link() {
    55766226        global $requests_template;
     
    55866236    }
    55876237
     6238/**
     6239 * @since 1.0.0
     6240 */
    55886241function bp_group_request_user_link() {
    55896242    echo bp_get_group_request_user_link();
    55906243}
     6244
     6245    /**
     6246     * @since 1.2.6
     6247     *
     6248     * @return mixed|void
     6249     */
    55916250    function bp_get_group_request_user_link() {
    55926251        global $requests_template;
     
    56026261    }
    56036262
     6263/**
     6264 * @since 1.0.0
     6265 */
    56046266function bp_group_request_time_since_requested() {
    56056267    global $requests_template;
     
    56156277}
    56166278
     6279/**
     6280 * @since 1.0.0
     6281 */
    56176282function bp_group_request_comment() {
    56186283    global $requests_template;
     
    57006365/** Group Invitations *********************************************************/
    57016366
     6367/**
     6368 * Class BP_Groups_Invite_Template
     6369 *
     6370 * @since 1.1.0
     6371 */
    57026372class BP_Groups_Invite_Template {
     6373
     6374    /**
     6375     * @since 1.1.0
     6376     * @var int
     6377     */
    57036378    public $current_invite = -1;
     6379
     6380    /**
     6381     * @since 1.1.0
     6382     * @var int
     6383     */
    57046384    public $invite_count;
     6385
     6386    /**
     6387     * @since 1.1.0
     6388     * @var array
     6389     */
    57056390    public $invites;
     6391
     6392    /**
     6393     * @since 1.1.0
     6394     * @var object
     6395     */
    57066396    public $invite;
    57076397
     6398    /**
     6399     * @since 1.1.0
     6400     * @var bool
     6401     */
    57086402    public $in_the_loop;
    57096403
     6404    /**
     6405     * @since 1.1.0
     6406     * @var int
     6407     */
    57106408    public $pag_page;
     6409
     6410    /**
     6411     * @since 1.1.0
     6412     * @var int
     6413     */
    57116414    public $pag_num;
     6415
     6416    /**
     6417     * @since 1.1.0
     6418     * @var string
     6419     */
    57126420    public $pag_links;
     6421
     6422    /**
     6423     * @since 1.1.0
     6424     * @var int
     6425     */
    57136426    public $total_invite_count;
    57146427
     6428    /**
     6429     * BP_Groups_Invite_Template constructor.
     6430     *
     6431     * @since 1.5.0
     6432     *
     6433     * @param array $args
     6434     */
    57156435    public function __construct( $args = array() ) {
    57166436
     
    57746494    }
    57756495
     6496    /**
     6497     * Whether or not there are invites to show.
     6498     *
     6499     * @since 1.1.0
     6500     *
     6501     * @return bool
     6502     */
    57766503    public function has_invites() {
    57776504        if ( ! empty( $this->invite_count ) ) {
     
    57826509    }
    57836510
     6511    /**
     6512     * Increments up to the next invite to show.
     6513     *
     6514     * @since 1.1.0
     6515     *
     6516     * @return object
     6517     */
    57846518    public function next_invite() {
    57856519        $this->current_invite++;
     
    57896523    }
    57906524
     6525    /**
     6526     * Rewinds to the first invite to show.
     6527     *
     6528     * @since 1.1.0
     6529     */
    57916530    public function rewind_invites() {
    57926531        $this->current_invite = -1;
     
    57966535    }
    57976536
     6537    /**
     6538     * Finishes up the invites to show.
     6539     *
     6540     * @since 1.1.0
     6541     *
     6542     * @return bool
     6543     */
    57986544    public function invites() {
    57996545        $tick = intval( $this->current_invite + 1 );
     
    58206566    }
    58216567
     6568    /**
     6569     * Sets up the invite to show.
     6570     *
     6571     * @since 1.1.0
     6572     */
    58226573    public function the_invite() {
    58236574        global $group_id;
     
    58746625}
    58756626
     6627/**
     6628 * Whether or not there are invites.
     6629 *
     6630 * @since 1.1.0
     6631 *
     6632 * @param string $args
     6633 * @return bool|mixed|void
     6634 */
    58766635function bp_group_has_invites( $args = '' ) {
    58776636    global $invites_template, $group_id;
     
    59146673}
    59156674
     6675/**
     6676 * @since 1.1.0
     6677 *
     6678 * @return mixed
     6679 */
    59166680function bp_group_invites() {
    59176681    global $invites_template;
     
    59206684}
    59216685
     6686/**
     6687 * @since 1.1.0
     6688 *
     6689 * @return mixed
     6690 */
    59226691function bp_group_the_invite() {
    59236692    global $invites_template;
     
    59266695}
    59276696
     6697/**
     6698 * @since 1.1.0
     6699 */
    59286700function bp_group_invite_item_id() {
    59296701    echo bp_get_group_invite_item_id();
    59306702}
     6703
     6704    /**
     6705     * @since 1.1.0
     6706     *
     6707     * @return mixed|void
     6708     */
    59316709    function bp_get_group_invite_item_id() {
    59326710        global $invites_template;
     
    59426720    }
    59436721
     6722/**
     6723 * @since 1.1.0
     6724 */
    59446725function bp_group_invite_user_avatar() {
    59456726    echo bp_get_group_invite_user_avatar();
    59466727}
     6728
     6729    /**
     6730     * @since 1.1.0
     6731     *
     6732     * @return mixed|void
     6733     */
    59476734    function bp_get_group_invite_user_avatar() {
    59486735        global $invites_template;
     
    59586745    }
    59596746
     6747/**
     6748 * @since 1.1.0
     6749 */
    59606750function bp_group_invite_user_link() {
    59616751    echo bp_get_group_invite_user_link();
    59626752}
     6753
     6754    /**
     6755     * @since 1.1.0
     6756     *
     6757     * @return mixed|void
     6758     */
    59636759    function bp_get_group_invite_user_link() {
    59646760        global $invites_template;
     
    59746770    }
    59756771
     6772/**
     6773 * @since 1.1.0
     6774 */
    59766775function bp_group_invite_user_last_active() {
    59776776    echo bp_get_group_invite_user_last_active();
    59786777}
     6778
     6779    /**
     6780     * @since 1.1.0
     6781     *
     6782     * @return mixed|void
     6783     */
    59796784    function bp_get_group_invite_user_last_active() {
    59806785        global $invites_template;
     
    59906795    }
    59916796
     6797/**
     6798 * @since 1.1.0
     6799 */
    59926800function bp_group_invite_user_remove_invite_url() {
    59936801    echo bp_get_group_invite_user_remove_invite_url();
    59946802}
     6803
     6804    /**
     6805     * @since 1.1.0
     6806     *
     6807     * @return string
     6808     */
    59956809    function bp_get_group_invite_user_remove_invite_url() {
    59966810        global $invites_template;
     
    60156829    echo bp_get_group_invite_pagination_links();
    60166830}
     6831
    60176832    /**
    60186833     * Get pagination links for group invitations.
  • trunk/src/bp-groups/bp-groups-widgets.php

    r10442 r10454  
    1212
    1313/**
    14  * Register widgets for groups component
     14 * Register widgets for groups component.
     15 *
     16 * @since 1.0.0
    1517 */
    1618function groups_register_widgets() {
     
    2022
    2123/**
    22  * GROUPS WIDGET
     24 * Groups widget.
     25 *
     26 * @since 1.0.3
    2327 */
    2428class BP_Groups_Widget extends WP_Widget {
     
    2630    /**
    2731     * Working as a group, we get things done better.
     32     *
     33     * @since 1.0.3
    2834     */
    2935    public function __construct() {
     
    4248    /**
    4349     * Extends our frontend output method.
     50     *
     51     * @since 1.0.3
    4452     *
    4553     * @param array $args     Array of arguments for the widget.
     
    159167     * Extends our update method.
    160168     *
     169     * @since 1.0.3
     170     *
    161171     * @param array $new_instance New instance data.
    162172     * @param array $old_instance Original instance data.
     
    176186    /**
    177187     * Extends our form method.
     188     *
     189     * @since 1.0.3
    178190     *
    179191     * @param array $instance Current instance.
     
    213225}
    214226
     227/**
     228 * AJAX callback for the Groups List widget.
     229 *
     230 * @since 1.0.0
     231 */
    215232function groups_ajax_widget_groups_list() {
    216233
  • trunk/src/bp-groups/classes/class-bp-group-extension.php

    r10417 r10454  
    8585 * differently. The legacy method is still supported, though deprecated.
    8686 *
    87  * @package BuddyPress
    88  * @subpackage Groups
    8987 * @since 1.1.0
    9088 */
     
    144142     * The slug of the current extension.
    145143     *
     144     * @since 1.1.0
    146145     * @var string
    147146     */
     
    151150     * The translatable name of the current extension.
    152151     *
     152     * @since 1.1.0
    153153     * @var string
    154154     */
     
    158158     * The visibility of the extension tab. 'public' or 'private'.
    159159     *
     160     * @since 1.1.0
    160161     * @var string
    161162     */
     
    165166     * The numeric position of the main nav item.
    166167     *
     168     * @since 1.1.0
    167169     * @var int
    168170     */
     
    172174     * Whether to show the nav item.
    173175     *
     176     * @since 1.1.0
    174177     * @var bool
    175178     */
     
    195198     * The text of the nav item. Defaults to self::name.
    196199     *
     200     * @since 1.1.0
    197201     * @var string
    198202     */
     
    204208     * Default: 'groups_custom_group_boxes'.
    205209     *
     210     * @since 1.1.0
    206211     * @var string
    207212     */
     
    213218     * Default: 'groups/single/plugins'.
    214219     *
     220     * @since 1.1.0
    215221     * @var string
    216222     */
     
    273279     * The content of the group tab.
    274280     *
     281     * @since 1.1.0
     282     *
    275283     * @param int|null $group_id ID of the group to display.
    276284     */
     
    278286
    279287    /**
    280      * Content displayed in a widget sidebar, if applicable
     288     * Content displayed in a widget sidebar, if applicable.
     289     *
     290     * @since 1.1.0
    281291     */
    282292    public function widget_display() {}
     
    652662     * Check whether the current user meets an access condition.
    653663     *
     664     * @since 2.1.0
     665     *
    654666     * @param string $access_condition 'anyone', 'loggedin', 'member',
    655667     *                                 'mod', 'admin' or 'noone'.
     
    759771    /**
    760772     * Hook the main display method, and loads the template file.
     773     *
     774     * @since 1.1.0
    761775     */
    762776    public function _display_hook() {
     
    16701684 * Register a new Group Extension.
    16711685 *
     1686 * @since 1.1.0
     1687 *
    16721688 * @param string $group_extension_class Name of the Extension class.
    16731689 * @return false|null Returns false on failure, otherwise null.
  • trunk/src/bp-groups/classes/class-bp-group-member-query.php

    r10417 r10454  
    255255     * 'last_joined' and 'first_joined' $type parameters.
    256256     *
     257     * @since 1.8.1
     258     *
    257259     * @param BP_User_Query $query BP_User_Query object.
    258260     */
  • trunk/src/bp-groups/classes/class-bp-groups-group.php

    r10417 r10454  
    1313/**
    1414 * BuddyPress Group object.
     15 *
     16 * @since 1.6.0
    1517 */
    1618class BP_Groups_Group {
     
    1921     * ID of the group.
    2022     *
     23     * @since 1.6.0
    2124     * @var int
    2225     */
     
    2629     * User ID of the group's creator.
    2730     *
     31     * @since 1.6.0
    2832     * @var int
    2933     */
     
    3337     * Name of the group.
    3438     *
     39     * @since 1.6.0
    3540     * @var string
    3641     */
     
    4045     * Group slug.
    4146     *
     47     * @since 1.6.0
    4248     * @var string
    4349     */
     
    4753     * Group description.
    4854     *
     55     * @since 1.6.0
    4956     * @var string
    5057     */
     
    5663     * Core statuses are 'public', 'private', and 'hidden'.
    5764     *
     65     * @since 1.6.0
    5866     * @var string
    5967     */
     
    6371     * Should (legacy) bbPress forums be enabled for this group?
    6472     *
     73     * @since 1.6.0
    6574     * @var int
    6675     */
     
    7079     * Date the group was created.
    7180     *
     81     * @since 1.6.0
    7282     * @var string
    7383     */
     
    7787     * Data about the group's admins.
    7888     *
     89     * @since 1.6.0
    7990     * @var array
    8091     */
     
    8495     * Data about the group's moderators.
    8596     *
     97     * @since 1.6.0
    8698     * @var array
    8799     */
     
    91103     * Total count of group members.
    92104     *
     105     * @since 1.6.0
    93106     * @var int
    94107     */
     
    145158    /**
    146159     * Constructor method.
     160     *
     161     * @since 1.6.0
    147162     *
    148163     * @param int|null $id   Optional. If the ID of an existing group is provided,
     
    168183    /**
    169184     * Set up data about the current group.
     185     *
     186     * @since 1.6.0
    170187     */
    171188    public function populate() {
     
    251268    /**
    252269     * Save the current group to the database.
     270     *
     271     * @since 1.6.0
    253272     *
    254273     * @return bool True on success, false on failure.
     
    366385     * Delete the current group.
    367386     *
     387     * @since 1.6.0
     388     *
    368389     * @return bool True on success, false on failure.
    369390     */
     
    410431     * Get whether a group exists for a given slug.
    411432     *
     433     * @since 1.6.0
     434     *
    412435     * @param string      $slug       Slug to check.
    413436     * @param string|bool $table_name Optional. Name of the table to check
     
    432455     * Alias of {@link BP_Groups_Group::group_exists()}.
    433456     *
     457     * @since 1.6.0
     458     *
    434459     * @param string $slug See {@link BP_Groups_Group::group_exists()}.
    435460     * @return string|null See {@link BP_Groups_Group::group_exists()}.
     
    441466    /**
    442467     * Get IDs of users with outstanding invites to a given group from a specified user.
     468     *
     469     * @since 1.6.0
    443470     *
    444471     * @param int $user_id ID of the inviting user.
     
    457484    /**
    458485     * Get a list of a user's groups, filtered by a search string.
     486     *
     487     * @since 1.6.0
    459488     *
    460489     * @param string   $filter  Search term. Matches against 'name' and
     
    504533     * Get a list of groups, filtered by a search string.
    505534     *
     535     * @since 1.6.0
     536     *
    506537     * @param string      $filter  Search term. Matches against 'name' and
    507538     *                             'description' fields.
     
    548579     * Check for the existence of a slug.
    549580     *
     581     * @since 1.6.0
     582     *
    550583     * @param string $slug Slug to check.
    551584     * @return string|null The slug, if found. Otherwise null.
     
    562595     * Get the slug for a given group ID.
    563596     *
     597     * @since 1.6.0
     598     *
    564599     * @param int $group_id ID of the group.
    565600     * @return string|null The slug, if found. Otherwise null.
     
    576611     * Check whether a given group has any members.
    577612     *
     613     * @since 1.6.0
     614     *
    578615     * @param int $group_id ID of the group.
    579616     * @return bool True if the group has members, otherwise false.
     
    594631    /**
    595632     * Check whether a group has outstanding membership requests.
     633     *
     634     * @since 1.6.0
    596635     *
    597636     * @param int $group_id ID of the group.
     
    609648    /**
    610649     * Get outstanding membership requests for a group.
     650     *
     651     * @since 1.6.0
    611652     *
    612653     * @param int      $group_id ID of the group.
     
    641682     * @see WP_Meta_Query::queries for a description of the 'meta_query'
    642683     *      parameter format.
     684     *
     685     * @since 1.6.0
    643686     *
    644687     * @param array $args {
     
    10241067     * Get a list of groups, sorted by those that have the most legacy forum topics.
    10251068     *
     1069     * @since 1.6.0
     1070     *
    10261071     * @param int|null          $limit           Optional. The max number of results to return.
    10271072     *                                           Default: null (no limit).
     
    11301175     * Get a list of groups, sorted by those that have the most legacy forum posts.
    11311176     *
     1177     * @since 1.6.0
     1178     *
    11321179     * @param int|null          $limit           Optional. The max number of results to return.
    11331180     *                                           Default: null (no limit).
     
    11971244     * Get a list of groups whose names start with a given letter.
    11981245     *
     1246     * @since 1.6.0
     1247     *
    11991248     * @param string            $letter          The letter.
    12001249     * @param int|null          $limit           Optional. The max number of results to return.
     
    12631312     *
    12641313     * Use BP_Groups_Group::get() with 'type' = 'random' instead.
     1314     *
     1315     * @since 1.6.0
    12651316     *
    12661317     * @param int|null          $limit           Optional. The max number of results to return.
     
    13361387     *       is_confirmed, is_pending, is_banned)
    13371388     *
     1389     * @since 1.6.0
     1390     *
    13381391     * @param array        $paged_groups Array of groups.
    13391392     * @param string|array $group_ids    Array or comma-separated list of IDs matching
     
    14131466     * Delete all invitations to a given group.
    14141467     *
     1468     * @since 1.6.0
     1469     *
    14151470     * @param int $group_id ID of the group whose invitations are being deleted.
    14161471     * @return int|null Number of rows records deleted on success, null on
     
    14311486     * current_user_can( 'bp_moderate' ).
    14321487     *
     1488     * @since 1.6.0
     1489     *
    14331490     * @return int Group count.
    14341491     */
     
    14471504    /**
    14481505     * Get global count of forum topics in public groups (legacy forums).
     1506     *
     1507     * @since 1.6.0
    14491508     *
    14501509     * @param string $type Optional. If 'unreplied', count will be limited to
     
    14821541     * Get the member count for a group.
    14831542     *
     1543     * @since 1.6.0
     1544     *
    14841545     * @param int $group_id Group ID.
    14851546     * @return int Count of confirmed members for the group.
  • trunk/src/bp-groups/classes/class-bp-groups-member.php

    r10445 r10454  
    55 * @package BuddyPress
    66 * @subpackage GroupsClasses
    7  * @since 1.0.0
     7 * @since 1.6.0
    88 */
    99
     
    1919     * ID of the membership.
    2020     *
     21     * @since 1.6.0
    2122     * @var int
    2223     */
     
    2627     * ID of the group associated with the membership.
    2728     *
     29     * @since 1.6.0
    2830     * @var int
    2931     */
     
    3335     * ID of the user associated with the membership.
    3436     *
     37     * @since 1.6.0
    3538     * @var int
    3639     */
     
    4043     * ID of the user whose invitation initiated the membership.
    4144     *
     45     * @since 1.6.0
    4246     * @var int
    4347     */
     
    4751     * Whether the member is an admin of the group.
    4852     *
     53     * @since 1.6.0
    4954     * @var int
    5055     */
     
    5459     * Whether the member is a mod of the group.
    5560     *
     61     * @since 1.6.0
    5662     * @var int
    5763     */
     
    6167     * Whether the member is banned from the group.
    6268     *
     69     * @since 1.6.0
    6370     * @var int
    6471     */
     
    7077     * Eg, 'Group Admin'.
    7178     *
     79     * @since 1.6.0
    7280     * @var int
    7381     */
     
    7987     * This value is updated when, eg, invitations are accepted.
    8088     *
     89     * @since 1.6.0
    8190     * @var string
    8291     */
     
    8695     * Whether the membership has been confirmed.
    8796     *
     97     * @since 1.6.0
    8898     * @var int
    8999     */
     
    96106     * include when requesting membership to a private group.
    97107     *
     108     * @since 1.6.0
    98109     * @var string
    99110     */
     
    108119     * invitee has not yet been notified.
    109120     *
     121     * @since 1.6.0
    110122     * @var int
    111123     */
     
    115127     * WP_User object representing the membership's user.
    116128     *
     129     * @since 1.6.0
    117130     * @var WP_User
    118131     */
     
    121134    /**
    122135     * Constructor method.
     136     *
     137     * @since 1.6.0
    123138     *
    124139     * @param int      $user_id  Optional. Along with $group_id, can be used to
     
    154169    /**
    155170     * Populate the object's properties.
     171     *
     172     * @since 1.6.0
    156173     */
    157174    public function populate() {
     
    189206     * Save the membership data to the database.
    190207     *
     208     * @since 1.6.0
     209     *
    191210     * @return bool True on success, false on failure.
    192211     */
     
    263282     * Promote a member to a new status.
    264283     *
     284     * @since 1.6.0
     285     *
    265286     * @param string $status The new status. 'mod' or 'admin'.
    266287     * @return bool True on success, false on failure.
     
    285306     * Demote membership to Member status (non-admin, non-mod).
    286307     *
     308     * @since 1.6.0
     309     *
    287310     * @return bool True on success, false on failure.
    288311     */
     
    298321     * Ban the user from the group.
    299322     *
     323     * @since 1.6.0
     324     *
    300325     * @return bool True on success, false on failure.
    301326     */
     
    313338     * Unban the user from the group.
    314339     *
     340     * @since 1.6.0
     341     *
    315342     * @return bool True on success, false on failure.
    316343     */
     
    326353    /**
    327354     * Mark a pending invitation as accepted.
     355     *
     356     * @since 1.6.0
    328357     */
    329358    public function accept_invite() {
     
    335364    /**
    336365     * Confirm a membership request.
     366     *
     367     * @since 1.6.0
    337368     */
    338369    public function accept_request() {
     
    344375     * Remove the current membership.
    345376     *
     377     * @since 1.6.0
     378     *
    346379     * @return bool True on success, false on failure.
    347380     */
     
    410443    /**
    411444     * Delete a membership, based on user + group IDs.
     445     *
     446     * @since 1.6.0
    412447     *
    413448     * @param int $user_id  ID of the user.
     
    452487    /**
    453488     * Get the IDs of the groups of which a specified user is a member.
     489     *
     490     * @since 1.6.0
    454491     *
    455492     * @param int      $user_id ID of the user.
     
    488525    /**
    489526     * Get the IDs of the groups of which a specified user is a member, sorted by the date joined.
     527     *
     528     * @since 1.6.0
    490529     *
    491530     * @param int         $user_id ID of the user.
     
    530569     * Get the IDs of the groups of which a specified user is an admin.
    531570     *
     571     * @since 1.6.0
     572     *
    532573     * @param int         $user_id ID of the user.
    533574     * @param int|bool    $limit   Optional. Max number of results to return.
     
    571612     * Get the IDs of the groups of which a specified user is a moderator.
    572613     *
     614     * @since 1.6.0
     615     *
    573616     * @param int         $user_id ID of the user.
    574617     * @param int|bool    $limit   Optional. Max number of results to return.
     
    612655     * Get the groups of which a specified user is banned from.
    613656     *
    614      * @since 2.4
     657     * @since 2.4.0
    615658     *
    616659     * @param int         $user_id ID of the user.
     
    656699     * Get the count of groups of which the specified user is a member.
    657700     *
     701     * @since 1.6.0
     702     *
    658703     * @param int $user_id Optional. Default: ID of the displayed user.
    659704     * @return int Group count.
     
    676721    /**
    677722     * Get a user's outstanding group invitations.
     723     *
     724     * @since 1.6.0
    678725     *
    679726     * @param int               $user_id ID of the invitee.
     
    734781     * Check whether a user has an outstanding invitation to a given group.
    735782     *
     783     * @since 1.6.0
     784     *
    736785     * @param int    $user_id  ID of the potential invitee.
    737786     * @param int    $group_id ID of the group.
     
    758807     * Delete an invitation, by specifying user ID and group ID.
    759808     *
     809     * @since 1.6.0
     810     *
    760811     * @global WPDB $wpdb
    761812     *
     
    787838     * Delete an unconfirmed membership request, by user ID and group ID.
    788839     *
     840     * @since 1.6.0
     841     *
    789842     * @param int $user_id  ID of the user.
    790843     * @param int $group_id ID of the group.
     
    805858     * Check whether a user is an admin of a given group.
    806859     *
     860     * @since 1.6.0
     861     *
    807862     * @param int $user_id  ID of the user.
    808863     * @param int $group_id ID of the group.
     
    823878     * Check whether a user is a mod of a given group.
    824879     *
     880     * @since 1.6.0
     881     *
    825882     * @param int $user_id  ID of the user.
    826883     * @param int $group_id ID of the group.
     
    841898     * Check whether a user is a member of a given group.
    842899     *
     900     * @since 1.6.0
     901     *
    843902     * @param int $user_id  ID of the user.
    844903     * @param int $group_id ID of the group.
     
    858917    /**
    859918     * Check whether a user is banned from a given group.
     919     *
     920     * @since 1.6.0
    860921     *
    861922     * @param int $user_id  ID of the user.
     
    898959     * Check whether a user has an outstanding membership request for a given group.
    899960     *
     961     * @since 1.6.0
     962     *
    900963     * @param int $user_id  ID of the user.
    901964     * @param int $group_id ID of the group.
     
    915978    /**
    916979     * Get a list of randomly selected IDs of groups that the member belongs to.
     980     *
     981     * @since 1.6.0
    917982     *
    918983     * @param int $user_id      ID of the user.
     
    9361001     * Get the IDs of all a given group's members.
    9371002     *
     1003     * @since 1.6.0
     1004     *
    9381005     * @param int $group_id ID of the group.
    9391006     * @return array IDs of all group members.
     
    9491016    /**
    9501017     * Get a list of all a given group's admins.
     1018     *
     1019     * @since 1.6.0
    9511020     *
    9521021     * @param int $group_id ID of the group.
     
    9711040     * Get a list of all a given group's moderators.
    9721041     *
     1042     * @since 1.6.0
     1043     *
    9731044     * @param int $group_id ID of the group.
    9741045     * @return array Info about group mods (user_id + date_modified).
     
    9851056     * Get the IDs users with outstanding membership requests to the group.
    9861057     *
     1058     * @since 1.6.0
     1059     *
    9871060     * @param int $group_id ID of the group.
    9881061     * @return array IDs of users with outstanding membership requests.
     
    9991072     * Get members of a group.
    10001073     *
    1001      * @deprecated 1.8.0
     1074     * @deprecated 1.6.0
    10021075     *
    10031076     * @param int        $group_id            ID of the group being queried for.
     
    10911164     * Delete all memberships for a given group.
    10921165     *
     1166     * @since 1.6.0
     1167     *
    10931168     * @param int $group_id ID of the group.
    10941169     * @return int Number of records deleted.
Note: See TracChangeset for help on using the changeset viewer.