Changeset 9907
- Timestamp:
- 06/02/2015 05:35:59 AM (10 years ago)
- Location:
- trunk/src/bp-groups
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-admin.php
r9906 r9907 1 1 <?php 2 2 /** 3 * BuddyPress Groups component admin screen 3 * BuddyPress Groups component admin screen. 4 4 * 5 5 * Props to WordPress core for the Comments admin screen, and its contextual … … 52 52 * 53 53 * @param array $custom_menus Array of BP top-level menu items. 54 * 54 55 * @return array Menu item array, with Groups added. 55 56 */ … … 247 248 $status = ( in_array( $_POST['group-status'], (array) $allowed_status ) ) ? $_POST['group-status'] : 'public'; 248 249 249 // Invite status250 250 /** 251 251 * Filters the allowed invite status values for the group. … … 434 434 * @since BuddyPress (1.7.0) 435 435 * 436 * @param string $value Will always be false unless another plugin filters it first.437 * @param string $option Screen option name.436 * @param string $value Will always be false unless another plugin filters it first. 437 * @param string $option Screen option name. 438 438 * @param string $new_value Screen option form value. 439 * 439 440 * @return string Option value. False to abandon update. 440 441 */ … … 814 815 * @since BuddyPress (1.7.0) 815 816 * 816 * @param BP_Groups_Group $item The BP_Groups_Group object for the current 817 * group. 817 * @param BP_Groups_Group $item The BP_Groups_Group object for the current group. 818 818 */ 819 819 function bp_groups_admin_edit_metabox_members( $item ) { … … 1005 1005 * @since BuddyPress (1.8.0) 1006 1006 * 1007 * @param BP_Group_Member_Query $query A BP_Group_Member_Query object. 1008 * @param string $member_type member|mod|admin|banned. 1007 * @param BP_Group_Member_Query $query A BP_Group_Member_Query object. 1008 * @param string $member_type member|mod|admin|banned. 1009 * 1009 1010 * @return string Pagination links HTML. 1010 1011 */ … … 1063 1064 * 1064 1065 * @param array $user_ids Array of user IDs. 1066 * 1065 1067 * @return array Array of user_logins corresponding to $user_ids. 1066 1068 */ … … 1133 1135 * 1134 1136 * @since BuddyPress (1.7.0) 1137 * 1135 1138 * @access public 1136 1139 * @var string … … 1142 1145 * 1143 1146 * @since BuddyPress (1.7.0) 1147 * 1144 1148 * @access public 1145 1149 * @var int … … 1449 1453 1450 1454 /** 1451 * Get the column names for sortable columns 1455 * Get the column names for sortable columns. 1452 1456 * 1453 1457 * Note: It's not documented in WP, but the second item in the … … 1683 1687 * @since BuddyPress (2.0.0) 1684 1688 * 1685 * @param array $item Information about the current row.1689 * @param array $item Information about the current row. 1686 1690 * @param string $column_name The column name. 1687 1691 * -
trunk/src/bp-groups/bp-groups-functions.php
r9906 r9907 2 2 3 3 /** 4 * BuddyPress Groups Functions 4 * BuddyPress Groups Functions. 5 5 * 6 6 * Functions are where all the magic happens in BuddyPress. They will … … 21 21 * @since BuddyPress (1.5.0) 22 22 * 23 * @return bool True if set, False if empty 23 * @return bool True if set, False if empty. 24 24 */ 25 25 function bp_groups_has_directory() { … … 38 38 * @param array|string $args { 39 39 * Array of al arguments. 40 * @type int $group_idID of the group.41 * @type bool $load_users No longer used.40 * @type int $group_id ID of the group. 41 * @type bool $load_users No longer used. 42 42 * @type bool $populate_extras Whether to fetch membership data and other 43 * extra information about the group. Default: false. 43 * extra information about the group. 44 * Default: false. 45 * } 44 46 * @return BP_Groups_Group $group The group object. 45 47 */ … … 76 78 * @param array|string $args { 77 79 * An array of arguments. 78 * @type int|bool $group_id Pass a group ID to update an existing item, or 79 * 0 / false to create a new group. Default: 0. 80 * @type int $creator_id The user ID that creates the group. 81 * @type string $name The group name. 82 * @type string $description Optional. The group's description. 83 * @type string $slug The group slug. 84 * @type string $status The group's status. Accepts 'public', 'private' or 85 'hidden'. Defaults to 'public'. 86 * @type int $enable_forum Optional. Whether the group has a forum enabled. 87 * If the legacy forums are enabled for this group or if a bbPress 88 * forum is enabled for the group, set this to 1. Default: 0. 89 * @type string $date_created The GMT time, in Y-m-d h:i:s format, 90 * when the group was created. Defaults to the current time. 80 * @type int|bool $group_id Pass a group ID to update an existing item, or 81 * 0 / false to create a new group. Default: 0. 82 * @type int $creator_id The user ID that creates the group. 83 * @type string $name The group name. 84 * @type string $description Optional. The group's description. 85 * @type string $slug The group slug. 86 * @type string $status The group's status. Accepts 'public', 'private' or 87 'hidden'. Defaults to 'public'. 88 * @type int $enable_forum Optional. Whether the group has a forum enabled. 89 * If the legacy forums are enabled for this group 90 * or if a bbPress forum is enabled for the group, 91 * set this to 1. Default: 0. 92 * @type string $date_created The GMT time, in Y-m-d h:i:s format, when the group 93 * was created. Defaults to the current time. 91 94 * } 92 95 * @return int|bool The ID of the group on success. False on error. … … 210 213 * section (Name, Description, and "Notify members..."). 211 214 * 212 * @param int $group_id ID of the group. 213 * @param string $group_name Name of the group. 214 * @param string $group_desc Description of the group. 215 * @param bool $notify_members Whether to send an email notification to group 216 * members about changes in these details. 215 * @param int $group_id ID of the group. 216 * @param string $group_name Name of the group. 217 * @param string $group_desc Description of the group. 218 * @param bool $notify_members Whether to send an email notification to group 219 * members about changes in these details. 220 * 217 221 * @return bool True on success, false on failure. 218 222 */ … … 255 259 * section (privacy settings, "enable forum", invitation status). 256 260 * 257 * @param int $group_idID of the group.258 * @param bool $enable_forumWhether to enable a forum for the group.259 * @param string $statusGroup status. 'public', 'private', 'hidden'.261 * @param int $group_id ID of the group. 262 * @param bool $enable_forum Whether to enable a forum for the group. 263 * @param string $status Group status. 'public', 'private', 'hidden'. 260 264 * @param string|bool $invite_status Optional. Who is allowed to send invitations 261 * to the group. 'members', 'mods', or 'admins'. 265 * to the group. 'members', 'mods', or 'admins'. 266 * 262 267 * @return bool True on success, false on failure. 263 268 */ … … 311 316 * 312 317 * @param int $group_id ID of the group to delete. 318 * 313 319 * @return bool True on success, false on failure. 314 320 */ … … 351 357 * 352 358 * @param string $status Status to check. 359 * 353 360 * @return bool True if status is allowed, otherwise false. 354 361 */ … … 363 370 * 364 371 * @param string $slug Group slug to check. 372 * 365 373 * @return string $slug A unique and sanitized slug. 366 374 */ … … 388 396 * 389 397 * @param int $group_id The numeric ID of the group. 398 * 390 399 * @return string The group's slug. 391 400 */ … … 401 410 * 402 411 * @param string $group_slug The group's slug. 412 * 403 413 * @return int The ID. 404 414 */ … … 413 423 * 414 424 * @param int $group_id ID of the group. 415 * @param int $user_id Optional. ID of the user. Defaults to the currently 416 * logged-in user. 425 * @param int $user_id Optional. ID of the user. Defaults to the currently 426 * logged-in user. 427 * 417 428 * @return bool True on success, false on failure. 418 429 */ … … 453 464 * 454 465 * @param int $group_id ID of the group. 455 * @param int $user_id Optional. ID of the user. Defaults to the currently 456 * logged-in user. 466 * @param int $user_id Optional. ID of the user. Defaults to the currently 467 * logged-in user. 468 * 457 469 * @return bool True on success, false on failure. 458 470 */ … … 519 531 * 520 532 * @param int $group_id ID of the group. 533 * 521 534 * @return array Info about group admins (user_id + date_modified). 522 535 */ … … 529 542 * 530 543 * @param int $group_id ID of the group. 544 * 531 545 * @return array Info about group admins (user_id + date_modified). 532 546 */ … … 546 560 * @param array $args { 547 561 * An array of optional arguments. 548 * @type int $group_idID of the group whose members are being queried.549 * Default: current group ID.550 * @type int $pagePage of results to be queried. Default: 1.551 * @type int $per_pageNumber of items to return per page of results.552 * Default: 20.553 * @type int $maxOptional. Max number of items to return.554 * @type array $excludeOptional. Array of user IDs to exclude.555 * @type bool|int True (or 1) to exclude admins and mods from results.556 * Default: 1.557 * @type bool|int True (or 1) to exclude banned users from results.558 * Default: 1.559 * @type array $group_roleOptional. Array of group roles to include.560 * @type string $search_terms Optional. Filter results by a search string.561 * @type string $typeOptional. Sort the order of results. 'last_joined',562 * 'first_joined', or any of the $type params available in563 * {@link BP_User_Query}. Default: 'last_joined'.562 * @type int $group_id ID of the group whose members are being queried. 563 * Default: current group ID. 564 * @type int $page Page of results to be queried. Default: 1. 565 * @type int $per_page Number of items to return per page of results. 566 * Default: 20. 567 * @type int $max Optional. Max number of items to return. 568 * @type array $exclude Optional. Array of user IDs to exclude. 569 * @type bool|int $value True (or 1) to exclude admins and mods from results. 570 * Default: 1. 571 * @type bool|int $value True (or 1) to exclude banned users from results. 572 * Default: 1. 573 * @type array $group_role Optional. Array of group roles to include. 574 * @type string $search_terms Optional. Filter results by a search string. 575 * @type string $type Optional. Sort the order of results. 'last_joined', 576 * 'first_joined', or any of the $type params available 577 * in {@link BP_User_Query}. Default: 'last_joined'. 564 578 * } 565 579 * @return array Multi-d array of 'members' list and 'count'. … … 645 659 * 646 660 * @param int $group_id Group ID. 661 * 647 662 * @return int Count of confirmed members for the group. 648 663 */ … … 706 721 * @since BuddyPress (1.2.0) 707 722 * 708 *709 723 * @param BP_Groups_Group $groups Object of found groups based on parameters. 710 724 * Passed by reference. … … 734 748 * Get the IDs of the groups of which a specified user is a member. 735 749 * 736 * @param int $user_id ID of the user.737 * @param int $pag_num Optional. Max number of results to return.738 * Default: false (no limit).750 * @param int $user_id ID of the user. 751 * @param int $pag_num Optional. Max number of results to return. 752 * Default: false (no limit). 739 753 * @param int $pag_page Optional. Page offset of results to return. 740 * Default: false (no limit).754 * Default: false (no limit). 741 755 * @return array { 742 756 * @type array $groups Array of groups returned by paginated query. 743 * @type int $total Count of groups matching query.757 * @type int $total Count of groups matching query. 744 758 * } 745 759 */ … … 756 770 * 757 771 * @param int $user_id Optional. Default: ID of the displayed user. 772 * 758 773 * @return int Group count. 759 774 */ … … 803 818 * 804 819 * @param int $group_id Optional. ID of the group. Default: ID of the 805 * current group.820 * current group. 806 821 * @return string 807 822 */ … … 843 858 * @param int $user_id ID of the user. 844 859 * @param int $group_id ID of the group. 845 * @param int|null ID of the membership if the user is an admin, otherwise null.846 860 * 847 861 * @return bool … … 856 870 * @param int $user_id ID of the user. 857 871 * @param int $group_id ID of the group. 858 * @param int|null ID of the membership if the user is a mod, otherwise null.859 872 * 860 873 * @return bool … … 869 882 * @param int $user_id ID of the user. 870 883 * @param int $group_id ID of the group. 871 * @param int|null ID of the membership if the user is a member, otherwise null.872 884 * 873 885 * @return bool … … 888 900 * @param int $user_id ID of the user. 889 901 * @param int $group_id ID of the group. 890 * @return int|null ID of the group if the user is the creator, otherwise false. 902 * 903 * @return bool 891 904 */ 892 905 function groups_is_user_creator( $user_id, $group_id ) { … … 903 916 * @param array|string $args { 904 917 * Array of arguments. 905 * @type string $content The content of the update.906 * @type int $user_idOptional. ID of the user posting the update. Default:907 * ID of the logged-in user.908 * @type int $group_id Optional. ID of the group to be affiliated with the909 * update. Default: ID of the current group.918 * @type string $content The content of the update. 919 * @type int $user_id Optional. ID of the user posting the update. Default: 920 * ID of the logged-in user. 921 * @type int $group_id Optional. ID of the group to be affiliated with the 922 * update. Default: ID of the current group. 910 923 * } 911 924 * @return int … … 987 1000 * Get IDs of users with outstanding invites to a given group from a specified user. 988 1001 * 989 * @param int $user_id ID of the inviting user.990 * @param int|bool $limit Limit to restrict to.991 * @param int|bool $page1002 * @param int $user_id ID of the inviting user. 1003 * @param int|bool $limit Limit to restrict to. 1004 * @param int|bool $page 992 1005 * @param string|array|bool $exclude 993 1006 * 994 * @return array IDs of users who have been invited to the group by the995 * user but have not yet accepted.1007 * @return array $value IDs of users who have been invited to the group by the 1008 * user but have not yet accepted. 996 1009 */ 997 1010 function groups_get_invites_for_user( $user_id = 0, $limit = false, $page = false, $exclude = false ) { … … 1009 1022 * 1010 1023 * @param int $user_id The user ID. 1024 * 1011 1025 * @return int 1012 1026 */ … … 1024 1038 * @param array|string $args { 1025 1039 * Array of arguments. 1026 * @type int $user_idID of the user being invited.1027 * @type int $group_idID of the group to which the user is being invited.1028 * @type int $inviter_idOptional. ID of the inviting user. Default:1029 * ID of the logged-in user.1040 * @type int $user_id ID of the user being invited. 1041 * @type int $group_id ID of the group to which the user is being invited. 1042 * @type int $inviter_id Optional. ID of the inviting user. Default: 1043 * ID of the logged-in user. 1030 1044 * @type string $date_modified Optional. Modified date for the invitation. 1031 * Default: current date/time.1032 * @type bool $is_confirmed.Optional. Whether the invitation should be1033 * marked confirmed. Default: false.1045 * Default: current date/time. 1046 * @type bool $is_confirmed Optional. Whether the invitation should be 1047 * marked confirmed. Default: false. 1034 1048 * } 1035 1049 * @return bool True on success, false on failure. … … 1085 1099 * Functionally, this is equivalent to removing a user from a group. 1086 1100 * 1087 * @param int $user_id ID of the user. 1088 * @param int $group_id ID of the group. 1101 * @param int $user_id ID of the user. 1102 * @param int $group_id ID of the group. 1103 * 1089 1104 * @return bool True on success, false on failure. 1090 1105 */ … … 1112 1127 * Returns true if a user is already a member of the group. 1113 1128 * 1114 * @param int $user_id ID of the user. 1115 * @param int $group_id ID of the group. 1129 * @param int $user_id ID of the user. 1130 * @param int $group_id ID of the group. 1131 * 1116 1132 * @return bool True when the user is a member of the group, otherwise false. 1117 1133 */ … … 1163 1179 * Reject a group invitation. 1164 1180 * 1165 * @param int $user_id ID of the user. 1166 * @param int $group_id ID of the group. 1181 * @param int $user_id ID of the user. 1182 * @param int $group_id ID of the group. 1183 * 1167 1184 * @return bool True on success, false on failure. 1168 1185 */ … … 1187 1204 * Delete a group invitation. 1188 1205 * 1189 * @param int $user_id ID of the invited user. 1190 * @param int $group_id ID of the group. 1206 * @param int $user_id ID of the invited user. 1207 * @param int $group_id ID of the group. 1208 * 1191 1209 * @return bool True on success, false on failure. 1192 1210 */ … … 1211 1229 * Send all pending invites by a single user to a specific group. 1212 1230 * 1213 * @param int $user_id ID of the inviting user.1231 * @param int $user_id ID of the inviting user. 1214 1232 * @param int $group_id ID of the group. 1215 1233 */ … … 1247 1265 * Get IDs of users with outstanding invites to a given group from a specified user. 1248 1266 * 1249 * @param int $user_id ID of the inviting user. 1250 * @param int $group_id ID of the group. 1251 * @return array IDs of users who have been invited to the group by the 1252 * user but have not yet accepted. 1267 * @param int $user_id ID of the inviting user. 1268 * @param int $group_id ID of the group. 1269 * 1270 * @return array $value IDs of users who have been invited to the group by the 1271 * user but have not yet accepted. 1253 1272 */ 1254 1273 function groups_get_invites_for_group( $user_id, $group_id ) { … … 1263 1282 * well (useful to make sure AJAX requests are not duplicated). 1264 1283 * 1265 * @param int $user_id ID of potential group member. 1266 * @param int $group_id ID of potential group. 1267 * @param string $type Optional. Use 'sent' to check for sent invites, 'all' to 1268 * check for all. Default: 'sent'. 1284 * @param int $user_id ID of potential group member. 1285 * @param int $group_id ID of potential group. 1286 * @param string $type Optional. Use 'sent' to check for sent invites, 1287 * 'all' to check for all. Default: 'sent'. 1288 * 1269 1289 * @return bool True if an invitation is found, otherwise false. 1270 1290 */ … … 1277 1297 * 1278 1298 * @param int $group_id ID of the group whose invitations are being deleted. 1299 * 1279 1300 * @return int|null Number of rows records deleted on success, null on failure. 1280 1301 */ … … 1288 1309 * Promote a member to a new status within a group. 1289 1310 * 1290 * @param int $user_id ID of the user. 1291 * @param int $group_id ID of the group. 1292 * @param string $status The new status. 'mod' or 'admin'. 1311 * @param int $user_id ID of the user. 1312 * @param int $group_id ID of the group. 1313 * @param string $status The new status. 'mod' or 'admin'. 1314 * 1293 1315 * @return bool True on success, false on failure. 1294 1316 */ … … 1320 1342 * Demote a user to 'member' status within a group. 1321 1343 * 1322 * @param int $user_id ID of the user. 1323 * @param int $group_id ID of the group. 1344 * @param int $user_id ID of the user. 1345 * @param int $group_id ID of the group. 1346 * 1324 1347 * @return bool True on success, false on failure. 1325 1348 */ … … 1347 1370 * Ban a member from a group. 1348 1371 * 1349 * @param int $user_id ID of the user. 1350 * @param int $group_id ID of the group. 1372 * @param int $user_id ID of the user. 1373 * @param int $group_id ID of the group. 1374 * 1351 1375 * @return bool True on success, false on failure. 1352 1376 */ … … 1374 1398 * Unban a member from a group. 1375 1399 * 1376 * @param int $user_id ID of the user. 1377 * @param int $group_id ID of the group. 1400 * @param int $user_id ID of the user. 1401 * @param int $group_id ID of the group. 1402 * 1378 1403 * @return bool True on success, false on failure. 1379 1404 */ … … 1403 1428 * Remove a member from a group. 1404 1429 * 1405 * @param int $user_id ID of the user. 1406 * @param int $group_id ID of the group. 1430 * @param int $user_id ID of the user. 1431 * @param int $group_id ID of the group. 1432 * 1407 1433 * @return bool True on success, false on failure. 1408 1434 */ … … 1441 1467 * 1442 1468 * @param int $requesting_user_id ID of the user requesting membership. 1443 * @param int $group_id ID of the group. 1469 * @param int $group_id ID of the group. 1470 * 1444 1471 * @return bool True on success, false on failure. 1445 1472 */ … … 1499 1526 * 1500 1527 * @param int $membership_id ID of the membership object. 1501 * @param int $user_id Optional. ID of the user who requested membership. 1502 * Provide this value along with $group_id to override $membership_id. 1503 * @param int $group_id Optional. ID of the group to which membership is being 1504 * requested. Provide this value along with $user_id to override 1505 * $membership_id. 1528 * @param int $user_id Optional. ID of the user who requested membership. 1529 * Provide this value along with $group_id to override 1530 * $membership_id. 1531 * @param int $group_id Optional. ID of the group to which membership is being 1532 * requested. Provide this value along with $user_id to 1533 * override $membership_id. 1534 * 1506 1535 * @return bool True on success, false on failure. 1507 1536 */ … … 1543 1572 * 1544 1573 * @param int $membership_id ID of the membership object. 1545 * @param int $user_id Optional. ID of the user who requested membership. 1546 * Provide this value along with $group_id to override $membership_id. 1547 * @param int $group_id Optional. ID of the group to which membership is being 1548 * requested. Provide this value along with $user_id to override 1549 * $membership_id. 1574 * @param int $user_id Optional. ID of the user who requested membership. 1575 * Provide this value along with $group_id to override 1576 * $membership_id. 1577 * @param int $group_id Optional. ID of the group to which membership is being 1578 * requested. Provide this value along with $user_id to 1579 * override $membership_id. 1580 * 1550 1581 * @return bool True on success, false on failure. 1551 1582 */ … … 1573 1604 * 1574 1605 * @param int $membership_id ID of the membership object. 1575 * @param int $user_id Optional. ID of the user who requested membership. 1576 * Provide this value along with $group_id to override $membership_id. 1577 * @param int $group_id Optional. ID of the group to which membership is being 1578 * requested. Provide this value along with $user_id to override 1579 * $membership_id. 1606 * @param int $user_id Optional. ID of the user who requested membership. 1607 * Provide this value along with $group_id to override 1608 * $membership_id. 1609 * @param int $group_id Optional. ID of the group to which membership is being 1610 * requested. Provide this value along with $user_id to 1611 * override $membership_id. 1612 * 1580 1613 * @return bool True on success, false on failure. 1581 1614 */ … … 1595 1628 * Check whether a user has an outstanding membership request for a given group. 1596 1629 * 1597 * @param int $user_id ID of the user. 1598 * @param int $group_id ID of the group. 1630 * @param int $user_id ID of the user. 1631 * @param int $group_id ID of the group. 1632 * 1599 1633 * @return int|null ID of the membership if found, otherwise false. 1600 1634 */ … … 1607 1641 * 1608 1642 * @param int $group_id ID of the group. 1643 * 1609 1644 * @return bool True on success, false on failure. 1610 1645 */ … … 1635 1670 * Delete metadata for a group. 1636 1671 * 1637 * @param int $group_idID of the group.1638 * @param string|bool $meta_key The key of the row to delete.1672 * @param int $group_id ID of the group. 1673 * @param string|bool $meta_key The key of the row to delete. 1639 1674 * @param string|bool $meta_value Optional. Metadata value. If specified, only delete 1640 * metadata entries with this value. 1641 * @param bool $delete_all Optional. If true, delete matching metadata entries 1642 * for all groups. Default: false. 1643 * @param bool $delete_all Optional. If true, delete matching metadata entries 1644 * for all objects, ignoring the specified group_id. Otherwise, only 1645 * delete matching metadata entries for the specified group. 1646 * Default: false. 1675 * metadata entries with this value. 1676 * @param bool $delete_all Optional. If true, delete matching metadata entries 1677 * for all groups. Otherwise, only delete matching 1678 * metadata entries for the specified group. 1679 * Default: false. 1680 * 1647 1681 * @return bool True on success, false on failure. 1648 1682 */ … … 1675 1709 * Get a piece of group metadata. 1676 1710 * 1677 * @param int $group_id ID of the group.1711 * @param int $group_id ID of the group. 1678 1712 * @param string $meta_key Metadata key. 1679 * @param bool $single Optional. If true, return only the first value of the 1680 * specified meta_key. This parameter has no effect if meta_key is 1681 * empty. 1713 * @param bool $single Optional. If true, return only the first value of the 1714 * specified meta_key. This parameter has no effect if 1715 * meta_key is empty. 1716 * 1682 1717 * @return mixed Metadata value. 1683 1718 */ … … 1693 1728 * Update a piece of group metadata. 1694 1729 * 1695 * @param int $group_id ID of the group. 1696 * @param string $meta_key Metadata key. 1697 * @param mixed $meta_value Value to store. 1698 * @param mixed $prev_value Optional. If specified, only update existing 1699 * metadata entries with the specified value. Otherwise, update all 1700 * entries. 1701 * @return bool|int Returns false on failure. On successful update of existing 1702 * metadata, returns true. On successful creation of new metadata, 1703 * returns the integer ID of the new metadata row. 1730 * @param int $group_id ID of the group. 1731 * @param string $meta_key Metadata key. 1732 * @param mixed $meta_value Value to store. 1733 * @param mixed $prev_value Optional. If specified, only update existing 1734 * metadata entries with the specified value. 1735 * Otherwise, update all entries. 1736 * 1737 * @return bool|int $retval Returns false on failure. On successful update of existing 1738 * metadata, returns true. On successful creation of new metadata, 1739 * returns the integer ID of the new metadata row. 1704 1740 */ 1705 1741 function groups_update_groupmeta( $group_id, $meta_key, $meta_value, $prev_value = '' ) { … … 1716 1752 * @since BuddyPress (2.0.0) 1717 1753 * 1718 * @param int $group_id ID of the group. 1719 * @param string $meta_key Metadata key. 1720 * @param mixed $meta_value Metadata value. 1721 * @param bool $unique. Optional. Whether to enforce a single metadata value 1722 * for the given key. If true, and the object already has a value for 1723 * the key, no change will be made. Default: false. 1754 * @param int $group_id ID of the group. 1755 * @param string $meta_key Metadata key. 1756 * @param mixed $meta_value Metadata value. 1757 * @param bool $unique. Optional. Whether to enforce a single metadata value 1758 * for the given key. If true, and the object already 1759 * has a value for the key, no change will be made. 1760 * Default: false. 1761 * 1724 1762 * @return int|bool The meta ID on successful update, false on failure. 1725 1763 */ -
trunk/src/bp-groups/classes/class-bp-group-extension.php
r9906 r9907 290 290 */ 291 291 292 /* 292 /** 293 293 * The content of the group tab 294 294 *
Note: See TracChangeset
for help on using the changeset viewer.