Display player position on profile close #35
This commit is contained in:
@@ -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 : '—';
|
||||
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 );
|
||||
|
||||
if ( $current_teams ):
|
||||
@@ -64,4 +72,5 @@ endforeach;
|
||||
|
||||
$output .= '</dl></div>';
|
||||
?>
|
||||
<?php echo $output; ?>
|
||||
<?php echo $output; ?>
|
||||
<br>
|
||||
Reference in New Issue
Block a user