Move text settings to dedicated tab

This commit is contained in:
Brian Miyaji
2014-04-25 01:06:14 +10:00
parent e382174441
commit 88d43e0a4f
20 changed files with 129 additions and 143 deletions

View File

@@ -28,20 +28,20 @@ $metrics = sp_get_player_metrics_data( $id );
$common = array();
if ( $nationality ):
$country_name = sp_array_value( $countries, $nationality, null );
$common[ SP()->text->string('Nationality', 'player') ] = $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[ SP()->text->string('Nationality') ] = $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;
$data = array_merge( $common, $metrics );
if ( $current_team )
$data[ SP()->text->string('Current Team', 'player') ] = '<a href="' . get_post_permalink( $current_team ) . '">' . get_the_title( $current_team ) . '</a>';
$data[ SP()->text->string('Current Team') ] = '<a href="' . get_post_permalink( $current_team ) . '">' . get_the_title( $current_team ) . '</a>';
if ( $past_teams ):
$teams = array();
foreach ( $past_teams as $team ):
$teams[] = '<a href="' . get_post_permalink( $team ) . '">' . get_the_title( $team ) . '</a>';
endforeach;
$data[ SP()->text->string('Past Teams', 'player') ] = implode( ', ', $teams );
$data[ SP()->text->string('Past Teams') ] = implode( ', ', $teams );
endif;
$output = '<div class="sp-list-wrapper">' .