Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/18/2016 05:18:23 AM (5 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/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.