apply_filters( 'sports_bench_playoff_series', $html, $series, $team_one, $team_one_class, $team_one_name, $team_two, $team_two_class, $team_two_name, $game_numbers )

Type

Filters

Section

Playoffs

Outputs the HTML for the playoff series in a bracket

Parameters

  • $html, string, current HTML being outputted
  • $series, Sports_Bench_Series object, the series object for the current playoff series
  • $team_one, Sports_Bench_Team object, the team object for the first team in the playoff series
  • $team_one_class, string, the CSS class for the first team
  • $team_one_name, string, the name of the first team in the series
  • $team_two, Sports_Bench_Team object, the team object for the second team in the playoff series
  • $team_two_class, string, the CSS class for the second team
  • $team_two_name, string, the name of the second team in the series
  • $game_numbers, string, list of game ids for the current series

Returns

  • string, the HTML to show the playoff series

Since: 1.5

Source: playoff-function.php, line 111, 133, 156, 179, 202, 225, 267, 289, 311, 334, 357, 399, 421, 443, 465, 487

Example

/**
 * Returns the HTML for the playoff series
 *
 * @param string $html
 *
 * @param Sports_Bench_Series $series
 *
 * @param Sports_Bench_Team $team_one
 *
 * @param string $team_one_class
 *
 * @param string $team_one_name
 *
 * @param Sports_Bench_Team $team_two
 *
 * @param string $team_two_class
 *
 * @param string $team_two_name
 *
 * @param string $game_numbers
 *
 * @return string
 *
 * @since 1.5
 */
function sports_bench_do_playoff_series( $html, $series, $team_one, $team_one_class, $team_one_name, $team_two, $team_two_class, $team_two_name, $game_numbers ) {
	$html .= '';
	$team_row_styles = apply_filters( 'sports_bench_playoff_team_row', '', $team_one );
	$html .= '';
	$html .= '';
	$html .= '';
	$html .= '';
	$html .= '';
	$html .= '';
	$team_row_styles = apply_filters( 'sports_bench_playoff_team_row', '', $team_two );
	$html .= '';
	$html .= '';
	$html .= '';
	$html .= '';
	$html .= '';
	$html .= '';
	$html .= '';
	$html .= '';

	$theme = wp_get_theme();
	$parent_theme = $theme->parent();

	if ( $theme->name != 'Sports Bench' || ( $parent_theme && $parent_theme->name != 'Sports Bench' ) ) {
		$html .= '';
	}
	$html .= '';
	$html .= '
' . $series->team_one_seed . '' . $team_one_name . '' . $series->get_team_score( 'team-one' ) . '
' . $series->team_two_seed . '' . $team_two_name . '' . $series->get_team_score( 'team-two' ) . '
' . $series->get_series_score() . '' . __( 'View', 'sports-bench' ) . '
'; $html .= apply_filters( 'sports_bench_playoff_series_modal', '', $series, $team_one, $team_one_name, $team_two, $team_two_name, $game_numbers ); return $html; } add_filter( 'sports_bench_playoff_series', 'sports_bench_do_playoff_series', 10, 9 );