Changeset 9512
- Timestamp:
- 02/18/2015 05:05:55 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r9471 r9512 24 24 */ 25 25 function bp_get_groups_slug() { 26 27 /** 28 * Filters the groups component slug. 29 * 30 * @since BuddyPress (1.5.0) 31 * 32 * @param string $slug Groups component slug. 33 */ 26 34 return apply_filters( 'bp_get_groups_slug', buddypress()->groups->slug ); 27 35 } … … 36 44 } 37 45 /** 38 * Return the groups component root slug 46 * Return the groups component root slug. 39 47 * 40 48 * @since BuddyPress (1.5.0) … … 43 51 */ 44 52 function bp_get_groups_root_slug() { 53 54 /** 55 * Filters the groups component root slug. 56 * 57 * @since BuddyPress (1.5.0) 58 * 59 * @param string $root_slug Groups component root slug. 60 */ 45 61 return apply_filters( 'bp_get_groups_root_slug', buddypress()->groups->root_slug ); 46 62 } … … 62 78 */ 63 79 function bp_get_groups_directory_permalink() { 80 81 /** 82 * Filters the group directory permalink. 83 * 84 * @since BuddyPress (1.5.0) 85 * 86 * @param string $value Permalink for the group directory. 87 */ 64 88 return apply_filters( 'bp_get_groups_directory_permalink', trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ) ); 65 89 } … … 397 421 return true; 398 422 } elseif ( $this->current_group + 1 == $this->group_count ) { 423 424 /** 425 * Fires right before the rewinding of groups list. 426 * 427 * @since BuddyPress (1.5.0) 428 */ 399 429 do_action('group_loop_end'); 400 430 // Do some cleaning up after the loop … … 419 449 $this->group = $this->next_group(); 420 450 421 if ( 0 == $this->current_group ) // loop has just started 422 do_action('group_loop_start'); 451 if ( 0 == $this->current_group ) { 452 453 /** 454 * Fires if the current group item is the first in the loop. 455 * 456 * @since BuddyPress (1.1.0) 457 */ 458 do_action( 'group_loop_start' ); 459 } 423 460 } 424 461 } … … 542 579 ) ); 543 580 544 // Filter and return whether or not the groups loop has groups in it 581 /** 582 * Filters whether or not there are groups to iterate over for the groups loop. 583 * 584 * @since BuddyPress (1.1.0) 585 * 586 * @param bool $value Whether or not there are groups to iterate over. 587 * @param BP_Groups_Template $groups_template BP_Groups_Template object based on parsed arguments. 588 * @param array $r Array of parsed arguments for the query. 589 */ 545 590 return apply_filters( 'bp_has_groups', $groups_template->has_groups(), $groups_template, $r ); 546 591 } … … 613 658 $group =& $groups_template->group; 614 659 660 /** 661 * Filters the ID of the current group in the loop. 662 * 663 * @since BuddyPress (1.0.0) 664 * 665 * @param int $id ID of the current group in the loop. 666 */ 615 667 return apply_filters( 'bp_get_group_id', $group->id ); 616 668 } … … 658 710 } 659 711 712 /** 713 * Filters classes that will be applied to row class of the current group in the loop. 714 * 715 * @since BuddyPress (1.7.0) 716 * 717 * @param array $classes Array of determined classes for the row. 718 */ 660 719 $classes = apply_filters( 'bp_get_group_class', $classes ); 661 720 $classes = array_merge( $classes, array() ); … … 687 746 $group =& $groups_template->group; 688 747 748 /** 749 * Filters the name of the current group in the loop. 750 * 751 * @since BuddyPress (1.0.0) 752 * 753 * @param string $name Name of the current group in the loop. 754 */ 689 755 return apply_filters( 'bp_get_group_name', $group->name ); 690 756 } … … 722 788 } 723 789 790 /** 791 * Filters the type for the current group in the loop. 792 * 793 * @since BuddyPress (1.0.0) 794 * 795 * @param string $type Type for the current group in the loop. 796 */ 724 797 return apply_filters( 'bp_get_group_type', $type ); 725 798 } … … 747 820 $group =& $groups_template->group; 748 821 822 /** 823 * Filters the status of the current group in the loop. 824 * 825 * @since BuddyPress (1.0.0) 826 * 827 * @param string $status Status of the current group in the loop. 828 */ 749 829 return apply_filters( 'bp_get_group_status', $group->status ); 750 830 } … … 814 894 } 815 895 896 /** 897 * Filters the group avatar while in the groups loop. 898 * 899 * @since BuddyPress (1.0.0) 900 * 901 * @param string $avatar HTML image element holding the group avatar. 902 * @param array $r Array of parsed arguments for the group avatar. 903 */ 816 904 return apply_filters( 'bp_get_group_avatar', $avatar, $r ); 817 905 } … … 902 990 return __( 'not yet active', 'buddypress' ); 903 991 } else { 992 993 /** 994 * Filters the 'last active' string for the current gorup in the loop. 995 * 996 * @since BuddyPress (1.0.0) 997 * 998 * @param string $value Determined last active value for the current group. 999 */ 904 1000 return apply_filters( 'bp_get_group_last_active', bp_core_time_since( $last_active ) ); 905 1001 } … … 929 1025 } 930 1026 1027 /** 1028 * Filters the permalink for the current group in the loop. 1029 * 1030 * @since BuddyPress (1.0.0) 1031 * 1032 * @param string $value Permalink for the current group in the loop. 1033 */ 931 1034 return apply_filters( 'bp_get_group_permalink', trailingslashit( bp_get_groups_directory_permalink() . $group->slug . '/' ) ); 932 1035 } … … 954 1057 $group =& $groups_template->group; 955 1058 1059 /** 1060 * Filters the permalink for the admin section of the current group in the loop. 1061 * 1062 * @since BuddyPress (1.0.0) 1063 * 1064 * @param string $value Permalink for the admin section of the current group in the loop. 1065 */ 956 1066 return apply_filters( 'bp_get_group_admin_permalink', trailingslashit( bp_get_group_permalink( $group ) . 'admin' ) ); 957 1067 } … … 979 1089 $group =& $groups_template->group; 980 1090 1091 /** 1092 * Filters the slug for the current group in the loop. 1093 * 1094 * @since BuddyPress (1.0.0) 1095 * 1096 * @param string $slug Slug for the current group in the loop. 1097 */ 981 1098 return apply_filters( 'bp_get_group_slug', $group->slug ); 982 1099 } … … 1004 1121 $group =& $groups_template->group; 1005 1122 1123 /** 1124 * Filters the description for the current group in the loop. 1125 * 1126 * @since BuddyPress (1.0.0) 1127 * 1128 * @param string $value Description for the current group. 1129 */ 1006 1130 return apply_filters( 'bp_get_group_description', stripslashes($group->description) ); 1007 1131 } … … 1033 1157 $group =& $groups_template->group; 1034 1158 1159 /** 1160 * Filters the permalink for the current group in the loop, for use in a textarea. 1161 * 1162 * 'bp_get_group_description_editable' does not have the formatting 1163 * filters that 'bp_get_group_description' has, which makes it 1164 * appropriate for "raw" editing. 1165 * 1166 * @since BuddyPress (1.0.0) 1167 * 1168 * @param string $description Description for the current group in the loop. 1169 */ 1035 1170 return apply_filters( 'bp_get_group_description_editable', $group->description ); 1036 1171 } … … 1059 1194 } 1060 1195 1196 /** 1197 * Filters the excerpt of a group description. 1198 * 1199 * @since BuddyPress (1.0.0) 1200 * 1201 * @param string $value Excerpt of a group description. 1202 * @param object $group Object for group whose description is made into an excerpt. 1203 */ 1061 1204 return apply_filters( 'bp_get_group_description_excerpt', bp_create_excerpt( $group->description ), $group ); 1062 1205 } … … 1146 1289 $group =& $groups_template->group; 1147 1290 1291 /** 1292 * Filters the created date of the current group in the loop. 1293 * 1294 * @since BuddyPress (1.0.0) 1295 * 1296 * @param string $value Created date for the current group. 1297 */ 1148 1298 return apply_filters( 'bp_get_group_date_created', bp_core_time_since( strtotime( $group->date_created ) ) ); 1149 1299 } … … 1171 1321 $group =& $groups_template->group; 1172 1322 1323 /** 1324 * Filters the username of the creator of the current group in the loop. 1325 * 1326 * @since BuddyPress (1.7.0) 1327 * 1328 * @param string $value Username of the group creator. 1329 */ 1173 1330 return apply_filters( 'bp_get_group_creator_username', bp_core_get_user_displayname( $group->creator_id ) ); 1174 1331 } … … 1196 1353 $group =& $groups_template->group; 1197 1354 1355 /** 1356 * Filters the user ID of the creator of the current group in the loop. 1357 * 1358 * @since BuddyPress (1.7.0) 1359 * 1360 * @param int $creator_id User ID of the group creator. 1361 */ 1198 1362 return apply_filters( 'bp_get_group_creator_id', $group->creator_id ); 1199 1363 } … … 1221 1385 $group =& $groups_template->group; 1222 1386 1387 /** 1388 * Filters the permalink of the creator of the current group in the loop. 1389 * 1390 * @since BuddyPress (1.7.0) 1391 * 1392 * @param string $value Permalink of the group creator. 1393 */ 1223 1394 return apply_filters( 'bp_get_group_creator_permalink', bp_core_get_user_domain( $group->creator_id ) ); 1224 1395 } … … 1295 1466 $avatar = bp_core_fetch_avatar( array( 'item_id' => $group->creator_id, 'type' => $type, 'css_id' => $id, 'class' => $class, 'width' => $width, 'height' => $height, 'alt' => $alt ) ); 1296 1467 1468 /** 1469 * Filters the avatar of the creator of the current group in the loop. 1470 * 1471 * @since BuddyPress (1.7.0) 1472 * 1473 * @param string $avatar Avatar of the group creator. 1474 */ 1297 1475 return apply_filters( 'bp_get_group_creator_avatar', $avatar ); 1298 1476 } … … 1436 1614 $admin_ids = implode( ',', $admin_ids ); 1437 1615 1616 /** 1617 * Filters a list of user IDs for a group's admins. 1618 * 1619 * This filter may return either an array or a comma separated string. 1620 * 1621 * @since BuddyPress (1.5.0) 1622 * 1623 * @param array|string $admin_ids List of user IDs for a group's admins. 1624 */ 1438 1625 return apply_filters( 'bp_group_admin_ids', $admin_ids ); 1439 1626 } … … 1467 1654 $mod_ids = implode( ',', $mod_ids ); 1468 1655 1656 /** 1657 * Filters a list of user IDs for a group's moderators. 1658 * 1659 * This filter may return either an array or a comma separated string. 1660 * 1661 * @since BuddyPress (1.5.0) 1662 * 1663 * @param array|string $admin_ids List of user IDs for a group's moderators. 1664 */ 1469 1665 return apply_filters( 'bp_group_mod_ids', $mod_ids ); 1470 1666 } … … 1489 1685 $group =& $groups_template->group; 1490 1686 1687 /** 1688 * Filters the permalink of the Members page for the current group in the loop. 1689 * 1690 * @since BuddyPress (1.0.0) 1691 * 1692 * @param string $value Permalink of the Members page for the current group. 1693 */ 1491 1694 return apply_filters( 'bp_get_group_all_members_permalink', bp_get_group_permalink( $group ) . 'members' ); 1492 1695 } … … 1562 1765 global $groups_template; 1563 1766 1767 /** 1768 * Filters the pagination HTML for a group loop. 1769 * 1770 * @since BuddyPress (1.2.0) 1771 * 1772 * @param string $pag_links HTML markup for the pagination links. 1773 */ 1564 1774 return apply_filters( 'bp_get_groups_pagination_links', $groups_template->pag_links ); 1565 1775 } … … 1584 1794 $total = bp_core_number_format( $groups_template->total_group_count ); 1585 1795 1796 /** 1797 * Filters the "Viewing x-y of z groups" pagination message. 1798 * 1799 * @since BuddyPress (1.5.0) 1800 * 1801 * @param string $value "Viewing x-y of z groups" text. 1802 * @param string $from_num Total amount for the low value in the range. 1803 * @param string $to_num Total amount for the high value in the range. 1804 * @param string $total Total amount of groups found. 1805 */ 1586 1806 return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing 1 group', 'Viewing %1$s - %2$s of %3$s groups', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total ); 1587 1807 } … … 1596 1816 */ 1597 1817 function bp_groups_auto_join() { 1818 1819 /** 1820 * Filters whether groups auto-join is enabled. 1821 * 1822 * @since BuddyPres (1.2.6) 1823 * 1824 * @param bool $value Enabled status. 1825 */ 1598 1826 return apply_filters( 'bp_groups_auto_join', (bool) buddypress()->groups->auto_join ); 1599 1827 } … … 1619 1847 $group =& $groups_template->group; 1620 1848 1849 /** 1850 * Filters the total member count for a group. 1851 * 1852 * @since BuddyPress (1.0.0) 1853 * 1854 * @param int $total_member_count Total member count for a group. 1855 */ 1621 1856 return apply_filters( 'bp_get_group_total_members', $group->total_member_count ); 1622 1857 } … … 1647 1882 $count_string = sprintf( _n( '%s member', '%s members', $count, 'buddypress' ), bp_core_number_format( $count ) ); 1648 1883 1884 /** 1885 * Filters the "x members" count string for a group. 1886 * 1887 * @since BuddyPress (1.2.0) 1888 * 1889 * @param string $count_string The "x members" count string for a group. 1890 */ 1649 1891 return apply_filters( 'bp_get_group_member_count', $count_string ); 1650 1892 } … … 1668 1910 $group =& $groups_template->group; 1669 1911 1912 /** 1913 * Filters the URL of the Forum page of a group. 1914 * 1915 * @since BuddyPress (1.0.0) 1916 * 1917 * @param string $value URL permalink for the Forum Page. 1918 */ 1670 1919 return apply_filters( 'bp_get_group_forum_permalink', bp_get_group_permalink( $group ) . 'forum' ); 1671 1920 } … … 1718 1967 } 1719 1968 1969 /** 1970 * Filters the topic count string for a group forum. 1971 * 1972 * @since BuddyPress (1.2.0) 1973 * 1974 * @param string $total_topics Total topic count string. 1975 * @param bool $showtext Whether or not to return as formatted string. 1976 */ 1720 1977 return apply_filters( 'bp_get_group_forum_topic_count', $total_topics, (bool)$showtext ); 1721 1978 } … … 1768 2025 } 1769 2026 2027 /** 2028 * Filters the post count string for a group forum. 2029 * 2030 * @since BuddyPress (1.2.0) 2031 * 2032 * @param string $total_posts Total post count string. 2033 * @param bool $showtext Whether or not to return as formatted string. 2034 */ 1770 2035 return apply_filters( 'bp_get_group_forum_post_count', $total_posts, (bool)$showtext ); 1771 2036 } … … 1881 2146 } 1882 2147 2148 /** 2149 * Filters the invite status of a group. 2150 * 2151 * Invite status in this case means who from the group can send invites. 2152 * 2153 * @since BuddyPress (1.5.0) 2154 * 2155 * @param string $invite_status Membership level needed to send an invite. 2156 * @param int $group_id ID of the group whose status is being checked. 2157 */ 1883 2158 return apply_filters( 'bp_group_get_invite_status', $invite_status, $group_id ); 1884 2159 } … … 2109 2384 $group =& $groups_template->group; 2110 2385 2386 /** 2387 * Filters whether a group has moderators. 2388 * 2389 * @since BuddyPress (1.0.0) 2390 * 2391 * @param array $value Array of user IDs who are a moderator of the provided group. 2392 */ 2111 2393 return apply_filters( 'bp_group_has_moderators', groups_get_group_mods( $group->id ) ); 2112 2394 } … … 2141 2423 extract( $r, EXTR_SKIP ); 2142 2424 2425 /** 2426 * Filters a URL for promoting a user to moderator. 2427 * 2428 * @since BuddyPress (1.1.0) 2429 * 2430 * @param string $value URL to use for promoting a user to moderator. 2431 */ 2143 2432 return apply_filters( 'bp_get_group_member_promote_mod_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/promote/mod/' . $user_id, 'groups_promote_member' ) ); 2144 2433 } … … 2173 2462 extract( $r, EXTR_SKIP ); 2174 2463 2464 /** 2465 * Filters a URL for promoting a user to admin. 2466 * 2467 * @since BuddyPress (1.1.0) 2468 * 2469 * @param string $value URL to use for promoting a user to admin. 2470 */ 2175 2471 return apply_filters( 'bp_get_group_member_promote_admin_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/promote/admin/' . $user_id, 'groups_promote_member' ) ); 2176 2472 } … … 2207 2503 $user_id = $members_template->member->user_id; 2208 2504 2505 /** 2506 * Filters a URL for demoting a user to member. 2507 * 2508 * @since BuddyPress (1.0.0) 2509 * 2510 * @param string $value URL to use for demoting a user to member. 2511 */ 2209 2512 return apply_filters( 'bp_get_group_member_demote_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/demote/' . $user_id, 'groups_demote_member' ) ); 2210 2513 } … … 2238 2541 $group =& $groups_template->group; 2239 2542 2543 /** 2544 * Filters a URL for banning a member from a group. 2545 * 2546 * @since BuddyPress (1.0.0) 2547 * 2548 * @param string $value URL to use for banning a member. 2549 */ 2240 2550 return apply_filters( 'bp_get_group_member_ban_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/ban/' . $user_id, 'groups_ban_member' ) ); 2241 2551 } … … 2272 2582 $group =& $groups_template->group; 2273 2583 2584 /** 2585 * Filters a URL for unbanning a member from a group. 2586 * 2587 * @since BuddyPress (1.0.0) 2588 * 2589 * @param string $value URL to use for unbanning a member. 2590 */ 2274 2591 return apply_filters( 'bp_get_group_member_unban_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/unban/' . $user_id, 'groups_unban_member' ) ); 2275 2592 } … … 2303 2620 $group =& $groups_template->group; 2304 2621 2622 /** 2623 * Filters a URL for removing a member from a group. 2624 * 2625 * @since BuddyPress (1.2.6) 2626 * 2627 * @param string $value URL to use for removing a member. 2628 */ 2305 2629 return apply_filters( 'bp_get_group_member_remove_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/remove/' . $user_id, 'groups_remove_member' ) ); 2306 2630 } … … 2375 2699 */ 2376 2700 function bp_get_group_total_for_member() { 2701 2702 /** 2703 * FIlters the group count for a displayed user. 2704 * 2705 * @since BuddyPress (1.1.0) 2706 * 2707 * @param int $value Total group count for a displayed user. 2708 */ 2377 2709 return apply_filters( 'bp_get_group_total_for_member', BP_Groups_Member::total_group_count() ); 2378 2710 } … … 2400 2732 $group =& $groups_template->group; 2401 2733 2734 /** 2735 * Filters the 'action' attribute for a group form. 2736 * 2737 * @since BuddyPress (1.0.0) 2738 * 2739 * @param string $value Action attribute for a group form. 2740 */ 2402 2741 return apply_filters( 'bp_group_form_action', bp_get_group_permalink( $group ) . $page ); 2403 2742 } … … 2428 2767 $page = bp_action_variable( 0 ); 2429 2768 2769 /** 2770 * Filters the 'action' attribute for a group admin form. 2771 * 2772 * @since BuddyPress (1.0.0) 2773 * 2774 * @param string $value Action attribute for a group admin form. 2775 */ 2430 2776 return apply_filters( 'bp_group_admin_form_action', bp_get_group_permalink( $group ) . 'admin/' . $page ); 2431 2777 } … … 2469 2815 $group =& $groups_template->group; 2470 2816 2817 /** 2818 * Filters whether current user is member of a group. 2819 * 2820 * @since BuddyPress (1.2.4) 2821 * 2822 * @param bool $is_member If user is a member of group or not. 2823 */ 2471 2824 return apply_filters( 'bp_group_is_member', !empty( $group->is_member ) ); 2472 2825 } … … 2486 2839 } 2487 2840 2841 /** 2842 * Filters whether current user has an outstanding invite to current group in loop. 2843 * 2844 * @since BuddyPress (2.1.0) 2845 * 2846 * @param bool $is_invited If user has an outstanding group invite. 2847 */ 2488 2848 return apply_filters( 'bp_group_is_invited', ! empty( $group->is_invited ) ); 2489 2849 } … … 2540 2900 } 2541 2901 2902 /** 2903 * Filters whether current user has been banned from current group in loop. 2904 * 2905 * @since BuddyPress (1.5.0) 2906 * 2907 * @param bool $is_invited If user has been from current group. 2908 */ 2542 2909 return (bool) apply_filters( 'bp_group_is_user_banned', $retval ); 2543 2910 } … … 2564 2931 $bp = buddypress(); 2565 2932 2933 /** 2934 * Filters the URL for accepting an invitation to a group. 2935 * 2936 * @since BuddyPress (1.0.0) 2937 * 2938 * @param string $value URL for accepting an invitation to a group. 2939 */ 2566 2940 return apply_filters( 'bp_get_group_accept_invite_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() . '/invites/accept/' . $group->id ), 'groups_accept_invite' ) ); 2567 2941 } … … 2588 2962 $bp = buddypress(); 2589 2963 2964 /** 2965 * Filters the URL for rejecting an invitation to a group. 2966 * 2967 * @since BuddyPress (1.0.0) 2968 * 2969 * @param string $value URL for rejecting an invitation to a group. 2970 */ 2590 2971 return apply_filters( 'bp_get_group_reject_invite_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() . '/invites/reject/' . $group->id ), 'groups_reject_invite' ) ); 2591 2972 } … … 2610 2991 $group =& $groups_template->group; 2611 2992 2993 /** 2994 * Filters the URL for confirming a request to leave a group. 2995 * 2996 * @since BuddyPress (1.0.0) 2997 * 2998 * @param string $value URL for confirming a request to leave a group. 2999 */ 2612 3000 return apply_filters( 'bp_group_leave_confirm_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group/yes', 'groups_leave_group' ) ); 2613 3001 } … … 2632 3020 $group =& $groups_template->group; 2633 3021 3022 /** 3023 * Filters the URL for rejecting a request to leave a group. 3024 * 3025 * @since BuddyPress (1.0.0) 3026 * 3027 * @param string $value URL for rejecting a request to leave a group. 3028 */ 2634 3029 return apply_filters( 'bp_get_group_leave_reject_link', bp_get_group_permalink( $group ) ); 2635 3030 } … … 2654 3049 $group =& $groups_template->group; 2655 3050 3051 /** 3052 * Filters the 'action' attribute for a group send invite form. 3053 * 3054 * @since BuddyPress (1.0.0) 3055 * 3056 * @param string $value Action attribute for a group send invite form. 3057 */ 2656 3058 return apply_filters( 'bp_group_send_invite_form_action', bp_get_group_permalink( $group ) . 'send-invites/send' ); 2657 3059 } … … 2721 3123 ); 2722 3124 2723 // Filter and return the HTML button 3125 /** 3126 * Filters the HTML button for creating a new topic in a group. 3127 * 3128 * @since BuddyPress (1.5.0) 3129 * 3130 * @param string $button HTML button for a new topic. 3131 */ 2724 3132 return bp_get_button( apply_filters( 'bp_get_group_new_topic_button', $button ) ); 2725 3133 } … … 2861 3269 } 2862 3270 2863 // Filter and return the HTML button 3271 /** 3272 * Filters the HTML button for joining a group. 3273 * 3274 * @since BuddyPress (1.2.6) 3275 * 3276 * @param string $button HTML button for joining a group. 3277 */ 2864 3278 return bp_get_button( apply_filters( 'bp_get_group_join_button', $button ) ); 2865 3279 } … … 2900 3314 ); 2901 3315 3316 /** 3317 * Filters the HTML button for creating a group. 3318 * 3319 * @since BuddyPress (2.0.0) 3320 * 3321 * @param string $button HTML button for creating a group. 3322 */ 2902 3323 return bp_get_button( apply_filters( 'bp_get_group_create_button', $button_args ) ); 2903 3324 } … … 2930 3351 $output = '<li id="group-create-nav">' . $create_group_button . '</li>'; 2931 3352 3353 /** 3354 * Filters the Create a Group nav item. 3355 * 3356 * @since BuddyPress (2.2.0) 3357 * 3358 * @param string $output HTML output for nav item. 3359 */ 2932 3360 return apply_filters( 'bp_get_group_create_nav_item', $output ); 2933 3361 } … … 3005 3433 } 3006 3434 3435 /** 3436 * Filters a message if the group is not visible to the current user. 3437 * 3438 * This will be true if it is a hidden or private group, and the user does not have access. 3439 * 3440 * @since BuddyPress (1.6.0) 3441 * 3442 * @param string $message Message to display to the current user. 3443 * @param object $group Group to get status message for. 3444 */ 3007 3445 echo apply_filters( 'bp_group_status_message', $message, $group ); 3008 3446 } … … 3044 3482 */ 3045 3483 function bp_get_total_group_count() { 3484 3485 /** 3486 * Filters the total number of groups. 3487 * 3488 * @since BuddyPress (1.0.0) 3489 * 3490 * @param int $value Total number of groups found. 3491 */ 3046 3492 return apply_filters( 'bp_get_total_group_count', groups_get_total_group_count() ); 3047 3493 } … … 3069 3515 $count = groups_total_groups_for_user( $user_id ); 3070 3516 3517 /** 3518 * Filters the total number of groups a user belongs to. 3519 * 3520 * @since BuddyPress (1.2.0) 3521 * 3522 * @param int $count Total number of groups for the user. 3523 * @param int $user_id ID of the user being checked. 3524 */ 3071 3525 return apply_filters( 'bp_get_total_group_count_for_user', $count, $user_id ); 3072 3526 } … … 3222 3676 return true; 3223 3677 } elseif ( $tick == $this->member_count ) { 3678 3224 3679 do_action( 'loop_end' ); 3225 3680 // Do some cleaning up after the loop … … 3294 3749 3295 3750 $members_template = new BP_Groups_Group_Members_Template( $r ); 3751 3752 /** 3753 * Filters whether or not a group member query has members to display. 3754 * 3755 * @since BuddyPress (1.1.0) 3756 * 3757 * @param bool $value Whether there are members to display. 3758 * @param BP_Groups_Group_Members_Template $members_template Object holding the member query results. 3759 */ 3296 3760 return apply_filters( 'bp_group_has_members', $members_template->has_members(), $members_template ); 3297 3761 } … … 3336 3800 ) ); 3337 3801 3802 /** 3803 * Filters the group member avatar while in the groups members loop. 3804 * 3805 * @since BuddyPress (1.0.0) 3806 * 3807 * @param string $value HTML markup for group member avatar. 3808 * @param array $r Parsed args used for the avatar query. 3809 */ 3338 3810 return apply_filters( 'bp_get_group_member_avatar', bp_core_fetch_avatar( $r ), $r ); 3339 3811 } … … 3367 3839 ) ); 3368 3840 3841 /** 3842 * Filters the group member avatar thumb while in the groups members loop. 3843 * 3844 * @since BuddyPress (1.1.0) 3845 * 3846 * @param string $value HTML markup for group member avatar thumb. 3847 * @param array $r Parsed args used for the avatar query. 3848 */ 3369 3849 return apply_filters( 'bp_get_group_member_avatar_thumb', bp_core_fetch_avatar( $r ), $r ); 3370 3850 } … … 3399 3879 ) ); 3400 3880 3881 /** 3882 * Filters the group member avatar mini while in the groups members loop. 3883 * 3884 * @since BuddyPress (1.0.0) 3885 * 3886 * @param string $value HTML markup for group member avatar mini. 3887 * @param array $r Parsed args used for the avatar query. 3888 */ 3401 3889 return apply_filters( 'bp_get_group_member_avatar_mini', bp_core_fetch_avatar( $r ), $r ); 3402 3890 } … … 3408 3896 global $members_template; 3409 3897 3898 /** 3899 * Filters the group member display name of the current user in the loop. 3900 * 3901 * @since BuddyPress (1.0.0) 3902 * 3903 * @param string $display_name Display name of the current user. 3904 */ 3410 3905 return apply_filters( 'bp_get_group_member_name', $members_template->member->display_name ); 3411 3906 } … … 3417 3912 global $members_template; 3418 3913 3914 /** 3915 * Filters the group member url for the current user in the loop. 3916 * 3917 * @since BuddyPress (1.0.0) 3918 * 3919 * @param string $value URL for the current user. 3920 */ 3419 3921 return apply_filters( 'bp_get_group_member_url', bp_core_get_user_domain( $members_template->member->user_id, $members_template->member->user_nicename, $members_template->member->user_login ) ); 3420 3922 } … … 3426 3928 global $members_template; 3427 3929 3930 /** 3931 * Filters the group member HTML link for the current user in the loop. 3932 * 3933 * @since BuddyPress (1.0.0) 3934 * 3935 * @param string $value HTML link for the current user. 3936 */ 3428 3937 return apply_filters( 'bp_get_group_member_link', '<a href="' . bp_core_get_user_domain( $members_template->member->user_id, $members_template->member->user_nicename, $members_template->member->user_login ) . '">' . $members_template->member->display_name . '</a>' ); 3429 3938 } … … 3435 3944 global $members_template; 3436 3945 3946 /** 3947 * Filters the group member domain for the current user in the loop. 3948 * 3949 * @since BuddyPress (1.2.0) 3950 * 3951 * @param string $value Domain for the current user. 3952 */ 3437 3953 return apply_filters( 'bp_get_group_member_domain', bp_core_get_user_domain( $members_template->member->user_id, $members_template->member->user_nicename, $members_template->member->user_login ) ); 3438 3954 } … … 3449 3965 $friend_status = ( 0 == $members_template->member->is_friend ) ? 'pending' : 'is_friend'; 3450 3966 3967 /** 3968 * Filters the friendship status between current user and displayed user in group member loop. 3969 * 3970 * @since BuddyPress (1.2.0) 3971 * 3972 * @param string $friend_status Current status of the friendship. 3973 */ 3451 3974 return apply_filters( 'bp_get_group_member_is_friend', $friend_status ); 3452 3975 } … … 3458 3981 global $members_template; 3459 3982 3983 /** 3984 * Filters whether the member is banned from the current group. 3985 * 3986 * @since BuddyPress (1.0.0) 3987 * 3988 * @param bool $is_banned Whether or not the member is banned. 3989 */ 3460 3990 return apply_filters( 'bp_get_group_member_is_banned', $members_template->member->is_banned ); 3461 3991 } … … 3464 3994 global $members_template; 3465 3995 3466 if ( $members_template->member->is_banned ) 3996 if ( $members_template->member->is_banned ) { 3997 3998 /** 3999 * Filters the class to add to the HTML if member is banned. 4000 * 4001 * @since BuddyPress (1.2.6) 4002 * 4003 * @param string $value HTML class to add. 4004 */ 3467 4005 echo apply_filters( 'bp_group_member_css_class', 'banned-user' ); 4006 } 3468 4007 } 3469 4008 … … 3474 4013 global $members_template; 3475 4014 4015 /** 4016 * Filters the joined since time for the current member in the loop. 4017 * 4018 * @since BuddyPress (1.0.0) 4019 * 4020 * @param string $value Joined since time. 4021 */ 3476 4022 return apply_filters( 'bp_get_group_member_joined_since', bp_core_get_last_activity( $members_template->member->date_modified, __( 'joined %s', 'buddypress') ) ); 3477 4023 } … … 3483 4029 global $members_template; 3484 4030 4031 /** 4032 * Filters the member's user ID for group members loop. 4033 * 4034 * @since BuddyPress (1.0.0) 4035 * 4036 * @param int $user_id User ID of the member. 4037 */ 3485 4038 return apply_filters( 'bp_get_group_member_id', $members_template->member->user_id ); 3486 4039 } … … 3499 4052 } 3500 4053 function bp_get_group_pag_id() { 4054 4055 /** 4056 * Filters the string to be used as the group pag id. 4057 * 4058 * @since BuddyPress (1.0.0) 4059 * 4060 * @param string $value Value to use for the pag id. 4061 */ 3501 4062 return apply_filters( 'bp_get_group_pag_id', 'pag' ); 3502 4063 } … … 3508 4069 function bp_get_group_member_pagination() { 3509 4070 global $members_template; 4071 4072 /** 4073 * Filters the HTML markup to be used for group member listing pagination. 4074 * 4075 * @since BuddyPress (1.0.0) 4076 * 4077 * @param string $pag_links HTML markup for the pagination. 4078 */ 3510 4079 return apply_filters( 'bp_get_group_member_pagination', $members_template->pag_links ); 3511 4080 } … … 3522 4091 $total = bp_core_number_format( $members_template->total_member_count ); 3523 4092 4093 /** 4094 * Filters the "Viewing x-y of z members" pagination message. 4095 * 4096 * @since BuddyPress (1.0.0) 4097 * 4098 * @param string $value "Viewing x-y of z members" text. 4099 * @param string $from_num Total amount for the low value in the range. 4100 * @param string $to_num Total amount for the high value in the range. 4101 * @param string $total Total amount of members found. 4102 */ 3524 4103 return apply_filters( 'bp_get_group_member_pagination_count', sprintf( _n( 'Viewing 1 member', 'Viewing %1$s - %2$s of %3$s members', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total ); 3525 4104 } … … 3538 4117 * Output the Group members template 3539 4118 * 3540 * @since BuddyPress ( ?)4119 * @since BuddyPress (2.0.0) 3541 4120 * 3542 4121 * @return string html output … … 3551 4130 3552 4131 <?php bp_groups_members_filter(); ?> 3553 <?php do_action( 'bp_members_directory_member_sub_types' ); ?> 4132 <?php 4133 4134 /** 4135 * Fires at the end of the group members search unordered list. 4136 * 4137 * Part of bp_groups_members_template_part(). 4138 * 4139 * @since BuddyPress (1.5.0) 4140 */ 4141 do_action( 'bp_members_directory_member_sub_types' ); ?> 3554 4142 3555 4143 </ul> … … 3567 4155 * Output the Group members filters 3568 4156 * 3569 * @since BuddyPress ( ?)4157 * @since BuddyPress (2.0.0) 3570 4158 * 3571 4159 * @return string html output … … 3585 4173 <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option> 3586 4174 3587 <?php do_action( 'bp_groups_members_order_options' ); ?> 4175 <?php 4176 4177 /** 4178 * Fires at the end of the Group members filters select input. 4179 * 4180 * Useful for plugins to add more filter options. 4181 * 4182 * @since BuddyPress (2.0.0) 4183 */ 4184 do_action( 'bp_groups_members_order_options' ); ?> 3588 4185 3589 4186 </select> … … 3622 4219 $can_create = false; 3623 4220 4221 /** 4222 * Filters if the current logged in user can create groups. 4223 * 4224 * @since BuddyPress (1.5.0) 4225 * 4226 * @param bool $can_create Whether the person can create groups. 4227 * @param int $restricted Whether or not group creation is restricted. 4228 */ 3624 4229 return apply_filters( 'bp_user_can_create_groups', $can_create, $restricted ); 3625 4230 } … … 3647 4252 unset( $is_enabled ); 3648 4253 4254 /** 4255 * Fires at the end of the creation of the group tabs. 4256 * 4257 * @since BuddyPress (1.0.0) 4258 */ 3649 4259 do_action( 'groups_creation_tabs' ); 3650 4260 } … … 3653 4263 $bp = buddypress(); 3654 4264 4265 /** 4266 * Filters the group creation stage title. 4267 * 4268 * @since BuddyPress (1.1.0) 4269 * 4270 * @param string $value HTML markup for the group creation stage title. 4271 */ 3655 4272 echo apply_filters( 'bp_group_creation_stage_title', '<span>— ' . $bp->groups->group_creation_steps[bp_get_groups_current_create_step()]['name'] . '</span>' ); 3656 4273 } … … 3667 4284 } 3668 4285 4286 /** 4287 * Filters the group creation form action. 4288 * 4289 * @since BuddyPress (1.1.0) 4290 * 4291 * @param string $value Action to be used with group creation form. 4292 */ 3669 4293 return apply_filters( 'bp_get_group_creation_form_action', trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . bp_action_variable( 1 ) ) ); 3670 4294 } … … 3751 4375 $new_group_id = 0; 3752 4376 4377 /** 4378 * Filters the new group ID. 4379 * 4380 * @since BuddyPress (1.1.0) 4381 * 4382 * @param int $new_group_id ID of the new group. 4383 */ 3753 4384 return apply_filters( 'bp_get_new_group_id', $new_group_id ); 3754 4385 } … … 3765 4396 $name = ''; 3766 4397 4398 /** 4399 * Filters the new group name. 4400 * 4401 * @since BuddyPress (1.1.0) 4402 * 4403 * @param string $name Name of the new group. 4404 */ 3767 4405 return apply_filters( 'bp_get_new_group_name', $name ); 3768 4406 } … … 3779 4417 $description = ''; 3780 4418 4419 /** 4420 * Filters the new group description. 4421 * 4422 * @since BuddyPress (1.1.0) 4423 * 4424 * @param string $name Description of the new group. 4425 */ 3781 4426 return apply_filters( 'bp_get_new_group_description', $description ); 3782 4427 } … … 3788 4433 $bp = buddypress(); 3789 4434 4435 /** 4436 * Filters whether or not to enable forums for the new group. 4437 * 4438 * @since BuddyPress (1.1.0) 4439 * 4440 * @param int $enable_forum Whether or not to enable forums. 4441 */ 3790 4442 return (int) apply_filters( 'bp_get_new_group_enable_forum', $bp->groups->current_group->enable_forum ); 3791 4443 } … … 3797 4449 $bp = buddypress(); 3798 4450 4451 /** 4452 * Filters the new group status. 4453 * 4454 * @since BuddyPress (1.1.0) 4455 * 4456 * @param string $status Status for the new group. 4457 */ 3799 4458 return apply_filters( 'bp_get_new_group_status', $bp->groups->current_group->status ); 3800 4459 } … … 3819 4478 extract( $r, EXTR_SKIP ); 3820 4479 4480 /** 4481 * Filters the new group avatar. 4482 * 4483 * @since BuddyPress (1.1.0) 4484 * 4485 * @param string $value HTML markup for the new group avatar. 4486 */ 3821 4487 return apply_filters( 'bp_get_new_group_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->groups->current_group->id, 'object' => 'group', 'type' => $type, 'avatar_dir' => 'group-avatars', 'alt' => $alt, 'width' => $width, 'height' => $height, 'class' => $class, 'no_grav' => $no_grav ) ) ); 3822 4488 } … … 3835 4501 } 3836 4502 4503 /** 4504 * Filters the permalink for the previous step with the group creation process. 4505 * 4506 * @since BuddyPress (1.1.0) 4507 * 4508 * @param string $value Permalink for the previous step. 4509 */ 3837 4510 return apply_filters( 'bp_get_group_creation_previous_link', trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . array_pop( $previous_steps ) ) ); 3838 4511 } … … 3863 4536 } 3864 4537 4538 /** 4539 * Filters the current group creation step. 4540 * 4541 * If none is found, returns an empty string. 4542 * 4543 * @since BuddyPress (1.6.0) 4544 * 4545 * @param string $current_create_step Current step in the group creation process. 4546 */ 3865 4547 return apply_filters( 'bp_get_groups_current_create_step', $current_create_step ); 3866 4548 } … … 3941 4623 </form>'; 3942 4624 4625 /** 4626 * Filters the HTML markup for the groups search form. 4627 * 4628 * @since BuddyPress (1.9.0) 4629 * 4630 * @param string $search_form_html HTML markup for the search form. 4631 */ 3943 4632 echo apply_filters( 'bp_directory_groups_search_form', $search_form_html ); 3944 4633 … … 4030 4719 } 4031 4720 4721 /** 4722 * Filters the current group admin tab slug. 4723 * 4724 * @since BuddyPress (1.6.0) 4725 * 4726 * @param string $tab Current group admin tab slug. 4727 */ 4032 4728 return apply_filters( 'bp_get_current_group_admin_tab', $tab ); 4033 4729 } … … 4066 4762 ) ); 4067 4763 4764 /** 4765 * Filters the current group avatar. 4766 * 4767 * @since BuddyPress (2.0.0) 4768 * 4769 * @param string $group_avatar HTML markup for current group avatar. 4770 */ 4068 4771 return apply_filters( 'bp_get_group_current_avatar', $group_avatar ); 4069 4772 } … … 4103 4806 $bp = buddypress(); 4104 4807 4808 /** 4809 * Filters the URL to delete the group avatar. 4810 * 4811 * @since BuddyPress (1.1.0) 4812 * 4813 * @param string $value URL to delete the group avatar. 4814 */ 4105 4815 return apply_filters( 'bp_get_group_avatar_delete_link', wp_nonce_url( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/group-avatar/delete', 'bp_group_avatar_delete' ) ); 4106 4816 } … … 4260 4970 return true; 4261 4971 } elseif ( $tick == $this->request_count ) { 4972 4973 /** 4974 * Fires right before the rewinding of group membership requests list. 4975 * 4976 * @since BuddyPress (1.5.0) 4977 */ 4262 4978 do_action( 'group_request_loop_end' ); 4263 4979 // Do some cleaning up after the loop … … 4275 4991 // loop has just started 4276 4992 if ( 0 == $this->current_request ) { 4993 4994 /** 4995 * Fires if the current group membership request item is the first in the loop. 4996 * 4997 * @since BuddyPress (1.1.0) 4998 */ 4277 4999 do_action( 'group_request_loop_start' ); 4278 5000 } … … 4304 5026 4305 5027 $requests_template = new BP_Groups_Membership_Requests_Template( $r ); 5028 5029 /** 5030 * Filters whether or not a group membership query has requests to display. 5031 * 5032 * @since BuddyPress (1.1.0) 5033 * 5034 * @param bool $value Whether there are requests to display. 5035 * @param BP_Groups_Membership_Requests_Template $requests_template Object holding the requests query results. 5036 */ 4306 5037 return apply_filters( 'bp_group_has_membership_requests', $requests_template->has_requests(), $requests_template ); 4307 5038 } … … 4322 5053 global $requests_template; 4323 5054 5055 /** 5056 * Filters the requesting user's avatar thumbnail. 5057 * 5058 * @since BuddyPress (1.0.0) 5059 * 5060 * @param string $value HTML markup for the user's avatar thumbnail. 5061 */ 4324 5062 echo apply_filters( 'bp_group_request_user_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $requests_template->request->user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $requests_template->request->user_id ) ) ) ) ); 4325 5063 } … … 4331 5069 global $requests_template; 4332 5070 5071 /** 5072 * Filters the URL to use to reject a membership request. 5073 * 5074 * @since BuddyPress (1.2.6) 5075 * 5076 * @param string $value URL to use to reject a membership request. 5077 */ 4333 5078 return apply_filters( 'bp_get_group_request_reject_link', wp_nonce_url( bp_get_group_permalink( groups_get_current_group() ) . 'admin/membership-requests/reject/' . $requests_template->request->membership_id, 'groups_reject_membership_request' ) ); 4334 5079 } … … 4340 5085 global $requests_template; 4341 5086 5087 /** 5088 * Filters the URL to use to accept a membership request. 5089 * 5090 * @since BuddyPress (1.2.6) 5091 * 5092 * @param string $value URL to use to accept a membership request. 5093 */ 4342 5094 return apply_filters( 'bp_get_group_request_accept_link', wp_nonce_url( bp_get_group_permalink( groups_get_current_group() ) . 'admin/membership-requests/accept/' . $requests_template->request->membership_id, 'groups_accept_membership_request' ) ); 4343 5095 } … … 4349 5101 global $requests_template; 4350 5102 5103 /** 5104 * Filters the URL for the user requesting membership. 5105 * 5106 * @since BuddyPress (1.2.6) 5107 * 5108 * @param string $value URL for the user requestion membership. 5109 */ 4351 5110 return apply_filters( 'bp_get_group_request_user_link', bp_core_get_userlink( $requests_template->request->user_id ) ); 4352 5111 } … … 4355 5114 global $requests_template; 4356 5115 5116 /** 5117 * Filters the formatted time since membership was requested. 5118 * 5119 * @since BuddyPress (1.0.0) 5120 * 5121 * @param string $value Formatted time since membership was requested. 5122 */ 4357 5123 echo apply_filters( 'bp_group_request_time_since_requested', sprintf( __( 'requested %s', 'buddypress' ), bp_core_time_since( strtotime( $requests_template->request->date_modified ) ) ) ); 4358 5124 } … … 4361 5127 global $requests_template; 4362 5128 5129 /** 5130 * Filters the membership request comment left by user. 5131 * 5132 * @since BuddyPress (1.0.0) 5133 * 5134 * @param string $value Membership request comment left by user. 5135 */ 4363 5136 echo apply_filters( 'bp_group_request_comment', strip_tags( stripslashes( $requests_template->request->comments ) ) ); 4364 5137 } … … 4381 5154 function bp_get_group_requests_pagination_links() { 4382 5155 global $requests_template; 5156 5157 /** 5158 * Filters pagination links for group membership requests. 5159 * 5160 * @since BuddyPress (2.0.0) 5161 * 5162 * @param string $value Pagination links for group membership requests. 5163 */ 4383 5164 return apply_filters( 'bp_get_group_requests_pagination_links', $requests_template->pag_links ); 4384 5165 } … … 4407 5188 $total = bp_core_number_format( $requests_template->total_request_count ); 4408 5189 5190 /** 5191 * Filters pagination count text for group membership requests. 5192 * 5193 * @since BuddyPress (2.0.0) 5194 * 5195 * @param string $value Pagination count text for group membership requests. 5196 */ 4409 5197 return apply_filters( 'bp_get_group_requests_pagination_count', sprintf( _n( 'Viewing 1 request', 'Viewing %1$s - %2$s of %3$s requests', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total ); 4410 5198 } … … 4595 5383 4596 5384 $invites_template = new BP_Groups_Invite_Template( $r ); 5385 5386 /** 5387 * Filters whether or not a group invites query has invites to display. 5388 * 5389 * @since BuddyPress (1.1.0) 5390 * 5391 * @param bool $value Whether there are requests to display. 5392 * @param BP_Groups_Invite_Template $invites_template Object holding the invites query results. 5393 */ 4597 5394 return apply_filters( 'bp_group_has_invites', $invites_template->has_invites(), $invites_template ); 4598 5395 } … … 4616 5413 global $invites_template; 4617 5414 5415 /** 5416 * Filters the group invite item ID. 5417 * 5418 * @since BuddyPress (1.1.0) 5419 * 5420 * @param string $value Group invite item ID. 5421 */ 4618 5422 return apply_filters( 'bp_get_group_invite_item_id', 'uid-' . $invites_template->invite->user->id ); 4619 5423 } … … 4625 5429 global $invites_template; 4626 5430 5431 /** 5432 * Filters the group invite user avatar. 5433 * 5434 * @since BuddyPress (1.1.0) 5435 * 5436 * @param string $value Group invite user avatar. 5437 */ 4627 5438 return apply_filters( 'bp_get_group_invite_user_avatar', $invites_template->invite->user->avatar_thumb ); 4628 5439 } … … 4634 5445 global $invites_template; 4635 5446 5447 /** 5448 * Filters the group invite user link. 5449 * 5450 * @since BuddyPress (1.1.0) 5451 * 5452 * @param string $value Group invite user link. 5453 */ 4636 5454 return apply_filters( 'bp_get_group_invite_user_link', bp_core_get_userlink( $invites_template->invite->user->id ) ); 4637 5455 } … … 4643 5461 global $invites_template; 4644 5462 5463 /** 5464 * Filters the group invite user's last active time. 5465 * 5466 * @since BuddyPress (1.1.0) 5467 * 5468 * @param string $value Group invite user's last active time. 5469 */ 4645 5470 return apply_filters( 'bp_get_group_invite_user_last_active', $invites_template->invite->user->last_active ); 4646 5471 } … … 4680 5505 function bp_get_group_invite_pagination_links() { 4681 5506 global $invites_template; 5507 5508 /** 5509 * Filters the pagination links for group invitations. 5510 * 5511 * @since BuddyPress (2.0.0) 5512 * 5513 * @param string $value Pagination links for group invitations. 5514 */ 4682 5515 return apply_filters( 'bp_get_group_invite_pagination_links', $invites_template->pag_links ); 4683 5516 } … … 4706 5539 $total = bp_core_number_format( $invites_template->total_invite_count ); 4707 5540 5541 /** This filter is documented in bp-groups/bp-groups-template.php */ 4708 5542 return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing 1 invitation', 'Viewing %1$s - %2$s of %3$s invitations', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total ); 4709 5543 } … … 4730 5564 4731 5565 /** 4732 * Output the current group activity-stream RSS url5566 * Output the current group activity-stream RSS URL 4733 5567 * 4734 5568 * @since BuddyPress (1.5.0) … … 4738 5572 } 4739 5573 /** 4740 * Return the current group activity-stream RSS url5574 * Return the current group activity-stream RSS URL 4741 5575 * 4742 5576 * @since BuddyPress (1.5.0) … … 4748 5582 $feed_link = trailingslashit( $group_link ); 4749 5583 5584 /** 5585 * Filters the current group activity-stream RSS URL. 5586 * 5587 * @since BuddyPress (1.2.0) 5588 * 5589 * @param string $feed_link Current group activity-stream RSS URL. 5590 */ 4750 5591 return apply_filters( 'bp_get_group_activity_feed_link', $feed_link ); 4751 5592 } … … 4773 5614 $current_group_id = isset( $current_group->id ) ? (int) $current_group->id : 0; 4774 5615 5616 /** 5617 * Filters the ID of the current group. 5618 * 5619 * @since BuddyPress (1.5.0) 5620 * 5621 * @param int $current_group_id ID of the current group. 5622 * @param object $current_group Instance holding the current group. 5623 */ 4775 5624 return apply_filters( 'bp_get_current_group_id', $current_group_id, $current_group ); 4776 5625 } … … 4796 5645 $current_group_slug = isset( $current_group->slug ) ? $current_group->slug : ''; 4797 5646 5647 /** 5648 * Filters the slug of the current group. 5649 * 5650 * @since BuddyPress (1.5.0) 5651 * 5652 * @param string $current_group_slug Slug of the current group. 5653 * @param object $current_group Instance holding the current group. 5654 */ 4798 5655 return apply_filters( 'bp_get_current_group_slug', $current_group_slug, $current_group ); 4799 5656 } … … 4818 5675 $current_group = groups_get_current_group(); 4819 5676 $current_group_name = isset( $current_group->name ) ? $current_group->name : ''; 5677 5678 /** This filter is documented in bp-groups/bp-groups-template.php */ 4820 5679 $name = apply_filters( 'bp_get_group_name', $current_group_name ); 4821 5680 5681 /** 5682 * Filters the name of the current group. 5683 * 5684 * @since BuddyPress (1.2.0) 5685 * 5686 * @param string $name Name of the current group. 5687 * @param object $current_group Instance holding the current group. 5688 */ 4822 5689 return apply_filters( 'bp_get_current_group_name', $name, $current_group ); 4823 5690 } … … 4843 5710 $current_group = groups_get_current_group(); 4844 5711 $current_group_desc = isset( $current_group->description ) ? $current_group->description : ''; 5712 5713 /** 5714 * Filters the description of the current group. 5715 * 5716 * This filter is used to apply extra filters related to formatting. 5717 * 5718 * @since BuddyPress (1.0.0) 5719 * 5720 * @param string $current_group_desc Description of the current group. 5721 */ 4845 5722 $desc = apply_filters( 'bp_get_group_description', $current_group_desc ); 4846 5723 5724 /** 5725 * Filters the description of the current group. 5726 * 5727 * @since BuddyPress (2.1.0) 5728 * 5729 * @param string $desc Description of the current group. 5730 */ 4847 5731 return apply_filters( 'bp_get_current_group_description', $desc ); 4848 5732 } … … 4902 5786 } 4903 5787 4904 // Return the url 5788 /** 5789 * Filters a URL for a group component action. 5790 * 5791 * @since BuddyPress (2.1.0) 5792 * 5793 * @param string $url URL for a group component action. 5794 * @param string $action Action being taken for the group. 5795 * @param string $query_args Query arguments being passed. 5796 * @param bool $nonce Whether or not to add a nonce. 5797 */ 4905 5798 return apply_filters( 'bp_get_groups_action_link', $url, $action, $query_args, $nonce ); 4906 5799 } … … 4956 5849 } 4957 5850 4958 // Filter and return 5851 /** 5852 * Filters the number of groups in user's profile. 5853 * 5854 * @since BuddyPress (2.0.0) 5855 * 5856 * @param string $value HTML for stats output. 5857 * @param array $r Array of parsed arguments for query. 5858 */ 4959 5859 return apply_filters( 'bp_groups_get_profile_stats', $r['output'], $r ); 4960 5860 }
Note: See TracChangeset
for help on using the changeset viewer.