Use gettext filter to modify fronted text

This commit is contained in:
Brian Miyaji
2014-06-13 23:21:59 +10:00
parent 89ce3ee84e
commit 5ba33fd629
21 changed files with 90 additions and 124 deletions

View File

@@ -31,7 +31,7 @@ $metrics_after = $player->metrics( false );
$common = array();
if ( $nationality ):
$country_name = sp_array_value( $countries, $nationality, null );
$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;';
$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;
$data = array_merge( $metrics_before, $common, $metrics_after );
@@ -50,7 +50,7 @@ if ( $past_teams ):
foreach ( $past_teams as $team ):
$teams[] = '<a href="' . get_post_permalink( $team ) . '">' . get_the_title( $team ) . '</a>';
endforeach;
$data[ SP()->text->string('Past Teams') ] = implode( ', ', $teams );
$data[ __( 'Past Teams', 'sportspress' ) ] = implode( ', ', $teams );
endif;
$output = '<div class="sp-list-wrapper">' .