Changeset 9906
- Timestamp:
- 06/02/2015 05:21:07 AM (10 years ago)
- Location:
- trunk/src/bp-groups
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-actions.php
r9819 r9906 456 456 * Sort the group creation steps. 457 457 * 458 * @return bool|null False on failure.458 * @return false|null False on failure. 459 459 */ 460 460 function groups_action_sort_creation_steps() { … … 508 508 * @since BuddyPress (1.2.0) 509 509 * 510 * @return bool|null False on failure.510 * @return false|null False on failure. 511 511 */ 512 512 function groups_action_group_feed() { -
trunk/src/bp-groups/bp-groups-activity.php
r9819 r9906 2 2 3 3 /** 4 * BuddyPress Groups Activity Functions 4 * BuddyPress Groups Activity Functions. 5 5 * 6 6 * These functions handle the recording, deleting and formatting of activity … … 90 90 * @since BuddyPress (2.0.0) 91 91 * 92 * @param string $action Static activity action.92 * @param string $action Static activity action. 93 93 * @param object $activity Activity data object. 94 * 94 95 * @return string 95 96 */ … … 121 122 * @since BuddyPress (2.0.0) 122 123 * 123 * @param string $action Static activity action.124 * @param string $action Static activity action. 124 125 * @param object $activity Activity data object. 126 * 125 127 * @return string 126 128 */ … … 165 167 * @param string $action Static activity action. 166 168 * @param object $activity Activity data object. 169 * 167 170 * @return string 168 171 */ … … 219 222 * 220 223 * @param array $activities Array of activity items. 224 * 221 225 * @return array 222 226 */ … … 270 274 * @param array $retval Empty array by default 271 275 * @param array $filter Current activity arguments 276 * 272 277 * @return array 273 278 */ … … 334 339 * return values. 335 340 * 336 * @param array $args {341 * @param array|string $args { 337 342 * An array of arguments for the new activity item. Accepts all parameters 338 343 * of {@link bp_activity_add()}. However, this wrapper provides some 339 344 * additional defaults, as described below: 340 * @type string $component Default: the id of your Groups component341 * (usually 'groups').342 * @type bool $hide_sitewide Default: True if the current group is not343 * public, otherwise false.345 * @type string $component Default: the id of your Groups component 346 * (usually 'groups'). 347 * @type bool $hide_sitewide Default: True if the current group is not 348 * public, otherwise false. 344 349 * } 345 350 * @return bool See {@link bp_activity_add()}. … … 386 391 * 387 392 * @param int $group_id Optional. The ID of the group whose last_activity is 388 * being updated. Default: the current group's ID. 393 * being updated. Default: the current group's ID. 394 * 389 395 * @return bool|null False on failure. 390 396 */ … … 408 414 409 415 /** 410 * Add an activity stream item when a member joins a group 416 * Add an activity stream item when a member joins a group. 411 417 * 412 418 * @since BuddyPress (1.9.0) 413 419 * 414 * @param int $user_id ID of the user joining the group.420 * @param int $user_id ID of the user joining the group. 415 421 * @param int $group_id ID of the group. 422 * 416 423 * @return bool|null False on failure. 417 424 */ … … 455 462 * @param BP_Groups_Group $old_group Group object before the details had been changed. 456 463 * @param bool $notify_members True if the admin has opted to notify group members, otherwise false. 464 * 457 465 * @return int|bool The ID of the activity on success. False on error. 458 466 */ … … 546 554 * 547 555 * @param int $group_id ID of the group. 548 * @param int $user_id ID of the user leaving the group.556 * @param int $user_id ID of the user leaving the group. 549 557 */ 550 558 function bp_groups_leave_group_delete_recent_activity( $group_id, $user_id ) { -
trunk/src/bp-groups/bp-groups-admin.php
r9819 r9906 561 561 * @since BuddyPress (1.7.0) 562 562 * 563 * @param BP_Groups_Group Instance of the current group being edited. Passed by reference.563 * @param BP_Groups_Group $this Instance of the current group being edited. Passed by reference. 564 564 */ 565 565 do_action_ref_array( 'bp_groups_admin_edit', array( &$group ) ); ?> … … 688 688 * @since BuddyPress (1.7.0) 689 689 * 690 * @global BP_Group _List_Table $bp_groups_list_table Group screen list table.690 * @global BP_Groups_List_Table $bp_groups_list_table Group screen list table. 691 691 * @global string $plugin_page Currently viewed plugin page. 692 692 */ … … 1339 1339 * @since BuddyPress (1.7.0) 1340 1340 * 1341 * @param object $item The current group item in the loop.1341 * @param object|array $item The current group item in the loop. 1342 1342 */ 1343 1343 public function single_row( $item = array() ) { … … 1585 1585 * @since BuddyPress (1.7.0) 1586 1586 * 1587 * @param array Information about the current row.1587 * @param array $item Information about the current row. 1588 1588 */ 1589 1589 public function column_description( $item = array() ) { … … 1605 1605 * @since BuddyPress (1.7.0) 1606 1606 * 1607 * @param array Information about the current row.1607 * @param array $item Information about the current row. 1608 1608 */ 1609 1609 public function column_status( $item = array() ) { … … 1641 1641 * @since BuddyPress (1.7.0) 1642 1642 * 1643 * @param array Information about the current row.1643 * @param array $item Information about the current row. 1644 1644 */ 1645 1645 public function column_members( $item = array() ) { … … 1662 1662 * @since BuddyPress (1.7.0) 1663 1663 * 1664 * @param array Information about the current row.1664 * @param array $item Information about the current row. 1665 1665 */ 1666 1666 public function column_last_active( $item = array() ) { … … 1683 1683 * @since BuddyPress (2.0.0) 1684 1684 * 1685 * @param array Information about the current row.1686 * @param string the column name.1685 * @param array $item Information about the current row. 1686 * @param string $column_name The column name. 1687 1687 * 1688 1688 * @return string -
trunk/src/bp-groups/bp-groups-adminbar.php
r9819 r9906 2 2 3 3 /** 4 * BuddyPress Groups Toolbar 4 * BuddyPress Groups Toolbar. 5 5 * 6 6 * Handles the groups functions related to the WordPress Toolbar. … … 20 20 * @todo Add dynamic menu items for group extensions. 21 21 * 22 * @return bool|null False if not on a group page, or if user does not have23 * access to group admin options.22 * @return false|null False if not on a group page, or if user does not have 23 * access to group admin options. 24 24 */ 25 25 function bp_groups_group_admin_menu() { -
trunk/src/bp-groups/bp-groups-cache.php
r9819 r9906 2 2 3 3 /** 4 * BuddyPress Groups Caching 4 * BuddyPress Groups Caching. 5 5 * 6 6 * Caching functions handle the clearing of cached objects and pages on specific … … 25 25 * groupmeta within a loop context. 26 26 * 27 * @param int|str|array $group_ids Accepts a single group_id, or a 28 * comma-separated list or array of group ids. 27 * 28 * @param int|string|array|bool $group_ids Accepts a single group_id, or a 29 * comma-separated list or array of 30 * group ids. 29 31 */ 30 32 function bp_groups_update_meta_cache( $group_ids = false ) { … … 46 48 * Clear the cached group count. 47 49 * 48 * @param $group_id Not used.50 * @param int $group_id Not used. 49 51 */ 50 52 function groups_clear_group_object_cache( $group_id ) { … … 76 78 * 77 79 * @since BuddyPress (2.0.0) 80 * 81 * @param int $meta_id 82 * @param int $group_id 78 83 */ 79 84 function bp_groups_delete_group_cache_on_metadata_change( $meta_id, $group_id ) { … … 88 93 * @since BuddyPress (1.6.0) 89 94 * 90 * @param int $group_idID of the group.95 * @param int $group_id ID of the group. 91 96 * @param BP_Groups_Group $group_obj Group object. 92 97 */ … … 98 103 99 104 /** 100 * Clears caches for all members in a group when a group is deleted 105 * Clears caches for all members in a group when a group is deleted. 101 106 * 102 107 * @since BuddyPress (1.6.0) 103 108 * 104 109 * @param BP_Groups_Group $group_obj Group object. 105 * @param array User IDs who were in this group.110 * @param array $user_ids User IDs who were in this group. 106 111 */ 107 112 function bp_groups_clear_group_members_caches( $group_obj, $user_ids ) { … … 136 141 * 137 142 * @param int $group_id The group ID. Not used in this function. 138 * @param int $user_id The user ID.143 * @param int $user_id The user ID. 139 144 */ 140 145 function bp_groups_clear_invite_count_on_uninvite( $group_id, $user_id ) { … … 148 153 * @since BuddyPress (2.0.0) 149 154 * 150 * @param int $group_idThe group ID. Not used in this function.155 * @param int $group_id The group ID. Not used in this function. 151 156 * @param array $invited_users Array of invited user IDs. 152 157 */ … … 162 167 * 163 168 * @param int $group_id The group ID. Not used in this function. 164 * @param int $user_id The user ID.169 * @param int $user_id The user ID. 165 170 */ 166 171 function groups_clear_group_user_object_cache( $group_id, $user_id ) { -
trunk/src/bp-groups/bp-groups-filters.php
r9819 r9906 2 2 3 3 /** 4 * BuddyPress Groups Filters 4 * BuddyPress Groups Filters. 5 5 * 6 6 * @package BuddyPress … … 73 73 * 74 74 * @param string $content 75 * 75 76 * @return string 76 77 */ … … 128 129 * 129 130 * @param string $sql 131 * 130 132 * @return string 131 133 */ … … 139 141 * 140 142 * @param string $sql 143 * 141 144 * @return string 142 145 */ … … 153 156 * 154 157 * @param string $sql 158 * 155 159 * @return string 156 160 */ … … 205 209 * @param string $cap 206 210 * @param array $args 211 * 207 212 * @return bool 208 213 */ … … 245 250 * @since BuddyPress (1.5.0) 246 251 * 247 * @param string $value SQL string to specify fetching just topic_id 252 * @param string $value SQL string to specify fetching just topic_id. 248 253 */ 249 254 return apply_filters( 'groups_filter_bbpress_root_page_sql', 't.topic_id' ); … … 255 260 * mentions suggestions? 256 261 * 257 * @param bool $load_mentions True to load mentions assets, false otherwise. 262 * @since BuddyPress (2.2.0) 263 * 264 * @param bool $load_mentions True to load mentions assets, false otherwise. 258 265 * @param bool $mentions_enabled True if mentions are enabled. 266 * 259 267 * @return bool True if mentions scripts should be loaded. 260 * @since BuddyPress (2.2.0)261 268 */ 262 269 function bp_groups_maybe_load_mentions_scripts( $load_mentions, $mentions_enabled ) { -
trunk/src/bp-groups/bp-groups-forums.php
r9819 r9906 2 2 3 3 /** 4 * BuddyPress Groups Forums 4 * BuddyPress Groups Forums. 5 5 * 6 6 * Action functions are exactly the same as screen functions, however they do not … … 25 25 * @since BuddyPress (1.0.0) 26 26 * 27 * @param int $group_idThe group ID that the new forum should be attached to.27 * @param int $group_id The group ID that the new forum should be attached to. 28 28 * @param string $group_name The group name. 29 29 * @param string $group_desc The group description. … … 67 67 * 68 68 * @param int $group_id Group id, passed from groups_details_updated. 69 * 70 * @return mixed 69 71 */ 70 72 function groups_update_group_forum( $group_id ) { … … 107 109 * 108 110 * @param string $post_text The text for the forum post. 109 * @param int $topic_id The topic ID used so we can identify where the new 110 * forum post should reside. 111 * @param mixed $page The page number where the new forum post should reside. 112 * Default: false. 111 * @param int $topic_id The topic ID used so we can identify where the new 112 * forum post should reside. 113 * @param mixed $page The page number where the new forum post should reside. 114 * Default: false. 115 * 113 116 * @return mixed The new forum post ID on success. Boolean false on failure. 114 117 */ … … 216 219 * 217 220 * @param string $topic_title The title for the forum topic. 218 * @param string $topic_text The text for the forum topic. 219 * @param string $topic_tags A comma-delimited string of topic tags. 220 * @param int $forum_id The forum ID this forum topic resides in. 221 * @param string $topic_text The text for the forum topic. 222 * @param string $topic_tags A comma-delimited string of topic tags. 223 * @param int $forum_id The forum ID this forum topic resides in. 224 * 221 225 * @return mixed The new topic object on success. Boolean false on failure. 222 226 */ … … 335 339 * @since BuddyPress (1.1.0) 336 340 * 337 * @param int $topic_idThe topic ID of the existing forum topic.341 * @param int $topic_id The topic ID of the existing forum topic. 338 342 * @param string $topic_title The title for the forum topic. 339 * @param string $topic_text The text for the forum topic. 340 * @param mixed $topic_tags A comma-delimited string of topic tags. Optional. 343 * @param string $topic_text The text for the forum topic. 344 * @param mixed $topic_tags A comma-delimited string of topic tags. Optional. 345 * 341 346 * @return mixed The topic object on success. Boolean false on failure. 342 347 */ … … 413 418 * @since BuddyPress (1.1.0) 414 419 * 415 * @param int $post_idThe post ID of the existing forum post.420 * @param int $post_id The post ID of the existing forum post. 416 421 * @param string $post_text The text for the forum post. 417 * @param int $topic_idThe topic ID of the existing forum topic.418 * @param mixed $page The page number where the new forum post should reside.419 * Optional.422 * @param int $topic_id The topic ID of the existing forum topic. 423 * @param mixed $page The page number where the new forum post should reside. Optional. 424 * 420 425 * @return mixed The forum post ID on success. Boolean false on failure. 421 426 */ … … 503 508 * 504 509 * @param int $topic_id The ID of the topic to be deleted. 510 * 505 511 * @return bool True if the delete routine went through properly. 506 512 */ … … 565 571 * @since BuddyPress (1.1.0) 566 572 * 567 * @param int $post_id The ID of the post you want to delete. 568 * @param int $topic_id Optional. The topic to which the post belongs. This 569 * value isn't used in the function but is passed along to do_action() 570 * hooks. 573 * @param int $post_id The ID of the post you want to delete. 574 * @param int|bool $topic_id Optional. The topic to which the post belongs. This 575 * value isn't used in the function but is passed along 576 * to do_action() hooks. 577 * 571 578 * @return bool True on success. 572 579 */ … … 617 624 * 618 625 * @param string $type Either 'newest', 'popular', 'unreplied', 'tags'. 619 * Default: 'newest'. 626 * Default: 'newest'. 627 * 620 628 * @return int The topic count. 621 629 */ … … 637 645 * @since BuddyPress (1.5.0) 638 646 * 639 * @param string $status Which groups to count. 'public', 'private', 'hidden', 640 * 'all'. Default: 'public'. 641 * @param string $search_terms Optional. Limit by a search term. 647 * @param string $status Which groups to count. 'public', 'private', 'hidden', 648 * 'all'. Default: 'public'. 649 * @param string|bool $search_terms Optional. Limit by a search term. 650 * 642 651 * @return int The topic count. 643 652 */ -
trunk/src/bp-groups/bp-groups-functions.php
r9819 r9906 36 36 * support and pass through the groups_get_group filter. 37 37 * 38 * @param array $args {38 * @param array|string $args { 39 39 * Array of al arguments. 40 40 * @type int $group_id ID of the group. … … 74 74 * @since BuddyPress (1.0.0) 75 75 * 76 * @param array $args {76 * @param array|string $args { 77 77 * An array of arguments. 78 78 * @type int|bool $group_id Pass a group ID to update an existing item, or … … 258 258 * @param bool $enable_forum Whether to enable a forum for the group. 259 259 * @param string $status Group status. 'public', 'private', 'hidden'. 260 * @param string $invite_status Optional. Who is allowed to send invitations260 * @param string|bool $invite_status Optional. Who is allowed to send invitations 261 261 * to the group. 'members', 'mods', or 'admins'. 262 262 * @return bool True on success, false on failure. … … 363 363 * 364 364 * @param string $slug Group slug to check. 365 * @return A unique and sanitized slug.365 * @return string $slug A unique and sanitized slug. 366 366 */ 367 367 function groups_check_slug( $slug ) { … … 656 656 * Get a collection of groups, based on the parameters passed. 657 657 * 658 * @param array $args {658 * @param array|string $args { 659 659 * Array of arguments. Supports all arguments of 660 660 * {@link BP_Groups_Group::get()}. Where the default values differ, they … … 735 735 * 736 736 * @param int $user_id ID of the user. 737 * @param int $ limitOptional. Max number of results to return.737 * @param int $pag_num Optional. Max number of results to return. 738 738 * Default: false (no limit). 739 * @param int $pag e Optional. Page offset of results to return.739 * @param int $pag_page Optional. Page offset of results to return. 740 740 * Default: false (no limit). 741 741 * @return array { … … 844 844 * @param int $group_id ID of the group. 845 845 * @param int|null ID of the membership if the user is an admin, otherwise null. 846 * 847 * @return bool 846 848 */ 847 849 function groups_is_user_admin( $user_id, $group_id ) { … … 855 857 * @param int $group_id ID of the group. 856 858 * @param int|null ID of the membership if the user is a mod, otherwise null. 859 * 860 * @return bool 857 861 */ 858 862 function groups_is_user_mod( $user_id, $group_id ) { … … 866 870 * @param int $group_id ID of the group. 867 871 * @param int|null ID of the membership if the user is a member, otherwise null. 872 * 873 * @return bool 868 874 */ 869 875 function groups_is_user_member( $user_id, $group_id ) { … … 895 901 * @todo Should bail out when the Activity component is not active. 896 902 * 897 * @param array {903 * @param array|string $args { 898 904 * Array of arguments. 899 905 * @type string $content The content of the update. … … 982 988 * 983 989 * @param int $user_id ID of the inviting user. 984 * @param int $group_id ID of the group. 990 * @param int|bool $limit Limit to restrict to. 991 * @param int|bool $page 992 * @param string|array|bool $exclude 993 * 985 994 * @return array IDs of users who have been invited to the group by the 986 995 * user but have not yet accepted. … … 1013 1022 * Invite a user to a group. 1014 1023 * 1015 * @param array $args {1024 * @param array|string $args { 1016 1025 * Array of arguments. 1017 1026 * @type int $user_id ID of the user being invited. … … 1627 1636 * 1628 1637 * @param int $group_id ID of the group. 1629 * @param string $meta_key The key of the row to delete.1630 * @param string $meta_value Optional. Metadata value. If specified, only delete1638 * @param string|bool $meta_key The key of the row to delete. 1639 * @param string|bool $meta_value Optional. Metadata value. If specified, only delete 1631 1640 * metadata entries with this value. 1632 1641 * @param bool $delete_all Optional. If true, delete matching metadata entries -
trunk/src/bp-groups/bp-groups-loader.php
r9828 r9906 2 2 3 3 /** 4 * BuddyPress Groups Loader 4 * BuddyPress Groups Loader. 5 5 * 6 6 * A groups component, for users to group themselves together. Includes a … … 18 18 19 19 /** 20 * Auto-join group when non group member performs group activity 20 * Auto-join group when non group member performs group activity. 21 21 * 22 22 * @since BuddyPress (1.5.0) … … 387 387 * @see BP_Component::setup_nav() for a description of arguments. 388 388 * 389 * @param array $main_nav Optional. See BP_Component::setup_nav() for 390 * description. 391 * @param array $sub_nav Optional. See BP_Component::setup_nav() for 392 * description. 389 * @param array $main_nav Optional. See BP_Component::setup_nav() for description. 390 * @param array $sub_nav Optional. See BP_Component::setup_nav() for description. 393 391 */ 394 392 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { … … 630 628 * parameter array. 631 629 * 632 * @param array $wp_admin_nav See BP_Component::setup_admin_bar() for a 633 * description. 630 * @param array $wp_admin_nav See BP_Component::setup_admin_bar() for a description. 634 631 */ 635 632 public function setup_admin_bar( $wp_admin_nav = array() ) { -
trunk/src/bp-groups/bp-groups-notifications.php
r9819 r9906 2 2 3 3 /** 4 * BuddyPress Groups Notification Functions 4 * BuddyPress Groups Notification Functions. 5 5 * 6 6 * These functions handle the recording, deleting and formatting of notifications … … 21 21 * @since BuddyPress (1.0.0) 22 22 * 23 * @param int $group_idID of the group.24 * @param BP_Groups_Group $old_group Group before new details were saved.23 * @param int $group_id ID of the group. 24 * @param BP_Groups_Group|null $old_group Group before new details were saved. 25 25 */ 26 26 function groups_notification_group_updated( $group_id = 0, $old_group = null ) { … … 148 148 * 149 149 * @param int $requesting_user_id ID of the user requesting group membership. 150 * @param int $admin_id ID of the group admin. 151 * @param int $group_id ID of the group. 152 * @param int $membership_id ID of the group membership object. 153 * @return bool|null False on failure. 150 * @param int $admin_id ID of the group admin. 151 * @param int $group_id ID of the group. 152 * @param int $membership_id ID of the group membership object. 153 * 154 * @return false|null False on failure. 154 155 */ 155 156 function groups_notification_new_membership_request( $requesting_user_id = 0, $admin_id = 0, $group_id = 0, $membership_id = 0 ) { … … 285 286 * @since BuddyPress (1.0.0) 286 287 * 287 * @param int $requesting_user_id ID of the user requesting group membership. 288 * @param int $group_id ID of the group. 289 * @param bool $accepted Optional. Whether the membership request was accepted. 290 * Default: true. 291 * @return boolean 288 * @param int $requesting_user_id ID of the user requesting group membership. 289 * @param int $group_id ID of the group. 290 * @param bool $accepted Optional. Whether the membership request was accepted. 291 * Default: true. 292 * 293 * @return false|null 292 294 */ 293 295 function groups_notification_membership_request_completed( $requesting_user_id = 0, $group_id = 0, $accepted = true ) { … … 401 403 * @since BuddyPress (1.0.0) 402 404 * 403 * @param int $user_id ID of the user.405 * @param int $user_id ID of the user. 404 406 * @param int $group_id ID of the group. 405 * @return bool|null False on failure. 407 * 408 * @return false|null False on failure. 406 409 */ 407 410 function groups_notification_promoted_member( $user_id = 0, $group_id = 0 ) { … … 506 509 * @since BuddyPress (1.0.0) 507 510 * 508 * @param BP_Groups_Group $group Group object. 509 * @param BP_Groups_Member $member Member object. 510 * @param int $inviter_user_id ID of the user who sent the invite. 511 * @return bool|null False on failure. 511 * @param BP_Groups_Group $group Group object. 512 * @param BP_Groups_Member $member Member object. 513 * @param int $inviter_user_id ID of the user who sent the invite. 514 * 515 * @return null|false False on failure. 512 516 */ 513 517 function groups_notification_group_invites( &$group, &$member, $inviter_user_id ) { … … 624 628 * @since BuddyPress (1.0.0) 625 629 * 626 * @param string $action The kind of notification being rendered. 627 * @param int $item_id The primary item ID. 628 * @param int $secondary_item_id The secondary item ID. 629 * @param int $total_items The total number of messaging-related notifications 630 * waiting for the user. 631 * @param string $format 'string' for BuddyBar-compatible notifications; 'array' 632 * for WP Toolbar. Default: 'string'. 630 * @param string $action The kind of notification being rendered. 631 * @param int $item_id The primary item ID. 632 * @param int $secondary_item_id The secondary item ID. 633 * @param int $total_items The total number of messaging-related notifications 634 * waiting for the user. 635 * @param string $format 'string' for BuddyBar-compatible notifications; 'array' 636 * for WP Toolbar. Default: 'string'. 637 * 633 638 * @return string 634 639 */ … … 1199 1204 * @since BuddyPress (2.0.0) 1200 1205 * 1201 * @param int $user_id ID of the user.1206 * @param int $user_id ID of the user. 1202 1207 * @param int $group_id ID of the group. 1203 1208 */ … … 1215 1220 * @since BuddyPress (1.9.0) 1216 1221 * 1217 * @param int $user_id ID of the user.1222 * @param int $user_id ID of the user. 1218 1223 * @param int $group_id ID of the group. 1219 1224 */ -
trunk/src/bp-groups/bp-groups-screens.php
r9828 r9906 1511 1511 * 1512 1512 * @param string $templates The templates from bp_get_theme_compat_templates(). 1513 * 1513 1514 * @return array $templates Array of custom templates to look for. 1514 1515 */ -
trunk/src/bp-groups/bp-groups-template.php
r9885 r9906 36 36 37 37 /** 38 * Output the groups component root slug 38 * Output the groups component root slug. 39 39 * 40 40 * @since BuddyPress (1.5.0) … … 63 63 64 64 /** 65 * Output group directory permalink 65 * Output group directory permalink. 66 66 * 67 67 * @since BuddyPress (1.5.0) … … 71 71 } 72 72 /** 73 * Return group directory permalink 73 * Return group directory permalink. 74 74 * 75 75 * @since BuddyPress (1.5.0) … … 140 140 * 141 141 * @access public 142 * @var public142 * @var string 143 143 */ 144 144 public $pag_page; … … 148 148 * 149 149 * @access public 150 * @var public150 * @var string 151 151 */ 152 152 public $pag_num; … … 466 466 * @since BuddyPress (1.0.0) 467 467 * 468 * @param array $args {468 * @param array|string $args { 469 469 * Array of parameters. All items are optional. 470 * @type string $type Shorthand for certain orderby/ 471 * order combinations. 'newest', 'active', 'popular', 472 * 'alphabetical', 'random'. When present, will override 473 * orderby and order params. Default: null. 474 * @type string $orderby Property to sort by. 475 * 'date_created', 'last_activity', 'total_member_count', 476 * 'name', 'random'. Default: 'date_created'. 477 * @type string $order Sort order. 'ASC' or 'DESC'. 478 * Default: 'DESC'. 479 * @type int $per_page Number of items to return per page 480 * of results. Default: null (no limit). 481 * @type int $page Page offset of results to return. 482 * Default: null (no limit). 483 * @type int $user_id If provided, results will be limited 484 * to groups of which the specified user is a member. Default: 485 * null. 486 * @type string $search_terms If provided, only groups 487 * whose names or descriptions match the search terms will be 488 * returned. Default: false. 489 * @type array $meta_query An array of meta_query 490 * conditions. See {@link WP_Meta_Query::queries} for 491 * description. 492 * @type array|string $include Array or comma-separated list of 493 * group IDs. Results will be limited to groups within the 494 * list. Default: false. 495 * @type bool $populate_extras Whether to fetch additional 496 * information (such as member count) about groups. Default: 497 * true. 498 * @type array|string $exclude Array or comma-separated list of 499 * group IDs. Results will exclude the listed groups. 500 * Default: false. 501 * @type bool $show_hidden Whether to include hidden groups in 502 * results. Default: false. 470 * @type string $type Shorthand for certain orderby/ 471 * order combinations. 'newest', 472 * 'active', 'popular', 'alphabetical', 473 * 'random'. When present, will override 474 * orderby and order params. Default: null. 475 * @type string $orderby Property to sort by. 476 * 'date_created', 'last_activity', 'total_member_count', 477 * 'name', 'random'. Default: 'date_created'. 478 * @type string $order Sort order. 'ASC' or 'DESC'. 479 * Default: 'DESC'. 480 * @type int $per_page Number of items to return per page 481 * of results. Default: null (no limit). 482 * @type int $page Page offset of results to return. 483 * Default: null (no limit). 484 * @type int $user_id If provided, results will be limited 485 * to groups of which the specified user 486 * is a member. Default: null. 487 * @type string $search_terms If provided, only groups whose names or descriptions 488 * match the search terms will be returned. Default: false. 489 * @type array $meta_query An array of meta_query conditions. 490 * See {@link WP_Meta_Query::queries} for description. 491 * @type array|string $include Array or comma-separated list of 492 * group IDs. Results will be limited 493 * to groups within the list. Default: false. 494 * @type bool $populate_extras Whether to fetch additional information 495 * (such as member count) about groups. 496 * Default: true. 497 * @type array|string $exclude Array or comma-separated list of group IDs. 498 * Results will exclude the listed groups. 499 * Default: false. 500 * @type bool $show_hidden Whether to include hidden groups in 501 * results. Default: false. 503 502 * } 504 503 * @return bool True if there are groups to display that match the params … … 614 613 * Is the group visible to the currently logged-in user? 615 614 * 616 * @param object $group Optional. Group object. Default: current group in loop. 615 * @param object|bool $group Optional. Group object. Default: current group in loop. 616 * 617 617 * @return bool 618 618 */ … … 640 640 * Output the ID of the current group in the loop. 641 641 * 642 * @param object $group Optional. Group object. Default: current group in loop.642 * @param object|bool $group Optional. Group object. Default: current group in loop. 643 643 */ 644 644 function bp_group_id( $group = false ) { … … 648 648 * Get the ID of the current group in the loop. 649 649 * 650 * @param object $group Optional. Group object. Default: current 651 * group in loop. 650 * @param object|bool $group Optional. Group object. 651 * Default: current group in loop. 652 * 652 653 * @return int 653 654 */ … … 673 674 * @since BuddyPress (1.7.0) 674 675 * 675 * @param array $classes Array of custom classes 676 * @param array $classes Array of custom classes. 676 677 */ 677 678 function bp_group_class( $classes = array() ) { … … 683 684 * @since BuddyPress (1.7.0) 684 685 * 685 * @param array $classes Array of custom classes 686 * @param array $classes Array of custom classes. 686 687 * 687 688 * @return string Row class of the group. … … 746 747 * Output the name of the current group in the loop. 747 748 * 748 * @param object $group Optional. Group object. Default: current749 * group in loop.749 * @param object|bool $group Optional. Group object. 750 * Default: current group in loop. 750 751 */ 751 752 function bp_group_name( $group = false ) { … … 755 756 * Get the name of the current group in the loop. 756 757 * 757 * @param object $group Optional. Group object. Default: current 758 * group in loop. 758 * @param object|bool $group Optional. Group object. 759 * Default: current group in loop. 760 * 759 761 * @return string 760 762 */ … … 778 780 * Output the type of the current group in the loop. 779 781 * 780 * @param object $group Optional. Group object. Default: current781 * group in loop.782 * @param object|bool $group Optional. Group object. 783 * Default: current group in loop. 782 784 */ 783 785 function bp_group_type( $group = false ) { 784 786 echo bp_get_group_type( $group ); 785 787 } 786 /** 787 * Get the type of the current group in the loop. 788 * 789 * @param object $group Optional. Group object. Default: current 790 * group in loop. 788 789 /** 790 * Get the type of the current group in the loop. 791 * 792 * @param object|bool $group Optional. Group object. 793 * Default: current group in loop. 794 * 795 * @return string 796 */ 797 function bp_get_group_type( $group = false ) { 798 global $groups_template; 799 800 if ( empty( $group ) ) 801 $group =& $groups_template->group; 802 803 if ( 'public' == $group->status ) { 804 $type = __( "Public Group", "buddypress" ); 805 } elseif ( 'hidden' == $group->status ) { 806 $type = __( "Hidden Group", "buddypress" ); 807 } elseif ( 'private' == $group->status ) { 808 $type = __( "Private Group", "buddypress" ); 809 } else { 810 $type = ucwords( $group->status ) . ' ' . __( 'Group', 'buddypress' ); 811 } 812 813 /** 814 * Filters the type for the current group in the loop. 815 * 816 * @since BuddyPress (1.0.0) 817 * 818 * @param string $type Type for the current group in the loop. 819 */ 820 return apply_filters( 'bp_get_group_type', $type ); 821 } 822 /** 823 * Output the status of the current group in the loop. 824 * 825 * @param object|bool $group Optional. Group object. 826 * Default: current group in loop. 827 */ 828 function bp_group_status( $group = false ) { 829 echo bp_get_group_status( $group ); 830 } 831 /** 832 * Get the status of the current group in the loop. 833 * 834 * @param object|bool $group Optional. Group object. 835 * Default: current group in loop. 836 * 791 837 * @return string 792 838 */ 793 function bp_get_group_ type( $group = false ) {839 function bp_get_group_status( $group = false ) { 794 840 global $groups_template; 795 841 … … 797 843 $group =& $groups_template->group; 798 844 799 if ( 'public' == $group->status ) { 800 $type = __( "Public Group", "buddypress" ); 801 } elseif ( 'hidden' == $group->status ) { 802 $type = __( "Hidden Group", "buddypress" ); 803 } elseif ( 'private' == $group->status ) { 804 $type = __( "Private Group", "buddypress" ); 805 } else { 806 $type = ucwords( $group->status ) . ' ' . __( 'Group', 'buddypress' ); 807 } 808 809 /** 810 * Filters the type for the current group in the loop. 845 /** 846 * Filters the status of the current group in the loop. 811 847 * 812 848 * @since BuddyPress (1.0.0) 813 849 * 814 * @param string $type Type for the current group in the loop.815 */816 return apply_filters( 'bp_get_group_type', $type );817 }818 819 /**820 * Output the status of the current group in the loop.821 *822 * @param object $group Optional. Group object. Default: current823 * group in loop.824 */825 function bp_group_status( $group = false ) {826 echo bp_get_group_status( $group );827 }828 /**829 * Get the status of the current group in the loop.830 *831 * @param object $group Optional. Group object. Default: current832 * group in loop.833 * @return string834 */835 function bp_get_group_status( $group = false ) {836 global $groups_template;837 838 if ( empty( $group ) )839 $group =& $groups_template->group;840 841 /**842 * Filters the status of the current group in the loop.843 *844 * @since BuddyPress (1.0.0)845 *846 850 * @param string $status Status of the current group in the loop. 847 851 */ … … 854 858 * @since BuddyPress (1.0.0) 855 859 * 856 * @param array $args {860 * @param array|string $args { 857 861 * See {@link bp_get_group_avatar()} for description of arguments. 858 862 * } … … 866 870 * @since BuddyPress (1.0.0) 867 871 * 868 * @param array $args {872 * @param array|string $args { 869 873 * Array of arguments. See {@link bp_core_fetch_avatar()} for 870 874 * detailed description. Default values that differ from that 871 875 * function are described below. 876 * 872 877 * @type string $type Default: 'full'. 873 * @type string $id Passed to $css_id parameter.878 * @type string $id Passed to $css_id parameter. 874 879 * } 875 880 * @return string … … 928 933 * @since BuddyPress (1.0.0) 929 934 * 930 * @param object $group Optional. Group object. Default: current931 * group in loop.935 * @param object|bool $group Optional. Group object. 936 * Default: current group in loop. 932 937 */ 933 938 function bp_group_avatar_thumb( $group = false ) { … … 939 944 * @since BuddyPress (1.0.0) 940 945 * 941 * @param object $group Optional. Group object. Default: current 942 * group in loop. 946 * @param object|bool $group Optional. Group object. 947 * Default: current group in loop. 948 * 943 949 * @return string 944 950 */ … … 955 961 * @since BuddyPress (1.0.0) 956 962 * 957 * @param object $group Optional. Group object. Default: current958 * group in loop.963 * @param object|bool $group Optional. Group object. 964 * Default: current group in loop. 959 965 */ 960 966 function bp_group_avatar_mini( $group = false ) { … … 966 972 * @since BuddyPress (1.0.0) 967 973 * 968 * @param object $group Optional. Group object. Default: current 969 * group in loop. 974 * @param object|bool $group Optional. Group object. 975 * Default: current group in loop. 976 * 977 * @return string 970 978 */ 971 979 function bp_get_group_avatar_mini( $group = false ) { … … 981 989 * Output the 'last active' string for the current group in the loop. 982 990 * 983 * @param object $group Optional. Group object. Default: current984 * group in loop.991 * @param object|bool $group Optional. Group object. 992 * Default: current group in loop. 985 993 */ 986 994 function bp_group_last_active( $group = false ) { … … 990 998 * Return the 'last active' string for the current group in the loop. 991 999 * 992 * @param object $group Optional. Group object. Default: current 993 * group in loop. 1000 * @param object|bool $group Optional. Group object. 1001 * Default: current group in loop. 1002 * 994 1003 * @return string 995 1004 */ … … 1023 1032 * Output the permalink for the current group in the loop. 1024 1033 * 1025 * @param object $group Optional. Group object. Default: current1026 * group in loop.1034 * @param object|bool $group Optional. Group object. 1035 * Default: current group in loop. 1027 1036 */ 1028 1037 function bp_group_permalink( $group = false ) { … … 1032 1041 * Return the permalink for the current group in the loop. 1033 1042 * 1034 * @param object $group Optional. Group object. Default: current 1035 * group in loop. 1043 * @param object|bool $group Optional. Group object. 1044 * Default: current group in loop. 1045 * 1036 1046 * @return string 1037 1047 */ … … 1056 1066 * Output the permalink for the admin section of the current group in the loop. 1057 1067 * 1058 * @param object $group Optional. Group object. Default: current1059 * group in loop.1068 * @param object|bool $group Optional. Group object. 1069 * Default: current group in loop. 1060 1070 */ 1061 1071 function bp_group_admin_permalink( $group = false ) { … … 1065 1075 * Return the permalink for the admin section of the current group in the loop. 1066 1076 * 1067 * @param object $group Optional. Group object. Default: current 1068 * group in loop. 1077 * @param object|bool $group Optional. Group object. 1078 * Default: current group in loop. 1079 * 1069 1080 * @return string 1070 1081 */ … … 1088 1099 * Return the slug for the current group in the loop. 1089 1100 * 1090 * @param object $group Optional. Group object. Default: current1091 * group in loop.1101 * @param object|bool $group Optional. Group object. 1102 * Default: current group in loop. 1092 1103 */ 1093 1104 function bp_group_slug( $group = false ) { … … 1097 1108 * Return the slug for the current group in the loop. 1098 1109 * 1099 * @param object $group Optional. Group object. Default: current 1100 * group in loop. 1110 * @param object|bool $group Optional. Group object. 1111 * Default: current group in loop. 1112 * 1101 1113 * @return string 1102 1114 */ … … 1120 1132 * Output the description for the current group in the loop. 1121 1133 * 1122 * @param object $group Optional. Group object. Default: current1123 * group in loop.1134 * @param object|bool $group Optional. Group object. 1135 * Default: current group in loop. 1124 1136 */ 1125 1137 function bp_group_description( $group = false ) { … … 1129 1141 * Return the description for the current group in the loop. 1130 1142 * 1131 * @param object $group Optional. Group object. Default: current 1132 * group in loop. 1143 * @param object|bool $group Optional. Group object. 1144 * Default: current group in loop. 1145 * 1133 1146 * @return string 1134 1147 */ … … 1152 1165 * Output the description for the current group in the loop, for use in a textarea. 1153 1166 * 1154 * @param object $group Optional. Group object. Default: current1155 * group in loop.1167 * @param object|bool $group Optional. Group object. 1168 * Default: current group in loop. 1156 1169 */ 1157 1170 function bp_group_description_editable( $group = false ) { … … 1165 1178 * appropriate for "raw" editing. 1166 1179 * 1167 * @param object $group Optional. Group object. Default: current 1168 * group in loop. 1180 * @param object|bool $group Optional. Group object. 1181 * Default: current group in loop. 1182 * 1169 1183 * @return string 1170 1184 */ … … 1192 1206 * Output an excerpt of the group description. 1193 1207 * 1194 * @param object $group Optional. The group being referenced. Defaults to the 1195 * group currently being iterated on in the groups loop. 1208 * @param object|bool $group Optional. The group being referenced. 1209 * Defaults to the group currently being 1210 * iterated on in the groups loop. 1196 1211 */ 1197 1212 function bp_group_description_excerpt( $group = false ) { … … 1201 1216 * Get an excerpt of a group description. 1202 1217 * 1203 * @param object $group Optional. The group being referenced. Defaults 1204 * to the group currently being iterated on in the groups loop. 1218 * @param object|bool $group Optional. The group being referenced. 1219 * Defaults to the group currently being 1220 * iterated on in the groups loop. 1221 * 1205 1222 * @return string Excerpt. 1206 1223 */ … … 1228 1245 * Either 'Public' or 'Private'. 1229 1246 * 1230 * @param object $group Optional. Group object. Default: current1231 * group in loop.1247 * @param object|bool $group Optional. Group object. 1248 * Default: current group in loop. 1232 1249 */ 1233 1250 function bp_group_public_status( $group = false ) { … … 1239 1256 * Either 'Public' or 'Private'. 1240 1257 * 1241 * @param object $group Optional. Group object. Default: current 1242 * group in loop. 1258 * @param object|bool $group Optional. Group object. 1259 * Default: current group in loop. 1260 * 1243 1261 * @return string 1244 1262 */ … … 1261 1279 * No longer used in BuddyPress. 1262 1280 * 1263 * @param object $group Optional. Group object. Default: current1264 * group in loop.1281 * @param object|bool $group Optional. Group object. 1282 * Default: current group in loop. 1265 1283 */ 1266 1284 function bp_group_is_public( $group = false ) { … … 1272 1290 * No longer used in BuddyPress. 1273 1291 * 1274 * @param object $group Optional. Group object. Default: current 1275 * group in loop. 1292 * @param object|bool $group Optional. Group object. 1293 * Default: current group in loop. 1294 * 1276 1295 * @return unknown 1277 1296 */ … … 1288 1307 * Output the created date of the current group in the loop. 1289 1308 * 1290 * @param object $group Optional. Group object. Default: current1291 * group in loop.1309 * @param object|bool $group Optional. Group object. 1310 * Default: current group in loop. 1292 1311 */ 1293 1312 function bp_group_date_created( $group = false ) { … … 1297 1316 * Return the created date of the current group in the loop. 1298 1317 * 1299 * @param object $group Optional. Group object. Default: current 1300 * group in loop. 1318 * @param object|bool $group Optional. Group object. 1319 * Default: current group in loop. 1320 * 1301 1321 * @return string 1302 1322 */ … … 1320 1340 * Output the username of the creator of the current group in the loop. 1321 1341 * 1322 * @param object $group Optional. Group object. Default: current1323 * group in loop.1342 * @param object|bool $group Optional. Group object. 1343 * Default: current group in loop. 1324 1344 */ 1325 1345 function bp_group_creator_username( $group = false ) { … … 1329 1349 * Return the username of the creator of the current group in the loop. 1330 1350 * 1331 * @param object $group Optional. Group object. Default: current 1332 * group in loop. 1351 * @param object|bool $group Optional. Group object. 1352 * Default: current group in loop. 1353 * 1333 1354 * @return string 1334 1355 */ … … 1352 1373 * Output the user ID of the creator of the current group in the loop. 1353 1374 * 1354 * @param object $group Optional. Group object. Default: current1355 * group in loop.1375 * @param object|bool $group Optional. Group object. 1376 * Default: current group in loop. 1356 1377 */ 1357 1378 function bp_group_creator_id( $group = false ) { … … 1361 1382 * Return the user ID of the creator of the current group in the loop. 1362 1383 * 1363 * @param object $group Optional. Group object. Default: current 1364 * group in loop. 1384 * @param object|bool $group Optional. Group object. 1385 * Default: current group in loop. 1386 * 1365 1387 * @return int 1366 1388 */ … … 1384 1406 * Output the permalink of the creator of the current group in the loop. 1385 1407 * 1386 * @param object $group Optional. Group object. Default: current1387 * group in loop.1408 * @param object|bool $group Optional. Group object. 1409 * Default: current group in loop. 1388 1410 */ 1389 1411 function bp_group_creator_permalink( $group = false ) { … … 1393 1415 * Return the permalink of the creator of the current group in the loop. 1394 1416 * 1395 * @param object $group Optional. Group object. Default: current 1396 * group in loop. 1417 * @param object|bool $group Optional. Group object. 1418 * Default: current group in loop. 1419 * 1397 1420 * @return string 1398 1421 */ … … 1416 1439 * Determine whether a user is the creator of the current group in the loop. 1417 1440 * 1418 * @param object $group Optional. Group object. Default: current 1419 * group in loop. 1420 * @param int $user_id ID of the user. 1441 * @param object|bool $group Optional. Group object. 1442 * Default: current group in loop. 1443 * @param int $user_id ID of the user. 1444 * 1421 1445 * @return bool 1422 1446 */ … … 1436 1460 * Output the avatar of the creator of the current group in the loop. 1437 1461 * 1438 * @param object $group Optional. Group object. Default: current1439 * group in loop.1440 * @param array $args {1462 * @param object|bool $group Optional. Group object. 1463 * Default: current group in loop. 1464 * @param array $args { 1441 1465 * Array of optional arguments. See {@link bp_get_group_creator_avatar()} 1442 1466 * for description. … … 1449 1473 * Return the avatar of the creator of the current group in the loop. 1450 1474 * 1451 * @param object $group Optional. Group object. Default: current1452 * group in loop.1453 * @param array $args {1475 * @param object|bool $group Optional. Group object. 1476 * Default: current group in loop. 1477 * @param array $args { 1454 1478 * Array of optional arguments. See {@link bp_core_fetch_avatar()} 1455 1479 * for detailed description of arguments. 1456 * @type string $type Default: 'full'.1457 * @type int $widthDefault: false.1458 * @type int $height Default: false.1459 * @type int $classDefault: 'avatar'.1460 * @type string $id Passed to 'css_id'. Default: false.1461 * @type string $alt Alt text. Default: 'Group creator profile1462 * photo of [user display name]'.1480 * @type string $type Default: 'full'. 1481 * @type int $width Default: false. 1482 * @type int $height Default: false. 1483 * @type int $class Default: 'avatar'. 1484 * @type string $id Passed to 'css_id'. Default: false. 1485 * @type string $alt Alt text. Default: 'Group creator profile 1486 * photo of [user display name]'. 1463 1487 * } 1464 1488 * @return string … … 1519 1543 * Output markup listing group admins. 1520 1544 * 1521 * @param object $group Optional. Group object. Default: current1522 * group in loop.1545 * @param object|bool $group Optional. Group object. 1546 * Default: current group in loop. 1523 1547 */ 1524 1548 function bp_group_list_admins( $group = false ) { … … 1559 1583 * Output markup listing group mod. 1560 1584 * 1561 * @param object $group Optional. Group object. Default: current1562 * group in loop.1585 * @param object|bool $group Optional. Group object. 1586 * Default: current group in loop. 1563 1587 */ 1564 1588 function bp_group_list_mods( $group = false ) { … … 1609 1633 * @since BuddyPress (1.5.0) 1610 1634 * 1611 * @param BP_Groups_Group $groupOptional. The group being queried. Defaults1612 * to the current group in the loop.1613 * @param string $formatOptional. 'string' to get a comma-separated string,1614 * 'array' to get an array.1615 * @return mixed $admin_ids A string or array of user IDs.1635 * @param BP_Groups_Group|bool $group Optional. The group being queried. Defaults 1636 * to the current group in the loop. 1637 * @param string $format Optional. 'string' to get a comma-separated string, 1638 * 'array' to get an array. 1639 * @return mixed $admin_ids A string or array of user IDs. 1616 1640 */ 1617 1641 function bp_group_admin_ids( $group = false, $format = 'string' ) { … … 1649 1673 * @since BuddyPress (1.5.0) 1650 1674 * 1651 * @param BP_Groups_Group $group Optional. The group being queried. Defaults1652 * to the current group in the loop.1653 * @param string $formatOptional. 'string' to get a comma-separated string,1654 * 'array' to get an array.1655 * @return mixed $mod_ids A string or array of user IDs.1675 * @param BP_Groups_Group|bool $group Optional. The group being queried. 1676 * Defaults to the current group in the loop. 1677 * @param string $format Optional. 'string' to get a comma-separated string, 1678 * 'array' to get an array. 1679 * @return mixed $mod_ids A string or array of user IDs. 1656 1680 */ 1657 1681 function bp_group_mod_ids( $group = false, $format = 'string' ) { … … 1693 1717 * Return the permalink of the Members page of the current group in the loop. 1694 1718 * 1695 * @param object $group Optional. Group object. Default: current 1696 * group in loop. 1719 * @param object|bool $group Optional. Group object. 1720 * Default: current group in loop. 1721 * 1697 1722 * @return string 1698 1723 */ … … 1854 1879 * Output the total member count for a group. 1855 1880 * 1856 * @param object $group Optional. Group object. Default: current group in loop.1881 * @param object|bool $group Optional. Group object. Default: current group in loop. 1857 1882 */ 1858 1883 function bp_group_total_members( $group = false ) { … … 1862 1887 * Get the total member count for a group. 1863 1888 * 1864 * @param object $group Optional. Group object. Default: current group in loop. 1889 * @param object|bool $group Optional. Group object. 1890 * Default: current group in loop. 1891 * 1865 1892 * @return int 1866 1893 */ … … 1883 1910 /** 1884 1911 * Output the "x members" count string for a group. 1885 *1886 * @param object $group Optional. Group object. Default: current group in loop.1887 1912 */ 1888 1913 function bp_group_member_count() { … … 1892 1917 * Generate the "x members" count string for a group. 1893 1918 * 1894 * @param object $group Optional. Group object. Default: current group in loop.1895 1919 * @return string 1896 1920 */ … … 1925 1949 * Generate the URL of the Forum page of a group. 1926 1950 * 1927 * @param object $group Optional. Group object. Default: current group in loop. 1951 * @param object|bool $group Optional. Group object. 1952 * Default: current group in loop. 1953 * 1928 1954 * @return string 1929 1955 */ … … 1947 1973 * Output the topic count for a group forum. 1948 1974 * 1949 * @param array $args See {@link bp_get_group_forum_topic_count()}.1975 * @param array|string $args See {@link bp_get_group_forum_topic_count()}. 1950 1976 */ 1951 1977 function bp_group_forum_topic_count( $args = '' ) { … … 1955 1981 * Generate the topic count string for a group forum. 1956 1982 * 1957 * @param array $args {1983 * @param array|string $args { 1958 1984 * Array of arguments. 1959 * @type bool $showtext Optional. If true, result will be formatted 1960 * as "x topics".If false, just a number will be returned.1961 * Default: false.1985 * @type bool $showtext Optional. If true, result will be formatted as "x topics". 1986 * If false, just a number will be returned. 1987 * Default: false. 1962 1988 * } 1963 1989 * @return string|int … … 2005 2031 * Output the post count for a group forum. 2006 2032 * 2007 * @param array $args See {@link bp_get_group_forum_post_count()}.2033 * @param array|string $args See {@link bp_get_group_forum_post_count()}. 2008 2034 */ 2009 2035 function bp_group_forum_post_count( $args = '' ) { … … 2013 2039 * Generate the post count string for a group forum. 2014 2040 * 2015 * @param array $args {2041 * @param array|string $args { 2016 2042 * Array of arguments. 2017 * @type bool $showtext Optional. If true, result will be formatted 2018 * as "x posts".If false, just a number will be returned.2019 * Default: false.2043 * @type bool $showtext Optional. If true, result will be formatted as "x posts". 2044 * If false, just a number will be returned. 2045 * Default: false. 2020 2046 * } 2021 2047 * @return string|int … … 2063 2089 * Determine whether forums are enabled for a group. 2064 2090 * 2065 * @param object $group Optional. Group object. Default: current group in loop. 2091 * @param object|bool $group Optional. Group object. Default: current group in loop. 2092 * 2066 2093 * @return bool 2067 2094 */ … … 2081 2108 * Output the 'checked' attribute for the group forums settings UI. 2082 2109 * 2083 * @param object $group Optional. Group object. Default: current group in loop.2110 * @param object|bool $group Optional. Group object. Default: current group in loop. 2084 2111 */ 2085 2112 function bp_group_show_forum_setting( $group = false ) { … … 2096 2123 * Output the 'checked' attribute for a given status in the settings UI. 2097 2124 * 2098 * @param string $setting Group status. 'public', 'private', 'hidden'.2099 * @param object $groupOptional. Group object. Default: current group in loop.2125 * @param string $setting Group status. 'public', 'private', 'hidden'. 2126 * @param object|bool $group Optional. Group object. Default: current group in loop. 2100 2127 */ 2101 2128 function bp_group_show_status_setting( $setting, $group = false ) { … … 2114 2141 * @since BuddyPress (1.5.0) 2115 2142 * 2116 * @param string $setting The setting you want to check against ('members',2117 * 'mods', or 'admins').2118 * @param object $groupOptional. Group object. Default: current group in loop.2143 * @param string $setting The setting you want to check against ('members', 2144 * 'mods', or 'admins'). 2145 * @param object|bool $group Optional. Group object. Default: current group in loop. 2119 2146 */ 2120 2147 function bp_group_show_invite_status_setting( $setting, $group = false ) { … … 2140 2167 * @since BuddyPress (1.5.0) 2141 2168 * 2142 * @param int $group_id Optional. The ID of the group whose status you want to 2143 * check. Default: the displayed group, or the current group in the loop. 2169 * @param int|bool $group_id Optional. The ID of the group whose status you want to 2170 * check. Default: the displayed group, or the current group 2171 * in the loop. 2172 * 2144 2173 * @return bool|string Returns false when no group can be found. Otherwise 2145 * returns the group invite status, from among 'members', 'mods', and2146 * 'admins'.2174 * returns the group invite status, from among 'members', 2175 * 'mods', and 'admins'. 2147 2176 */ 2148 2177 function bp_group_get_invite_status( $group_id = false ) { … … 2258 2287 * @since BuddyPress (1.0.0) 2259 2288 * @todo Remove in 1.4 2289 * 2290 * @param bool $admin_list 2291 * @param bool $group 2260 2292 */ 2261 2293 function bp_group_admin_memberlist( $admin_list = false, $group = false ) { … … 2333 2365 * 2334 2366 * @todo Deprecate. 2367 * 2368 * @param bool $admin_list 2369 * @param bool $group 2335 2370 */ 2336 2371 function bp_group_mod_memberlist( $admin_list = false, $group = false ) { … … 2399 2434 * Determine whether a group has moderators. 2400 2435 * 2401 * @param object $group Optional. Group object. Default: current group in loop. 2436 * @param object|bool $group Optional. Group object. Default: current group in loop. 2437 * 2402 2438 * @return array Info about group admins (user_id + date_modified). 2403 2439 */ … … 2421 2457 * Output a URL for promoting a user to moderator. 2422 2458 * 2423 * @param array $args See {@link bp_get_group_member_promote_mod_link()}.2459 * @param array|string $args See {@link bp_get_group_member_promote_mod_link()}. 2424 2460 */ 2425 2461 function bp_group_member_promote_mod_link( $args = '' ) { … … 2429 2465 * Generate a URL for promoting a user to moderator. 2430 2466 * 2431 * @param array $args {2432 * @type int $user_id ID of the member to promote. Default:2433 * current member in a group member loop.2434 * @type object $group Group object. Default: current group.2467 * @param array|string $args { 2468 * @type int $user_id ID of the member to promote. Default: 2469 * current member in a group member loop. 2470 * @type object $group Group object. Default: current group. 2435 2471 * } 2436 2472 * @return string … … 2460 2496 * Output a URL for promoting a user to admin. 2461 2497 * 2462 * @param array $args See {@link bp_get_group_member_promote_admin_link()}.2498 * @param array|string $args See {@link bp_get_group_member_promote_admin_link()}. 2463 2499 */ 2464 2500 function bp_group_member_promote_admin_link( $args = '' ) { … … 2468 2504 * Generate a URL for promoting a user to admin. 2469 2505 * 2470 * @param array $args {2471 * @type int $user_id ID of the member to promote. Default:2472 * current member in a group member loop.2473 * @type object $group Group object. Default: current group.2506 * @param array|string $args { 2507 * @type int $user_id ID of the member to promote. Default: 2508 * current member in a group member loop. 2509 * @type object $group Group object. Default: current group. 2474 2510 * } 2475 2511 * @return string … … 2500 2536 * 2501 2537 * @param int $user_id ID of the member to demote. Default: current member in 2502 * a member loop.2538 * a member loop. 2503 2539 */ 2504 2540 function bp_group_member_demote_link( $user_id = 0 ) { … … 2513 2549 * Generate a URL for demoting a user to member. 2514 2550 * 2515 * @param int $user_id ID of the member to demote. Default: current 2516 * member in a member loop. 2517 * @param object $group Optional. Group object. Default: current group. 2551 * @param int $user_id ID of the member to demote. Default: current 2552 * member in a member loop. 2553 * @param object|bool $group Optional. Group object. Default: current group. 2554 * 2518 2555 * @return string 2519 2556 */ … … 2540 2577 * Output a URL for banning a member from a group. 2541 2578 * 2542 * @param int $user_id ID of the member to ban. Default: current member in2543 * a member loop.2579 * @param int $user_id ID of the member to ban. 2580 * Default: current member in a member loop. 2544 2581 */ 2545 2582 function bp_group_member_ban_link( $user_id = 0 ) { … … 2554 2591 * Generate a URL for banning a member from a group. 2555 2592 * 2556 * @param int $user_id ID of the member to ban. Default: current 2557 * member in a member loop. 2558 * @param object $group Optional. Group object. Default: current group. 2593 * @param int $user_id ID of the member to ban. 2594 * Default: current member in a member loop. 2595 * @param object|bool $group Optional. Group object. Default: current group. 2596 * 2559 2597 * @return string 2560 2598 */ … … 2578 2616 * Output a URL for unbanning a member from a group. 2579 2617 * 2580 * @param int $user_id ID of the member to unban. Default: current member in2581 * a member loop.2618 * @param int $user_id ID of the member to unban. 2619 * Default: current member in a member loop. 2582 2620 */ 2583 2621 function bp_group_member_unban_link( $user_id = 0 ) { … … 2592 2630 * Generate a URL for unbanning a member from a group. 2593 2631 * 2594 * @param int $user_id ID of the member to unban. Default: current 2595 * member in a member loop. 2596 * @param object $group Optional. Group object. Default: current group. 2632 * @param int $user_id ID of the member to unban. 2633 * Default: current member in a member loop. 2634 * @param object|bool $group Optional. Group object. Default: current group. 2635 * 2597 2636 * @return string 2598 2637 */ … … 2619 2658 * Output a URL for removing a member from a group. 2620 2659 * 2621 * @param int $user_id ID of the member to remove. Default: current member in2622 * a member loop.2660 * @param int $user_id ID of the member to remove. 2661 * Default: current member in a member loop. 2623 2662 */ 2624 2663 function bp_group_member_remove_link( $user_id = 0 ) { … … 2633 2672 * Generate a URL for removing a member from a group. 2634 2673 * 2635 * @param int $user_id ID of the member to remove. Default: current 2636 * member in a member loop. 2637 * @param object $group Optional. Group object. Default: current group. 2674 * @param int $user_id ID of the member to remove. 2675 * Default: current member in a member loop. 2676 * @param object|bool $group Optional. Group object. Default: current group. 2677 * 2638 2678 * @return string 2639 2679 */ … … 2657 2697 * HTML admin subnav items for group pages. 2658 2698 * 2659 * @param object $group Optional. Group object. Default: current group in2660 * the loop.2699 * @param object|bool $group Optional. Group object. 2700 * Default: current group in the loop. 2661 2701 */ 2662 2702 function bp_group_admin_tabs( $group = false ) { … … 2682 2722 /** 2683 2723 * BackCompat for plugins/themes directly hooking groups_admin_tabs 2684 * without using the Groups Extension API 2685 * 2686 * @param string $subnav_output subnav item output 2687 * @param string $subnav_item subnav item params 2688 * @param string $selected_item current selected tab 2724 * without using the Groups Extension API. 2725 * 2726 * @param string $subnav_output Subnav item output. 2727 * @param string $subnav_item subnav item params. 2728 * @param string $selected_item Surrent selected tab. 2729 * 2689 2730 * @return string HTML output 2690 2731 */ … … 2745 2786 * Generate the 'action' attribute for a group form. 2746 2787 * 2747 * @param string $page Page slug. 2748 * @param object $group Optional. Group object. Default: current group 2749 * in the loop. 2788 * @param string $page Page slug. 2789 * @param object|bool $group Optional. Group object. 2790 * Default: current group in the loop. 2791 * 2750 2792 * @return string 2751 2793 */ … … 2769 2811 * Output the 'action' attribute for a group admin form. 2770 2812 * 2771 * @param string $page Optional. Page slug.2813 * @param string|bool $page Optional. Page slug. 2772 2814 */ 2773 2815 function bp_group_admin_form_action( $page = false ) { … … 2777 2819 * Generate the 'action' attribute for a group admin form. 2778 2820 * 2779 * @param string $page Optional. Page slug. 2780 * @param object $group Optional. Group object. Default: current group 2781 * in the loop. 2821 * @param string|bool $page Optional. Page slug. 2822 * @param object|bool $group Optional. Group object. 2823 * Default: current group in the loop. 2824 * 2782 2825 * @return string 2783 2826 */ … … 2804 2847 * Determine whether the logged-in user has requested membership to a group. 2805 2848 * 2806 * @param object $group Optional. Group object. Default: current group in 2807 * the loop. 2849 * @param object|bool $group Optional. Group object. 2850 * Default: current group in the loop. 2851 * 2808 2852 * @return bool 2809 2853 */ … … 2825 2869 * @global object $groups_template 2826 2870 * 2827 * @param object $group Optional. Group to check is_member. Default: current 2828 * group in the loop. 2871 * @param object|bool $group Optional. Group to check is_member. 2872 * Default: current group in the loop. 2873 * 2829 2874 * @return bool If user is member of group or not. 2830 2875 */ … … 2852 2897 * Check whether the current user has an outstanding invite to the current group in the loop. 2853 2898 * 2854 * @param object $group Optional. Group data object. Default: the current 2855 * group in the groups loop. 2899 * @param object|bool $group Optional. Group data object. 2900 * Default: the current group in the groups loop. 2901 * 2856 2902 * @return bool True if the user has an outstanding invite, otherwise false. 2857 2903 */ … … 2888 2934 * @since BuddyPress (1.5.0) 2889 2935 * 2890 * @global BP_Groups_Template $groups_template Group template loop object 2891 * @param BP_Groups_Group $group Group to check if user is banned 2892 * @param int $user_id The user ID to check 2936 * @global BP_Groups_Template $groups_template Group template loop object. 2937 * 2938 * @param BP_Groups_Group|bool $group Group to check if user is banned. 2939 * @param int $user_id The user ID to check. 2940 * 2893 2941 * @return bool True if user is banned. False if user isn't banned. 2894 2942 */ … … 2943 2991 * Generate the URL for accepting an invitation to a group. 2944 2992 * 2945 * @param object $group Optional. Group object. Default: Current group 2946 * in the loop. 2993 * @param object|bool $group Optional. Group object. 2994 * Default: Current group in the loop. 2995 * 2947 2996 * @return string 2948 2997 */ … … 2974 3023 * Generate the URL for rejecting an invitation to a group. 2975 3024 * 2976 * @param object $group Optional. Group object. Default: Current group 2977 * in the loop. 3025 * @param object|bool $group Optional. Group object. 3026 * Default: Current group in the loop. 3027 * 2978 3028 * @return string 2979 3029 */ … … 3005 3055 * Generate the URL for confirming a request to leave a group. 3006 3056 * 3007 * @param object $group Optional. Group object. Default: Current group 3008 * in the loop. 3057 * @param object|bool $group Optional. Group object. 3058 * Default: Current group in the loop. 3059 * 3009 3060 * @return string 3010 3061 */ … … 3034 3085 * Generate the URL for rejecting a request to leave a group. 3035 3086 * 3036 * @param object $group Optional. Group object. Default: Current group 3037 * in the loop. 3087 * @param object|bool $group Optional. Group object. 3088 * Default: Current group in the loop. 3089 * 3038 3090 * @return string 3039 3091 */ … … 3063 3115 * Output the 'action' attribute for a group send invite form. 3064 3116 * 3065 * @param object $page Optional. Group object. Default: current group 3066 * in the loop. 3117 * @param object|bool $group Optional. Group object. 3118 * Default: current group in the loop. 3119 * 3067 3120 * @return string 3068 3121 */ … … 3086 3139 * Determine whether the current user has friends to invite to a group. 3087 3140 * 3088 * @param object $group Optional. Group object. Default: current group in 3089 * the loop. 3141 * @param object|bool $group Optional. Group object. 3142 * Default: current group in the loop. 3143 * 3090 3144 * @return bool 3091 3145 */ … … 3111 3165 * 3112 3166 * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, 3113 * boolean false if not passed.3167 * boolean false if not passed. 3114 3168 */ 3115 3169 function bp_group_new_topic_button( $group = false ) { 3116 3170 echo bp_get_group_new_topic_button( $group ); 3117 3171 } 3172 3118 3173 /** 3119 3174 * Returns a 'New Topic' button for a group. … … 3122 3177 * 3123 3178 * @param BP_Groups_Group|bool $group The BP Groups_Group object if 3124 * passed, boolean false if not passed. 3179 * passed, boolean false if not passed. 3180 * 3125 3181 * @return string HTML code for the button. 3126 3182 */ … … 3158 3214 3159 3215 /** 3160 * Output button to join a group 3216 * Output button to join a group. 3161 3217 * 3162 3218 * @since BuddyPress (1.0.0) 3163 3219 * 3164 * @param object $group Single group object3220 * @param object|bool $group Single group object. 3165 3221 */ 3166 3222 function bp_group_join_button( $group = false ) { … … 3168 3224 } 3169 3225 /** 3170 * Return button to join a group 3226 * Return button to join a group. 3171 3227 * 3172 3228 * @since BuddyPress (1.0.0) 3173 3229 * 3174 * @param object $group Single group object 3230 * @param object|bool $group Single group object. 3231 * 3232 * @return mixed 3175 3233 */ 3176 3234 function bp_get_group_join_button( $group = false ) { … … 3391 3449 * @since BuddyPress (2.2.0) 3392 3450 * 3393 * @uses bp_group_create_nav_item() to output the create a Group nav item 3451 * @uses bp_group_create_nav_item() to output the create a Group nav item. 3394 3452 * @return string HTML Output 3395 3453 */ … … 3415 3473 * @since BuddyPress (1.0.0) 3416 3474 * 3417 * @global BP_Groups_Template $groups_template Groups template object 3475 * @global BP_Groups_Template $groups_template Groups template object. 3418 3476 * @param object $group Group to get status message for. Optional; defaults to current group. 3419 3477 */ … … 3495 3553 3496 3554 /** 3497 * Output the total number of groups 3555 * Output the total number of groups. 3498 3556 * 3499 3557 * @since BuddyPress (1.0.0) … … 3503 3561 } 3504 3562 /** 3505 * Return the total number of groups 3563 * Return the total number of groups. 3506 3564 * 3507 3565 * @since BuddyPress (1.0.0) … … 3521 3579 3522 3580 /** 3523 * Output the total number of groups a user belongs to 3581 * Output the total number of groups a user belongs to. 3524 3582 * 3525 3583 * @since BuddyPress (1.0.0) 3526 3584 * 3527 * @param int $user_id User ID to get group membership count 3585 * @param int $user_id User ID to get group membership count. 3528 3586 */ 3529 3587 function bp_total_group_count_for_user( $user_id = 0 ) { … … 3531 3589 } 3532 3590 /** 3533 * Return the total number of groups a user belongs to 3591 * Return the total number of groups a user belongs to. 3534 3592 * 3535 3593 * Filtered by `bp_core_number_format()` by default … … 3537 3595 * @since BuddyPress (1.0.0) 3538 3596 * 3539 * @param int $user_id User ID to get group membership count 3597 * @param int $user_id User ID to get group membership count. 3598 * 3599 * @return int 3540 3600 */ 3541 3601 function bp_get_total_group_count_for_user( $user_id = 0 ) { … … 3573 3633 * @param array $args { 3574 3634 * An array of optional arguments. 3575 * @type int $group_idID of the group whose members are being3576 * queried. Default: current group ID.3577 * @type int $pagePage of results to be queried. Default: 1.3578 * @type int $per_pageNumber of items to return per page of3579 * results. Default: 20.3580 * @type int $maxOptional. Max number of items to return.3581 * @type array $excludeOptional. Array of user IDs to exclude.3582 * @type bool|int True (or 1) to exclude admins and mods from3583 * results. Default: 1.3584 * @type bool|int True (or 1) to exclude banned users from results.3585 * Default: 1.3586 * @type array $group_roleOptional. Array of group roles to include.3587 * @type string $search_termsOptional. Search terms to match.3635 * @type int $group_id ID of the group whose members are being 3636 * queried. Default: current group ID. 3637 * @type int $page Page of results to be queried. Default: 1. 3638 * @type int $per_page Number of items to return per page of 3639 * results. Default: 20. 3640 * @type int $max Optional. Max number of items to return. 3641 * @type array $exclude Optional. Array of user IDs to exclude. 3642 * @type bool|int $exclude_admin_mods True (or 1) to exclude admins and mods from 3643 * results. Default: 1. 3644 * @type bool|int $exclude_banned True (or 1) to exclude banned users from results. 3645 * Default: 1. 3646 * @type array $group_role Optional. Array of group roles to include. 3647 * @type string $search_terms Optional. Search terms to match. 3588 3648 * } 3589 3649 */ … … 3745 3805 * Initialize a group member query loop. 3746 3806 * 3747 * @param array $args {3807 * @param array|string $args { 3748 3808 * An array of optional arguments. 3749 * @type int $group_idID of the group whose members are being queried.3750 * Default: current group ID.3751 * @type int $pagePage of results to be queried. Default: 1.3752 * @type int $per_pageNumber of items to return per page of results.3753 * Default: 20.3754 * @type int $maxOptional. Max number of items to return.3755 * @type array $excludeOptional. Array of user IDs to exclude.3756 * @type bool|int True (or 1) to exclude admins and mods from results.3757 * Default: 1.3758 * @type bool|int True (or 1) to exclude banned users from results.3759 * Default: 1.3760 * @type array $group_roleOptional. Array of group roles to include.3761 * @type string $typeOptional. Sort order of results. 'last_joined',3762 * 'first_joined', or any of the $type params available in3763 * {@link BP_User_Query}. Default: 'last_joined'.3764 * @type string $search_termsOptional. Search terms to match. Pass an3765 * empty string to force-disable search, even in the presence of3766 * $_REQUEST['s']. Default: null.3809 * @type int $group_id ID of the group whose members are being queried. 3810 * Default: current group ID. 3811 * @type int $page Page of results to be queried. Default: 1. 3812 * @type int $per_page Number of items to return per page of results. 3813 * Default: 20. 3814 * @type int $max Optional. Max number of items to return. 3815 * @type array $exclude Optional. Array of user IDs to exclude. 3816 * @type bool|int $exclude_admin_mods True (or 1) to exclude admins and mods from results. 3817 * Default: 1. 3818 * @type bool|int $exclude_banned True (or 1) to exclude banned users from results. 3819 * Default: 1. 3820 * @type array $group_role Optional. Array of group roles to include. 3821 * @type string $type Optional. Sort order of results. 'last_joined', 3822 * 'first_joined', or any of the $type params available in 3823 * {@link BP_User_Query}. Default: 'last_joined'. 3824 * @type string $search_terms Optional. Search terms to match. Pass an 3825 * empty string to force-disable search, even in 3826 * the presence of $_REQUEST['s']. Default: null. 3767 3827 * } 3828 * 3829 * @return bool 3768 3830 */ 3769 3831 function bp_group_has_members( $args = '' ) { … … 3823 3885 * @since BuddyPress (1.0.0) 3824 3886 * 3825 * @param array $args {@see bp_core_fetch_avatar()}3887 * @param array|string $args {@see bp_core_fetch_avatar()} 3826 3888 */ 3827 3889 function bp_group_member_avatar( $args = '' ) { … … 3833 3895 * @since BuddyPress (1.0.0) 3834 3896 * 3835 * @param array $args {@see bp_core_fetch_avatar()} 3897 * @param array|string $args {@see bp_core_fetch_avatar()} 3898 * 3899 * @return string 3836 3900 */ 3837 3901 function bp_get_group_member_avatar( $args = '' ) { … … 3861 3925 * @since BuddyPress (1.0.0) 3862 3926 * 3863 * @param array $args {@see bp_core_fetch_avatar()}3927 * @param array|string $args {@see bp_core_fetch_avatar()} 3864 3928 */ 3865 3929 … … 3872 3936 * @since BuddyPress (1.0.0) 3873 3937 * 3874 * @param array $args {@see bp_core_fetch_avatar()} 3938 * @param array|string $args {@see bp_core_fetch_avatar()} 3939 * 3940 * @return string 3875 3941 */ 3876 3942 function bp_get_group_member_avatar_thumb( $args = '' ) { … … 3900 3966 * @since BuddyPress (1.0.0) 3901 3967 * 3902 * @param array $args {@see bp_core_fetch_avatar()} 3968 * @param int $width Width of avatar to fetch. 3969 * @param int $height Height of avatar to fetch. 3903 3970 */ 3904 3971 function bp_group_member_avatar_mini( $width = 30, $height = 30 ) { … … 3910 3977 * @since BuddyPress (1.0.0) 3911 3978 * 3912 * @param array $args {@see bp_core_fetch_avatar()} 3979 * @param int $width Width of avatar to fetch. 3980 * @param int $height Height of avatar to fetch. 3981 * 3982 * @return string 3913 3983 */ 3914 3984 function bp_get_group_member_avatar_mini( $width = 30, $height = 30 ) { … … 4589 4659 4590 4660 /** 4591 * Echoes the current group creation step 4661 * Echoes the current group creation step. 4592 4662 * 4593 4663 * @since BuddyPress (1.6.0) … … 4597 4667 } 4598 4668 /** 4599 * Returns the current group creation step. If none is found, returns an empty string 4669 * Returns the current group creation step. If none is found, returns an empty string. 4600 4670 * 4601 4671 * @since BuddyPress (1.6.0) 4602 4672 * 4603 * @uses apply_filters() Filter bp_get_groups_current_create_step to modify 4673 * @uses apply_filters() Filter bp_get_groups_current_create_step to modify. 4674 * 4604 4675 * @return string $current_create_step 4605 4676 */ … … 4718 4789 4719 4790 /** 4720 * Displays group header tabs 4791 * Displays group header tabs. 4721 4792 * 4722 4793 * @todo Deprecate? … … 4737 4808 4738 4809 /** 4739 * Displays group filter titles 4810 * Displays group filter titles. 4740 4811 * 4741 4812 * @todo Deprecate? … … 4773 4844 * 4774 4845 * @param string $slug 4846 * 4775 4847 * @return bool 4776 4848 */ … … 4780 4852 4781 4853 /** 4782 * Echoes the current group admin tab slug 4854 * Echoes the current group admin tab slug. 4783 4855 * 4784 4856 * @since BuddyPress (1.6.0) … … 4788 4860 } 4789 4861 /** 4790 * Returns the current group admin tab slug 4862 * Returns the current group admin tab slug. 4791 4863 * 4792 4864 * @since BuddyPress (1.6.0) 4793 4865 * 4794 * @uses apply_filters() Filter bp_get_current_group_admin_tab to modify return value 4795 * @return string $tab The current tab's slug 4866 * @uses apply_filters() Filter bp_get_current_group_admin_tab to modify return value. 4867 * 4868 * @return string $tab The current tab's slug. 4796 4869 */ 4797 4870 function bp_get_group_current_admin_tab() { … … 4815 4888 4816 4889 /** 4817 * Outputs the current group avatar 4890 * Outputs the current group avatar. 4818 4891 * 4819 4892 * @since BuddyPress (1.0.0) 4820 4893 * @param string $type thumb or full ? 4821 * @uses bp_get_group_current_avatar() to get the avatar of the current group 4894 * @uses bp_get_group_current_avatar() to get the avatar of the current group. 4822 4895 */ 4823 4896 function bp_group_current_avatar( $type = 'thumb' ) { … … 4825 4898 } 4826 4899 /** 4827 * Returns the current group avatar 4900 * Returns the current group avatar. 4828 4901 * 4829 4902 * @since BuddyPress (2.0.0) … … 4854 4927 4855 4928 /** 4856 * Return whether a group has an avatar 4929 * Return whether a group has an avatar. 4857 4930 * 4858 4931 * @since BuddyPress (1.1.0) 4859 4932 * 4860 * @param int $group_id 4933 * @param int|bool $group_id 4934 * 4861 4935 * @return boolean 4862 4936 */ … … 4937 5011 * @param array $args { 4938 5012 * @type int $group_id ID of the group whose membership requests 4939 * are being queried. Default: current group id.5013 * are being queried. Default: current group id. 4940 5014 * @type int $per_page Number of records to return per page of 4941 * results. Default: 10.4942 * @type int $page Page of results to show. Default: 1.4943 * @type int $max Max items to return. Default: false (show all)5015 * results. Default: 10. 5016 * @type int $page Page of results to show. Default: 1. 5017 * @type int $max Max items to return. Default: false (show all) 4944 5018 * } 4945 5019 */ … … 5086 5160 * Initialize a group membership request template loop. 5087 5161 * 5088 * @param array $args {5162 * @param array|string $args { 5089 5163 * @type int $group_id ID of the group. Defaults to current group. 5090 5164 * @type int $per_page Number of records to return per page. Default: 10. 5091 * @type int $page Page of results to return. Default: 1.5092 * @type int $max Max number of items to return. Default: false.5165 * @type int $page Page of results to return. Default: 1. 5166 * @type int $max Max number of items to return. Default: false. 5093 5167 * } 5094 5168 * @return bool True if there are requests, otherwise false. … … 5661 5735 5662 5736 /** 5663 * Hook group activity feed to <head> 5737 * Hook group activity feed to <head>. 5664 5738 * 5665 5739 * @since BuddyPress (1.5.0) … … 5679 5753 5680 5754 /** 5681 * Output the current group activity-stream RSS URL 5755 * Output the current group activity-stream RSS URL. 5682 5756 * 5683 5757 * @since BuddyPress (1.5.0) … … 5687 5761 } 5688 5762 /** 5689 * Return the current group activity-stream RSS URL 5763 * Return the current group activity-stream RSS URL. 5690 5764 * 5691 5765 * @since BuddyPress (1.5.0) … … 5710 5784 5711 5785 /** 5712 * Echoes the output of bp_get_current_group_id() 5786 * Echoes the output of bp_get_current_group_id(). 5713 5787 * 5714 5788 * @since BuddyPress (1.5.0) … … 5718 5792 } 5719 5793 /** 5720 * Returns the ID of the current group 5794 * Returns the ID of the current group. 5721 5795 * 5722 5796 * @since BuddyPress (1.5.0) 5723 * @uses apply_filters() Filter bp_get_current_group_id to modify this output 5724 * 5725 * @return int $current_group_id The id of the current group, if there is one 5797 * @uses apply_filters() Filter bp_get_current_group_id to modify this output. 5798 * 5799 * @return int $current_group_id The id of the current group, if there is one. 5726 5800 */ 5727 5801 function bp_get_current_group_id() { … … 5741 5815 5742 5816 /** 5743 * Echoes the output of bp_get_current_group_slug() 5817 * Echoes the output of bp_get_current_group_slug(). 5744 5818 * 5745 5819 * @since BuddyPress (1.5.0) … … 5749 5823 } 5750 5824 /** 5751 * Returns the slug of the current group 5825 * Returns the slug of the current group. 5752 5826 * 5753 5827 * @since BuddyPress (1.5.0) 5754 * @uses apply_filters() Filter bp_get_current_group_slug to modify this output 5755 * 5756 * @return string $current_group_slug The slug of the current group, if there is one 5828 * @uses apply_filters() Filter bp_get_current_group_slug to modify this output. 5829 * 5830 * @return string $current_group_slug The slug of the current group, if there is one. 5757 5831 */ 5758 5832 function bp_get_current_group_slug() { … … 5772 5846 5773 5847 /** 5774 * Echoes the output of bp_get_current_group_name() 5848 * Echoes the output of bp_get_current_group_name(). 5775 5849 * 5776 5850 * @since BuddyPress (1.5.0) … … 5780 5854 } 5781 5855 /** 5782 * Returns the name of the current group 5856 * Returns the name of the current group. 5783 5857 * 5784 5858 * @since BuddyPress (1.5.0) 5785 * @uses apply_filters() Filter bp_get_current_group_name to modify this output 5786 * 5787 * @return string The name of the current group, if there is one 5859 * @uses apply_filters() Filter bp_get_current_group_name to modify this output. 5860 * 5861 * @return string The name of the current group, if there is one. 5788 5862 */ 5789 5863 function bp_get_current_group_name() { … … 5806 5880 5807 5881 /** 5808 * Echoes the output of bp_get_current_group_description() 5882 * Echoes the output of bp_get_current_group_description(). 5809 5883 * 5810 5884 * @since BuddyPress (2.1.0) … … 5814 5888 } 5815 5889 /** 5816 * Returns the description of the current group 5890 * Returns the description of the current group. 5817 5891 * 5818 5892 * @since BuddyPress (2.1.0) 5819 5893 * @uses apply_filters() Filter bp_get_current_group_description to modify 5820 * this output 5821 * 5822 * @return string The description of the current group, if there is one 5894 * this output. 5895 * 5896 * @return string The description of the current group, if there is one. 5823 5897 */ 5824 5898 function bp_get_current_group_description() { … … 5848 5922 5849 5923 /** 5850 * Output a URL for a group component action 5924 * Output a URL for a group component action. 5851 5925 * 5852 5926 * @since BuddyPress (1.2.0) … … 5855 5929 * @param string $query_args 5856 5930 * @param bool $nonce 5931 * 5857 5932 * @return string 5858 5933 */ … … 5861 5936 } 5862 5937 /** 5863 * Get a URL for a group component action 5938 * Get a URL for a group component action. 5864 5939 * 5865 5940 * @since BuddyPress (1.2.0) … … 5868 5943 * @param string $query_args 5869 5944 * @param bool $nonce 5945 * 5870 5946 * @return string 5871 5947 */ … … 5921 5997 * @since BuddyPress (2.0.0) 5922 5998 * 5923 * @param array $args before|after|user_id 5924 * @uses bp_groups_get_profile_stats() to get the stats 5999 * @param array|string $args before|after|user_id 6000 * 6001 * @uses bp_groups_get_profile_stats() to get the stats. 5925 6002 */ 5926 6003 function bp_groups_profile_stats( $args = '' ) { … … 5934 6011 * @since BuddyPress (2.0.0) 5935 6012 * 5936 * @param array $args before|after|user_id6013 * @param array|string $args before|after|user_id 5937 6014 * @return string HTML for stats output. 5938 6015 */ -
trunk/src/bp-groups/classes/class-bp-group-extension.php
r9819 r9906 290 290 */ 291 291 292 // The content of the group tab 292 /* 293 * The content of the group tab 294 * 295 * @param int|null $group_id 296 */ 293 297 public function display( $group_id = null ) {} 294 298 295 // Content displayed in a widget sidebar, if applicable 299 /** 300 * Content displayed in a widget sidebar, if applicable 301 */ 296 302 public function widget_display() {} 297 303 … … 1084 1090 * 1085 1091 * @param string $screen The screen markup, captured in the output 1086 * buffer. 1087 * @param string $screen The same markup, with a submit button added. 1092 * buffer. 1093 * 1094 * @return string $screen The same markup, with a submit button added. 1088 1095 */ 1089 1096 protected function maybe_add_submit_button( $screen = '' ) { … … 1119 1126 * @since BuddyPress (2.1.0) 1120 1127 * 1121 * @param string $location 1128 * @param string $redirect 1129 * 1122 1130 * @return string 1123 1131 */ … … 1674 1682 * 1675 1683 * @param string Name of the Extension class. 1676 * @return bool|null Returns false on failure, otherwise null.1684 * @return false|null Returns false on failure, otherwise null. 1677 1685 */ 1678 1686 function bp_register_group_extension( $group_extension_class = '' ) { -
trunk/src/bp-groups/classes/class-bp-group-member-query.php
r9819 r9906 1 1 <?php 2 2 /** 3 * BuddyPress Groups Classes 3 * BuddyPress Groups Classes. 4 4 * 5 5 * @package BuddyPress … … 14 14 * 15 15 * Special notes about the group members data schema: 16 * - *Members* are entries with is_confirmed = 1 17 * - *Pending requests* are entries with is_confirmed = 0 and inviter_id = 0 16 * - *Members* are entries with is_confirmed = 1. 17 * - *Pending requests* are entries with is_confirmed = 0 and inviter_id = 0. 18 18 * - *Pending and sent invitations* are entries with is_confirmed = 0 and 19 * inviter_id != 0 and invite_sent = 1 19 * inviter_id != 0 and invite_sent = 1. 20 20 * - *Pending and unsent invitations* are entries with is_confirmed = 0 and 21 * inviter_id != 0 and invite_sent = 0 21 * inviter_id != 0 and invite_sent = 0. 22 22 * - *Membership requests* are entries with is_confirmed = 0 and 23 * inviter_id = 0 (and invite_sent = 0) 23 * inviter_id = 0 (and invite_sent = 0). 24 24 * 25 25 * @since BuddyPress (1.8.0) 26 26 * 27 * @param array $args {27 * @param array $args { 28 28 * Array of arguments. Accepts all arguments from 29 29 * {@link BP_User_Query}, with the following additions: 30 * @type int $group_id ID of the group to limit results to. 31 * @type array $group_role Array of group roles to match ('member', 32 * 'mod', 'admin', 'banned'). Default: array( 'member' ). 33 * @type bool $is_confirmed Whether to limit to confirmed members. 34 * Default: true. 35 * @type string $type Sort order. Accepts any value supported by 36 * {@link BP_User_Query}, in addition to 'last_joined' and 37 * 'first_joined'. Default: 'last_joined'. 30 * 31 * @type int $group_id ID of the group to limit results to. 32 * @type array $group_role Array of group roles to match ('member', 33 * 'mod', 'admin', 'banned'). 34 * Default: array( 'member' ). 35 * @type bool $is_confirmed Whether to limit to confirmed members. 36 * Default: true. 37 * @type string $type Sort order. Accepts any value supported by 38 * {@link BP_User_Query}, in addition to 'last_joined' 39 * and 'first_joined'. Default: 'last_joined'. 38 40 * } 39 41 */ … … 78 80 * 79 81 * @param array $include Existing group IDs in the $include parameter, 80 * as calculated in BP_User_Query.82 * as calculated in BP_User_Query. 81 83 * @return array 82 84 */ … … 298 300 * @since BuddyPress (1.8.0) 299 301 * 300 * @param BP_User_Query $query BP_User_Query object. Because we're301 * filtering the current object, we use $this inside of the302 * method instead.303 * @param string $user_ids_sql Sanitized, comma-separated string of304 * the user ids returned by the main query.302 * @param BP_User_Query $query BP_User_Query object. Because we're 303 * filtering the current object, we use 304 * $this inside of the method instead. 305 * @param string $user_ids_sql Sanitized, comma-separated string of 306 * the user ids returned by the main query. 305 307 */ 306 308 public function populate_group_member_extras( $query, $user_ids_sql ) { … … 336 338 * @since BuddyPress (2.1.0) 337 339 * 338 * @param BP_User_Query $query BP_User_Query object. 339 * @param array $gm_ids array of group member ids. 340 * @param BP_User_Query $query BP_User_Query object. 341 * @param array $gm_ids array of group member ids. 342 * 340 343 * @return array 341 344 */ -
trunk/src/bp-groups/classes/class-bp-groups-group.php
r9819 r9906 156 156 * Constructor method. 157 157 * 158 * @param int $id Optional. If the ID of an existing group is provided,159 * the object will be pre-populated with info about that group.160 * @param array $args {158 * @param int|null $id Optional. If the ID of an existing group is provided, 159 * the object will be pre-populated with info about that group. 160 * @param array $args { 161 161 * Array of optional arguments. 162 162 * @type bool $populate_extras Whether to fetch "extra" data about … … 284 284 * @since BuddyPress (1.0.0) 285 285 * 286 * @param BP_Groups_Group Current instance of the group item being saved. Passed by reference.286 * @param BP_Groups_Group $this Current instance of the group item being saved. Passed by reference. 287 287 */ 288 288 do_action_ref_array( 'groups_group_before_save', array( &$this ) ); … … 364 364 * @since BuddyPress (1.0.0) 365 365 * 366 * @param BP_Groups_Group Current instance of the group item that was saved. Passed by reference.366 * @param BP_Groups_Group $this Current instance of the group item that was saved. Passed by reference. 367 367 */ 368 368 do_action_ref_array( 'groups_group_after_save', array( &$this ) ); … … 420 420 * Get whether a group exists for a given slug. 421 421 * 422 * @param string $slug Slug to check. 423 * @param string $table_name Optional. Name of the table to check 424 * against. Default: $bp->groups->table_name. 422 * @param string $slug Slug to check. 423 * @param string|bool $table_name Optional. Name of the table to check 424 * against. Default: $bp->groups->table_name. 425 * 425 426 * @return string|null ID of the group, if one is found, else null. 426 427 */ … … 473 474 * Default: the displayed user. 474 475 * @param mixed $order Not used. 475 * @param int $limit Optional. The max number of results to return.476 * @param int|null $limit Optional. The max number of results to return. 476 477 * Default: null (no limit). 477 * @param int $page Optional. The page offset of results to return.478 * @param int|null $page Optional. The page offset of results to return. 478 479 * Default: null (no limit). 480 * @return false|array { 481 * @type array $groups Array of matched and paginated group objects. 482 * @type int $total Total count of groups matching the query. 483 * } 484 */ 485 public static function filter_user_groups( $filter, $user_id = 0, $order = false, $limit = null, $page = null ) { 486 global $wpdb; 487 488 if ( empty( $user_id ) ) 489 $user_id = bp_displayed_user_id(); 490 491 $search_terms_like = bp_esc_like( $filter ) . '%'; 492 493 $pag_sql = $order_sql = $hidden_sql = ''; 494 495 if ( !empty( $limit ) && !empty( $page ) ) 496 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 497 498 // Get all the group ids for the current user's groups. 499 $gids = BP_Groups_Member::get_group_ids( $user_id ); 500 501 if ( empty( $gids['groups'] ) ) 502 return false; 503 504 $bp = buddypress(); 505 506 $gids = esc_sql( implode( ',', wp_parse_id_list( $gids['groups'] ) ) ); 507 508 $paged_groups = $wpdb->get_results( $wpdb->prepare( "SELECT id as group_id FROM {$bp->groups->table_name} WHERE ( name LIKE %s OR description LIKE %s ) AND id IN ({$gids}) {$pag_sql}", $search_terms_like, $search_terms_like ) ); 509 $total_groups = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name} WHERE ( name LIKE %s OR description LIKE %s ) AND id IN ({$gids})", $search_terms_like, $search_terms_like ) ); 510 511 return array( 'groups' => $paged_groups, 'total' => $total_groups ); 512 } 513 514 /** 515 * Get a list of groups, filtered by a search string. 516 * 517 * @param string $filter Search term. Matches against 'name' and 518 * 'description' fields. 519 * @param int|null $limit Optional. The max number of results to return. 520 * Default: null (no limit). 521 * @param int|null $page Optional. The page offset of results to return. 522 * Default: null (no limit). 523 * @param string|bool $sort_by Column to sort by. Default: false (default 524 * sort). 525 * @param string|bool $order ASC or DESC. Default: false (default sort). 479 526 * @return array { 480 527 * @type array $groups Array of matched and paginated group objects. … … 482 529 * } 483 530 */ 484 public static function filter_user_groups( $filter, $user_id = 0, $order = false, $limit = null, $page = null ) {485 global $wpdb;486 487 if ( empty( $user_id ) )488 $user_id = bp_displayed_user_id();489 490 $search_terms_like = bp_esc_like( $filter ) . '%';491 492 $pag_sql = $order_sql = $hidden_sql = '';493 494 if ( !empty( $limit ) && !empty( $page ) )495 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );496 497 // Get all the group ids for the current user's groups.498 $gids = BP_Groups_Member::get_group_ids( $user_id );499 500 if ( empty( $gids['groups'] ) )501 return false;502 503 $bp = buddypress();504 505 $gids = esc_sql( implode( ',', wp_parse_id_list( $gids['groups'] ) ) );506 507 $paged_groups = $wpdb->get_results( $wpdb->prepare( "SELECT id as group_id FROM {$bp->groups->table_name} WHERE ( name LIKE %s OR description LIKE %s ) AND id IN ({$gids}) {$pag_sql}", $search_terms_like, $search_terms_like ) );508 $total_groups = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name} WHERE ( name LIKE %s OR description LIKE %s ) AND id IN ({$gids})", $search_terms_like, $search_terms_like ) );509 510 return array( 'groups' => $paged_groups, 'total' => $total_groups );511 }512 513 /**514 * Get a list of groups, filtered by a search string.515 *516 * @param string $filter Search term. Matches against 'name' and517 * 'description' fields.518 * @param int $limit Optional. The max number of results to return.519 * Default: null (no limit).520 * @param int $page Optional. The page offset of results to return.521 * Default: null (no limit).522 * @param string $sort_by Column to sort by. Default: false (default523 * sort).524 * @param string $order ASC or DESC. Default: false (default sort).525 * @return array {526 * @type array $groups Array of matched and paginated group objects.527 * @type int $total Total count of groups matching the query.528 * }529 */530 531 public static function search_groups( $filter, $limit = null, $page = null, $sort_by = false, $order = false ) { 531 532 global $wpdb; … … 621 622 * 622 623 * @param int $group_id ID of the group. 623 * @param int $limit Optional. Max number of results to return.624 * @param int|null $limit Optional. Max number of results to return. 624 625 * Default: null (no limit). 625 * @param int $page Optional. Page offset of results returned. Default:626 * @param int|null $page Optional. Page offset of results returned. Default: 626 627 * null (no limit). 627 628 * @return array { … … 1078 1079 * Get a list of groups, sorted by those that have the most legacy forum topics. 1079 1080 * 1080 * @param int $limit Optional. The max number of results to return.1081 * @param int|null $limit Optional. The max number of results to return. 1081 1082 * Default: null (no limit). 1082 * @param int $page Optional. The page offset of results to return.1083 * @param int|null $page Optional. The page offset of results to return. 1083 1084 * Default: null (no limit). 1084 1085 * @param int $user_id Optional. If present, groups will be limited to 1085 1086 * those of which the specified user is a member. 1086 * @param string $search_terms Optional. Limit groups to those whose1087 * @param string|bool $search_terms Optional. Limit groups to those whose 1087 1088 * name or description field contain the search string. 1088 1089 * @param bool $populate_extras Optional. Whether to fetch extra 1089 1090 * information about the groups. Default: true. 1090 * @param string|array Optional. Array or comma-separated list of group1091 * @param string|array|bool $exclude Optional. Array or comma-separated list of group 1091 1092 * IDs to exclude from results. 1092 1093 * @return array { … … 1147 1148 * Get a list of groups, sorted by those that have the most legacy forum posts. 1148 1149 * 1149 * @param int $limit Optional. The max number of results to return.1150 * @param int|null $limit Optional. The max number of results to return. 1150 1151 * Default: null (no limit). 1151 * @param int $page Optional. The page offset of results to return.1152 * @param int|null $page Optional. The page offset of results to return. 1152 1153 * Default: null (no limit). 1153 * @param int $user_id Optional. If present, groups will be limited to 1154 * those of which the specified user is a member. 1155 * @param string $search_terms Optional. Limit groups to those whose 1154 * @param string|bool $search_terms Optional. Limit groups to those whose 1156 1155 * name or description field contain the search string. 1157 1156 * @param bool $populate_extras Optional. Whether to fetch extra 1158 1157 * information about the groups. Default: true. 1159 * @param string|array Optional. Array or comma-separated list of group1158 * @param string|array|bool Optional. Array or comma-separated list of group 1160 1159 * IDs to exclude from results. 1161 1160 * @return array { … … 1217 1216 * 1218 1217 * @param string $letter The letter. 1219 * @param int $limit Optional. The max number of results to return.1218 * @param int|null $limit Optional. The max number of results to return. 1220 1219 * Default: null (no limit). 1221 * @param int $page Optional. The page offset of results to return.1220 * @param int|null $page Optional. The page offset of results to return. 1222 1221 * Default: null (no limit). 1223 1222 * @param bool $populate_extras Optional. Whether to fetch extra 1224 1223 * information about the groups. Default: true. 1225 * @param string|array Optional. Array or comma-separated list of group1224 * @param string|array|bool $exclude Optional. Array or comma-separated list of group 1226 1225 * IDs to exclude from results. 1227 * @return array {1226 * @return false|array { 1228 1227 * @type array $groups Array of group objects returned by the 1229 1228 * paginated query. … … 1283 1282 * Use BP_Groups_Group::get() with 'type' = 'random' instead. 1284 1283 * 1285 * @param int $limit Optional. The max number of results to return.1284 * @param int|null $limit Optional. The max number of results to return. 1286 1285 * Default: null (no limit). 1287 * @param int $page Optional. The page offset of results to return.1286 * @param int|null $page Optional. The page offset of results to return. 1288 1287 * Default: null (no limit). 1289 1288 * @param int $user_id Optional. If present, groups will be limited to 1290 1289 * those of which the specified user is a member. 1291 * @param string $search_terms Optional. Limit groups to those whose1290 * @param string|bool $search_terms Optional. Limit groups to those whose 1292 1291 * name or description field contain the search string. 1293 1292 * @param bool $populate_extras Optional. Whether to fetch extra 1294 1293 * information about the groups. Default: true. 1295 * @param string|array Optional. Array or comma-separated list of group1294 * @param string|array|bool $exclude Optional. Array or comma-separated list of group 1296 1295 * IDs to exclude from results. 1297 1296 * @return array { … … 1359 1358 * @param string|array Array or comma-separated list of IDs matching 1360 1359 * $paged_groups. 1361 * @param string $type Not used.1360 * @param string|bool $type Not used. 1362 1361 * @return array $paged_groups 1363 1362 */ … … 1469 1468 * Get global count of forum topics in public groups (legacy forums). 1470 1469 * 1471 * @param $type Optional. If 'unreplied', count will be limited to1470 * @param string $type Optional. If 'unreplied', count will be limited to 1472 1471 * those topics that have received no replies. 1473 1472 * @return int Forum topic count. … … 1521 1520 * @param string $status Which group type to count. 'public', 'private', 1522 1521 * 'hidden', or 'all'. Default: 'public'. 1522 * @param string|bool $search_terms Provided search terms. 1523 * 1523 1524 * @return int The topic count 1524 1525 */ -
trunk/src/bp-groups/classes/class-bp-groups-member-suggestions.php
r9819 r9906 1 1 <?php 2 2 /** 3 * BuddyPress Groups Classes 3 * BuddyPress Groups Classes. 4 4 * 5 5 * @package BuddyPress … … 23 23 * @access protected 24 24 * @var array $args { 25 * @type int $group_idPositive integers will restrict the search to members in that group.26 * Negative integers will restrict the search to members in every other group.27 * @type int $limitMaximum number of results to display. Default: 16.28 * @type bool $only_friends If true, only match the current user's friends. Default: false.29 * @type string $term The suggestion service will try to find results that contain this string.30 * Mandatory.25 * @type int $group_id Positive integers will restrict the search to members in that group. 26 * Negative integers will restrict the search to members in every other group. 27 * @type int $limit Maximum number of results to display. Default: 16. 28 * @type bool $only_friends If true, only match the current user's friends. Default: false. 29 * @type string $term The suggestion service will try to find results that contain this string. 30 * Mandatory. 31 31 * } 32 32 */ … … 43 43 * Validate and sanitise the parameters for the suggestion service query. 44 44 * 45 * @since BuddyPress (2.1.0) 46 * 45 47 * @return true|WP_Error If validation fails, return a WP_Error object. On success, return true (bool). 46 * @since BuddyPress (2.1.0)47 48 */ 48 49 public function validate() { … … 88 89 * Find and return a list of username suggestions that match the query. 89 90 * 91 * @since BuddyPress (2.1.0) 92 * 90 93 * @return array|WP_Error Array of results. If there were problems, returns a WP_Error object. 91 * @since BuddyPress (2.1.0)92 94 */ 93 95 public function get_suggestions() { -
trunk/src/bp-groups/classes/class-bp-groups-member.php
r9901 r9906 138 138 * @param int $group_id Optional. Along with $user_id, can be used to 139 139 * look up a membership. 140 * @param int $id Optional. The unique ID of the membership object.140 * @param int|bool $id Optional. The unique ID of the membership object. 141 141 * @param bool $populate Whether to populate the properties of the 142 142 * located membership. Default: true. … … 227 227 * @since BuddyPress (1.0.0) 228 228 * 229 * @param BP_Groups_Member Current instance of the group membership item being saved. Passed by reference.229 * @param BP_Groups_Member $this Current instance of the group membership item being saved. Passed by reference. 230 230 */ 231 231 do_action_ref_array( 'groups_member_before_save', array( &$this ) ); … … 260 260 * @since BuddyPress (1.0.0) 261 261 * 262 * @param BP_Groups_Member Current instance of the group membership item has been saved. Passed by reference.262 * @param BP_Groups_Member $this Current instance of the group membership item has been saved. Passed by reference. 263 263 */ 264 264 do_action_ref_array( 'groups_member_after_save', array( &$this ) ); … … 361 361 * @since BuddyPress (2.3.0) 362 362 * 363 * @param BP_Groups_Member Current group membership object.363 * @param BP_Groups_Member $this Current group membership object. 364 364 */ 365 365 do_action_ref_array( 'groups_member_before_remove', array( $this ) ); … … 382 382 * @since BuddyPress (2.3.0) 383 383 * 384 * @param BP_Groups_Member Current group membership object.384 * @param BP_Groups_Member $this Current group membership object. 385 385 */ 386 386 do_action_ref_array( 'groups_member_after_remove', array( $this ) ); … … 461 461 * 462 462 * @param int $user_id ID of the user. 463 * @param int $limit Optional. Max number of results to return.463 * @param int|bool $limit Optional. Max number of results to return. 464 464 * Default: false (no limit). 465 * @param int $page Optional. Page offset of results to return.465 * @param int|bool $page Optional. Page offset of results to return. 466 466 * Default: false (no limit). 467 467 * @return array { … … 497 497 * 498 498 * @param int $user_id ID of the user. 499 * @param int $limit Optional. Max number of results to return.499 * @param int|bool $limit Optional. Max number of results to return. 500 500 * Default: false (no limit). 501 * @param int $page Optional. Page offset of results to return.501 * @param int|bool $page Optional. Page offset of results to return. 502 502 * Default: false (no limit). 503 * @param string $filter Optional. Limit results to groups whose name or503 * @param string|bool $filter Optional. Limit results to groups whose name or 504 504 * description field matches search terms. 505 505 * @return array { … … 538 538 * 539 539 * @param int $user_id ID of the user. 540 * @param int $limit Optional. Max number of results to return.540 * @param int|bool $limit Optional. Max number of results to return. 541 541 * Default: false (no limit). 542 * @param int $page Optional. Page offset of results to return.542 * @param int|bool $page Optional. Page offset of results to return. 543 543 * Default: false (no limit). 544 * @param string $filter Optional. Limit results to groups whose name or544 * @param string|bool $filter Optional. Limit results to groups whose name or 545 545 * description field matches search terms. 546 546 * @return array { … … 579 579 * 580 580 * @param int $user_id ID of the user. 581 * @param int $limit Optional. Max number of results to return.581 * @param int|bool $limit Optional. Max number of results to return. 582 582 * Default: false (no limit). 583 * @param int $page Optional. Page offset of results to return.583 * @param int|bool $page Optional. Page offset of results to return. 584 584 * Default: false (no limit). 585 * @param string $filter Optional. Limit results to groups whose name or585 * @param string|bool $filter Optional. Limit results to groups whose name or 586 586 * description field matches search terms. 587 587 * @return array { … … 641 641 * 642 642 * @param int $user_id ID of the invitee. 643 * @param int $limit Optional. Max number of results to return.643 * @param int|bool $limit Optional. Max number of results to return. 644 644 * Default: false (no limit). 645 * @param int $page Optional. Page offset of results to return.645 * @param int|bool $page Optional. Page offset of results to return. 646 646 * Default: false (no limit). 647 * @param string|array $exclude Optional. Array or comma-separated list647 * @param string|array|bool $exclude Optional. Array or comma-separated list 648 648 * of group IDs to exclude from results. 649 649 * @return array { … … 773 773 * @param int|null ID of the membership if the user is an admin, 774 774 * otherwise null. 775 * 776 * @return mixed 775 777 */ 776 778 public static function check_is_admin( $user_id, $group_id ) { … … 792 794 * @param int|null ID of the membership if the user is a mod, 793 795 * otherwise null. 796 * 797 * @return mixed 794 798 */ 795 799 public static function check_is_mod( $user_id, $group_id ) { … … 811 815 * @param int|null ID of the membership if the user is a member, 812 816 * otherwise null. 817 * 818 * @return mixed 813 819 */ 814 820 public static function check_is_member( $user_id, $group_id ) { … … 830 836 * @param int|null ID of the membership if the user is banned, 831 837 * otherwise null. 838 * 839 * @return mixed 832 840 */ 833 841 public static function check_is_banned( $user_id, $group_id ) { … … 968 976 * 969 977 * @deprecated BuddyPress (1.8.0) 978 * 979 * @param $group_id 980 * @param $limit 981 * @param $page 982 * @param $exclude_admins_mods 983 * @param $exclude_banned 984 * @param $exclude 985 * 986 * @return mixed 970 987 */ 971 988 public static function get_all_for_group( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false ) { … … 1068 1085 * 1069 1086 * @param int $user_id ID of the user. 1087 * 1088 * @return mixed 1070 1089 */ 1071 1090 public static function delete_all_for_user( $user_id ) {
Note: See TracChangeset
for help on using the changeset viewer.