Changeset 8427
- Timestamp:
- 05/16/2014 10:42:09 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-admin.php
r8426 r8427 1075 1075 * @since BuddyPress (1.7.0) 1076 1076 */ 1077 function prepare_items() {1077 public function prepare_items() { 1078 1078 global $groups_template; 1079 1079 … … 1182 1182 * @return array Array of column headers. 1183 1183 */ 1184 function get_column_info() {1184 public function get_column_info() { 1185 1185 $this->_column_headers = array( 1186 1186 $this->get_columns(), … … 1197 1197 * @since BuddyPress (1.7.0) 1198 1198 */ 1199 function no_items() {1199 public function no_items() { 1200 1200 _e( 'No groups found.', 'buddypress' ); 1201 1201 } … … 1206 1206 * @since BuddyPress (1.7.0) 1207 1207 */ 1208 function display() {1208 public function display() { 1209 1209 extract( $this->_args ); 1210 1210 … … 1240 1240 * @param object $item The current group item in the loop. 1241 1241 */ 1242 function single_row( $item = array() ) {1242 public function single_row( $item = array() ) { 1243 1243 static $even = false; 1244 1244 … … 1266 1266 * @since BuddyPress (1.7.0) 1267 1267 */ 1268 function get_views() {1268 public function get_views() { 1269 1269 $url_base = bp_get_admin_url( 'admin.php?page=bp-groups' ); ?> 1270 1270 … … 1287 1287 * @return array Key/value pairs for the bulk actions dropdown. 1288 1288 */ 1289 function get_bulk_actions() {1289 public function get_bulk_actions() { 1290 1290 return apply_filters( 'bp_groups_list_table_get_bulk_actions', array( 1291 1291 'delete' => __( 'Delete', 'buddypress' ) … … 1302 1302 * @return array Array of column titles. 1303 1303 */ 1304 function get_columns() {1304 public function get_columns() { 1305 1305 return apply_filters( 'bp_groups_list_table_get_columns', array( 1306 1306 'cb' => '<input name type="checkbox" />', … … 1329 1329 * @return array Array of sortable column names. 1330 1330 */ 1331 function get_sortable_columns() {1331 public function get_sortable_columns() { 1332 1332 return array( 1333 1333 'gid' => array( 'gid', false ), … … 1347 1347 * @param array $item A singular item (one full row). 1348 1348 */ 1349 function column_cb( $item = array() ) {1349 public function column_cb( $item = array() ) { 1350 1350 printf( '<label class="screen-reader-text" for="gid-%1$d">' . __( 'Select group %1$d', 'buddypress' ) . '</label><input type="checkbox" name="gid[]" value="%1$d" id="gid-%1$d" />', $item['id'] ); 1351 1351 } … … 1360 1360 * @param array $item A singular item (one full row). 1361 1361 */ 1362 function column_gid( $item = array() ) {1363 echo '<strong>' . $item['id']. '</strong>';1362 public function column_gid( $item = array() ) { 1363 echo '<strong>' . absint( $item['id'] ) . '</strong>'; 1364 1364 } 1365 1365 … … 1375 1375 * @param array $item A singular item (one full row). 1376 1376 */ 1377 function column_comment( $item = array() ) {1377 public function column_comment( $item = array() ) { 1378 1378 1379 1379 // Preorder items: Edit | Delete | View … … 1392 1392 $edit_url = $base_url . '&action=edit'; 1393 1393 $view_url = bp_get_group_permalink( $item_obj ); 1394 $group_name = apply_filters_ref_array( 'bp_get_group_name', array( $item['name'] ), $item ); 1394 1395 1395 1396 // Rollover actions … … 1413 1414 'type' => 'thumb', 1414 1415 'avatar_dir' => 'group-avatars', 1415 'alt' => sprintf( __( 'Group logo of %s', 'buddypress' ), $ item['name']),1416 'alt' => sprintf( __( 'Group logo of %s', 'buddypress' ), $group_name ), 1416 1417 'width' => '32', 1417 1418 'height' => '32', 1418 'title' => $ item['name']1419 'title' => $group_name 1419 1420 ) ); 1420 1421 1421 $content = apply_filters_ref_array( 'bp_get_group_name', array( sprintf( '<strong><a href="%s">%s</a></strong>', esc_url( $edit_url ), $item['name'] ), $item ));1422 $content = sprintf( '<strong><a href="%s">%s</a></strong>', esc_url( $edit_url ), $group_name ); 1422 1423 1423 1424 echo $avatar . ' ' . $content . ' ' . $this->row_actions( $actions ); … … 1431 1432 * @param array Information about the current row. 1432 1433 */ 1433 function column_description( $item = array() ) {1434 public function column_description( $item = array() ) { 1434 1435 echo apply_filters_ref_array( 'bp_get_group_description', array( $item['description'], $item ) ); 1435 1436 } … … 1442 1443 * @param array Information about the current row. 1443 1444 */ 1444 function column_status( $item = array() ) {1445 public function column_status( $item = array() ) { 1445 1446 $status = $item['status']; 1446 1447 $status_desc = ''; … … 1470 1471 * @param array Information about the current row. 1471 1472 */ 1472 function column_members( $item = array() ) {1473 public function column_members( $item = array() ) { 1473 1474 $count = groups_get_groupmeta( $item['id'], 'total_member_count' ); 1474 1475 echo apply_filters_ref_array( 'bp_groups_admin_get_group_member_count', array( (int) $count, $item ) ); … … 1482 1483 * @param array Information about the current row. 1483 1484 */ 1484 function column_last_active( $item = array() ) {1485 public function column_last_active( $item = array() ) { 1485 1486 $last_active = groups_get_groupmeta( $item['id'], 'last_activity' ); 1486 1487 echo apply_filters_ref_array( 'bp_groups_admin_get_group_last_active', array( $last_active, $item ) ); … … 1495 1496 * @param string the column name. 1496 1497 */ 1497 function column_default( $item = array(), $column_name = '' ) {1498 public function column_default( $item = array(), $column_name = '' ) { 1498 1499 return apply_filters( 'bp_groups_admin_get_group_custom_column', '', $column_name, $item ); 1499 1500 }
Note: See TracChangeset
for help on using the changeset viewer.