Changeset 10454 for trunk/src/bp-groups/classes/class-bp-groups-member.php
- Timestamp:
- 01/18/2016 05:18:23 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-member.php
r10445 r10454 5 5 * @package BuddyPress 6 6 * @subpackage GroupsClasses 7 * @since 1. 0.07 * @since 1.6.0 8 8 */ 9 9 … … 19 19 * ID of the membership. 20 20 * 21 * @since 1.6.0 21 22 * @var int 22 23 */ … … 26 27 * ID of the group associated with the membership. 27 28 * 29 * @since 1.6.0 28 30 * @var int 29 31 */ … … 33 35 * ID of the user associated with the membership. 34 36 * 37 * @since 1.6.0 35 38 * @var int 36 39 */ … … 40 43 * ID of the user whose invitation initiated the membership. 41 44 * 45 * @since 1.6.0 42 46 * @var int 43 47 */ … … 47 51 * Whether the member is an admin of the group. 48 52 * 53 * @since 1.6.0 49 54 * @var int 50 55 */ … … 54 59 * Whether the member is a mod of the group. 55 60 * 61 * @since 1.6.0 56 62 * @var int 57 63 */ … … 61 67 * Whether the member is banned from the group. 62 68 * 69 * @since 1.6.0 63 70 * @var int 64 71 */ … … 70 77 * Eg, 'Group Admin'. 71 78 * 79 * @since 1.6.0 72 80 * @var int 73 81 */ … … 79 87 * This value is updated when, eg, invitations are accepted. 80 88 * 89 * @since 1.6.0 81 90 * @var string 82 91 */ … … 86 95 * Whether the membership has been confirmed. 87 96 * 97 * @since 1.6.0 88 98 * @var int 89 99 */ … … 96 106 * include when requesting membership to a private group. 97 107 * 108 * @since 1.6.0 98 109 * @var string 99 110 */ … … 108 119 * invitee has not yet been notified. 109 120 * 121 * @since 1.6.0 110 122 * @var int 111 123 */ … … 115 127 * WP_User object representing the membership's user. 116 128 * 129 * @since 1.6.0 117 130 * @var WP_User 118 131 */ … … 121 134 /** 122 135 * Constructor method. 136 * 137 * @since 1.6.0 123 138 * 124 139 * @param int $user_id Optional. Along with $group_id, can be used to … … 154 169 /** 155 170 * Populate the object's properties. 171 * 172 * @since 1.6.0 156 173 */ 157 174 public function populate() { … … 189 206 * Save the membership data to the database. 190 207 * 208 * @since 1.6.0 209 * 191 210 * @return bool True on success, false on failure. 192 211 */ … … 263 282 * Promote a member to a new status. 264 283 * 284 * @since 1.6.0 285 * 265 286 * @param string $status The new status. 'mod' or 'admin'. 266 287 * @return bool True on success, false on failure. … … 285 306 * Demote membership to Member status (non-admin, non-mod). 286 307 * 308 * @since 1.6.0 309 * 287 310 * @return bool True on success, false on failure. 288 311 */ … … 298 321 * Ban the user from the group. 299 322 * 323 * @since 1.6.0 324 * 300 325 * @return bool True on success, false on failure. 301 326 */ … … 313 338 * Unban the user from the group. 314 339 * 340 * @since 1.6.0 341 * 315 342 * @return bool True on success, false on failure. 316 343 */ … … 326 353 /** 327 354 * Mark a pending invitation as accepted. 355 * 356 * @since 1.6.0 328 357 */ 329 358 public function accept_invite() { … … 335 364 /** 336 365 * Confirm a membership request. 366 * 367 * @since 1.6.0 337 368 */ 338 369 public function accept_request() { … … 344 375 * Remove the current membership. 345 376 * 377 * @since 1.6.0 378 * 346 379 * @return bool True on success, false on failure. 347 380 */ … … 410 443 /** 411 444 * Delete a membership, based on user + group IDs. 445 * 446 * @since 1.6.0 412 447 * 413 448 * @param int $user_id ID of the user. … … 452 487 /** 453 488 * Get the IDs of the groups of which a specified user is a member. 489 * 490 * @since 1.6.0 454 491 * 455 492 * @param int $user_id ID of the user. … … 488 525 /** 489 526 * 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 490 529 * 491 530 * @param int $user_id ID of the user. … … 530 569 * Get the IDs of the groups of which a specified user is an admin. 531 570 * 571 * @since 1.6.0 572 * 532 573 * @param int $user_id ID of the user. 533 574 * @param int|bool $limit Optional. Max number of results to return. … … 571 612 * Get the IDs of the groups of which a specified user is a moderator. 572 613 * 614 * @since 1.6.0 615 * 573 616 * @param int $user_id ID of the user. 574 617 * @param int|bool $limit Optional. Max number of results to return. … … 612 655 * Get the groups of which a specified user is banned from. 613 656 * 614 * @since 2.4 657 * @since 2.4.0 615 658 * 616 659 * @param int $user_id ID of the user. … … 656 699 * Get the count of groups of which the specified user is a member. 657 700 * 701 * @since 1.6.0 702 * 658 703 * @param int $user_id Optional. Default: ID of the displayed user. 659 704 * @return int Group count. … … 676 721 /** 677 722 * Get a user's outstanding group invitations. 723 * 724 * @since 1.6.0 678 725 * 679 726 * @param int $user_id ID of the invitee. … … 734 781 * Check whether a user has an outstanding invitation to a given group. 735 782 * 783 * @since 1.6.0 784 * 736 785 * @param int $user_id ID of the potential invitee. 737 786 * @param int $group_id ID of the group. … … 758 807 * Delete an invitation, by specifying user ID and group ID. 759 808 * 809 * @since 1.6.0 810 * 760 811 * @global WPDB $wpdb 761 812 * … … 787 838 * Delete an unconfirmed membership request, by user ID and group ID. 788 839 * 840 * @since 1.6.0 841 * 789 842 * @param int $user_id ID of the user. 790 843 * @param int $group_id ID of the group. … … 805 858 * Check whether a user is an admin of a given group. 806 859 * 860 * @since 1.6.0 861 * 807 862 * @param int $user_id ID of the user. 808 863 * @param int $group_id ID of the group. … … 823 878 * Check whether a user is a mod of a given group. 824 879 * 880 * @since 1.6.0 881 * 825 882 * @param int $user_id ID of the user. 826 883 * @param int $group_id ID of the group. … … 841 898 * Check whether a user is a member of a given group. 842 899 * 900 * @since 1.6.0 901 * 843 902 * @param int $user_id ID of the user. 844 903 * @param int $group_id ID of the group. … … 858 917 /** 859 918 * Check whether a user is banned from a given group. 919 * 920 * @since 1.6.0 860 921 * 861 922 * @param int $user_id ID of the user. … … 898 959 * Check whether a user has an outstanding membership request for a given group. 899 960 * 961 * @since 1.6.0 962 * 900 963 * @param int $user_id ID of the user. 901 964 * @param int $group_id ID of the group. … … 915 978 /** 916 979 * Get a list of randomly selected IDs of groups that the member belongs to. 980 * 981 * @since 1.6.0 917 982 * 918 983 * @param int $user_id ID of the user. … … 936 1001 * Get the IDs of all a given group's members. 937 1002 * 1003 * @since 1.6.0 1004 * 938 1005 * @param int $group_id ID of the group. 939 1006 * @return array IDs of all group members. … … 949 1016 /** 950 1017 * Get a list of all a given group's admins. 1018 * 1019 * @since 1.6.0 951 1020 * 952 1021 * @param int $group_id ID of the group. … … 971 1040 * Get a list of all a given group's moderators. 972 1041 * 1042 * @since 1.6.0 1043 * 973 1044 * @param int $group_id ID of the group. 974 1045 * @return array Info about group mods (user_id + date_modified). … … 985 1056 * Get the IDs users with outstanding membership requests to the group. 986 1057 * 1058 * @since 1.6.0 1059 * 987 1060 * @param int $group_id ID of the group. 988 1061 * @return array IDs of users with outstanding membership requests. … … 999 1072 * Get members of a group. 1000 1073 * 1001 * @deprecated 1. 8.01074 * @deprecated 1.6.0 1002 1075 * 1003 1076 * @param int $group_id ID of the group being queried for. … … 1091 1164 * Delete all memberships for a given group. 1092 1165 * 1166 * @since 1.6.0 1167 * 1093 1168 * @param int $group_id ID of the group. 1094 1169 * @return int Number of records deleted.
Note: See TracChangeset
for help on using the changeset viewer.