Skip to:
Content

BuddyPress.org


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.
Note: See TracChangeset for help on using the changeset viewer.