apply_filters( 'sports_bench_before_game_shortcode', $html, $game_id, $away_team, $home_team )

Type

Filters

Section

Games
Shortcodes

Outputs the HTML for before the game shortcode

Parameters

  • $html, string, the current HTML for before the game shortcode
  • $game_id, integer, the game id for the selected 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, the HTML to be outputted before the game shortcode

Since: 1.5

Source: shortcodes.php, line 159

Example

/**
 * Returns the html for the div for the top part of the game shortcode
 *
 * @param $html, current html for the section
 *
 * @param $away_team, the Team Class for the away team
 *
 * @param $home_team, the Team Class for the home team
 *
 * @return string, html for the div
 *
 * @since 1.5
 */
function sports_bench_game_shortcode_head( $html, $away_team, $home_team ) {
    $html .= '
'; $html .= '
'; $html .= '
'; $html .= '
'; return $html; } add_filter( 'sports_bench_before_game_shortcode', 'sports_bench_game_shortcode_head', 10, 3 );