apply_filters( 'sports_bench_game_preview_row', $styles, $team )

Type

Filters

Section

Game Preview

Output styles for a team row in the game preview

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team that this row is for

Returns

  • string, the CSS styles for the row

Since: 1.5

Source: display-functions.php, line 158, 164

Example

/**
 * Returns the styles for a team row in the game preview
 *
 * @param $styles, current styles for the row
 *
 * @param $team, the Team Class for the current team
 *
 * @return string, styles for the row
 *
 * @since 1.5
 */
function sports_bench_preview_table_row_styles( $styles, $team ) {
	$styles = 'border-right: 5px solid ' . $team->team_primary_color . '; border-left: 5px solid ' . $team->team_primary_color . ';';

	return $styles;
}
add_filter( 'sports_bench_game_preview_row', 'sports_bench_preview_table_row_styles', 10, 2 );