Changeset 9028
- Timestamp:
- 09/17/2014 02:15:25 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r8931 r9028 2 2 3 3 /** 4 * BuddyPress Groups Template Functions 5 * 6 * @package BuddyPress 7 * @subpackage GroupsTemplate 4 * BuddyPress Groups Template Functions. 8 5 */ 9 6 … … 12 9 13 10 /** 14 * Output the groups component slug 15 * 16 * @package BuddyPress 17 * @subpackage Groups Template 18 * @since BuddyPress (1.5) 19 * 20 * @uses bp_get_groups_slug() 11 * Output the groups component slug. 12 * 13 * @since BuddyPress (1.5.0) 21 14 */ 22 15 function bp_groups_slug() { … … 24 17 } 25 18 /** 26 * Return the groups component slug 27 * 28 * @ package BuddyPress29 * @subpackage Groups Template30 * @ since BuddyPress (1.5)19 * Return the groups component slug. 20 * 21 * @since BuddyPress (1.5.0) 22 * 23 * @return string 31 24 */ 32 25 function bp_get_groups_slug() { … … 37 30 * Output the groups component root slug 38 31 * 39 * @package BuddyPress 40 * @subpackage Groups Template 41 * @since BuddyPress (1.5) 42 * 43 * @uses bp_get_groups_root_slug() 32 * @since BuddyPress (1.5.0) 44 33 */ 45 34 function bp_groups_root_slug() { … … 49 38 * Return the groups component root slug 50 39 * 51 * @ package BuddyPress52 * @subpackage Groups Template53 * @ since BuddyPress (1.5)40 * @since BuddyPress (1.5.0) 41 * 42 * @return string 54 43 */ 55 44 function bp_get_groups_root_slug() { … … 60 49 * Output group directory permalink 61 50 * 62 * @package BuddyPress 63 * @subpackage Groups Template 64 * @since BuddyPress (1.5) 65 * @uses bp_get_groups_directory_permalink() 51 * @since BuddyPress (1.5.0) 66 52 */ 67 53 function bp_groups_directory_permalink() { … … 71 57 * Return group directory permalink 72 58 * 73 * @package BuddyPress 74 * @subpackage Groups Template 75 * @since BuddyPress (1.5) 76 * @uses apply_filters() 77 * @uses traisingslashit() 78 * @uses bp_get_root_domain() 79 * @uses bp_get_groups_root_slug() 59 * @since BuddyPress (1.5.0) 60 * 80 61 * @return string 81 62 */ … … 84 65 } 85 66 86 /***************************************************************************** 87 * Groups Template Class/Tags 88 **/ 89 67 /** 68 * The main Groups template loop class. 69 * 70 * Responsible for loading a group of groups into a loop for display. 71 */ 90 72 class BP_Groups_Template { 73 74 /** 75 * The loop iterator. 76 * 77 * @access public 78 * @var int 79 */ 91 80 var $current_group = -1; 81 82 /** 83 * The number of groups returned by the paged query. 84 * 85 * @access public 86 * @var int 87 */ 92 88 var $group_count; 89 90 /** 91 * Array of groups located by the query. 92 * 93 * @access public 94 * @var array 95 */ 93 96 var $groups; 97 98 /** 99 * The group object currently being iterated on. 100 * 101 * @access public 102 * @var object 103 */ 94 104 var $group; 95 105 106 /** 107 * A flag for whether the loop is currently being iterated. 108 * 109 * @access public 110 * @var bool 111 */ 96 112 var $in_the_loop; 97 113 114 /** 115 * The page number being requested. 116 * 117 * @access public 118 * @var public 119 */ 98 120 var $pag_page; 121 122 /** 123 * The number of items being requested per page. 124 * 125 * @access public 126 * @var public 127 */ 99 128 var $pag_num; 129 130 /** 131 * An HTML string containing pagination links. 132 * 133 * @access public 134 * @var string 135 */ 100 136 var $pag_links; 137 138 /** 139 * The total number of groups matching the query parameters. 140 * 141 * @access public 142 * @var int 143 */ 101 144 var $total_group_count; 102 145 146 /** 147 * Whether the template loop is for a single group page. 148 * 149 * @access public 150 * @var bool 151 */ 103 152 var $single_group = false; 104 153 154 /** 155 * Field to sort by. 156 * 157 * @access public 158 * @var string 159 */ 105 160 var $sort_by; 161 162 /** 163 * Sort order. 164 * 165 * @access public 166 * @var string 167 */ 106 168 var $order; 107 169 170 /** 171 * Constructor method. 172 * 173 * @see BP_Groups_Group::get() for an in-depth description of arguments. 174 * 175 * @param array $args { 176 * Array of arguments. Accepts all arguments accepted by 177 * {@link BP_Groups_Group::get()}. In cases where the default 178 * values of the params differ, they have been discussed below. 179 * @type int $per_page Default: 20. 180 * @type int $page Default: 1. 181 * } 182 */ 108 183 function __construct( $args = array() ){ 109 184 … … 264 339 } 265 340 341 /** 342 * Whether there are groups available in the loop. 343 * 344 * @see bp_has_groups() 345 * 346 * @return bool True if there are items in the loop, otherwise false. 347 */ 266 348 function has_groups() { 267 349 if ( $this->group_count ) … … 271 353 } 272 354 355 /** 356 * Set up the next group and iterate index. 357 * 358 * @return object The next group to iterate over. 359 */ 273 360 function next_group() { 274 361 $this->current_group++; … … 278 365 } 279 366 367 /** 368 * Rewind the groups and reset member index. 369 */ 280 370 function rewind_groups() { 281 371 $this->current_group = -1; … … 285 375 } 286 376 377 /** 378 * Whether there are groups left in the loop to iterate over. 379 * 380 * This method is used by {@link bp_groups()} as part of the while loop 381 * that controls iteration inside the groups loop, eg: 382 * while ( bp_groups() ) { ... 383 * 384 * @see bp_groups() 385 * 386 * @return bool True if there are more groups to show, otherwise false. 387 */ 287 388 function groups() { 288 389 if ( $this->current_group + 1 < $this->group_count ) { … … 298 399 } 299 400 401 /** 402 * Set up the current group inside the loop. 403 * 404 * Used by {@link bp_the_group()} to set up the current group data 405 * while looping, so that template tags used during that iteration make 406 * reference to the current member. 407 * 408 * @see bp_the_group() 409 */ 300 410 function the_group() { 301 411 $this->in_the_loop = true; … … 308 418 309 419 /** 310 * Start the Groups Template Loop 420 * Start the Groups Template Loop. 311 421 * 312 422 * @since BuddyPress (1.0.0) … … 348 458 * results. Default: false. 349 459 * } 350 *351 460 * @return bool True if there are groups to display that match the params 352 461 */ … … 430 539 } 431 540 541 /** 542 * Check whether there are more groups to iterate over. 543 * 544 * @return bool 545 */ 432 546 function bp_groups() { 433 547 global $groups_template; … … 435 549 } 436 550 551 /** 552 * Set up the current group inside the loop. 553 * 554 * @return object 555 */ 437 556 function bp_the_group() { 438 557 global $groups_template; … … 440 559 } 441 560 561 /** 562 * Is the group visible to the currently logged-in user? 563 * 564 * @param object $group Optional. Group object. Default: current group in loop. 565 * @return bool 566 */ 442 567 function bp_group_is_visible( $group = false ) { 443 568 global $groups_template; … … 460 585 } 461 586 587 /** 588 * Output the ID of the current group in the loop. 589 * 590 * @param object $group Optional. Group object. Default: current group in loop. 591 */ 462 592 function bp_group_id( $group = false ) { 463 593 echo bp_get_group_id( $group ); 464 594 } 595 /** 596 * Get the ID of the current group in the loop. 597 * 598 * @param object $group Optional. Group object. Default: current 599 * group in loop. 600 * @return int 601 */ 465 602 function bp_get_group_id( $group = false ) { 466 603 global $groups_template; … … 473 610 474 611 /** 475 * Output the row class of a group476 * 477 * @since BuddyPress (1.7 )612 * Output the row class of the current group in the loop. 613 * 614 * @since BuddyPress (1.7.0) 478 615 */ 479 616 function bp_group_class() { … … 481 618 } 482 619 /** 483 * Return the row class of a group484 * 485 * @ global BP_Groups_Template $groups_template486 * @return string Row class of the group487 * @ since BuddyPress (1.7)620 * Get the row class of the current group in the loop. 621 * 622 * @since BuddyPress (1.7.0) 623 * 624 * @return string Row class of the group. 488 625 */ 489 626 function bp_get_group_class() { … … 521 658 } 522 659 660 /** 661 * Output the name of the current group in the loop. 662 * 663 * @param object $group Optional. Group object. Default: current 664 * group in loop. 665 */ 523 666 function bp_group_name( $group = false ) { 524 667 echo bp_get_group_name( $group ); 525 668 } 669 /** 670 * Get the name of the current group in the loop. 671 * 672 * @param object $group Optional. Group object. Default: current 673 * group in loop. 674 * @return string 675 */ 526 676 function bp_get_group_name( $group = false ) { 527 677 global $groups_template; … … 533 683 } 534 684 685 /** 686 * Output the type of the current group in the loop. 687 * 688 * @param object $group Optional. Group object. Default: current 689 * group in loop. 690 */ 535 691 function bp_group_type( $group = false ) { 536 692 echo bp_get_group_type( $group ); 537 693 } 694 /** 695 * Get the type of the current group in the loop. 696 * 697 * @param object $group Optional. Group object. Default: current 698 * group in loop. 699 * @return string 700 */ 538 701 function bp_get_group_type( $group = false ) { 539 702 global $groups_template; … … 555 718 } 556 719 720 /** 721 * Output the status of the current group in the loop. 722 * 723 * @param object $group Optional. Group object. Default: current 724 * group in loop. 725 */ 557 726 function bp_group_status( $group = false ) { 558 727 echo bp_get_group_status( $group ); 559 728 } 729 /** 730 * Get the status of the current group in the loop. 731 * 732 * @param object $group Optional. Group object. Default: current 733 * group in loop. 734 * @return string 735 */ 560 736 function bp_get_group_status( $group = false ) { 561 737 global $groups_template; … … 572 748 * @since BuddyPress (1.0.0) 573 749 * 574 * @param array $args {@see bp_core_fetch_avatar()} 750 * @param array $args { 751 * See {@link bp_get_group_avatar()} for description of arguments. 752 * } 575 753 */ 576 754 function bp_group_avatar( $args = '' ) { … … 582 760 * @since BuddyPress (1.0.0) 583 761 * 584 * @param array $args {@see bp_core_fetch_avatar()} 762 * @param array $args { 763 * Array of arguments. See {@link bp_core_fetch_avatar()} for 764 * detailed description. Default values that differ from that 765 * function are described below. 766 * @type string $type Default: 'full'. 767 * @type string $id Passed to $css_id parameter. 768 * } 769 * @return string 585 770 */ 586 771 function bp_get_group_avatar( $args = '' ) { … … 630 815 * @since BuddyPress (1.0.0) 631 816 * 632 * @param object $group Single group object 817 * @param object $group Optional. Group object. Default: current 818 * group in loop. 633 819 */ 634 820 function bp_group_avatar_thumb( $group = false ) { … … 640 826 * @since BuddyPress (1.0.0) 641 827 * 642 * @param object $group Single group object 828 * @param object $group Optional. Group object. Default: current 829 * group in loop. 830 * @return string 643 831 */ 644 832 function bp_get_group_avatar_thumb( $group = false ) { … … 654 842 * @since BuddyPress (1.0.0) 655 843 * 656 * @param object $group Single group object 844 * @param object $group Optional. Group object. Default: current 845 * group in loop. 657 846 */ 658 847 function bp_group_avatar_mini( $group = false ) { … … 664 853 * @since BuddyPress (1.0.0) 665 854 * 666 * @param object $group Single group object 855 * @param object $group Optional. Group object. Default: current 856 * group in loop. 667 857 */ 668 858 function bp_get_group_avatar_mini( $group = false ) { … … 675 865 } 676 866 867 /** 868 * Output the 'last active' string for the current group in the loop. 869 * 870 * @param object $group Optional. Group object. Default: current 871 * group in loop. 872 */ 677 873 function bp_group_last_active( $group = false ) { 678 874 echo bp_get_group_last_active( $group ); 679 875 } 876 /** 877 * Return the 'last active' string for the current group in the loop. 878 * 879 * @param object $group Optional. Group object. Default: current 880 * group in loop. 881 * @return string 882 */ 680 883 function bp_get_group_last_active( $group = false ) { 681 884 global $groups_template; … … 696 899 } 697 900 901 /** 902 * Output the permalink for the current group in the loop. 903 * 904 * @param object $group Optional. Group object. Default: current 905 * group in loop. 906 */ 698 907 function bp_group_permalink( $group = false ) { 699 908 echo bp_get_group_permalink( $group ); 700 909 } 910 /** 911 * Return the permalink for the current group in the loop. 912 * 913 * @param object $group Optional. Group object. Default: current 914 * group in loop. 915 * @return string 916 */ 701 917 function bp_get_group_permalink( $group = false ) { 702 918 global $groups_template; … … 708 924 } 709 925 926 /** 927 * Output the permalink for the admin section of the current group in the loop. 928 * 929 * @param object $group Optional. Group object. Default: current 930 * group in loop. 931 */ 710 932 function bp_group_admin_permalink( $group = false ) { 711 933 echo bp_get_group_admin_permalink( $group ); 712 934 } 935 /** 936 * Return the permalink for the admin section of the current group in the loop. 937 * 938 * @param object $group Optional. Group object. Default: current 939 * group in loop. 940 * @return string 941 */ 713 942 function bp_get_group_admin_permalink( $group = false ) { 714 943 global $groups_template; … … 720 949 } 721 950 951 /** 952 * Return the slug for the current group in the loop. 953 * 954 * @param object $group Optional. Group object. Default: current 955 * group in loop. 956 */ 722 957 function bp_group_slug( $group = false ) { 723 958 echo bp_get_group_slug( $group ); 724 959 } 960 /** 961 * Return the slug for the current group in the loop. 962 * 963 * @param object $group Optional. Group object. Default: current 964 * group in loop. 965 * @return string 966 */ 725 967 function bp_get_group_slug( $group = false ) { 726 968 global $groups_template; … … 732 974 } 733 975 976 /** 977 * Output the description for the current group in the loop. 978 * 979 * @param object $group Optional. Group object. Default: current 980 * group in loop. 981 */ 734 982 function bp_group_description( $group = false ) { 735 983 echo bp_get_group_description( $group ); 736 984 } 985 /** 986 * Return the description for the current group in the loop. 987 * 988 * @param object $group Optional. Group object. Default: current 989 * group in loop. 990 * @return string 991 */ 737 992 function bp_get_group_description( $group = false ) { 738 993 global $groups_template; … … 744 999 } 745 1000 1001 /** 1002 * Output the description for the current group in the loop, for use in a textarea. 1003 * 1004 * @param object $group Optional. Group object. Default: current 1005 * group in loop. 1006 */ 746 1007 function bp_group_description_editable( $group = false ) { 747 1008 echo bp_get_group_description_editable( $group ); 748 1009 } 1010 /** 1011 * Return the permalink for the current group in the loop, for use in a textarea. 1012 * 1013 * 'bp_get_group_description_editable' does not have the formatting 1014 * filters that 'bp_get_group_description' has, which makes it 1015 * appropriate for "raw" editing. 1016 * 1017 * @param object $group Optional. Group object. Default: current 1018 * group in loop. 1019 * @return string 1020 */ 749 1021 function bp_get_group_description_editable( $group = false ) { 750 1022 global $groups_template; … … 782 1054 } 783 1055 784 1056 /** 1057 * Output the status of the current group in the loop. 1058 * 1059 * Either 'Public' or 'Private'. 1060 * 1061 * @param object $group Optional. Group object. Default: current 1062 * group in loop. 1063 */ 785 1064 function bp_group_public_status( $group = false ) { 786 1065 echo bp_get_group_public_status( $group ); 787 1066 } 1067 /** 1068 * Return the status of the current group in the loop. 1069 * 1070 * Either 'Public' or 'Private'. 1071 * 1072 * @param object $group Optional. Group object. Default: current 1073 * group in loop. 1074 * @return string 1075 */ 788 1076 function bp_get_group_public_status( $group = false ) { 789 1077 global $groups_template; … … 799 1087 } 800 1088 1089 /** 1090 * Output whether the current group in the loop is public. 1091 * 1092 * No longer used in BuddyPress. 1093 * 1094 * @param object $group Optional. Group object. Default: current 1095 * group in loop. 1096 */ 801 1097 function bp_group_is_public( $group = false ) { 802 1098 echo bp_get_group_is_public( $group ); 803 1099 } 1100 /** 1101 * Return whether the current group in the loop is public. 1102 * 1103 * No longer used in BuddyPress. 1104 * 1105 * @param object $group Optional. Group object. Default: current 1106 * group in loop. 1107 * @return unknown 1108 */ 804 1109 function bp_get_group_is_public( $group = false ) { 805 1110 global $groups_template; … … 811 1116 } 812 1117 1118 /** 1119 * Output the created date of the current group in the loop. 1120 * 1121 * @param object $group Optional. Group object. Default: current 1122 * group in loop. 1123 */ 813 1124 function bp_group_date_created( $group = false ) { 814 1125 echo bp_get_group_date_created( $group ); 815 1126 } 1127 /** 1128 * Return the created date of the current group in the loop. 1129 * 1130 * @param object $group Optional. Group object. Default: current 1131 * group in loop. 1132 * @return string 1133 */ 816 1134 function bp_get_group_date_created( $group = false ) { 817 1135 global $groups_template; … … 823 1141 } 824 1142 1143 /** 1144 * Output the username of the creator of the current group in the loop. 1145 * 1146 * @param object $group Optional. Group object. Default: current 1147 * group in loop. 1148 */ 825 1149 function bp_group_creator_username( $group = false ) { 826 1150 echo bp_get_group_creator_username( $group ); 827 1151 } 1152 /** 1153 * Return the username of the creator of the current group in the loop. 1154 * 1155 * @param object $group Optional. Group object. Default: current 1156 * group in loop. 1157 * @return string 1158 */ 828 1159 function bp_get_group_creator_username( $group = false ) { 829 1160 global $groups_template; … … 835 1166 } 836 1167 1168 /** 1169 * Output the user ID of the creator of the current group in the loop. 1170 * 1171 * @param object $group Optional. Group object. Default: current 1172 * group in loop. 1173 */ 837 1174 function bp_group_creator_id( $group = false ) { 838 1175 echo bp_get_group_creator_id( $group ); 839 1176 } 1177 /** 1178 * Return the user ID of the creator of the current group in the loop. 1179 * 1180 * @param object $group Optional. Group object. Default: current 1181 * group in loop. 1182 * @return int 1183 */ 840 1184 function bp_get_group_creator_id( $group = false ) { 841 1185 global $groups_template; … … 847 1191 } 848 1192 1193 /** 1194 * Output the permalink of the creator of the current group in the loop. 1195 * 1196 * @param object $group Optional. Group object. Default: current 1197 * group in loop. 1198 */ 849 1199 function bp_group_creator_permalink( $group = false ) { 850 1200 echo bp_get_group_creator_permalink( $group ); 851 1201 } 1202 /** 1203 * Return the permalink of the creator of the current group in the loop. 1204 * 1205 * @param object $group Optional. Group object. Default: current 1206 * group in loop. 1207 * @return string 1208 */ 852 1209 function bp_get_group_creator_permalink( $group = false ) { 853 1210 global $groups_template; … … 859 1216 } 860 1217 1218 /** 1219 * Determine whether a user is the creator of the current group in the loop. 1220 * 1221 * @param object $group Optional. Group object. Default: current 1222 * group in loop. 1223 * @param int $user_id ID of the user. 1224 * @return bool 1225 */ 861 1226 function bp_is_group_creator( $group = false, $user_id = 0 ) { 862 1227 global $groups_template; … … 871 1236 } 872 1237 1238 /** 1239 * Output the avatar of the creator of the current group in the loop. 1240 * 1241 * @param object $group Optional. Group object. Default: current 1242 * group in loop. 1243 * @param array $args { 1244 * Array of optional arguments. See {@link bp_get_group_creator_avatar()} 1245 * for description. 1246 * } 1247 */ 873 1248 function bp_group_creator_avatar( $group = false, $args = array() ) { 874 1249 echo bp_get_group_creator_avatar( $group, $args ); 875 1250 } 1251 /** 1252 * Return the avatar of the creator of the current group in the loop. 1253 * 1254 * @param object $group Optional. Group object. Default: current 1255 * group in loop. 1256 * @param array $args { 1257 * Array of optional arguments. See {@link bp_core_fetch_avatar()} 1258 * for detailed description of arguments. 1259 * @type string $type Default: 'full'. 1260 * @type int $width Default: false. 1261 * @type int $height Default: false. 1262 * @type int $class Default: 'avatar'. 1263 * @type string $id Passed to 'css_id'. Default: false. 1264 * @type string $alt Alt text. Default: 'Group creator profile 1265 * photo of [user display name]'. 1266 * } 1267 * @return string 1268 */ 876 1269 function bp_get_group_creator_avatar( $group = false, $args = array() ) { 877 1270 global $groups_template; … … 897 1290 } 898 1291 899 1292 /** 1293 * Determine whether the current user is the admin of the current group. 1294 * 1295 * Alias of {@link bp_is_item_admin()}. 1296 * 1297 * @return bool 1298 */ 900 1299 function bp_group_is_admin() { 901 1300 return bp_is_item_admin(); 902 1301 } 903 1302 1303 /** 1304 * Determine whether the current user is a mod of the current group. 1305 * 1306 * Alias of {@link bp_is_item_mod()}. 1307 * 1308 * @return bool 1309 */ 904 1310 function bp_group_is_mod() { 905 1311 return bp_is_item_mod(); 906 1312 } 907 1313 1314 /** 1315 * Output markup listing group admins. 1316 * 1317 * @param object $group Optional. Group object. Default: current 1318 * group in loop. 1319 */ 908 1320 function bp_group_list_admins( $group = false ) { 909 1321 global $groups_template; … … 940 1352 } 941 1353 1354 /** 1355 * Output markup listing group mod. 1356 * 1357 * @param object $group Optional. Group object. Default: current 1358 * group in loop. 1359 */ 942 1360 function bp_group_list_mods( $group = false ) { 943 1361 global $groups_template; … … 983 1401 984 1402 /** 985 * Return a list of user_ids for a group's admins 986 * 987 * @package BuddyPress 988 * @since BuddyPress (1.5) 989 * 990 * @param BP_Groups_Group $group (optional) The group being queried. Defaults to the current group in the loop 991 * @param string $format 'string' to get a comma-separated string, 'array' to get an array 992 * @return mixed $admin_ids A string or array of user_ids 1403 * Return a list of user IDs for a group's admins. 1404 * 1405 * @since BuddyPress (1.5.0) 1406 * 1407 * @param BP_Groups_Group $group Optional. The group being queried. Defaults 1408 * to the current group in the loop. 1409 * @param string $format Optional. 'string' to get a comma-separated string, 1410 * 'array' to get an array. 1411 * @return mixed $admin_ids A string or array of user IDs. 993 1412 */ 994 1413 function bp_group_admin_ids( $group = false, $format = 'string' ) { … … 1013 1432 1014 1433 /** 1015 * Return a list of user_ids for a group's moderators 1016 * 1017 * @package BuddyPress 1018 * @since BuddyPress (1.5) 1019 * 1020 * @param BP_Groups_Group $group (optional) The group being queried. Defaults to the current group in the loop 1021 * @param string $format 'string' to get a comma-separated string, 'array' to get an array 1022 * @return mixed $mod_ids A string or array of user_ids 1434 * Return a list of user IDs for a group's moderators. 1435 * 1436 * @since BuddyPress (1.5.0) 1437 * 1438 * @param BP_Groups_Group $group Optional. The group being queried. Defaults 1439 * to the current group in the loop. 1440 * @param string $format Optional. 'string' to get a comma-separated string, 1441 * 'array' to get an array. 1442 * @return mixed $mod_ids A string or array of user IDs. 1023 1443 */ 1024 1444 function bp_group_mod_ids( $group = false, $format = 'string' ) { … … 1042 1462 } 1043 1463 1464 /** 1465 * Output the permalink of the current group's Members page. 1466 */ 1044 1467 function bp_group_all_members_permalink() { 1045 1468 echo bp_get_group_all_members_permalink(); 1046 1469 } 1470 /** 1471 * Return the permalink of the Members page of the current group in the loop. 1472 * 1473 * @param object $group Optional. Group object. Default: current 1474 * group in loop. 1475 * @return string 1476 */ 1047 1477 function bp_get_group_all_members_permalink( $group = false ) { 1048 1478 global $groups_template; … … 1054 1484 } 1055 1485 1486 /** 1487 * Display a Groups search form. 1488 * 1489 * No longer used in BuddyPress. 1490 * 1491 * @todo Deprecate 1492 */ 1056 1493 function bp_group_search_form() { 1057 1494 global $bp; … … 1254 1691 * Get the 'checked' value, if needed, for a given invite_status on the group create/admin screens 1255 1692 * 1256 * @package BuddyPress 1257 * @subpackage Groups Template 1258 * @since BuddyPress (1.5) 1693 * @since BuddyPress (1.5.0) 1259 1694 * 1260 1695 * @param string $setting The setting you want to check against ('members', 'mods', or 'admins') … … 1279 1714 * This function can be used either in or out of the loop. 1280 1715 * 1281 * @package BuddyPress 1282 * @subpackage Groups Template 1283 * @since BuddyPress (1.5) 1716 * @since BuddyPress (1.5.0) 1284 1717 * 1285 1718 * @param int $group_id (optional) The id of the group whose status you want to check … … 1315 1748 * Can the logged-in user send invitations in the specified group? 1316 1749 * 1317 * @package BuddyPress 1318 * @subpackage Groups Template 1319 * @since BuddyPress (1.5) 1750 * @since BuddyPress (1.5.0) 1320 1751 * 1321 1752 * @param int $group_id (optional) The id of the group whose status you want to check … … 1374 1805 * @deprecated 1.5 1375 1806 * @deprecated No longer used. 1376 * @since BuddyPress (1.0 )1807 * @since BuddyPress (1.0.0) 1377 1808 * @todo Remove in 1.4 1378 1809 */ … … 2096 2527 * @global BP_Groups_Template $groups_template Groups template object 2097 2528 * @param object $group Group to get status message for. Optional; defaults to current group. 2098 * @since BuddyPress (1.0 )2529 * @since BuddyPress (1.0.0) 2099 2530 */ 2100 2531 function bp_group_status_message( $group = null ) { … … 2681 3112 * Determine if the current logged in user can create groups. 2682 3113 * 2683 * @package BuddyPress Groups 2684 * @since BuddyPress (1.5) 3114 * @since BuddyPress (1.5.0) 2685 3115 * 2686 3116 * @uses apply_filters() To call 'bp_user_can_create_groups'. … … 2921 3351 * Echoes the current group creation step 2922 3352 * 2923 * @since BuddyPress (1.6 )3353 * @since BuddyPress (1.6.0) 2924 3354 */ 2925 3355 function bp_groups_current_create_step() { … … 2929 3359 * Returns the current group creation step. If none is found, returns an empty string 2930 3360 * 2931 * @since BuddyPress (1.6 )3361 * @since BuddyPress (1.6.0) 2932 3362 * 2933 3363 * @uses apply_filters() Filter bp_get_groups_current_create_step to modify … … 3028 3458 * Displays group header tabs 3029 3459 * 3030 * @package BuddyPress3031 3460 * @todo Deprecate? 3032 3461 */ … … 3048 3477 * Displays group filter titles 3049 3478 * 3050 * @package BuddyPress3051 3479 * @todo Deprecate? 3052 3480 */ … … 3080 3508 * Is the current page a specific group admin screen? 3081 3509 * 3082 * @since BuddyPress (1.1 )3510 * @since BuddyPress (1.1.0) 3083 3511 * 3084 3512 * @param string $slug … … 3092 3520 * Echoes the current group admin tab slug 3093 3521 * 3094 * @since BuddyPress (1.6 )3522 * @since BuddyPress (1.6.0) 3095 3523 */ 3096 3524 function bp_group_current_admin_tab() { … … 3100 3528 * Returns the current group admin tab slug 3101 3529 * 3102 * @since BuddyPress (1.6 )3530 * @since BuddyPress (1.6.0) 3103 3531 * 3104 3532 * @uses apply_filters() Filter bp_get_current_group_admin_tab to modify return value … … 3122 3550 * Outputs the current group avatar 3123 3551 * 3124 * @since BuddyPress (1.0 )3552 * @since BuddyPress (1.0.0) 3125 3553 * @param string $type thumb or full ? 3126 3554 * @uses bp_get_group_current_avatar() to get the avatar of the current group … … 3789 4217 * Hook group activity feed to <head> 3790 4218 * 3791 * @since BuddyPress (1.5 )4219 * @since BuddyPress (1.5.0) 3792 4220 */ 3793 4221 function bp_groups_activity_feed() { … … 3811 4239 * Echoes the output of bp_get_current_group_id() 3812 4240 * 3813 * @package BuddyPress 3814 * @since BuddyPress (1.5) 4241 * @since BuddyPress (1.5.0) 3815 4242 */ 3816 4243 function bp_current_group_id() { … … 3820 4247 * Returns the ID of the current group 3821 4248 * 3822 * @package BuddyPress 3823 * @since BuddyPress (1.5) 4249 * @since BuddyPress (1.5.0) 3824 4250 * @uses apply_filters() Filter bp_get_current_group_id to modify this output 3825 4251 * … … 3836 4262 * Echoes the output of bp_get_current_group_slug() 3837 4263 * 3838 * @package BuddyPress 3839 * @since BuddyPress (1.5) 4264 * @since BuddyPress (1.5.0) 3840 4265 */ 3841 4266 function bp_current_group_slug() { … … 3845 4270 * Returns the slug of the current group 3846 4271 * 3847 * @package BuddyPress 3848 * @since BuddyPress (1.5) 4272 * @since BuddyPress (1.5.0) 3849 4273 * @uses apply_filters() Filter bp_get_current_group_slug to modify this output 3850 4274 * … … 3861 4285 * Echoes the output of bp_get_current_group_name() 3862 4286 * 3863 * @package BuddyPress3864 4287 */ 3865 4288 function bp_current_group_name() { … … 3869 4292 * Returns the name of the current group 3870 4293 * 3871 * @package BuddyPress 3872 * @since BuddyPress (1.5) 4294 * @since BuddyPress (1.5.0) 3873 4295 * @uses apply_filters() Filter bp_get_current_group_name to modify this output 3874 4296 * … … 3886 4308 * Echoes the output of bp_get_current_group_description() 3887 4309 * 3888 * @package BuddyPress3889 4310 * @since BuddyPress (2.1.0) 3890 4311 */ … … 3895 4316 * Returns the description of the current group 3896 4317 * 3897 * @package BuddyPress3898 4318 * @since BuddyPress (2.1.0) 3899 4319 * @uses apply_filters() Filter bp_get_current_group_description to modify … … 3913 4333 * Output a URL for a group component action 3914 4334 * 3915 * @since BuddyPress (1.2 )4335 * @since BuddyPress (1.2.0) 3916 4336 * 3917 4337 * @param string $action … … 3926 4346 * Get a URL for a group component action 3927 4347 * 3928 * @since BuddyPress (1.2 )4348 * @since BuddyPress (1.2.0) 3929 4349 * 3930 4350 * @param string $action
Note: See TracChangeset
for help on using the changeset viewer.