Changeset 7561
- Timestamp:
- 11/11/2013 02:24:01 AM (11 years ago)
- Location:
- trunk/bp-groups
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-actions.php
r7384 r7561 4 4 * BuddyPress Groups Actions 5 5 * 6 * Action functions are exactly the same as screen functions, however they do not7 * have a template screen associated with them. Usually they will send the user8 * back to the default screen after execution.6 * Action functions are exactly the same as screen functions, however they do 7 * not have a template screen associated with them. Usually they will send the 8 * user back to the default screen after execution. 9 9 * 10 10 * @package BuddyPress … … 15 15 if ( !defined( 'ABSPATH' ) ) exit; 16 16 17 /** 18 * Catch and process group creation form submissions. 19 */ 17 20 function groups_action_create_group() { 18 21 global $bp; … … 239 242 240 243 /** 244 * Catch and process "Leave Group" button clicks. 245 * 241 246 * When a group member clicks on the "Leave Group" button from a group's page, 242 247 * this function is run. … … 285 290 add_action( 'bp_actions', 'groups_action_leave_group' ); 286 291 287 292 /** 293 * Sort the group creation steps. 294 */ 288 295 function groups_action_sort_creation_steps() { 289 296 global $bp; … … 311 318 312 319 /** 313 * Catch es requests for a random group page (example.com/groups/?random-group) and redirects320 * Catch requests for a random group page (example.com/groups/?random-group) and redirect. 314 321 */ 315 322 function groups_action_redirect_to_random_group() { … … 324 331 325 332 /** 326 * Load the activity feed for the specificgroup.327 * 328 * @since BuddyPress ( v1.2)333 * Load the activity feed for the current group. 334 * 335 * @since BuddyPress (1.2.0) 329 336 */ 330 337 function groups_action_group_feed() { -
trunk/bp-groups/bp-groups-activity.php
r7077 r7561 14 14 if ( !defined( 'ABSPATH' ) ) exit; 15 15 16 /** 17 * Register activity actions for the Groups component. 18 */ 16 19 function groups_register_activity_actions() { 17 20 global $bp; … … 36 39 add_action( 'bp_register_activity_actions', 'groups_register_activity_actions' ); 37 40 41 /** 42 * Record an activity item related to the Groups component. 43 * 44 * A wrapper for {@link bp_activity_add()} that provides some Groups-specific 45 * defaults. 46 * 47 * @see bp_activity_add() for more detailed description of parameters and 48 * return values. 49 * 50 * @param array $args { 51 * An array of arguments for the new activity item. Accepts all parameters 52 * of {@link bp_activity_add()}. However, this wrapper provides some 53 * additional defaults, as described below: 54 * @type string $component Default: the id of your Groups component 55 * (usually 'groups'). 56 * @type bool $hide_sitewide Default: True if the current group is not 57 * public, otherwise false. 58 * } 59 * @return bool See {@link bp_activity_add()}. 60 */ 38 61 function groups_record_activity( $args = '' ) { 39 62 global $bp; … … 76 99 } 77 100 101 /** 102 * Update the last_activity meta value for a given group. 103 * 104 * @param int $group_id Optional. The ID of the group whose last_activity is 105 * being updated. Default: the current group's ID. 106 */ 78 107 function groups_update_last_activity( $group_id = 0 ) { 79 108 global $bp; -
trunk/bp-groups/bp-groups-admin.php
r7478 r7561 3 3 * BuddyPress Groups component admin screen 4 4 * 5 * Props to WordPress core for the Comments admin screen, and its contextual help text,6 * on which this implementation is heavily based.5 * Props to WordPress core for the Comments admin screen, and its contextual 6 * help text, on which this implementation is heavily based. 7 7 * 8 8 * @package BuddyPress 9 * @since BuddyPress (1.7 )9 * @since BuddyPress (1.7.0) 10 10 * @subpackage Groups 11 11 */ … … 22 22 23 23 /** 24 * Register s the Groups component admin screen25 * 26 * @since BuddyPress (1.7 )24 * Register the Groups component admin screen. 25 * 26 * @since BuddyPress (1.7.0) 27 27 */ 28 28 function bp_groups_add_admin_menu() { … … 44 44 45 45 /** 46 * Add groups component to custom menus array 47 * 48 * @since BuddyPress (1.7) 49 * 50 * @param array $custom_menus 51 * @return array 46 * Add groups component to custom menus array. 47 * 48 * This ensures that the Groups menu item appears in the proper order on the 49 * main Dashboard menu. 50 * 51 * @since BuddyPress (1.7.0) 52 * 53 * @param array $custom_menus Array of BP top-level menu items. 54 * @return array Menu item array, with Groups added. 52 55 */ 53 56 function bp_groups_admin_menu_order( $custom_menus = array() ) { … … 58 61 59 62 /** 60 * Set up the admin page before any output is sent. Register contextual help and screen options for this admin page. 63 * Set up the Groups admin page. 64 * 65 * Loaded before the page is rendered, this function does all initial setup, 66 * including: processing form requests, registering contextual help, and 67 * setting up screen options. 68 * 69 * @since BuddyPress (1.7.0) 61 70 * 62 71 * @global object $bp BuddyPress global settings 63 72 * @global BP_Groups_List_Table $bp_groups_list_table Groups screen list table 64 * @since BuddyPress (1.7)65 73 */ 66 74 function bp_groups_admin_load() { … … 376 384 377 385 /** 378 * Handle save/update of screen options for the Groups component admin screen 379 * 380 * @since BuddyPress (1.7 )386 * Handle save/update of screen options for the Groups component admin screen. 387 * 388 * @since BuddyPress (1.7.0) 381 389 * 382 390 * @param string $value Will always be false unless another plugin filters it first. 383 * @param string $option Screen option name 384 * @param string $new_value Screen option form value 391 * @param string $option Screen option name. 392 * @param string $new_value Screen option form value. 385 393 * @return string Option value. False to abandon update. 386 394 */ … … 398 406 399 407 /** 400 * Outputs the Groups component admin screens401 * 402 * @since BuddyPress (1.7 )408 * Select the appropirate Groups admin screen, and output it. 409 * 410 * @since BuddyPress (1.7.0) 403 411 */ 404 412 function bp_groups_admin() { … … 421 429 422 430 /** 423 * Display the single groups edit screen 424 * 425 * @since BuddyPress (1.7 )431 * Display the single groups edit screen. 432 * 433 * @since BuddyPress (1.7.0) 426 434 */ 427 435 function bp_groups_admin_edit() { … … 544 552 545 553 /** 546 * Display the Group delete confirmation screen 554 * Display the Group delete confirmation screen. 547 555 * 548 556 * We include a separate confirmation because group deletion is truly 549 557 * irreversible. 550 558 * 551 * @since (BuddyPress) 1.7559 * @since BuddyPress (1.7.0) 552 560 */ 553 561 function bp_groups_admin_delete() { … … 592 600 593 601 /** 594 * Display the Groups admin index screen, which contains a list of all your 595 * BuddyPress groups. 596 * 597 * @global BP_Group_List_Table $bp_groups_list_table Group screen list table 598 * @global string $plugin_page 599 * @since BuddyPress (1.7) 602 * Display the Groups admin index screen. 603 * 604 * This screen contains a list of all BuddyPress groups. 605 * 606 * @since BuddyPress (1.7.0) 607 * 608 * @global BP_Group_List_Table $bp_groups_list_table Group screen list table. 609 * @global string $plugin_page Currently viewed plugin page. 600 610 */ 601 611 function bp_groups_admin_index() { … … 653 663 654 664 /** 655 * Settings metabox 656 * 657 * @param object $item Group item 658 * @since BuddyPress (1.7) 665 * Markup for the single group's Settings metabox. 666 * 667 * @since BuddyPress (1.7.0) 668 * 669 * @param object $item Information about the current group. 659 670 */ 660 671 function bp_groups_admin_edit_metabox_settings( $item ) { … … 691 702 692 703 /** 693 * Add New Members metabox694 * 695 * @since BuddyPress (1.7 )704 * Output the markup for a single group's Add New Members metabox. 705 * 706 * @since BuddyPress (1.7.0) 696 707 */ 697 708 function bp_groups_admin_edit_metabox_add_new_members( $item ) { … … 704 715 705 716 /** 706 * Members metabox 707 * 708 * @param BP_Groups_Group $item The BP_Groups_Group object 709 * 710 * @since BuddyPress (1.7) 717 * Renders the Members metabox on single group pages. 718 * 719 * @since BuddyPress (1.7.0) 720 * 721 * @param BP_Groups_Group $item The BP_Groups_Group object for the current 722 * group. 711 723 */ 712 724 function bp_groups_admin_edit_metabox_members( $item ) { … … 844 856 845 857 /** 846 * Status metabox for the Groups admin edit screen 847 * 848 * @param object $item Group item 849 * @since BuddyPress (1.7) 858 * Renders the Status metabox for the Groups admin edit screen. 859 * 860 * @since BuddyPress (1.7.0) 861 * 862 * @param object $item Information about the currently displayed group. 850 863 */ 851 864 function bp_groups_admin_edit_metabox_status( $item ) { … … 872 885 873 886 /** 874 * Create pagination links out of a BP_Group_Member_Query 887 * Create pagination links out of a BP_Group_Member_Query. 875 888 * 876 889 * This function is intended to create pagination links for use under the … … 880 893 * deprecated soon. 881 894 * 882 * @since BuddyPress (1.8) 883 * @param object $query A BP_Group_Member_Query object 884 * @param string $member_type member|mod|admin|banned 895 * @since BuddyPress (1.8.0) 896 * 897 * @param BP_Group_Member_Query $query A BP_Group_Member_Query object. 898 * @param string $member_type member|mod|admin|banned. 899 * @return string Pagination links HTML. 885 900 */ 886 901 function bp_groups_admin_create_pagination_links( BP_Group_Member_Query $query, $member_type ) { … … 929 944 930 945 /** 931 * Match a set of user ids up to a set of usernames 932 * 933 * @since BuddyPress (1.7) 946 * Get a set of usernames corresponding to a set of user IDs. 947 * 948 * @since BuddyPress (1.7.0) 949 * 950 * @param array $user_ids Array of user IDs. 951 * @return array Array of user_logins corresponding to $user_ids. 934 952 */ 935 953 function bp_groups_admin_get_usernames_from_ids( $user_ids = array() ) { … … 946 964 947 965 /** 948 * AJAX handler for group member autocomplete requests 949 * 950 * @since BuddyPress (1.7 )966 * AJAX handler for group member autocomplete requests. 967 * 968 * @since BuddyPress (1.7.0) 951 969 */ 952 970 function bp_groups_admin_autocomplete_handler() { … … 994 1012 * List table class for the Groups component admin page. 995 1013 * 996 * @since BuddyPress (1.7 )1014 * @since BuddyPress (1.7.0) 997 1015 */ 998 1016 class BP_Groups_List_Table extends WP_List_Table { 999 1017 1000 1018 /** 1001 * What type of view is being displayed? e.g. "All", "Pending", "Approved", "Spam"... 1002 * 1003 * @since BuddyPress (1.7) 1004 */ 1019 * The type of view currently being displayed. 1020 * 1021 * e.g. "All", "Pending", "Approved", "Spam"... 1022 * 1023 * @since BuddyPress (1.7.0) 1024 * 1025 * @access public 1026 * @var string 1027 */ 1005 1028 public $view = 'all'; 1006 1029 1007 1030 /** 1008 * Group counts for each group type 1009 * 1010 * @since BuddyPress (1.7) 1031 * Group counts for each group type. 1032 * 1033 * @since BuddyPress (1.7.0) 1034 * 1035 * @access public 1036 * @var int 1011 1037 */ 1012 1038 public $group_counts = 0; … … 1015 1041 * Constructor 1016 1042 * 1017 * @since BuddyPress (1.7 )1043 * @since BuddyPress (1.7.0) 1018 1044 */ 1019 1045 public function __construct() { … … 1028 1054 1029 1055 /** 1030 * Handle filtering of data, sorting, pagination, and any other data-manipulation required prior to rendering. 1031 * 1032 * @since BuddyPress (1.7) 1056 * Set up items for display in the list table. 1057 * 1058 * Handles filtering of data, sorting, pagination, and any other data 1059 * manipulation required prior to rendering. 1060 * 1061 * @since BuddyPress (1.7.0) 1033 1062 */ 1034 1063 function prepare_items() { … … 1133 1162 1134 1163 /** 1135 * Get an array of all the columns on the page 1136 * 1137 * @return array 1138 * @since BuddyPress (1.7) 1164 * Get an array of all the columns on the page. 1165 * 1166 * @since BuddyPress (1.7.0) 1167 * 1168 * @return array Array of column headers. 1139 1169 */ 1140 1170 function get_column_info() { … … 1149 1179 1150 1180 /** 1151 * Display s a message on screen when no items are found (e.g. no search matches)1152 * 1153 * @since BuddyPress (1.7 )1181 * Display a message on screen when no items are found ("No groups found"). 1182 * 1183 * @since BuddyPress (1.7.0) 1154 1184 */ 1155 1185 function no_items() { … … 1158 1188 1159 1189 /** 1160 * Output s the Groups data table1161 * 1162 * @since BuddyPress (1.7 )1190 * Output the Groups data table. 1191 * 1192 * @since BuddyPress (1.7.0) 1163 1193 */ 1164 1194 function display() { … … 1190 1220 1191 1221 /** 1192 * Generates content for a single row of the table 1193 * 1194 * @param object $item The current item 1195 * @since BuddyPress (1.7) 1222 * Generate content for a single row of the table. 1223 * 1224 * @since BuddyPress (1.7.0) 1225 * 1226 * @param object $item The current group item in the loop. 1196 1227 */ 1197 1228 function single_row( $item = array() ) { … … 1219 1250 * Get the list of views available on this table (e.g. "all", "public"). 1220 1251 * 1221 * @since BuddyPress (1.7 )1252 * @since BuddyPress (1.7.0) 1222 1253 */ 1223 1254 function get_views() { … … 1236 1267 1237 1268 /** 1238 * Get bulk actions 1239 * 1240 * @return array Key/value pairs for the bulk actions dropdown 1241 * @since BuddyPress (1.7) 1269 * Get bulk actions for single group row. 1270 * 1271 * @since BuddyPress (1.7.0) 1272 * 1273 * @return array Key/value pairs for the bulk actions dropdown. 1242 1274 */ 1243 1275 function get_bulk_actions() { … … 1250 1282 * Get the table column titles. 1251 1283 * 1284 * @since BuddyPress (1.7.0) 1285 * 1252 1286 * @see WP_List_Table::single_row_columns() 1253 * @return array1254 * @ since BuddyPress (1.7)1287 * 1288 * @return array Array of column titles. 1255 1289 */ 1256 1290 function get_columns() { … … 1277 1311 * $desc_first = false. 1278 1312 * 1279 * @return array 1280 * @since BuddyPress (1.7) 1313 * @since BuddyPress (1.7.0) 1314 * 1315 * @return array Array of sortable column names. 1281 1316 */ 1282 1317 function get_sortable_columns() { … … 1290 1325 1291 1326 /** 1292 * Checkbox column 1293 * 1294 * @param array $item A singular item (one full row) 1327 * Markup for the Checkbox column. 1328 * 1329 * @since BuddyPress (1.7.0) 1330 * 1295 1331 * @see WP_List_Table::single_row_columns() 1296 * @since BuddyPress (1.7) 1332 * 1333 * @param array $item A singular item (one full row). 1297 1334 */ 1298 1335 function column_cb( $item = array() ) { … … 1301 1338 1302 1339 /** 1303 * Group id column 1304 * 1305 * @param array $item A singular item (one full row) 1340 * Markup for the Group ID column. 1341 * 1342 * @since BuddyPress (1.7.0) 1343 * 1306 1344 * @see WP_List_Table::single_row_columns() 1307 * @since BuddyPress (1.7) 1345 * 1346 * @param array $item A singular item (one full row). 1308 1347 */ 1309 1348 function column_gid( $item = array() ) { … … 1316 1355 * Called "comment" in the CSS so we can re-use some WP core CSS. 1317 1356 * 1318 * @param array $item A singular item (one full row) 1357 * @since BuddyPress (1.7.0) 1358 * 1319 1359 * @see WP_List_Table::single_row_columns() 1320 * @since BuddyPress (1.7) 1360 * 1361 * @param array $item A singular item (one full row). 1321 1362 */ 1322 1363 function column_comment( $item = array() ) { … … 1370 1411 1371 1412 /** 1372 * Description column 1373 * 1374 * @since BuddyPress (1.7) 1413 * Markup for the Description column. 1414 * 1415 * @since BuddyPress (1.7.0) 1416 * 1417 * @param array Information about the current row. 1375 1418 */ 1376 1419 function column_description( $item = array() ) { … … 1379 1422 1380 1423 /** 1381 * Status column 1382 * 1383 * @since BuddyPress (1.7) 1424 * Markup for the Status column. 1425 * 1426 * @since BuddyPress (1.7.0) 1427 * 1428 * @param array Information about the current row. 1384 1429 */ 1385 1430 function column_status( $item = array() ) { … … 1405 1450 1406 1451 /** 1407 * Number of Members column 1408 * 1409 * @since BuddyPress (1.7) 1452 * Markup for the Number of Members column. 1453 * 1454 * @since BuddyPress (1.7.0) 1455 * 1456 * @param array Information about the current row. 1410 1457 */ 1411 1458 function column_members( $item = array() ) { … … 1415 1462 1416 1463 /** 1417 * Last Active column 1418 * 1419 * @since BuddyPress (1.7) 1464 * Markup for the Last Active column. 1465 * 1466 * @since BuddyPress (1.7.0) 1467 * 1468 * @param array Information about the current row. 1420 1469 */ 1421 1470 function column_last_active( $item = array() ) { -
trunk/bp-groups/bp-groups-adminbar.php
r6342 r7561 4 4 * BuddyPress Groups Toolbar 5 5 * 6 * Handles the groups functions related to the WordPress Toolbar 6 * Handles the groups functions related to the WordPress Toolbar. 7 7 * 8 8 * @package BuddyPress … … 14 14 15 15 /** 16 * Add s the Group Admin top-level menu to group pages16 * Add the Group Admin top-level menu when viewing group pages. 17 17 * 18 * @package BuddyPress 19 * @since BuddyPress (1.5) 18 * @since BuddyPress (1.5.0) 20 19 * 21 * @todo Add dynamic menu items for group extensions 20 * @todo Add dynamic menu items for group extensions. 22 21 */ 23 22 function bp_groups_group_admin_menu() { … … 107 106 108 107 /** 109 * Remove rogue WP core edit menu when viewing a group108 * Remove rogue WP core Edit menu when viewing a single group. 110 109 * 111 * @since BuddyPress (1.6 )110 * @since BuddyPress (1.6.0) 112 111 */ 113 112 function bp_groups_remove_edit_page_menu() {
Note: See TracChangeset
for help on using the changeset viewer.