Changeset 10148 for trunk/src/bp-groups/bp-groups-admin.php
- Timestamp:
- 09/27/2015 05:25:02 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-admin.php
r10131 r10148 6 6 * help text, on which this implementation is heavily based. 7 7 * 8 * @since 1.7.0 9 * 8 10 * @package BuddyPress 9 * @since BuddyPress (1.7.0)10 11 * @subpackage Groups 11 12 */ 12 13 13 // Exit if accessed directly 14 // Exit if accessed directly. 14 15 defined( 'ABSPATH' ) || exit; 15 16 16 // Include WP's list table class 17 // Include WP's list table class. 17 18 if ( !class_exists( 'WP_List_Table' ) ) require( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); 18 19 … … 24 25 * Register the Groups component admin screen. 25 26 * 26 * @since BuddyPress (1.7.0)27 * @since 1.7.0 27 28 */ 28 29 function bp_groups_add_admin_menu() { … … 49 50 * main Dashboard menu. 50 51 * 51 * @since BuddyPress (1.7.0)52 * @since 1.7.0 52 53 * 53 54 * @param array $custom_menus Array of BP top-level menu items. … … 68 69 * setting up screen options. 69 70 * 70 * @since BuddyPress (1.7.0)71 * @since 1.7.0 71 72 * 72 73 * @global BP_Groups_List_Table $bp_groups_list_table Groups screen list table. … … 86 87 * Fires at top of groups admin page. 87 88 * 88 * @since BuddyPress (1.7.0)89 * @since 1.7.0 89 90 * 90 91 * @param string $doaction Current $_GET action being performed in admin screen. … … 137 138 * Fires after the registration of all of the default group meta boxes. 138 139 * 139 * @since BuddyPress (1.7.0)140 * @since 1.7.0 140 141 */ 141 142 do_action( 'bp_groups_admin_meta_boxes' ); … … 241 242 * Filters the allowed status values for the group. 242 243 * 243 * @since BuddyPress (1.0.2)244 * @since 1.0.2 244 245 * 245 246 * @param array $value Array of allowed group statuses. … … 251 252 * Filters the allowed invite status values for the group. 252 253 * 253 * @since BuddyPress (1.5.0)254 * @since 1.5.0 254 255 * 255 256 * @param array $value Array of allowed invite statuses. … … 375 376 * Fires before redirect so plugins can do something first on save action. 376 377 * 377 * @since BuddyPress (1.6.0)378 * @since 1.6.0 378 379 * 379 380 * @param int $group_id ID of the group being edited. … … 414 415 * Filters the URL to redirect to after successfully editing a group. 415 416 * 416 * @since BuddyPress (1.7.0)417 * @since 1.7.0 417 418 * 418 419 * @param string $redirect_to URL to redirect user to. … … 432 433 * Handle save/update of screen options for the Groups component admin screen. 433 434 * 434 * @since BuddyPress (1.7.0)435 * @since 1.7.0 435 436 * 436 437 * @param string $value Will always be false unless another plugin filters it first. … … 455 456 * Select the appropriate Groups admin screen, and output it. 456 457 * 457 * @since BuddyPress (1.7.0)458 * @since 1.7.0 458 459 */ 459 460 function bp_groups_admin() { … … 478 479 * Display the single groups edit screen. 479 480 * 480 * @since BuddyPress (1.7.0)481 * @since 1.7.0 481 482 */ 482 483 function bp_groups_admin_edit() { … … 560 561 * Useful for plugins to modify the group before display. 561 562 * 562 * @since BuddyPress (1.7.0)563 * @since 1.7.0 563 564 * 564 565 * @param BP_Groups_Group $this Instance of the current group being edited. Passed by reference. … … 636 637 * irreversible. 637 638 * 638 * @since BuddyPress (1.7.0)639 * @since 1.7.0 639 640 */ 640 641 function bp_groups_admin_delete() { … … 688 689 * This screen contains a list of all BuddyPress groups. 689 690 * 690 * @since BuddyPress (1.7.0)691 * @since 1.7.0 691 692 * 692 693 * @global BP_Groups_List_Table $bp_groups_list_table Group screen list table. … … 715 716 * Useful for plugins to modify the messages before display. 716 717 * 717 * @since BuddyPress (1.7.0)718 * @since 1.7.0 718 719 * 719 720 * @param array $messages Array of messages to be displayed. … … 757 758 * Markup for the single group's Settings metabox. 758 759 * 759 * @since BuddyPress (1.7.0)760 * @since 1.7.0 760 761 * 761 762 * @param object $item Information about the current group. … … 801 802 * Output the markup for a single group's Add New Members metabox. 802 803 * 803 * @since BuddyPress (1.7.0)804 * @since 1.7.0 804 805 */ 805 806 function bp_groups_admin_edit_metabox_add_new_members( $item ) { … … 815 816 * Renders the Members metabox on single group pages. 816 817 * 817 * @since BuddyPress (1.7.0)818 * @since 1.7.0 818 819 * 819 820 * @param BP_Groups_Group $item The BP_Groups_Group object for the current group. … … 938 939 * Fires after the listing of a single row for members in a group on the group edit screen. 939 940 * 940 * @since BuddyPress (1.8.0)941 * @since 1.8.0 941 942 * 942 943 * @param int $ID ID of the user being rendered. … … 971 972 * Renders the Status metabox for the Groups admin edit screen. 972 973 * 973 * @since BuddyPress (1.7.0)974 * @since 1.7.0 974 975 * 975 976 * @param object $item Information about the currently displayed group. … … 1006 1007 * deprecated soon. 1007 1008 * 1008 * @since BuddyPress (1.8.0)1009 * @since 1.8.0 1009 1010 * 1010 1011 * @param BP_Group_Member_Query $query A BP_Group_Member_Query object. … … 1064 1065 * Get a set of usernames corresponding to a set of user IDs. 1065 1066 * 1066 * @since BuddyPress (1.7.0)1067 * @since 1.7.0 1067 1068 * 1068 1069 * @param array $user_ids Array of user IDs. … … 1085 1086 * AJAX handler for group member autocomplete requests. 1086 1087 * 1087 * @since BuddyPress (1.7.0)1088 * @since 1.7.0 1088 1089 */ 1089 1090 function bp_groups_admin_autocomplete_handler() { … … 1128 1129 * List table class for the Groups component admin page. 1129 1130 * 1130 * @since BuddyPress (1.7.0)1131 * @since 1.7.0 1131 1132 */ 1132 1133 class BP_Groups_List_Table extends WP_List_Table { … … 1137 1138 * e.g. "All", "Pending", "Approved", "Spam"... 1138 1139 * 1139 * @since BuddyPress (1.7.0)1140 * @since 1.7.0 1140 1141 * 1141 1142 * @access public … … 1147 1148 * Group counts for each group type. 1148 1149 * 1149 * @since BuddyPress (1.7.0)1150 * @since 1.7.0 1150 1151 * 1151 1152 * @access public … … 1165 1166 * Constructor 1166 1167 * 1167 * @since BuddyPress (1.7.0)1168 * @since 1.7.0 1168 1169 */ 1169 1170 public function __construct() { … … 1183 1184 * manipulation required prior to rendering. 1184 1185 * 1185 * @since BuddyPress (1.7.0)1186 * @since 1.7.0 1186 1187 */ 1187 1188 public function prepare_items() { … … 1288 1289 * Get an array of all the columns on the page. 1289 1290 * 1290 * @since BuddyPress (1.7.0)1291 * @since 1.7.0 1291 1292 * 1292 1293 * @return array Array of column headers. … … 1306 1307 * Get name of default primary column 1307 1308 * 1308 * @since BuddyPress (2.3.3)1309 * @since 2.3.3 1309 1310 * @access protected 1310 1311 * … … 1319 1320 * Display a message on screen when no items are found ("No groups found"). 1320 1321 * 1321 * @since BuddyPress (1.7.0)1322 * @since 1.7.0 1322 1323 */ 1323 1324 public function no_items() { … … 1328 1329 * Output the Groups data table. 1329 1330 * 1330 * @since BuddyPress (1.7.0)1331 * @since 1.7.0 1331 1332 */ 1332 1333 public function display() { … … 1358 1359 * Generate content for a single row of the table. 1359 1360 * 1360 * @since BuddyPress (1.7.0)1361 * @since 1.7.0 1361 1362 * 1362 1363 * @param object|array $item The current group item in the loop. … … 1376 1377 * Filters the classes applied to a single row in the groups list table. 1377 1378 * 1378 * @since BuddyPress (1.9.0)1379 * @since 1.9.0 1379 1380 * 1380 1381 * @param array $row_classes Array of classes to apply to the row. … … 1394 1395 * Get the list of views available on this table (e.g. "all", "public"). 1395 1396 * 1396 * @since BuddyPress (1.7.0)1397 * @since 1.7.0 1397 1398 */ 1398 1399 public function get_views() { … … 1410 1411 * Fires inside listing of views so plugins can add their own. 1411 1412 * 1412 * @since BuddyPress (1.7.0)1413 * @since 1.7.0 1413 1414 * 1414 1415 * @param string $url_base Current URL base for view. … … 1423 1424 * Get bulk actions for single group row. 1424 1425 * 1425 * @since BuddyPress (1.7.0)1426 * @since 1.7.0 1426 1427 * 1427 1428 * @return array Key/value pairs for the bulk actions dropdown. … … 1432 1433 * Filters the list of bulk actions to display on a single group row. 1433 1434 * 1434 * @since BuddyPress (1.7.0)1435 * @since 1.7.0 1435 1436 * 1436 1437 * @param array $value Array of bulk actions to display. … … 1444 1445 * Get the table column titles. 1445 1446 * 1446 * @since BuddyPress (1.7.0)1447 * @since 1.7.0 1447 1448 * 1448 1449 * @see WP_List_Table::single_row_columns() … … 1455 1456 * Filters the titles for the columns for the groups list table. 1456 1457 * 1457 * @since BuddyPress (2.0.0)1458 * @since 2.0.0 1458 1459 * 1459 1460 * @param array $value Array of slugs and titles for the columns. … … 1481 1482 * $desc_first = false. 1482 1483 * 1483 * @since BuddyPress (1.7.0)1484 * @since 1.7.0 1484 1485 * 1485 1486 * @return array Array of sortable column names. … … 1528 1529 * Markup for the Checkbox column. 1529 1530 * 1530 * @since BuddyPress (1.7.0)1531 * @since 1.7.0 1531 1532 * 1532 1533 * @see WP_List_Table::single_row_columns() … … 1541 1542 * Markup for the Group ID column. 1542 1543 * 1543 * @since BuddyPress (1.7.0)1544 * @since 1.7.0 1544 1545 * 1545 1546 * @see WP_List_Table::single_row_columns() … … 1556 1557 * Called "comment" in the CSS so we can re-use some WP core CSS. 1557 1558 * 1558 * @since BuddyPress (1.7.0)1559 * @since 1.7.0 1559 1560 * 1560 1561 * @see WP_List_Table::single_row_columns() … … 1583 1584 * Filters the group name for a group's column content. 1584 1585 * 1585 * @since BuddyPress (1.7.0)1586 * @since 1.7.0 1586 1587 * 1587 1588 * @param string $value Name of the group being rendered. … … 1604 1605 * Filters the actions that will be shown for the column content. 1605 1606 * 1606 * @since BuddyPress (1.7.0)1607 * @since 1.7.0 1607 1608 * 1608 1609 * @param array $value Array of actions to be displayed for the column content. … … 1635 1636 * Markup for the Description column. 1636 1637 * 1637 * @since BuddyPress (1.7.0)1638 * @since 1.7.0 1638 1639 * 1639 1640 * @param array $item Information about the current row. … … 1644 1645 * Filters the markup for the Description column. 1645 1646 * 1646 * @since BuddyPress (1.0.0)1647 * @since 1.0.0 1647 1648 * 1648 1649 * @param string $value Markup for the Description column. … … 1655 1656 * Markup for the Status column. 1656 1657 * 1657 * @since BuddyPress (1.7.0)1658 * @since 1.7.0 1658 1659 * 1659 1660 * @param array $item Information about the current row. … … 1680 1681 * Filters the markup for the Status column. 1681 1682 * 1682 * @since BuddyPress (1.7.0)1683 * @since 1.7.0 1683 1684 * 1684 1685 * @param string $status_desc Markup for the Status column. … … 1691 1692 * Markup for the Number of Members column. 1692 1693 * 1693 * @since BuddyPress (1.7.0)1694 * @since 1.7.0 1694 1695 * 1695 1696 * @param array $item Information about the current row. … … 1701 1702 * Filters the markup for the number of Members column. 1702 1703 * 1703 * @since BuddyPress (1.7.0)1704 * @since 1.7.0 1704 1705 * 1705 1706 * @param int $count Markup for the number of Members column. … … 1712 1713 * Markup for the Last Active column. 1713 1714 * 1714 * @since BuddyPress (1.7.0)1715 * @since 1.7.0 1715 1716 * 1716 1717 * @param array $item Information about the current row. … … 1722 1723 * Filters the markup for the Last Active column. 1723 1724 * 1724 * @since BuddyPress (1.7.0)1725 * @since 1.7.0 1725 1726 * 1726 1727 * @param string $last_active Markup for the Last Active column. … … 1733 1734 * Allow plugins to add their custom column. 1734 1735 * 1735 * @since BuddyPress (2.0.0)1736 * @since 2.0.0 1736 1737 * 1737 1738 * @param array $item Information about the current row. … … 1745 1746 * Filters a string to allow plugins to add custom column content. 1746 1747 * 1747 * @since BuddyPress (2.0.0)1748 * @since 2.0.0 1748 1749 * 1749 1750 * @param string $value Empty string.
Note: See TracChangeset
for help on using the changeset viewer.