Changeset 10454 for trunk/src/bp-groups/bp-groups-functions.php
- Timestamp:
- 01/18/2016 05:18:23 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-functions.php
r10453 r10454 35 35 * of instantiating BP_Groups_Group directly, so that you will inherit cache 36 36 * support and pass through the groups_get_group filter. 37 * 38 * @since 1.2.0 37 39 * 38 40 * @param array|string $args { … … 213 215 * section (Name, Description, and "Notify members..."). 214 216 * 217 * @since 1.0.0 218 * 215 219 * @param int $group_id ID of the group. 216 220 * @param string $group_name Name of the group. … … 258 262 * section (privacy settings, "enable forum", invitation status). 259 263 * 264 * @since 1.0.0 265 * 260 266 * @param int $group_id ID of the group. 261 267 * @param bool $enable_forum Whether to enable a forum for the group. … … 353 359 * Check a group status (eg 'private') against the whitelist of registered statuses. 354 360 * 361 * @since 1.1.0 362 * 355 363 * @param string $status Status to check. 356 364 * @return bool True if status is allowed, otherwise false. … … 364 372 /** 365 373 * Provide a unique, sanitized version of a group slug. 374 * 375 * @since 1.0.0 366 376 * 367 377 * @param string $slug Group slug to check. … … 390 400 * Get a group slug by its ID. 391 401 * 402 * @since 1.0.0 403 * 392 404 * @param int $group_id The numeric ID of the group. 393 405 * @return string The group's slug. … … 414 426 /** 415 427 * Remove a user from a group. 428 * 429 * @since 1.0.0 416 430 * 417 431 * @param int $group_id ID of the group. … … 454 468 /** 455 469 * Add a user to a group. 470 * 471 * @since 1.0.0 456 472 * 457 473 * @param int $group_id ID of the group. … … 521 537 * Get a list of group administrators. 522 538 * 539 * @since 1.0.0 540 * 523 541 * @param int $group_id ID of the group. 524 542 * @return array Info about group admins (user_id + date_modified). … … 531 549 * Get a list of group moderators. 532 550 * 551 * @since 1.0.0 552 * 533 553 * @param int $group_id ID of the group. 534 554 * @return array Info about group admins (user_id + date_modified). … … 546 566 * To use the legacy query, filter 'bp_use_legacy_group_member_query', 547 567 * returning true. 568 * 569 * @since 1.0.0 548 570 * 549 571 * @param array $args { … … 647 669 * Get the member count for a group. 648 670 * 671 * @since 1.2.3 672 * 649 673 * @param int $group_id Group ID. 650 674 * @return int Count of confirmed members for the group. … … 658 682 /** 659 683 * Get a collection of groups, based on the parameters passed. 684 * 685 * @since 1.2.0 660 686 * 661 687 * @param array|string $args { … … 720 746 * Get the total group count for the site. 721 747 * 748 * @since 1.2.0 749 * 722 750 * @return int 723 751 */ … … 735 763 /** 736 764 * Get the IDs of the groups of which a specified user is a member. 765 * 766 * @since 1.0.0 737 767 * 738 768 * @param int $user_id ID of the user. … … 757 787 * Get the count of groups of which the specified user is a member. 758 788 * 789 * @since 1.0.0 790 * 759 791 * @param int $user_id Optional. Default: ID of the displayed user. 760 792 * @return int Group count. … … 803 835 /** 804 836 * Generate the avatar upload directory path for a given group. 837 * 838 * @since 1.1.0 805 839 * 806 840 * @param int $group_id Optional. ID of the group. Default: ID of the current group. … … 842 876 * Check whether a user is an admin of a given group. 843 877 * 878 * @since 1.0.0 879 * 844 880 * @param int $user_id ID of the user. 845 881 * @param int $group_id ID of the group. … … 853 889 * Check whether a user is a mod of a given group. 854 890 * 891 * @since 1.0.0 892 * 855 893 * @param int $user_id ID of the user. 856 894 * @param int $group_id ID of the group. … … 864 902 * Check whether a user is a member of a given group. 865 903 * 904 * @since 1.0.0 905 * 866 906 * @param int $user_id ID of the user. 867 907 * @param int $group_id ID of the group. … … 872 912 } 873 913 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 */ 874 924 function groups_is_user_banned( $user_id, $group_id ) { 875 925 return BP_Groups_Member::check_is_banned( $user_id, $group_id ); … … 893 943 /** 894 944 * Post an Activity status update affiliated with a group. 945 * 946 * @since 1.2.0 895 947 * 896 948 * @param array|string $args { … … 984 1036 * Get IDs of users with outstanding invites to a given group from a specified user. 985 1037 * 1038 * @since 1.0.0 1039 * 986 1040 * @param int $user_id ID of the inviting user. 987 1041 * @param int|bool $limit Limit to restrict to. … … 1018 1072 /** 1019 1073 * Invite a user to a group. 1074 * 1075 * @since 1.0.0 1020 1076 * 1021 1077 * @param array|string $args { … … 1082 1138 * Functionally, this is equivalent to removing a user from a group. 1083 1139 * 1140 * @since 1.0.0 1141 * 1084 1142 * @param int $user_id ID of the user. 1085 1143 * @param int $group_id ID of the group. … … 1108 1166 * 1109 1167 * Returns true if a user is already a member of the group. 1168 * 1169 * @since 1.0.0 1110 1170 * 1111 1171 * @param int $user_id ID of the user. … … 1160 1220 * Reject a group invitation. 1161 1221 * 1222 * @since 1.0.0 1223 * 1162 1224 * @param int $user_id ID of the user. 1163 1225 * @param int $group_id ID of the group. … … 1184 1246 * Delete a group invitation. 1185 1247 * 1248 * @since 1.0.0 1249 * 1186 1250 * @param int $user_id ID of the invited user. 1187 1251 * @param int $group_id ID of the group. … … 1207 1271 /** 1208 1272 * Send all pending invites by a single user to a specific group. 1273 * 1274 * @since 1.0.0 1209 1275 * 1210 1276 * @param int $user_id ID of the inviting user. … … 1246 1312 * Get IDs of users with outstanding invites to a given group from a specified user. 1247 1313 * 1314 * @since 1.0.0 1315 * 1248 1316 * @param int $user_id ID of the inviting user. 1249 1317 * @param int $group_id ID of the group. … … 1261 1329 * Entering 'all' as the $type parameter will return unsent invitations as 1262 1330 * well (useful to make sure AJAX requests are not duplicated). 1331 * 1332 * @since 1.0.0 1263 1333 * 1264 1334 * @param int $user_id ID of potential group member. … … 1275 1345 * Delete all invitations to a given group. 1276 1346 * 1347 * @since 1.0.0 1348 * 1277 1349 * @param int $group_id ID of the group whose invitations are being deleted. 1278 1350 * @return int|null Number of rows records deleted on success, null on failure. … … 1286 1358 /** 1287 1359 * Promote a member to a new status within a group. 1360 * 1361 * @since 1.0.0 1288 1362 * 1289 1363 * @param int $user_id ID of the user. … … 1319 1393 * Demote a user to 'member' status within a group. 1320 1394 * 1395 * @since 1.0.0 1396 * 1321 1397 * @param int $user_id ID of the user. 1322 1398 * @param int $group_id ID of the group. … … 1346 1422 * Ban a member from a group. 1347 1423 * 1424 * @since 1.0.0 1425 * 1348 1426 * @param int $user_id ID of the user. 1349 1427 * @param int $group_id ID of the group. … … 1373 1451 * Unban a member from a group. 1374 1452 * 1453 * @since 1.0.0 1454 * 1375 1455 * @param int $user_id ID of the user. 1376 1456 * @param int $group_id ID of the group. … … 1402 1482 * Remove a member from a group. 1403 1483 * 1484 * @since 1.2.6 1485 * 1404 1486 * @param int $user_id ID of the user. 1405 1487 * @param int $group_id ID of the group. … … 1431 1513 /** 1432 1514 * Create a group membership request. 1515 * 1516 * @since 1.0.0 1433 1517 * 1434 1518 * @param int $requesting_user_id ID of the user requesting membership. … … 1490 1574 * Accept a pending group membership request. 1491 1575 * 1576 * @since 1.0.0 1577 * 1492 1578 * @param int $membership_id ID of the membership object. 1493 1579 * @param int $user_id Optional. ID of the user who requested membership. … … 1535 1621 * Reject a pending group membership request. 1536 1622 * 1623 * @since 1.0.0 1624 * 1537 1625 * @param int $membership_id ID of the membership object. 1538 1626 * @param int $user_id Optional. ID of the user who requested membership. … … 1566 1654 * Delete a pending group membership request. 1567 1655 * 1656 * @since 1.2.0 1657 * 1568 1658 * @param int $membership_id ID of the membership object. 1569 1659 * @param int $user_id Optional. ID of the user who requested membership. … … 1590 1680 * Check whether a user has an outstanding membership request for a given group. 1591 1681 * 1682 * @since 1.0.0 1683 * 1592 1684 * @param int $user_id ID of the user. 1593 1685 * @param int $group_id ID of the group. … … 1601 1693 * Accept all pending membership requests to a group. 1602 1694 * 1695 * @since 1.0.2 1696 * 1603 1697 * @param int $group_id ID of the group. 1604 1698 * @return bool True on success, false on failure. … … 1629 1723 /** 1630 1724 * Delete metadata for a group. 1725 * 1726 * @since 1.0.0 1631 1727 * 1632 1728 * @param int $group_id ID of the group. … … 1668 1764 * Get a piece of group metadata. 1669 1765 * 1766 * @since 1.0.0 1767 * 1670 1768 * @param int $group_id ID of the group. 1671 1769 * @param string $meta_key Metadata key. … … 1685 1783 /** 1686 1784 * Update a piece of group metadata. 1785 * 1786 * @since 1.0.0 1687 1787 * 1688 1788 * @param int $group_id ID of the group.
Note: See TracChangeset
for help on using the changeset viewer.