apply_filters( 'sports_bench_before_rivalry_shortcode', $html, $team_one, $team_two )

Type

Filters

Section

Shortcodes

Outputs the HTML for before the rivalry shortcode

Parameters

  • $html, string, the current HTML for before the team's information section
  • $team_one, Sports_Bench_Team object, the team object for the first selected team
  • $team_two, Sports_Bench_Team object, the team object for the second selected team

Returns

  • string, the HTML to be outputted before the rivalry shortcode

Since: 1.5

Source: shortcodes.php, line 505

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_rivalry_shortcode', 'sports_bench_game_shortcode_head', 10, 3 );