BP_Groups_List_Table::single_row( object|array $item = array() )
Generate content for a single row of the table.
Description
Parameters
- $item
-
(Optional) The current group item in the loop.
Default value: array()
Source
File: bp-groups/classes/class-bp-groups-list-table.php
public function single_row( $item = array() ) {
static $even = false;
$row_classes = array();
if ( $even ) {
$row_classes = array( 'even' );
} else {
$row_classes = array( 'alternate', 'odd' );
}
/**
* Filters the classes applied to a single row in the groups list table.
*
* @since BuddyPress 1.9.0
*
* @param array $row_classes Array of classes to apply to the row.
* @param string $value ID of the current group being displayed.
*/
$row_classes = apply_filters( 'bp_groups_admin_row_class', $row_classes, $item['id'] );
$row_class = ' class="' . implode( ' ', $row_classes ) . '"';
echo '<tr' . $row_class . ' id="group-' . esc_attr( $item['id'] ) . '" data-parent_id="' . esc_attr( $item['id'] ) . '" data-root_id="' . esc_attr( $item['id'] ) . '">';
echo $this->single_row_columns( $item );
echo '</tr>';
$even = ! $even;
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 1.7.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.