apply_filters( 'sports_bench_game_shortcode_info', $html, $game, $away_team, $away_team_name, $away_score, $home_team, $home_team_name, $home_score, $time_in_game, $location )
Type
Filters
Section
Games
Shortcodes
Outputs the HTML for the game information section of the game shortcode
Parameters
- $html, string, the current HTML for before the player shortcode
- $game, Sports_Bench_Game object, the game object for the selected game
- $away_team, Sports_Bench_Team object, the team object for the away team
- $away_team_name, string, the team name for the away team
- $away_score, string, the score for the away team if the game is final
- $home_team, Sports_Bench_Team object, the team object for the home team
- $home_team_name, string, the team name for the home team
- $home_score, string, the score for the home team if the game is final
- $time_in_game, string, the current time and period for the game if it is in progress, otherwise it's the date and time of the game or final
- $location, string, the location for the game
Returns
- string, the HTML to be outputted for the game information section of the game shortcode
Since: 1.5
Source: shortcodes.php, line 160
Example
function sports_bench_do_game_shortcode_info( $html, $game, $away_team, $away_team_name, $away_score, $home_team, $home_team_name, $home_score, $time_in_game, $location ) { if ( $game->game_status != 'final' ) { $time_class = 'scheduled'; } else { $time_class = ''; } $html .= '
' . $away_team->get_team_photo( 'team-logo' ) . ' | '; $html .= '' . $away_team_name . ' | '; $html .= '' . $away_score . ' | '; $html .= '' . $time_in_game . ' | '; $html .= '' . $home_score . ' | '; $html .= '' . $home_team_name . ' | '; $html .= '' . $home_team->get_team_photo( 'team-logo' ) . ' | '; $html .= '