apply_filters( 'sports_bench_scoreboard_row_styles', $styles, $team, $location )
Type
Filters
Section
Scoreboard
Output styles for the table body row for a team in the scoreboard game
Parameters
- $styles, string, current styles for the row
- $team, Sports_Bench_Team object, the team that this row is for
- $location, string, whether this row is in the scoreboard template or widget
Returns
- string, the CSS styles for the row
Since: 1.5
Source: scoreboard.php, line 488, 494, 658, 664
Example
/** * Returns the border style for the rows for the Sports Bench Scoreboard * * @param $styles, styles already applied * * @param $team, the team object for the row * * @param $location, location that's being applied * * @return string, added styles for the row * * @since 1.5 */ function sports_bench_scoreboard_row_borders( $styles, $team, $location ) { if ( 'widget' == $location ) { return 'border-right: 5px solid ' . $team->team_primary_color . '; border-left: 5px solid ' . $team->team_primary_color . ';'; } elseif ( 'scoreboard' == $location ) { return 'border-right: 5px solid ' . $team->team_primary_color . '; border-left: 5px solid ' . $team->team_primary_color . ';'; } return ''; } add_filter( 'sports_bench_scoreboard_row_styles', 'sports_bench_scoreboard_row_borders', 10, 3 );