apply_filters( 'sports_bench_team_roster_table', $html, $players, $team_id )
Type
Filters
Section
Teams
Outputs the table for the team’s roster
Parameters
- $html, string, the current HTML for the table
- $players, array, the players and their information that are on the team
- $team_id, integer, the team id for the team
Returns
- string, the HTML for the roster table
Since: 1.5
Source: team-functions.php, line 100
Example
/** * Returns the html for the team's roster table * * @param string $html * * @param array $players * * @param int $team_id * * @return string, html for the roster table * * @since 1.5 */ function sports_bench_do_team_roster_table( $html, $players, $team_id ) { $html .= '
' . __( 'Player', 'sports-bench' ) . ' | '; $html .= '' . __( 'Position', 'sports-bench' ) . ' | '; $html .= '' . __( 'Hometown', 'sports-bench' ) . ' | '; $html .= '' . __( 'Height', 'sports-bench' ) . ' | '; $html .= '' . __( 'Weight', 'sports-bench' ) . ' | '; $html .= '' . __( 'Age', 'sports-bench' ) . ' | '; $html .= '
---|---|---|---|---|---|
' . $player[ 'first_name' ] . ' ' . $player[ 'last_name' ] . ' | '; $html .= '' . $player[ 'position' ] . ' | '; $html .= '' . $player[ 'home_city' ] . ', ' . $player[ 'home_state' ] . ' | '; $html .= '' . stripslashes( $player[ 'height' ] ) . ' | '; $html .= '' . $player[ 'weight' ] . ' | '; $html .= '' . $player[ 'age' ] . ' | '; $html .= '