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

@@ -205,6 +205,6 @@ if ( $pad != 0 && $pad != 7 )
$calendar_output .= "\n\t</tr>\n\t</tbody>\n\t</table>\n\t</div>";
if ( $id && $show_all_events_link )
$calendar_output .= '<a class="sp-calendar-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . SP()->text->string('View all events', 'event') . '</a>';
$calendar_output .= '<a class="sp-calendar-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . SP()->text->string('View all events') . '</a>';
echo apply_filters( 'sportspress_event_calendar', $calendar_output );

View File

@@ -17,7 +17,7 @@ $time = get_the_time( get_option('time_format'), $id );
$leagues = get_the_terms( $id, 'sp_league' );
$seasons = get_the_terms( $id, 'sp_season' );
$data = array( SP()->text->string('Date', 'event') => $date, SP()->text->string('Time', 'event') => $time );
$data = array( SP()->text->string('Date') => $date, SP()->text->string('Time') => $time );
if ( $leagues ):
$league = array_pop( $leagues );
@@ -29,7 +29,7 @@ if ( $seasons ):
$data[ SP()->text->string('Season') ] = $season->name;
endif;
?>
<h3><?php echo SP()->text->string('Details', 'event'); ?></h3>
<h3><?php echo SP()->text->string('Details'); ?></h3>
<div class="sp-table-wrapper">
<table class="sp-event-details sp-data-table">
<thead>

View File

@@ -32,22 +32,22 @@ extract( $defaults, EXTR_SKIP );
if ( isset( $columns ) )
$usecolumns = $columns;
echo '<th class="data-date">' . SP()->text->string('Date', 'event') . '</th>';
echo '<th class="data-date">' . SP()->text->string('Date') . '</th>';
if ( $usecolumns == null || in_array( 'event', $usecolumns ) )
echo '<th class="data-event">' . SP()->text->string('Event', 'event') . '</th>';
echo '<th class="data-event">' . SP()->text->string('Event') . '</th>';
if ( $usecolumns == null || in_array( 'teams', $usecolumns ) )
echo '<th class="data-teams">' . SP()->text->string('Teams', 'event') . '</th>';
echo '<th class="data-teams">' . SP()->text->string('Teams') . '</th>';
if ( $usecolumns == null || in_array( 'time', $usecolumns ) )
echo '<th class="data-time">' . SP()->text->string('Time', 'event') . '</th>';
echo '<th class="data-time">' . SP()->text->string('Time') . '</th>';
if ( $usecolumns == null || in_array( 'venue', $usecolumns ) )
echo '<th class="data-venue">' . SP()->text->string('Venue', 'event') . '</th>';
echo '<th class="data-venue">' . SP()->text->string('Venue') . '</th>';
if ( $usecolumns == null || in_array( 'article', $usecolumns ) )
echo '<th class="data-article">' . SP()->text->string('Article', 'event') . '</th>';
echo '<th class="data-article">' . SP()->text->string('Article') . '</th>';
?>
</tr>
</thead>
@@ -129,9 +129,9 @@ extract( $defaults, EXTR_SKIP );
endif;
if ( $event->post_content !== null ):
if ( $event->post_status == 'publish' ):
echo SP()->text->string('Recap', 'event');
echo SP()->text->string('Recap');
else:
echo SP()->text->string('Preview', 'event');
echo SP()->text->string('Preview');
endif;
endif;
@@ -148,6 +148,6 @@ extract( $defaults, EXTR_SKIP );
</table>
<?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', 'event') . '</a>';
echo '<a class="sp-calendar-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . SP()->text->string('View all events') . '</a>';
?>
</div>

View File

@@ -38,7 +38,7 @@ foreach( $teams as $key => $team_id ):
<tr>
<?php if ( $has_players ): ?>
<th class="data-number">#</th>
<th class="data-name"><?php echo SP()->text->string('Player', 'event'); ?></th>
<th class="data-name"><?php echo SP()->text->string('Player'); ?></th>
<?php endif; foreach( $performance_labels as $key => $label ): ?>
<th class="data-<?php echo $key; ?>"><?php echo $label; ?></th>
<?php endforeach; ?>
@@ -102,7 +102,7 @@ foreach( $teams as $key => $team_id ):
<?php
if ( $has_players ):
echo '<td class="data-number">&nbsp;</td>';
echo '<td class="data-name">' . SP()->text->string('Total', 'event') . '</td>';
echo '<td class="data-name">' . SP()->text->string('Total') . '</td>';
endif;
$row = $data[0];

