apply_filters( 'sports_bench_team_shortcode_information', $html, $team, $record )

Type

Filters

Section

Shortcodes
Teams

Outputs the HTML for the team information section of the team shortcode

Parameters

  • $html, string, the current HTML for the team information section
  • $team, Sports_Bench_Team object, the team object for the selected team
  • $record, array, the record for the team in wins, losses and draws/ties

Returns

  • string, the HTML to be outputted for the team information section of the team shortcode

Since: 1.5

Source: shortcodes.php, line 59

Example

/**
 * Returns the html for the team information section in the team listing shortcode
 *
 * @param string $html
 *
 * @param Sports_Bench_Team $team
 *
 * @param array $record
 *
 * @return string, html for the team information section
 */
function sports_bench_do_team_shortcode_information( $html, $team, $record ) {
	$html .= '';
	$html .= '
'; $html .= '

' . $team->team_name . '

'; $html .= '

' . $team->team_city . ', ' . $team->team_state . '

'; $html .= '

' . $team->team_stadium . '

'; $html .= '

' . $team->team_head_coach . '

'; $html .= '

' . $record[ 0 ] . '-' . $record[ 1 ] . '-' . $record[ 2 ] . '

'; $html .= '
'; return $html; } add_filter( 'sports_bench_team_shortcode_information', 'sports_bench_do_team_shortcode_information', 10, 3 );