apply_filters( 'sports_bench_game_stats_info', $html, $game, $away_team, $home_team )

Type

Filters

Section

Game Recap

Outputs the game stats section for the game recap

Parameters

  • $html, string, the current html that's being outputted
  • $game, Sports_Bench_Game object, the game object for the current game
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, HTML for the game stats section for a game recap

Since: 1.5

Source: display-functions.php, line 205

Example

/**
 * Returns the HTML for a game stats section for a game recap
 *
 * @param $html, current html for the game stats section
 *
 * @param $game, the Game Class for the game
 *
 * @param $away_team, the Team Class for the away team
 *
 * @param $home_team, the Team Class for the home team
 *
 * @return string, the html for the game stats section
 *
 * @since 1.5
 */
function sports_bench_theme_game_stats_info( $html, $game, $away_team, $home_team ) {
	$html .= '';

	if ( get_option( 'sports-bench-sport' ) != 'baseball' ) {
		$html .= '';
	}

	$html .= '';

	$html .= '';

	return $html;
}
remove_filter( 'sports_bench_game_stats_info', 'sports_bench_do_game_stats_info', 10 );
add_filter( 'sports_bench_game_stats_info', 'sports_bench_theme_game_stats_info', 10, 5 );