apply_filters( 'sports_bench_team_listing_info', $html, $team_id, $team_name, $num_teams, $count )

Type

Filters

Section

Teams

Outputs the HTML for the team listing for the team listing page

Parameters

  • $html, string, the current HTML for the team listing
  • $team_id, integer, the team id for the team
  • $team_name, string, the team name
  • $num_teams, integer, the total number of teams
  • $count, integer, the current count of teams being looped through

Returns

  • string, HTML for the team listing for the team listing page

Since: 1.5

Source: team-functions.php, line 219; shortcodes.php, line 537

Example

/**
 * Returns the HTML for a team on the teams listing page
 *
 * @param $html, current html for the team
 *
 * @param $team_id, the id of the current team
 *
 * @param $team_name, the name of the current team
 *
 * @param $num_teams, the total number of teams being listed
 *
 * @param $count, the current number of the team being shown
 *
 * @return string, html for a team
 *
 * @sice 1.5
 */
function sports_bench_team_listing( $html, $team_id, $team_name, $num_teams, $count ) {
	$current_team = new Sports_Bench_Team( (int)$team_id );
	if ( 0 == $count ) {
		$html .= '';
	}

	return $html;
}
remove_filter( 'sports_bench_team_listing_info', 'sports_bench_do_team_listing_info' );
add_filter( 'sports_bench_team_listing_info', 'sports_bench_team_listing', 10, 5 );