__( 'Pos', 'sportspress' ), 'thumbnails' => 0, 'thumbnail_size' => 'thumbnail' ); $r = wp_parse_args( $args, $defaults ); $leagues = get_the_terms( $id, 'sp_league' ); $seasons = get_the_terms( $id, 'sp_season' ); $terms = array(); if ( isset( $leagues[0] ) ) $terms[] = $leagues[0]->name; if ( isset( $seasons[0] ) ) $terms[] = $seasons[0]->name; $title = sizeof( $terms ) ? implode( ' — ', $terms ) : get_the_title( $id ); $output = '
| ' . $r['number_label'] . ' | '; foreach( $labels as $key => $label ): $output .= '' . $label . ' | '; endforeach; $output .= '|
|---|---|---|
| ' . $i . ' | '; // Thumbnail and name as link $permalink = get_post_permalink( $team_id ); if ( $r['thumbnails'] ): $thumbnail = get_the_post_thumbnail( $team_id, $r['thumbnail_size'], array( 'class' => 'logo' ) ); else: $thumbnail = null; endif; $name = sportspress_array_value( $row, 'name', sportspress_array_value( $row, 'name', ' ' ) ); $output .= '' . ( $thumbnail ? $thumbnail . ' ' : '' ) . '' . $name . ' | '; foreach( $labels as $key => $value ): if ( $key == 'name' ) continue; $output .= '' . sportspress_array_value( $row, $key, '—' ) . ' | '; endforeach; $output .= '