apply_filters( 'sports_bench_team_season_stats', '', $team, $season )

Filters
Stats
Teams

Returns the HTML to show the stats for a team in a season.

Parameters

  • string $html
  • Sports_Bench_Team $team
  • string $season

Returns

  • string, HTML to show the stats for a team in a season

Since: 1.7

Source: team-functions.php, line 476

Example

function sports_bench_do_team_season_stats( $html, $team, $season) {
	$stats_array = sports_bench_get_team_season_stats( $team, $season );
	$total_stats = $stats_array[ 0 ];
	$average_stats = $stats_array [ 1 ];

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

        $html .= '';
        $html .= '';
		$html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';

        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';

        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';

        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';

        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';

        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';

        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';

        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';

        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';
        $html .= '';

        $html .= '
' . __( 'Total Stats', 'sports-bench' ) . '' . __( 'Average Stats', 'sports-bench' ) . '
' . __( 'Doubles', 'sports-bench' ) . '' . $total_stats[ 'doubles' ] . '' . $average_stats[ 'doubles' ] . '
' . __( 'Triples', 'sports-bench' ) . '' . $total_stats[ 'triples' ] . '' . $average_stats[ 'triples' ] . '
' . __( 'Home Runs', 'sports-bench' ) . '' . $total_stats[ 'homeruns' ] . '' . $average_stats[ 'homeruns' ] . '
' . __( 'Hits', 'sports-bench' ) . '' . $total_stats[ 'hits' ] . '' . $average_stats[ 'hits' ] . '
' . __( 'Errors', 'sports-bench' ) . '' . $total_stats[ 'errors' ] . '' . $average_stats[ 'errors' ] . '
' . __( 'Left on Base', 'sports-bench' ) . '' . $total_stats[ 'lob' ] . '' . $average_stats[ 'lob' ] . '
' . __( 'Runs Scored', 'sports-bench' ) . '' . $total_stats[ 'runs' ] . '' . $average_stats[ 'runs' ] . '
' . __( 'Runs Given Up', 'sports-bench' ) . '' . $total_stats[ 'runs_against' ] . '' . $average_stats[ 'runs_against' ] . '
'; } elseif ( 'basketball' === get_option( 'sports-bench-sport' ) ) { $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= '
' . __( 'Total Stats', 'sports-bench' ) . '' . __( 'Average Stats', 'sports-bench' ) . '
' . __( 'Points', 'sports-bench' ) . '' . $total_stats[ 'points' ] . '' . $average_stats[ 'points' ] . '
' . __( 'Field Goals Made/Percentage', 'sports-bench' ) . '' . $total_stats[ 'fgm' ] . '' . $average_stats[ 'fg_pct' ] . '
' . __( 'Three Pointers Made/Percentage', 'sports-bench' ) . '' . $total_stats[ '3pm' ] . '' . $average_stats[ '3p_pct' ] . '
' . __( 'Free Throws Made/Percentage', 'sports-bench' ) . '' . $total_stats[ 'ftm' ] . '' . $average_stats[ 'ft_pct' ] . '
' . __( 'Total Rebounds', 'sports-bench' ) . '' . $total_stats[ 'rebounds' ] . '' . $average_stats[ 'rebounds' ] . '
' . __( 'Offensive Rebounds', 'sports-bench' ) . '' . $total_stats[ 'off_rebounds' ] . '' . $average_stats[ 'off_rebounds' ] . '
' . __( 'Defensive Rebounds', 'sports-bench' ) . '' . $total_stats[ 'def_rebounds' ] . '' . $average_stats[ 'def_rebounds' ] . '
' . __( 'Assists', 'sports-bench' ) . '' . $total_stats[ 'assists' ] . '' . $average_stats[ 'assists' ] . '
' . __( 'Steals', 'sports-bench' ) . '' . $total_stats[ 'steals' ] . '' . $average_stats[ 'steals' ] . '
' . __( 'Blocks', 'sports-bench' ) . '' . $total_stats[ 'blocks' ] . '' . $average_stats[ 'blocks' ] . '
' . __( 'Points in the Paint', 'sports-bench' ) . '' . $total_stats[ 'pip' ] . '' . $average_stats[ 'pip' ] . '
' . __( 'Turnovers', 'sports-bench' ) . '' . $total_stats[ 'to' ] . '' . $average_stats[ 'to' ] . '
' . __( 'Points off Turnovers', 'sports-bench' ) . '' . $total_stats[ 'pot' ] . '' . $average_stats[ 'pot' ] . '
' . __( 'Fast Break Points', 'sports-bench' ) . '' . $total_stats[ 'fast_break' ] . '' . $average_stats[ 'fast_break' ] . '
' . __( 'Fouls', 'sports-bench' ) . '' . $total_stats[ 'fouls' ] . '' . $average_stats[ 'fouls' ] . '
' . __( 'Points Against', 'sports-bench' ) . '' . $total_stats[ 'points_against' ] . '' . $average_stats[ 'points_against' ] . '
'; } elseif ( 'football' === get_option( 'sports-bench-sport' ) ) { $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $possession = $total_stats[ 'possession' ]; //echo $possession; $minutes = floor( $possession / 60 ); $seconds = $possession % 60; if ( 9 > $seconds ) { $seconds = '0' . $seconds; } $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= '
' . __( 'Total Stats', 'sports-bench' ) . '' . __( 'Average Stats', 'sports-bench' ) . '
' . __( 'Points', 'sports-bench' ) . '' . $total_stats[ 'points' ] . '' . $average_stats[ 'points' ] . '
' . __( 'Total Yards', 'sports-bench' ) . '' . $total_stats[ 'total' ] . '' . $average_stats[ 'total' ] . '
' . __( 'Pass Yards', 'sports-bench' ) . '' . $total_stats[ 'pass' ] . '' . $average_stats[ 'pass' ] . '
' . __( 'Rushing Yards', 'sports-bench' ) . '' . $total_stats[ 'rush' ] . '' . $average_stats[ 'rush' ] . '
' . __( 'Turnovers', 'sports-bench' ) . '' . $total_stats[ 'turnovers' ] . '' . $average_stats[ 'turnovers' ] . '
' . __( 'Interceptions', 'sports-bench' ) . '' . $total_stats[ 'ints' ] . '' . $average_stats[ 'ints' ] . '
' . __( 'Fumbles', 'sports-bench' ) . '' . $total_stats[ 'fumbles' ] . '' . $average_stats[ 'fumbles' ] . '
' . __( 'Fumbles Lost', 'sports-bench' ) . '' . $total_stats[ 'fumbles_lost' ] . '' . $average_stats[ 'fumbles_lost' ] . '
' . __( 'Possession', 'sports-bench' ) . '' . $minutes . ':' . $seconds . '' . $average_stats[ 'possession' ] . '
' . __( 'Kick Returns', 'sports-bench' ) . '' . $total_stats[ 'kick_returns' ] . '' . $average_stats[ 'kick_returns' ] . '
' . __( 'Kick Return Yards', 'sports-bench' ) . '' . $total_stats[ 'kick_return_yards' ] . '' . $average_stats[ 'kick_return_yards' ] . '
' . __( 'Penalties', 'sports-bench' ) . '' . $total_stats[ 'penalties' ] . '' . $average_stats[ 'penalties' ] . '
' . __( 'Penalty Yards', 'sports-bench' ) . '' . $total_stats[ 'penalty_yards' ] . '' . $average_stats[ 'penalty_yards' ] . '
' . __( 'First Downs', 'sports-bench' ) . '' . $total_stats[ 'first_downs' ] . '' . $average_stats[ 'first_downs' ] . '
' . __( 'Points Against', 'sports-bench' ) . '' . $total_stats[ 'points_against' ] . '' . $average_stats[ 'points_against' ] . '
'; } elseif ( 'hockey' === get_option( 'sports-bench-sport' ) ) { $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= '
' . __( 'Total Stats', 'sports-bench' ) . '' . __( 'Average Stats', 'sports-bench' ) . '
' . __( 'Goals', 'sports-bench' ) . '' . $total_stats[ 'goals' ] . '' . $average_stats[ 'goals' ] . '
' . __( 'Shots on Goal', 'sports-bench' ) . '' . $total_stats[ 'shots_on_goal' ] . '' . $average_stats[ 'shots_on_goal' ] . '
' . __( 'Power Plays', 'sports-bench' ) . '' . $total_stats[ 'power_plays' ] . '' . $average_stats[ 'power_plays' ] . '
' . __( 'Power Play Goals', 'sports-bench' ) . '' . $total_stats[ 'power_play_goals' ] . '' . $average_stats[ 'power_play_goals' ] . '
' . __( 'Penalty Minutes', 'sports-bench' ) . '' . $total_stats[ 'penalty_minutes' ] . '' . $average_stats[ 'penalty_minutes' ] . '
' . __( 'Goals Against', 'sports-bench' ) . '' . $total_stats[ 'goals_against' ] . '' . $average_stats[ 'goals_against' ] . '
'; } elseif ( 'rugby' === get_option( 'sports-bench-sport' ) ) { $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= '
' . __( 'Total Stats', 'sports-bench' ) . '' . __( 'Average Stats', 'sports-bench' ) . '
' . __( 'Points', 'sports-bench' ) . '' . $total_stats[ 'points' ] . '' . $average_stats[ 'points' ] . '
' . __( 'Tries', 'sports-bench' ) . '' . $total_stats[ 'tries' ] . '' . $average_stats[ 'tries' ] . '
' . __( 'Conversions', 'sports-bench' ) . '' . $total_stats[ 'conversions' ] . '' . $average_stats[ 'conversions' ] . '
' . __( 'Penalty Goals', 'sports-bench' ) . '' . $total_stats[ 'penalty_goals' ] . '' . $average_stats[ 'penalty_goals' ] . '
' . __( 'Kick Percentage', 'sports-bench' ) . '' . $total_stats[ 'kick_percentage' ] . '' . $average_stats[ 'kick_percentage' ] . '
' . __( 'Runs', 'sports-bench' ) . '' . $total_stats[ 'meters_run' ] . '' . $average_stats[ 'meters_run' ] . '
' . __( 'Kicks from Hand', 'sports-bench' ) . '' . $total_stats[ 'meters_hand' ] . '' . $average_stats[ 'meters_hand' ] . '
' . __( 'Passes', 'sports-bench' ) . '' . $total_stats[ 'meters_pass' ] . '' . $average_stats[ 'meters_pass' ] . '
' . __( 'Possession', 'sports-bench' ) . '' . $total_stats[ 'meters_pass' ] . '' . $average_stats[ 'possession' ] . '
' . __( 'Clean Breaks', 'sports-bench' ) . '' . $total_stats[ 'clean_breaks' ] . '' . $average_stats[ 'clean_breaks' ] . '
' . __( 'Defenders Beaten', 'sports-bench' ) . '' . $total_stats[ 'defenders_beaten' ] . '' . $average_stats[ 'defenders_beaten' ] . '
' . __( 'Offload', 'sports-bench' ) . '' . $total_stats[ 'offload' ] . '' . $average_stats[ 'offload' ] . '
' . __( 'Rucks', 'sports-bench' ) . '' . $total_stats[ 'rucks' ] . '' . $average_stats[ 'rucks' ] . '
' . __( 'Mauls', 'sports-bench' ) . '' . $total_stats[ 'mauls' ] . '' . $average_stats[ 'mauls' ] . '
' . __( 'Turnovers Conceded', 'sports-bench' ) . '' . $total_stats[ 'turnovers_conceeded' ] . '' . $average_stats[ 'turnovers_conceeded' ] . '
' . __( 'Scrums', 'sports-bench' ) . '' . $total_stats[ 'scrums' ] . '' . $average_stats[ 'scrums' ] . '
' . __( 'Lineouts', 'sports-bench' ) . '' . $total_stats[ 'lineouts' ] . '' . $average_stats[ 'lineouts' ] . '
' . __( 'Penalties Conceded', 'sports-bench' ) . '' . $total_stats[ 'penalties_conceeded' ] . '' . $average_stats[ 'penalties_conceeded' ] . '
' . __( 'Red Cards', 'sports-bench' ) . '' . $total_stats[ 'red_cards' ] . '' . $average_stats[ 'red_cards' ] . '
' . __( 'Yellow Cards', 'sports-bench' ) . '' . $total_stats[ 'yellow_cards' ] . '' . $average_stats[ 'yellow_cards' ] . '
' . __( 'Free Kicks Conceded', 'sports-bench' ) . '' . $total_stats[ 'free_kicks_conceeded' ] . '' . $average_stats[ 'free_kicks_conceeded' ] . '
' . __( 'Goals Against', 'sports-bench' ) . '' . $total_stats[ 'goals_against' ] . '' . $average_stats[ 'goals_against' ] . '
'; } elseif ( 'soccer' === get_option( 'sports-bench-sport' ) ) { $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= '
' . __( 'Total Stats', 'sports-bench' ) . '' . __( 'Average Stats', 'sports-bench' ) . '
' . __( 'Goals', 'sports-bench' ) . '' . $total_stats[ 'goals' ] . '' . $average_stats[ 'goals' ] . '
' . __( 'Possession', 'sports-bench' ) . '' . $total_stats[ 'possession' ] . '' . $average_stats[ 'possession' ] . '
' . __( 'Shots', 'sports-bench' ) . '' . $total_stats[ 'shots' ] . '' . $average_stats[ 'shots' ] . '
' . __( 'Shots on Goal', 'sports-bench' ) . '' . $total_stats[ 'sog' ] . '' . $average_stats[ 'sog' ] . '
' . __( 'Corners', 'sports-bench' ) . '' . $total_stats[ 'corners' ] . '' . $average_stats[ 'corners' ] . '
' . __( 'Offsides', 'sports-bench' ) . '' . $total_stats[ 'offsides' ] . '' . $average_stats[ 'offsides' ] . '
' . __( 'Fouls', 'sports-bench' ) . '' . $total_stats[ 'fouls' ] . '' . $average_stats[ 'fouls' ] . '
' . __( 'Saves', 'sports-bench' ) . '' . $total_stats[ 'saves' ] . '' . $average_stats[ 'saves' ] . '
' . __( 'Goals Against', 'sports-bench' ) . '' . $total_stats[ 'goals_against' ] . '' . $average_stats[ 'goals_against' ] . '
' . __( 'Yellow Cards', 'sports-bench' ) . '' . $total_stats[ 'yellows' ] . '' . $average_stats[ 'yellows' ] . '
' . __( 'Red Cards', 'sports-bench' ) . '' . $total_stats[ 'reds' ] . '' . $average_stats[ 'reds' ] . '
'; } elseif ( 'volleyball' === get_option( 'sports-bench-sport' ) ) { $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= '
' . __( 'Total Stats', 'sports-bench' ) . '' . __( 'Average Stats', 'sports-bench' ) . '
' . __( 'Points', 'sports-bench' ) . '' . $total_stats[ 'points' ] . '' . $average_stats[ 'points' ] . '
' . __( 'Kills', 'sports-bench' ) . '' . $total_stats[ 'kills' ] . '' . $average_stats[ 'kills' ] . '
' . __( 'Blocks', 'sports-bench' ) . '' . $total_stats[ 'blocks' ] . '' . $average_stats[ 'blocks' ] . '
' . __( 'Aces', 'sports-bench' ) . '' . $total_stats[ 'aces' ] . '' . $average_stats[ 'aces' ] . '
' . __( 'Assists', 'sports-bench' ) . '' . $total_stats[ 'assists' ] . '' . $average_stats[ 'assists' ] . '
' . __( 'Digs', 'sports-bench' ) . '' . $total_stats[ 'digs' ] . '' . $average_stats[ 'digs' ] . '
' . __( 'Attacks', 'sports-bench' ) . '' . $total_stats[ 'attacks' ] . '' . $average_stats[ 'attacks' ] . '
' . __( 'Hitting Errors', 'sports-bench' ) . '' . $total_stats[ 'hitting_errors' ] . '' . $average_stats[ 'hitting_errors' ] . '
' . __( 'Points Against', 'sports-bench' ) . '' . $total_stats[ 'points_against' ] . '' . $average_stats[ 'points_against' ] . '
'; } else { return; } return $html; } add_filter( 'sports_bench_team_season_stats', 'sports_bench_do_team_season_stats', 10, 3 );