View File

@@ -59,11 +59,11 @@ if ( empty( $table_rows ) ):
else:
$output .= '<h3>' . SP()->text->string('Team Results', 'event') . '</h3>';
$output .= '<h3>' . SP()->text->string('Team Results') . '</h3>';
$output .= '<div class="sp-table-wrapper">' .
'<table class="sp-event-results sp-data-table sp-responsive-table"><thead>' .
'<th class="data-name">' . SP()->text->string('Team', 'event') . '</th>';
'<th class="data-name">' . SP()->text->string('Team') . '</th>';
foreach( $result_labels as $key => $label ):
$output .= '<th class="data-' . $key . '">' . $label . '</th>';
endforeach;

View File

@@ -32,7 +32,7 @@ foreach( $venues as $venue ):
$latitude = sp_array_value( $meta, 'sp_latitude', 0 );
$longitude = sp_array_value( $meta, 'sp_longitude', 0 );
?>
<h3><?php echo SP()->text->string('Venue', 'event'); ?></h3>
<h3><?php echo SP()->text->string('Venue'); ?></h3>
<table class="sp-data-table sp-event-venue">
<thead>
<tr>

View File

@@ -41,7 +41,7 @@ if ( ! $columns )
if ( ! is_array( $columns ) )
$columns = explode( ',', $columns );
$output .= '<th class="data-rank">' . SP()->text->string('Pos', 'team') . '</th>';
$output .= '<th class="data-rank">' . SP()->text->string('Pos') . '</th>';
foreach( $labels as $key => $label ):
if ( ! is_array( $columns ) || $key == 'name' || in_array( $key, $columns ) )
@@ -93,7 +93,7 @@ endforeach;
$output .= '</tbody>' . '</table>';
if ( $show_full_table_link )
$output .= '<a class="sp-league-table-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . SP()->text->string('View full table', 'team') . '</a>';
$output .= '<a class="sp-league-table-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . SP()->text->string('View full table') . '</a>';
$output .= '</div>';

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">' .

View File

@@ -136,6 +136,6 @@ $output .= "
</div>\n";
if ( $show_all_players_link )
$output .= '<a class="sp-player-list-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . SP()->text->string('View all players', 'player') . '</a>';
$output .= '<a class="sp-player-list-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . SP()->text->string('View all players') . '</a>';
echo apply_filters( 'sportspress_player_gallery', $output );

View File

@@ -53,7 +53,7 @@ endif;
if ( in_array( $orderby, array( 'number', 'name' ) ) ):
$output .= '<th class="data-number">#</th>';
else:
$output .= '<th class="data-rank">' . SP()->text->string('Rank', 'player') . '</th>';
$output .= '<th class="data-rank">' . SP()->text->string('Rank') . '</th>';
endif;
foreach( $labels as $key => $label ):
@@ -106,6 +106,6 @@ endforeach;
$output .= '</tbody>' . '</table>' . '</div>';
if ( $show_all_players_link )
$output .= '<a class="sp-player-list-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . SP()->text->string('View all players', 'player') . '</a>';
$output .= '<a class="sp-player-list-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . SP()->text->string('View all players') . '</a>';
echo apply_filters( 'sportspress_player_list', $output );

View File

@@ -92,7 +92,7 @@ foreach ( $positions as $position ):
if ( in_array( $r['orderby'], array( 'number', 'name' ) ) ):
$output .= '<th class="data-number">#</th>';
else:
$output .= '<th class="data-rank">' . SP()->text->string('Rank', 'player') . '</th>';
$output .= '<th class="data-rank">' . SP()->text->string('Rank') . '</th>';
endif;
foreach( $labels as $key => $label ):