Display player position on profile close #35

This commit is contained in:
Brian Miyaji
2014-08-25 00:18:09 +10:00
parent 7ffde06772
commit 15bc070588

View File

@@ -34,6 +34,14 @@ if ( $nationality ):
$common[ __( 'Nationality', 'sportspress' ) ] = $country_name ? ( $show_nationality_flags ? '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . '/assets/images/flags/' . strtolower( $nationality ) . '.png" alt="' . $nationality . '"> ' : '' ) . $country_name : '&mdash;'; $common[ __( 'Nationality', 'sportspress' ) ] = $country_name ? ( $show_nationality_flags ? '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . '/assets/images/flags/' . strtolower( $nationality ) . '.png" alt="' . $nationality . '"> ' : '' ) . $country_name : '&mdash;';
endif; endif;
$position_names = array();
$positions = get_the_terms( $id, 'sp_position' );
foreach ( $positions as $position ):
$position_names[] = $position->name;
endforeach;
$common[ __( 'Position', 'sportspress' ) ] = implode( ', ', $position_names );
$data = array_merge( $metrics_before, $common, $metrics_after ); $data = array_merge( $metrics_before, $common, $metrics_after );
if ( $current_teams ): if ( $current_teams ):
@@ -64,4 +72,5 @@ endforeach;
$output .= '</dl></div>'; $output .= '</dl></div>';
?> ?>
<?php echo $output; ?> <?php echo $output; ?>
<br>