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

@@ -42,22 +42,22 @@ if ( isset( $columns ) )
<thead>
<tr>
<?php
echo '<th class="data-date">' . SP()->text->string('Date') . '</th>';
echo '<th class="data-date">' . __( 'Date', 'sportspress' ) . '</th>';
if ( $usecolumns == null || in_array( 'event', $usecolumns ) )
echo '<th class="data-event">' . SP()->text->string('Event') . '</th>';
echo '<th class="data-event">' . __( 'Event', 'sportspress' ) . '</th>';
if ( $usecolumns == null || in_array( 'teams', $usecolumns ) )
echo '<th class="data-teams">' . SP()->text->string('Teams') . '</th>';
echo '<th class="data-teams">' . __( 'Teams', 'sportspress' ) . '</th>';
if ( $usecolumns == null || in_array( 'time', $usecolumns ) )
echo '<th class="data-time">' . SP()->text->string('Time/Results') . '</th>';
echo '<th class="data-time">' . __( 'Time/Results', 'sportspress' ) . '</th>';
if ( $usecolumns == null || in_array( 'venue', $usecolumns ) )
echo '<th class="data-venue">' . SP()->text->string('Venue') . '</th>';
echo '<th class="data-venue">' . __( 'Venue', 'sportspress' ) . '</th>';
if ( $usecolumns == null || in_array( 'article', $usecolumns ) )
echo '<th class="data-article">' . SP()->text->string('Article') . '</th>';
echo '<th class="data-article">' . __( 'Article', 'sportspress' ) . '</th>';
?>
</tr>
</thead>
@@ -160,9 +160,9 @@ if ( isset( $columns ) )
endif;
if ( $event->post_content !== null ):
if ( $event->post_status == 'publish' ):
echo SP()->text->string('Recap');
echo __( 'Recap', 'sportspress' );
else:
echo SP()->text->string('Preview');
echo __( 'Preview', 'sportspress' );
endif;
endif;
@@ -180,5 +180,5 @@ if ( isset( $columns ) )
</div>
<?php
if ( $id && $show_all_events_link )
echo '<a class="sp-calendar-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . SP()->text->string('View all events') . '</a>';
echo '<a class="sp-calendar-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all events', 'sportspress' ) . '</a>';
?>