Changeset 10454 for trunk/src/bp-groups/bp-groups-template.php
- Timestamp:
- 01/18/2016 05:18:23 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r10452 r10454 96 96 * 97 97 * Responsible for loading a group of groups into a loop for display. 98 * 99 * @since 1.2.0 98 100 */ 99 101 class BP_Groups_Template { … … 103 105 * 104 106 * @var int 107 * @since 1.2.0 105 108 */ 106 109 public $current_group = -1; … … 110 113 * 111 114 * @var int 115 * @since 1.2.0 112 116 */ 113 117 public $group_count; … … 117 121 * 118 122 * @var array 123 * @since 1.2.0 119 124 */ 120 125 public $groups; … … 124 129 * 125 130 * @var object 131 * @since 1.2.0 126 132 */ 127 133 public $group; … … 131 137 * 132 138 * @var bool 139 * @since 1.2.0 133 140 */ 134 141 public $in_the_loop; … … 138 145 * 139 146 * @var string 147 * @since 1.2.0 140 148 */ 141 149 public $pag_page; … … 145 153 * 146 154 * @var string 155 * @since 1.2.0 147 156 */ 148 157 public $pag_num; … … 152 161 * 153 162 * @var string 163 * @since 1.2.0 154 164 */ 155 165 public $pag_links; … … 159 169 * 160 170 * @var int 171 * @since 1.2.0 161 172 */ 162 173 public $total_group_count; … … 166 177 * 167 178 * @var bool 179 * @since 1.2.0 168 180 */ 169 181 public $single_group = false; … … 173 185 * 174 186 * @var string 187 * @since 1.2.0 175 188 */ 176 189 public $sort_by; … … 180 193 * 181 194 * @var string 195 * @since 1.2.0 182 196 */ 183 197 public $order; … … 366 380 * Whether there are groups available in the loop. 367 381 * 382 * @since 1.2.0 383 * 368 384 * @see bp_has_groups() 369 385 * … … 381 397 * Set up the next group and iterate index. 382 398 * 399 * @since 1.2.0 400 * 383 401 * @return object The next group to iterate over. 384 402 */ … … 392 410 /** 393 411 * Rewind the groups and reset member index. 412 * 413 * @since 1.2.0 394 414 */ 395 415 function rewind_groups() { … … 406 426 * that controls iteration inside the groups loop, eg: 407 427 * while ( bp_groups() ) { ... 428 * 429 * @since 1.2.0 408 430 * 409 431 * @see bp_groups() … … 436 458 * while looping, so that template tags used during that iteration make 437 459 * reference to the current member. 460 * 461 * @since 1.2.0 438 462 * 439 463 * @see bp_the_group() … … 605 629 * Check whether there are more groups to iterate over. 606 630 * 631 * @since 1.0.0 632 * 607 633 * @return bool 608 634 */ … … 615 641 * Set up the current group inside the loop. 616 642 * 643 * @since 1.0.0 644 * 617 645 * @return object 618 646 */ … … 624 652 /** 625 653 * Is the group visible to the currently logged-in user? 654 * 655 * @since 1.0.0 626 656 * 627 657 * @param object|bool $group Optional. Group object. Default: current group in loop. … … 653 683 * Output the ID of the current group in the loop. 654 684 * 685 * @since 1.0.0 686 * 655 687 * @param object|bool $group Optional. Group object. Default: current group in loop. 656 688 */ … … 660 692 /** 661 693 * Get the ID of the current group in the loop. 694 * 695 * @since 1.0.0 662 696 * 663 697 * @param object|bool $group Optional. Group object. … … 761 795 * Output the name of the current group in the loop. 762 796 * 797 * @since 1.0.0 798 * 763 799 * @param object|bool $group Optional. Group object. 764 800 * Default: current group in loop. … … 769 805 /** 770 806 * Get the name of the current group in the loop. 807 * 808 * @since 1.0.0 771 809 * 772 810 * @param object|bool $group Optional. Group object. … … 796 834 * Output the type of the current group in the loop. 797 835 * 836 * @since 1.0.0 837 * 798 838 * @param object|bool $group Optional. Group object. 799 839 * Default: current group in loop. … … 805 845 /** 806 846 * Get the type of the current group in the loop. 847 * 848 * @since 1.0.0 807 849 * 808 850 * @param object|bool $group Optional. Group object. … … 841 883 * Output the status of the current group in the loop. 842 884 * 885 * @since 1.1.0 886 * 843 887 * @param object|bool $group Optional. Group object. 844 888 * Default: current group in loop. … … 849 893 /** 850 894 * Get the status of the current group in the loop. 895 * 896 * @since 1.1.0 851 897 * 852 898 * @param object|bool $group Optional. Group object. … … 1026 1072 * Output the 'last active' string for the current group in the loop. 1027 1073 * 1074 * @since 1.0.0 1075 * 1028 1076 * @param object|bool $group Optional. Group object. 1029 1077 * Default: current group in loop. … … 1034 1082 /** 1035 1083 * Return the 'last active' string for the current group in the loop. 1084 * 1085 * @since 1.0.0 1036 1086 * 1037 1087 * @param object|bool $group Optional. Group object. … … 1072 1122 * Output the permalink for the current group in the loop. 1073 1123 * 1124 * @since 1.0.0 1125 * 1074 1126 * @param object|bool $group Optional. Group object. 1075 1127 * Default: current group in loop. … … 1080 1132 /** 1081 1133 * Return the permalink for the current group in the loop. 1134 * 1135 * @since 1.0.0 1082 1136 * 1083 1137 * @param object|bool $group Optional. Group object. … … 1107 1161 * Output the permalink for the admin section of the current group in the loop. 1108 1162 * 1163 * @since 1.0.0 1164 * 1109 1165 * @param object|bool $group Optional. Group object. 1110 1166 * Default: current group in loop. … … 1115 1171 /** 1116 1172 * Return the permalink for the admin section of the current group in the loop. 1173 * 1174 * @since 1.0.0 1117 1175 * 1118 1176 * @param object|bool $group Optional. Group object. … … 1142 1200 * Return the slug for the current group in the loop. 1143 1201 * 1202 * @since 1.0.0 1203 * 1144 1204 * @param object|bool $group Optional. Group object. 1145 1205 * Default: current group in loop. … … 1150 1210 /** 1151 1211 * Return the slug for the current group in the loop. 1212 * 1213 * @since 1.0.0 1152 1214 * 1153 1215 * @param object|bool $group Optional. Group object. … … 1177 1239 * Output the description for the current group in the loop. 1178 1240 * 1241 * @since 1.0.0 1242 * 1179 1243 * @param object|bool $group Optional. Group object. 1180 1244 * Default: current group in loop. … … 1185 1249 /** 1186 1250 * Return the description for the current group in the loop. 1251 * 1252 * @since 1.0.0 1187 1253 * 1188 1254 * @param object|bool $group Optional. Group object. … … 1212 1278 * Output the description for the current group in the loop, for use in a textarea. 1213 1279 * 1280 * @since 1.0.0 1281 * 1214 1282 * @param object|bool $group Optional. Group object. 1215 1283 * Default: current group in loop. … … 1225 1293 * appropriate for "raw" editing. 1226 1294 * 1295 * @since 1.0.0 1296 * 1227 1297 * @param object|bool $group Optional. Group object. 1228 1298 * Default: current group in loop. … … 1254 1324 * Output an excerpt of the group description. 1255 1325 * 1326 * @since 1.0.0 1327 * 1256 1328 * @param object|bool $group Optional. The group being referenced. 1257 1329 * Defaults to the group currently being … … 1263 1335 /** 1264 1336 * Get an excerpt of a group description. 1337 * 1338 * @since 1.0.0 1265 1339 * 1266 1340 * @param object|bool $group Optional. The group being referenced. … … 1292 1366 * Either 'Public' or 'Private'. 1293 1367 * 1368 * @since 1.0.0 1369 * 1294 1370 * @param object|bool $group Optional. Group object. 1295 1371 * Default: current group in loop. … … 1302 1378 * 1303 1379 * Either 'Public' or 'Private'. 1380 * 1381 * @since 1.0.0 1304 1382 * 1305 1383 * @param object|bool $group Optional. Group object. … … 1362 1440 * Output the created date of the current group in the loop. 1363 1441 * 1442 * @since 1.0.0 1443 * 1364 1444 * @param object|bool $group Optional. Group object. 1365 1445 * Default: current group in loop. … … 1370 1450 /** 1371 1451 * Return the created date of the current group in the loop. 1452 * 1453 * @since 1.0.0 1372 1454 * 1373 1455 * @param object|bool $group Optional. Group object. … … 1397 1479 * Output the username of the creator of the current group in the loop. 1398 1480 * 1481 * @since 1.7.0 1482 * 1399 1483 * @param object|bool $group Optional. Group object. 1400 1484 * Default: current group in loop. … … 1405 1489 /** 1406 1490 * Return the username of the creator of the current group in the loop. 1491 * 1492 * @since 1.7.0 1407 1493 * 1408 1494 * @param object|bool $group Optional. Group object. … … 1432 1518 * Output the user ID of the creator of the current group in the loop. 1433 1519 * 1520 * @since 1.7.0 1521 * 1434 1522 * @param object|bool $group Optional. Group object. 1435 1523 * Default: current group in loop. … … 1440 1528 /** 1441 1529 * Return the user ID of the creator of the current group in the loop. 1530 * 1531 * @since 1.7.0 1442 1532 * 1443 1533 * @param object|bool $group Optional. Group object. … … 1467 1557 * Output the permalink of the creator of the current group in the loop. 1468 1558 * 1559 * @since 1.7.0 1560 * 1469 1561 * @param object|bool $group Optional. Group object. 1470 1562 * Default: current group in loop. … … 1475 1567 /** 1476 1568 * Return the permalink of the creator of the current group in the loop. 1569 * 1570 * @since 1.7.0 1477 1571 * 1478 1572 * @param object|bool $group Optional. Group object. … … 1501 1595 /** 1502 1596 * Determine whether a user is the creator of the current group in the loop. 1597 * 1598 * @since 1.7.0 1503 1599 * 1504 1600 * @param object|bool $group Optional. Group object. … … 1523 1619 /** 1524 1620 * Output the avatar of the creator of the current group in the loop. 1621 * 1622 * @since 1.7.0 1525 1623 * 1526 1624 * @param object|bool $group Optional. Group object. … … 1536 1634 /** 1537 1635 * Return the avatar of the creator of the current group in the loop. 1636 * 1637 * @since 1.7.0 1538 1638 * 1539 1639 * @param object|bool $group Optional. Group object. … … 1590 1690 * Alias of {@link bp_is_item_admin()}. 1591 1691 * 1692 * @since 1.1.0 1693 * 1592 1694 * @return bool 1593 1695 */ … … 1601 1703 * Alias of {@link bp_is_item_mod()}. 1602 1704 * 1705 * @since 1.1.0 1706 * 1603 1707 * @return bool 1604 1708 */ … … 1609 1713 /** 1610 1714 * Output markup listing group admins. 1715 * 1716 * @since 1.0.0 1611 1717 * 1612 1718 * @param object|bool $group Optional. Group object. … … 1650 1756 * Output markup listing group mod. 1651 1757 * 1758 * @since 1.0.0 1759 * 1652 1760 * @param object|bool $group Optional. Group object. 1653 1761 * Default: current group in loop. … … 1785 1893 /** 1786 1894 * Output the permalink of the current group's Members page. 1895 * 1896 * @since 1.0.0 1787 1897 */ 1788 1898 function bp_group_all_members_permalink() { … … 1791 1901 /** 1792 1902 * Return the permalink of the Members page of the current group in the loop. 1903 * 1904 * @since 1.0.0 1793 1905 * 1794 1906 * @param object|bool $group Optional. Group object. … … 1875 1987 /** 1876 1988 * Output the pagination HTML for a group loop. 1989 * 1990 * @since 1.2.0 1877 1991 */ 1878 1992 function bp_groups_pagination_links() { … … 1882 1996 * Get the pagination HTML for a group loop. 1883 1997 * 1998 * @since 1.2.0 1999 * 1884 2000 * @return string 1885 2001 */ … … 1899 2015 /** 1900 2016 * Output the "Viewing x-y of z groups" pagination message. 2017 * 2018 * @since 1.2.0 1901 2019 */ 1902 2020 function bp_groups_pagination_count() { … … 1905 2023 /** 1906 2024 * Generate the "Viewing x-y of z groups" pagination message. 2025 * 2026 * @since 1.5.0 1907 2027 * 1908 2028 * @return string … … 1941 2061 * public group automatically when creating content in that group. 1942 2062 * 2063 * @since 1.2.6 2064 * 1943 2065 * @return bool 1944 2066 */ … … 1948 2070 * Filters whether groups auto-join is enabled. 1949 2071 * 1950 * @since BuddyPres (1.2.6)2072 * @since 1.2.6 1951 2073 * 1952 2074 * @param bool $value Enabled status. … … 1957 2079 /** 1958 2080 * Output the total member count for a group. 2081 * 2082 * @since 1.0.0 1959 2083 * 1960 2084 * @param object|bool $group Optional. Group object. Default: current group in loop. … … 1965 2089 /** 1966 2090 * Get the total member count for a group. 2091 * 2092 * @since 1.0.0 1967 2093 * 1968 2094 * @param object|bool $group Optional. Group object. … … 1991 2117 /** 1992 2118 * Output the "x members" count string for a group. 2119 * 2120 * @since 1.2.0 1993 2121 */ 1994 2122 function bp_group_member_count() { … … 1997 2125 /** 1998 2126 * Generate the "x members" count string for a group. 2127 * 2128 * @since 1.2.0 1999 2129 * 2000 2130 * @return string … … 2023 2153 /** 2024 2154 * Output the URL of the Forum page of the current group in the loop. 2155 * 2156 * @since 1.0.0 2025 2157 */ 2026 2158 function bp_group_forum_permalink() { … … 2029 2161 /** 2030 2162 * Generate the URL of the Forum page of a group. 2163 * 2164 * @since 1.0.0 2031 2165 * 2032 2166 * @param object|bool $group Optional. Group object. … … 2056 2190 * Output the topic count for a group forum. 2057 2191 * 2192 * @since 1.2.0 2193 * 2058 2194 * @param array|string $args See {@link bp_get_group_forum_topic_count()}. 2059 2195 */ … … 2063 2199 /** 2064 2200 * Generate the topic count string for a group forum. 2201 * 2202 * @since 1.2.0 2065 2203 * 2066 2204 * @param array|string $args { … … 2118 2256 * Output the post count for a group forum. 2119 2257 * 2258 * @since 1.2.0 2259 * 2120 2260 * @param array|string $args See {@link bp_get_group_forum_post_count()}. 2121 2261 */ … … 2125 2265 /** 2126 2266 * Generate the post count string for a group forum. 2267 * 2268 * @since 1.2.0 2127 2269 * 2128 2270 * @param array|string $args { … … 2180 2322 * Determine whether forums are enabled for a group. 2181 2323 * 2324 * @since 1.0.0 2325 * 2182 2326 * @param object|bool $group Optional. Group object. Default: current group in loop. 2183 *2184 2327 * @return bool 2185 2328 */ … … 2201 2344 * Output the 'checked' attribute for the group forums settings UI. 2202 2345 * 2346 * @since 1.0.0 2347 * 2203 2348 * @param object|bool $group Optional. Group object. Default: current group in loop. 2204 2349 */ … … 2217 2362 /** 2218 2363 * Output the 'checked' attribute for a given status in the settings UI. 2364 * 2365 * @since 1.0.0 2219 2366 * 2220 2367 * @param string $setting Group status. 'public', 'private', 'hidden'. … … 2533 2680 * Determine whether a group has moderators. 2534 2681 * 2682 * @since 1.0.0 2683 * 2535 2684 * @param object|bool $group Optional. Group object. Default: current group in loop. 2536 2685 * @return array Info about group admins (user_id + date_modified). … … 2558 2707 * Output a URL for promoting a user to moderator. 2559 2708 * 2709 * @since 1.1.0 2710 * 2560 2711 * @param array|string $args See {@link bp_get_group_member_promote_mod_link()}. 2561 2712 */ … … 2565 2716 /** 2566 2717 * Generate a URL for promoting a user to moderator. 2718 * 2719 * @since 1.1.0 2567 2720 * 2568 2721 * @param array|string $args { … … 2597 2750 * Output a URL for promoting a user to admin. 2598 2751 * 2752 * @since 1.1.0 2753 * 2599 2754 * @param array|string $args See {@link bp_get_group_member_promote_admin_link()}. 2600 2755 */ … … 2604 2759 /** 2605 2760 * Generate a URL for promoting a user to admin. 2761 * 2762 * @since 1.1.0 2606 2763 * 2607 2764 * @param array|string $args { … … 2636 2793 * Output a URL for demoting a user to member. 2637 2794 * 2795 * @since 1.0.0 2796 * 2638 2797 * @param int $user_id ID of the member to demote. Default: current member in 2639 2798 * a member loop. … … 2650 2809 /** 2651 2810 * Generate a URL for demoting a user to member. 2811 * 2812 * @since 1.0.0 2652 2813 * 2653 2814 * @param int $user_id ID of the member to demote. Default: current … … 2682 2843 * Output a URL for banning a member from a group. 2683 2844 * 2845 * @since 1.0.0 2846 * 2684 2847 * @param int $user_id ID of the member to ban. 2685 2848 * Default: current member in a member loop. … … 2696 2859 /** 2697 2860 * Generate a URL for banning a member from a group. 2861 * 2862 * @since 1.0.0 2698 2863 * 2699 2864 * @param int $user_id ID of the member to ban. … … 2722 2887 * Output a URL for unbanning a member from a group. 2723 2888 * 2889 * @since 1.0.0 2890 * 2724 2891 * @param int $user_id ID of the member to unban. 2725 2892 * Default: current member in a member loop. … … 2736 2903 /** 2737 2904 * Generate a URL for unbanning a member from a group. 2905 * 2906 * @since 1.0.0 2738 2907 * 2739 2908 * @param int $user_id ID of the member to unban. … … 2766 2935 * Output a URL for removing a member from a group. 2767 2936 * 2937 * @since 1.2.6 2938 * 2768 2939 * @param int $user_id ID of the member to remove. 2769 2940 * Default: current member in a member loop. … … 2780 2951 /** 2781 2952 * Generate a URL for removing a member from a group. 2953 * 2954 * @since 1.2.6 2782 2955 * 2783 2956 * @param int $user_id ID of the member to remove. … … 2808 2981 * HTML admin subnav items for group pages. 2809 2982 * 2983 * @since 1.0.0 2984 * 2810 2985 * @param object|bool $group Optional. Group object. 2811 2986 * Default: current group in the loop. … … 2834 3009 * BackCompat for plugins/themes directly hooking groups_admin_tabs 2835 3010 * without using the Groups Extension API. 3011 * 3012 * @since 2.2.0 2836 3013 * 2837 3014 * @param string $subnav_output Subnav item output. … … 2864 3041 /** 2865 3042 * Output the group count for the displayed user. 3043 * 3044 * @since 1.1.0 2866 3045 */ 2867 3046 function bp_group_total_for_member() { … … 2871 3050 * Get the group count for the displayed user. 2872 3051 * 3052 * @since 1.1.0 3053 * 2873 3054 * @return string 2874 3055 */ … … 2887 3068 /** 2888 3069 * Output the 'action' attribute for a group form. 3070 * 3071 * @since 1.0.0 2889 3072 * 2890 3073 * @param string $page Page slug. … … 2895 3078 /** 2896 3079 * Generate the 'action' attribute for a group form. 3080 * 3081 * @since 1.0.0 2897 3082 * 2898 3083 * @param string $page Page slug. … … 2923 3108 * Output the 'action' attribute for a group admin form. 2924 3109 * 3110 * @since 1.0.0 3111 * 2925 3112 * @param string|bool $page Optional. Page slug. 2926 3113 */ … … 2930 3117 /** 2931 3118 * Generate the 'action' attribute for a group admin form. 3119 * 3120 * @since 1.0.0 2932 3121 * 2933 3122 * @param string|bool $page Optional. Page slug. … … 2962 3151 * Determine whether the logged-in user has requested membership to a group. 2963 3152 * 3153 * @since 1.0.0 3154 * 2964 3155 * @param object|bool $group Optional. Group object. 2965 3156 * Default: current group in the loop. … … 2983 3174 * Check if current user is member of a group. 2984 3175 * 3176 * @since 1.0.0 3177 * 2985 3178 * @global object $groups_template 2986 3179 * … … 3015 3208 /** 3016 3209 * Check whether the current user has an outstanding invite to the current group in the loop. 3210 * 3211 * @since 2.1.0 3017 3212 * 3018 3213 * @param object|bool $group Optional. Group data object. … … 3105 3300 /** 3106 3301 * Output the URL for accepting an invitation to the current group in the loop. 3302 * 3303 * @since 1.0.0 3107 3304 */ 3108 3305 function bp_group_accept_invite_link() { … … 3111 3308 /** 3112 3309 * Generate the URL for accepting an invitation to a group. 3310 * 3311 * @since 1.0.0 3113 3312 * 3114 3313 * @param object|bool $group Optional. Group object. … … 3139 3338 /** 3140 3339 * Output the URL for accepting an invitation to the current group in the loop. 3340 * 3341 * @since 1.0.0 3141 3342 */ 3142 3343 function bp_group_reject_invite_link() { … … 3145 3346 /** 3146 3347 * Generate the URL for rejecting an invitation to a group. 3348 * 3349 * @since 1.0.0 3147 3350 * 3148 3351 * @param object|bool $group Optional. Group object. … … 3173 3376 /** 3174 3377 * Output the URL for confirming a request to leave a group. 3378 * 3379 * @since 1.0.0 3175 3380 */ 3176 3381 function bp_group_leave_confirm_link() { … … 3179 3384 /** 3180 3385 * Generate the URL for confirming a request to leave a group. 3386 * 3387 * @since 1.0.0 3181 3388 * 3182 3389 * @param object|bool $group Optional. Group object. … … 3205 3412 /** 3206 3413 * Output the URL for rejecting a request to leave a group. 3414 * 3415 * @since 1.0.0 3207 3416 */ 3208 3417 function bp_group_leave_reject_link() { … … 3211 3420 /** 3212 3421 * Generate the URL for rejecting a request to leave a group. 3422 * 3423 * @since 1.0.0 3213 3424 * 3214 3425 * @param object|bool $group Optional. Group object. … … 3237 3448 /** 3238 3449 * Output the 'action' attribute for a group send invite form. 3450 * 3451 * @since 1.0.0 3239 3452 */ 3240 3453 function bp_group_send_invite_form_action() { … … 3243 3456 /** 3244 3457 * Output the 'action' attribute for a group send invite form. 3458 * 3459 * @since 1.0.0 3245 3460 * 3246 3461 * @param object|bool $group Optional. Group object. … … 3269 3484 /** 3270 3485 * Determine whether the current user has friends to invite to a group. 3486 * 3487 * @since 1.0.0 3271 3488 * 3272 3489 * @param object|bool $group Optional. Group object. … … 3756 3973 /* Group Members *************************************************************/ 3757 3974 3975 /** 3976 * Class BP_Groups_Group_Members_Template 3977 * 3978 * @since 1.0.0 3979 */ 3758 3980 class BP_Groups_Group_Members_Template { 3981 3982 /** 3983 * @since 1.0.0 3984 * @var int 3985 */ 3759 3986 public $current_member = -1; 3987 3988 /** 3989 * @since 1.0.0 3990 * @var int 3991 */ 3760 3992 public $member_count; 3993 3994 /** 3995 * @since 1.0.0 3996 * @var array 3997 */ 3761 3998 public $members; 3999 4000 /** 4001 * @since 1.0.0 4002 * @var object 4003 */ 3762 4004 public $member; 3763 4005 4006 /** 4007 * @since 1.0.0 4008 * @var bool 4009 */ 3764 4010 public $in_the_loop; 3765 4011 4012 /** 4013 * @since 1.0.0 4014 * @var int 4015 */ 3766 4016 public $pag_page; 4017 4018 /** 4019 * @since 1.0.0 4020 * @var int 4021 */ 3767 4022 public $pag_num; 4023 4024 /** 4025 * @since 1.0.0 4026 * @var array|string|void 4027 */ 3768 4028 public $pag_links; 4029 4030 /** 4031 * @since 1.0.0 4032 * @var int 4033 */ 3769 4034 public $total_group_count; 3770 4035 3771 4036 /** 3772 4037 * Constructor. 4038 * 4039 * @since 1.5.0 3773 4040 * 3774 4041 * @param array $args { … … 3877 4144 } 3878 4145 4146 /** 4147 * Whether or not there are members to display. 4148 * 4149 * @since 1.0.0 4150 * 4151 * @return bool 4152 */ 3879 4153 public function has_members() { 3880 4154 if ( ! empty( $this->member_count ) ) { … … 3885 4159 } 3886 4160 4161 /** 4162 * Increments to the next member to display. 4163 * 4164 * @since 1.0.0 4165 * 4166 * @return object 4167 */ 3887 4168 public function next_member() { 3888 4169 $this->current_member++; … … 3892 4173 } 3893 4174 4175 /** 4176 * Rewinds to the first member to display. 4177 * 4178 * @since 1.0.0 4179 */ 3894 4180 public function rewind_members() { 3895 4181 $this->current_member = -1; … … 3899 4185 } 3900 4186 4187 /** 4188 * Finishes up the members for display. 4189 * 4190 * @since 1.0.0 4191 * 4192 * @return bool 4193 */ 3901 4194 public function members() { 3902 4195 $tick = intval( $this->current_member + 1 ); … … 3923 4216 } 3924 4217 4218 /** 4219 * Sets up the member to display. 4220 * 4221 * @since 1.0.0 4222 */ 3925 4223 public function the_member() { 3926 4224 $this->in_the_loop = true; … … 3945 4243 /** 3946 4244 * Initialize a group member query loop. 4245 * 4246 * @since 1.0.0 3947 4247 * 3948 4248 * @param array|string $args { … … 4009 4309 } 4010 4310 4311 /** 4312 * @since 1.0.0 4313 * 4314 * @return mixed 4315 */ 4011 4316 function bp_group_members() { 4012 4317 global $members_template; … … 4015 4320 } 4016 4321 4322 /** 4323 * @since 1.0.0 4324 * 4325 * @return mixed 4326 */ 4017 4327 function bp_group_the_member() { 4018 4328 global $members_template; … … 4142 4452 } 4143 4453 4454 /** 4455 * @since 1.0.0 4456 */ 4144 4457 function bp_group_member_name() { 4145 4458 echo bp_get_group_member_name(); 4146 4459 } 4460 4461 /** 4462 * @since 1.0.0 4463 * 4464 * @return mixed|void 4465 */ 4147 4466 function bp_get_group_member_name() { 4148 4467 global $members_template; … … 4158 4477 } 4159 4478 4479 /** 4480 * @since 1.0.0 4481 */ 4160 4482 function bp_group_member_url() { 4161 4483 echo bp_get_group_member_url(); 4162 4484 } 4485 4486 /** 4487 * @since 1.0.0 4488 * 4489 * @return mixed|void 4490 */ 4163 4491 function bp_get_group_member_url() { 4164 4492 global $members_template; … … 4174 4502 } 4175 4503 4504 /** 4505 * @since 1.0.0 4506 */ 4176 4507 function bp_group_member_link() { 4177 4508 echo bp_get_group_member_link(); 4178 4509 } 4510 4511 /** 4512 * @since 1.0.0 4513 * 4514 * @return mixed|void 4515 */ 4179 4516 function bp_get_group_member_link() { 4180 4517 global $members_template; … … 4190 4527 } 4191 4528 4529 /** 4530 * @since 1.2.0 4531 */ 4192 4532 function bp_group_member_domain() { 4193 4533 echo bp_get_group_member_domain(); 4194 4534 } 4535 4536 /** 4537 * @since 1.2.0 4538 * 4539 * @return mixed|void 4540 */ 4195 4541 function bp_get_group_member_domain() { 4196 4542 global $members_template; … … 4206 4552 } 4207 4553 4554 /** 4555 * @since 1.2.0 4556 */ 4208 4557 function bp_group_member_is_friend() { 4209 4558 echo bp_get_group_member_is_friend(); 4210 4559 } 4560 4561 /** 4562 * @since 1.2.0 4563 * 4564 * @return mixed|void 4565 */ 4211 4566 function bp_get_group_member_is_friend() { 4212 4567 global $members_template; … … 4230 4585 } 4231 4586 4587 /** 4588 * @since 1.0.0 4589 */ 4232 4590 function bp_group_member_is_banned() { 4233 4591 echo bp_get_group_member_is_banned(); 4234 4592 } 4593 4594 /** 4595 * @since 1.0.0 4596 * 4597 * @return mixed|void 4598 */ 4235 4599 function bp_get_group_member_is_banned() { 4236 4600 global $members_template; … … 4246 4610 } 4247 4611 4612 /** 4613 * @since 1.2.6 4614 */ 4248 4615 function bp_group_member_css_class() { 4249 4616 global $members_template; … … 4262 4629 } 4263 4630 4631 /** 4632 * @since 1.0.0 4633 */ 4264 4634 function bp_group_member_joined_since() { 4265 4635 echo bp_get_group_member_joined_since(); 4266 4636 } 4637 4638 /** 4639 * @since 1.0.0 4640 * 4641 * @return mixed|void 4642 */ 4267 4643 function bp_get_group_member_joined_since() { 4268 4644 global $members_template; … … 4278 4654 } 4279 4655 4656 /** 4657 * @since 1.0.0 4658 */ 4280 4659 function bp_group_member_id() { 4281 4660 echo bp_get_group_member_id(); 4282 4661 } 4662 4663 /** 4664 * @since 1.0.0 4665 * 4666 * @return mixed|void 4667 */ 4283 4668 function bp_get_group_member_id() { 4284 4669 global $members_template; … … 4294 4679 } 4295 4680 4681 /** 4682 * @since 1.0.0 4683 * 4684 * @return bool 4685 */ 4296 4686 function bp_group_member_needs_pagination() { 4297 4687 global $members_template; … … 4304 4694 } 4305 4695 4696 /** 4697 * @since 1.0.0 4698 */ 4306 4699 function bp_group_pag_id() { 4307 4700 echo bp_get_group_pag_id(); 4308 4701 } 4702 4703 /** 4704 * @since 1.0.0 4705 * 4706 * @return mixed|void 4707 */ 4309 4708 function bp_get_group_pag_id() { 4310 4709 … … 4319 4718 } 4320 4719 4720 /** 4721 * @since 1.0.0 4722 */ 4321 4723 function bp_group_member_pagination() { 4322 4724 echo bp_get_group_member_pagination(); 4323 4725 wp_nonce_field( 'bp_groups_member_list', '_member_pag_nonce' ); 4324 4726 } 4727 4728 /** 4729 * @since 1.0.0 4730 * 4731 * @return mixed|void 4732 */ 4325 4733 function bp_get_group_member_pagination() { 4326 4734 global $members_template; … … 4336 4744 } 4337 4745 4746 /** 4747 * @since 1.0.0 4748 */ 4338 4749 function bp_group_member_pagination_count() { 4339 4750 echo bp_get_group_member_pagination_count(); 4340 4751 } 4752 4753 /** 4754 * @since 1.0.0 4755 * 4756 * @return mixed|void 4757 */ 4341 4758 function bp_get_group_member_pagination_count() { 4342 4759 global $members_template; … … 4366 4783 } 4367 4784 4785 /** 4786 * @since 1.0.0 4787 */ 4368 4788 function bp_group_member_admin_pagination() { 4369 4789 echo bp_get_group_member_admin_pagination(); 4370 4790 wp_nonce_field( 'bp_groups_member_admin_list', '_member_admin_pag_nonce' ); 4371 4791 } 4792 4793 /** 4794 * @since 1.0.0 4795 * 4796 * @return mixed 4797 */ 4372 4798 function bp_get_group_member_admin_pagination() { 4373 4799 global $members_template; … … 4563 4989 } 4564 4990 4991 /** 4992 * @since 1.0.0 4993 * 4994 * @return bool 4995 */ 4565 4996 function bp_group_creation_tabs() { 4566 4997 $bp = buddypress(); … … 4594 5025 } 4595 5026 5027 /** 5028 * @since 1.0.0 5029 */ 4596 5030 function bp_group_creation_stage_title() { 4597 5031 $bp = buddypress(); … … 4607 5041 } 4608 5042 5043 /** 5044 * @since 1.1.0 5045 */ 4609 5046 function bp_group_creation_form_action() { 4610 5047 echo bp_get_group_creation_form_action(); 4611 5048 } 5049 5050 /** 5051 * @since 1.1.0 5052 * 5053 * @return mixed|void 5054 */ 4612 5055 function bp_get_group_creation_form_action() { 4613 5056 $bp = buddypress(); … … 4628 5071 } 4629 5072 5073 /** 5074 * @since 1.1.0 5075 * 5076 * @param string $step_slug 5077 * 5078 * @return bool 5079 */ 4630 5080 function bp_is_group_creation_step( $step_slug ) { 4631 5081 … … 4659 5109 } 4660 5110 5111 /** 5112 * @since 1.1.0 5113 * 5114 * @param array $step_slugs 5115 * 5116 * @return bool 5117 */ 4661 5118 function bp_is_group_creation_step_complete( $step_slugs ) { 4662 5119 $bp = buddypress(); … … 4683 5140 } 4684 5141 5142 /** 5143 * @since 1.1.0 5144 * 5145 * @param string $step_slug 5146 * 5147 * @return bool 5148 */ 4685 5149 function bp_are_previous_group_creation_steps_complete( $step_slug ) { 4686 5150 $bp = buddypress(); … … 4708 5172 } 4709 5173 5174 /** 5175 * @since 1.1.0 5176 */ 4710 5177 function bp_new_group_id() { 4711 5178 echo bp_get_new_group_id(); 4712 5179 } 5180 5181 /** 5182 * @since 1.1.0 5183 * 5184 * @return mixed|void 5185 */ 4713 5186 function bp_get_new_group_id() { 4714 5187 $bp = buddypress(); … … 4727 5200 } 4728 5201 5202 /** 5203 * @since 1.1.0 5204 */ 4729 5205 function bp_new_group_name() { 4730 5206 echo bp_get_new_group_name(); 4731 5207 } 5208 5209 /** 5210 * @since 1.1.0 5211 * 5212 * @return mixed|void 5213 */ 4732 5214 function bp_get_new_group_name() { 4733 5215 $bp = buddypress(); … … 4746 5228 } 4747 5229 5230 /** 5231 * @since 1.1.0 5232 */ 4748 5233 function bp_new_group_description() { 4749 5234 echo bp_get_new_group_description(); 4750 5235 } 5236 5237 /** 5238 * @since 1.1.0 5239 * 5240 * @return mixed|void 5241 */ 4751 5242 function bp_get_new_group_description() { 4752 5243 $bp = buddypress(); … … 4765 5256 } 4766 5257 5258 /** 5259 * @since 1.1.0 5260 */ 4767 5261 function bp_new_group_enable_forum() { 4768 5262 echo bp_get_new_group_enable_forum(); 4769 5263 } 5264 5265 /** 5266 * @since 1.1.0 5267 * 5268 * @return int 5269 */ 4770 5270 function bp_get_new_group_enable_forum() { 4771 5271 $bp = buddypress(); … … 4784 5284 } 4785 5285 5286 /** 5287 * @since 1.1.0 5288 */ 4786 5289 function bp_new_group_status() { 4787 5290 echo bp_get_new_group_status(); 4788 5291 } 5292 5293 /** 5294 * @since 1.1.0 5295 * 5296 * @return mixed|void 5297 */ 4789 5298 function bp_get_new_group_status() { 4790 5299 $bp = buddypress(); … … 5102 5611 } 5103 5612 5613 /** 5614 * @since 1.0.0 5615 */ 5104 5616 function bp_directory_groups_search_form() { 5105 5617 … … 5130 5642 /** 5131 5643 * Displays group header tabs. 5644 * 5645 * @since 1.0.0 5132 5646 * 5133 5647 * @todo Deprecate? … … 5149 5663 /** 5150 5664 * Displays group filter titles. 5665 * 5666 * @since 1.0.0 5151 5667 * 5152 5668 * @todo Deprecate? … … 5295 5811 } 5296 5812 5813 /** 5814 * @since 1.1.0 5815 */ 5297 5816 function bp_group_avatar_delete_link() { 5298 5817 echo bp_get_group_avatar_delete_link(); 5299 5818 } 5819 5820 /** 5821 * @since 1.1.0 5822 * 5823 * @return mixed|void 5824 */ 5300 5825 function bp_get_group_avatar_delete_link() { 5301 5826 $bp = buddypress(); … … 5311 5836 } 5312 5837 5838 /** 5839 * @since 1.0.0 5840 */ 5313 5841 function bp_custom_group_boxes() { 5314 5842 do_action( 'groups_custom_group_boxes' ); 5315 5843 } 5316 5844 5845 /** 5846 * @since 1.0.0 5847 */ 5317 5848 function bp_custom_group_admin_tabs() { 5318 5849 do_action( 'groups_custom_group_admin_tabs' ); 5319 5850 } 5320 5851 5852 /** 5853 * @since 1.0.0 5854 */ 5321 5855 function bp_custom_group_fields_editable() { 5322 5856 do_action( 'groups_custom_group_fields_editable' ); 5323 5857 } 5324 5858 5859 /** 5860 * @since 1.0.0 5861 */ 5325 5862 function bp_custom_group_fields() { 5326 5863 do_action( 'groups_custom_group_fields' ); … … 5329 5866 /* Group Membership Requests *************************************************/ 5330 5867 5868 /** 5869 * Class BP_Groups_Membership_Requests_Template 5870 * 5871 * @since 1.0.0 5872 */ 5331 5873 class BP_Groups_Membership_Requests_Template { 5874 5875 /** 5876 * @since 1.0.0 5877 * @var int 5878 */ 5332 5879 public $current_request = -1; 5880 5881 /** 5882 * @since 1.0.0 5883 * @var int 5884 */ 5333 5885 public $request_count; 5886 5887 /** 5888 * @since 1.0.0 5889 * @var array 5890 */ 5334 5891 public $requests; 5892 5893 /** 5894 * @since 1.0.0 5895 * @var object 5896 */ 5335 5897 public $request; 5336 5898 5899 /** 5900 * @sine 1.0.0 5901 * @var bool 5902 */ 5337 5903 public $in_the_loop; 5338 5904 5905 /** 5906 * @since 1.0.0 5907 * @var int 5908 */ 5339 5909 public $pag_page; 5910 5911 /** 5912 * @since 1.0.0 5913 * @var int 5914 */ 5340 5915 public $pag_num; 5916 5917 /** 5918 * @since 1.0.0 5919 * @var array|string|void 5920 */ 5341 5921 public $pag_links; 5922 5923 /** 5924 * @since 1.0.0 5925 * @var int 5926 */ 5342 5927 public $total_request_count; 5343 5928 5344 5929 /** 5345 5930 * Constructor method. 5931 * 5932 * @since 1.5.0 5346 5933 * 5347 5934 * @param array $args { … … 5433 6020 } 5434 6021 6022 /** 6023 * Whether or not there are requests to show. 6024 * 6025 * @since 1.0.0 6026 * 6027 * @return bool 6028 */ 5435 6029 public function has_requests() { 5436 6030 if ( ! empty( $this->request_count ) ) { … … 5441 6035 } 5442 6036 6037 /** 6038 * Moves up to the next request. 6039 * 6040 * @since 1.0.0 6041 * 6042 * @return object 6043 */ 5443 6044 public function next_request() { 5444 6045 $this->current_request++; … … 5448 6049 } 5449 6050 6051 /** 6052 * Rewinds the requests to the first in the list. 6053 * 6054 * @since 1.0.0 6055 */ 5450 6056 public function rewind_requests() { 5451 6057 $this->current_request = -1; … … 5456 6062 } 5457 6063 6064 /** 6065 * Finishes up the requests to display. 6066 * 6067 * @since 1.0.0 6068 * 6069 * @return bool 6070 */ 5458 6071 public function requests() { 5459 6072 $tick = intval( $this->current_request + 1 ); … … 5476 6089 } 5477 6090 6091 /** 6092 * Sets up the request to display. 6093 * 6094 * @since 1.0.0 6095 */ 5478 6096 public function the_request() { 5479 6097 $this->in_the_loop = true; … … 5495 6113 /** 5496 6114 * Initialize a group membership request template loop. 6115 * 6116 * @since 1.0.0 5497 6117 * 5498 6118 * @param array|string $args { … … 5529 6149 } 5530 6150 6151 /** 6152 * @since 1.0.0 6153 * 6154 * @return mixed 6155 */ 5531 6156 function bp_group_membership_requests() { 5532 6157 global $requests_template; … … 5535 6160 } 5536 6161 6162 /** 6163 * @since 1.0.0 6164 * 6165 * @return mixed 6166 */ 5537 6167 function bp_group_the_membership_request() { 5538 6168 global $requests_template; … … 5541 6171 } 5542 6172 6173 /** 6174 * @since 1.0.0 6175 */ 5543 6176 function bp_group_request_user_avatar_thumb() { 5544 6177 global $requests_template; … … 5554 6187 } 5555 6188 6189 /** 6190 * @since 1.0.0 6191 */ 5556 6192 function bp_group_request_reject_link() { 5557 6193 echo bp_get_group_request_reject_link(); 5558 6194 } 6195 6196 /** 6197 * @since 1.2.6 6198 * 6199 * @return mixed|void 6200 */ 5559 6201 function bp_get_group_request_reject_link() { 5560 6202 global $requests_template; … … 5570 6212 } 5571 6213 6214 /** 6215 * @since 1.0.0 6216 */ 5572 6217 function bp_group_request_accept_link() { 5573 6218 echo bp_get_group_request_accept_link(); 5574 6219 } 6220 6221 /** 6222 * @since 1.2.6 6223 * @return mixed|void 6224 */ 5575 6225 function bp_get_group_request_accept_link() { 5576 6226 global $requests_template; … … 5586 6236 } 5587 6237 6238 /** 6239 * @since 1.0.0 6240 */ 5588 6241 function bp_group_request_user_link() { 5589 6242 echo bp_get_group_request_user_link(); 5590 6243 } 6244 6245 /** 6246 * @since 1.2.6 6247 * 6248 * @return mixed|void 6249 */ 5591 6250 function bp_get_group_request_user_link() { 5592 6251 global $requests_template; … … 5602 6261 } 5603 6262 6263 /** 6264 * @since 1.0.0 6265 */ 5604 6266 function bp_group_request_time_since_requested() { 5605 6267 global $requests_template; … … 5615 6277 } 5616 6278 6279 /** 6280 * @since 1.0.0 6281 */ 5617 6282 function bp_group_request_comment() { 5618 6283 global $requests_template; … … 5700 6365 /** Group Invitations *********************************************************/ 5701 6366 6367 /** 6368 * Class BP_Groups_Invite_Template 6369 * 6370 * @since 1.1.0 6371 */ 5702 6372 class BP_Groups_Invite_Template { 6373 6374 /** 6375 * @since 1.1.0 6376 * @var int 6377 */ 5703 6378 public $current_invite = -1; 6379 6380 /** 6381 * @since 1.1.0 6382 * @var int 6383 */ 5704 6384 public $invite_count; 6385 6386 /** 6387 * @since 1.1.0 6388 * @var array 6389 */ 5705 6390 public $invites; 6391 6392 /** 6393 * @since 1.1.0 6394 * @var object 6395 */ 5706 6396 public $invite; 5707 6397 6398 /** 6399 * @since 1.1.0 6400 * @var bool 6401 */ 5708 6402 public $in_the_loop; 5709 6403 6404 /** 6405 * @since 1.1.0 6406 * @var int 6407 */ 5710 6408 public $pag_page; 6409 6410 /** 6411 * @since 1.1.0 6412 * @var int 6413 */ 5711 6414 public $pag_num; 6415 6416 /** 6417 * @since 1.1.0 6418 * @var string 6419 */ 5712 6420 public $pag_links; 6421 6422 /** 6423 * @since 1.1.0 6424 * @var int 6425 */ 5713 6426 public $total_invite_count; 5714 6427 6428 /** 6429 * BP_Groups_Invite_Template constructor. 6430 * 6431 * @since 1.5.0 6432 * 6433 * @param array $args 6434 */ 5715 6435 public function __construct( $args = array() ) { 5716 6436 … … 5774 6494 } 5775 6495 6496 /** 6497 * Whether or not there are invites to show. 6498 * 6499 * @since 1.1.0 6500 * 6501 * @return bool 6502 */ 5776 6503 public function has_invites() { 5777 6504 if ( ! empty( $this->invite_count ) ) { … … 5782 6509 } 5783 6510 6511 /** 6512 * Increments up to the next invite to show. 6513 * 6514 * @since 1.1.0 6515 * 6516 * @return object 6517 */ 5784 6518 public function next_invite() { 5785 6519 $this->current_invite++; … … 5789 6523 } 5790 6524 6525 /** 6526 * Rewinds to the first invite to show. 6527 * 6528 * @since 1.1.0 6529 */ 5791 6530 public function rewind_invites() { 5792 6531 $this->current_invite = -1; … … 5796 6535 } 5797 6536 6537 /** 6538 * Finishes up the invites to show. 6539 * 6540 * @since 1.1.0 6541 * 6542 * @return bool 6543 */ 5798 6544 public function invites() { 5799 6545 $tick = intval( $this->current_invite + 1 ); … … 5820 6566 } 5821 6567 6568 /** 6569 * Sets up the invite to show. 6570 * 6571 * @since 1.1.0 6572 */ 5822 6573 public function the_invite() { 5823 6574 global $group_id; … … 5874 6625 } 5875 6626 6627 /** 6628 * Whether or not there are invites. 6629 * 6630 * @since 1.1.0 6631 * 6632 * @param string $args 6633 * @return bool|mixed|void 6634 */ 5876 6635 function bp_group_has_invites( $args = '' ) { 5877 6636 global $invites_template, $group_id; … … 5914 6673 } 5915 6674 6675 /** 6676 * @since 1.1.0 6677 * 6678 * @return mixed 6679 */ 5916 6680 function bp_group_invites() { 5917 6681 global $invites_template; … … 5920 6684 } 5921 6685 6686 /** 6687 * @since 1.1.0 6688 * 6689 * @return mixed 6690 */ 5922 6691 function bp_group_the_invite() { 5923 6692 global $invites_template; … … 5926 6695 } 5927 6696 6697 /** 6698 * @since 1.1.0 6699 */ 5928 6700 function bp_group_invite_item_id() { 5929 6701 echo bp_get_group_invite_item_id(); 5930 6702 } 6703 6704 /** 6705 * @since 1.1.0 6706 * 6707 * @return mixed|void 6708 */ 5931 6709 function bp_get_group_invite_item_id() { 5932 6710 global $invites_template; … … 5942 6720 } 5943 6721 6722 /** 6723 * @since 1.1.0 6724 */ 5944 6725 function bp_group_invite_user_avatar() { 5945 6726 echo bp_get_group_invite_user_avatar(); 5946 6727 } 6728 6729 /** 6730 * @since 1.1.0 6731 * 6732 * @return mixed|void 6733 */ 5947 6734 function bp_get_group_invite_user_avatar() { 5948 6735 global $invites_template; … … 5958 6745 } 5959 6746 6747 /** 6748 * @since 1.1.0 6749 */ 5960 6750 function bp_group_invite_user_link() { 5961 6751 echo bp_get_group_invite_user_link(); 5962 6752 } 6753 6754 /** 6755 * @since 1.1.0 6756 * 6757 * @return mixed|void 6758 */ 5963 6759 function bp_get_group_invite_user_link() { 5964 6760 global $invites_template; … … 5974 6770 } 5975 6771 6772 /** 6773 * @since 1.1.0 6774 */ 5976 6775 function bp_group_invite_user_last_active() { 5977 6776 echo bp_get_group_invite_user_last_active(); 5978 6777 } 6778 6779 /** 6780 * @since 1.1.0 6781 * 6782 * @return mixed|void 6783 */ 5979 6784 function bp_get_group_invite_user_last_active() { 5980 6785 global $invites_template; … … 5990 6795 } 5991 6796 6797 /** 6798 * @since 1.1.0 6799 */ 5992 6800 function bp_group_invite_user_remove_invite_url() { 5993 6801 echo bp_get_group_invite_user_remove_invite_url(); 5994 6802 } 6803 6804 /** 6805 * @since 1.1.0 6806 * 6807 * @return string 6808 */ 5995 6809 function bp_get_group_invite_user_remove_invite_url() { 5996 6810 global $invites_template; … … 6015 6829 echo bp_get_group_invite_pagination_links(); 6016 6830 } 6831 6017 6832 /** 6018 6833 * Get pagination links for group invitations.
Note: See TracChangeset
for help on using the changeset viewer.