Fix Plugin-Check warnings

This commit is contained in:
Brian Miyaji
2014-01-22 04:40:30 +11:00
parent 9cde21de71
commit 76bfb6e5ee
24 changed files with 61 additions and 318 deletions

View File

@@ -1,12 +1,5 @@
<?php
function sportspress_admin_menu( $position ) {
add_options_page(
__( 'SportsPress', 'sportspress' ),
__( 'SportsPress', 'sportspress' ),
'manage_options',
'sportspress',
'sportspress_settings'
);
if ( ! current_user_can( 'manage_options' ) )
return;
@@ -23,7 +16,7 @@ function sportspress_admin_menu( $position ) {
if ( $position ):
$menu[ $position ] = array( '', 'read', 'separator-sportspress', '', 'wp-menu-separator sportspress' );
endif;
// Remove "Positions" link from Media submenu
unset( $submenu['upload.php'][17] );

View File

@@ -4,8 +4,7 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain ) {
if ( is_admin() ):
switch ( $typenow ):
case 'sp_team':
if ( 'sp_team' == $typenow ):
switch ( $untranslated_text ):
case 'Enter title here':
$translated_text = __( 'Team', 'sportspress' );
@@ -20,22 +19,7 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain ) {
$translated_text = sprintf( __( 'Remove %s', 'sportspress' ), __( 'Logo', 'sportspress' ) );
break;
endswitch;
case 'sp_event':
switch ( $untranslated_text ):
case 'Enter title here':
$translated_text = __( '(auto)', 'sportspress' );
break;
case 'Scheduled for: <b>%1$s</b>':
$translated_text = __( 'Date/Time: <b>%1$s</b>', 'sportspress' );
break;
case 'Published on: <b>%1$s</b>':
$translated_text = __( 'Date/Time: <b>%1$s</b>', 'sportspress' );
break;
case 'Publish <b>immediately</b>':
$translated_text = __( 'Date/Time: <b>%1$s</b>', 'sportspress' );
break;
endswitch;
case 'sp_player':
elseif ( in_array( $typenow, array( 'sp_event', 'sp_player', 'sp_staff' ) ) ):
switch ( $untranslated_text ):
case 'Enter title here':
$translated_text = __( 'Name', 'sportspress' );
@@ -50,41 +34,18 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain ) {
$translated_text = sprintf( __( 'Remove %s', 'sportspress' ), __( 'Photo', 'sportspress' ) );
break;
case 'Scheduled for: <b>%1$s</b>':
$translated_text = __( 'Joined: <b>%1$s</b>', 'sportspress' );
$translated_text = __( 'Date/Time: <b>%1$s</b>', 'sportspress' );
break;
case 'Published on: <b>%1$s</b>':
$translated_text = __( 'Joined: <b>%1$s</b>', 'sportspress' );
$translated_text = __( 'Date/Time: <b>%1$s</b>', 'sportspress' );
break;
case 'Publish <b>immediately</b>':
$translated_text = __( 'Joined: <b>%1$s</b>', 'sportspress' );
$translated_text = __( 'Date/Time: <b>%1$s</b>', 'sportspress' );
break;
endswitch;
case 'sp_staff':
switch ( $untranslated_text ):
case 'Enter title here':
$translated_text = __( 'Name', 'sportspress' );
break;
case 'Set featured image':
$translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) );
break;
case 'Set Featured Image':
$translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) );
break;
case 'Remove featured image':
$translated_text = sprintf( __( 'Remove %s', 'sportspress' ), __( 'Photo', 'sportspress' ) );
break;
case 'Scheduled for: <b>%1$s</b>':
$translated_text = __( 'Joined: <b>%1$s</b>', 'sportspress' );
break;
case 'Published on: <b>%1$s</b>':
$translated_text = __( 'Joined: <b>%1$s</b>', 'sportspress' );
break;
case 'Publish <b>immediately</b>':
$translated_text = __( 'Joined: <b>%1$s</b>', 'sportspress' );
break;
endswitch;
endswitch;
endif;
endif;
return $translated_text;
}
add_filter( 'gettext', 'sportspress_gettext', 20, 3 );

View File

@@ -6,7 +6,7 @@ function sportspress_manage_posts_custom_column( $column, $post_id ) {
edit_post_link( get_the_post_thumbnail( $post_id, 'sportspress-icon' ), '', '', $post_id );
break;
case 'sp_position':
echo get_the_terms( $post_id, 'sp_position' ) ? the_terms( $post_id, 'sp_position' ) : '';
echo get_the_terms( $post_id, 'sp_position' ) ? the_terms( $post_id, 'sp_position' ) : '&mdash;';
break;
case 'sp_positions':
echo get_the_terms ( $post_id, 'sp_position' ) ? the_terms( $post_id, 'sp_position' ) : sprintf( __( 'All %s', 'sportspress' ), __( 'positions', 'sportspress' ) );
@@ -15,7 +15,7 @@ function sportspress_manage_posts_custom_column( $column, $post_id ) {
$post_type = get_post_type( $post );
$teams = get_post_meta ( $post_id, 'sp_team', false );
if ( empty( $teams ) ):
echo '';
echo '&mdash;';
break;
elseif ( $post_type == 'sp_event' ):
$results = get_post_meta( $post_id, 'sp_results', true );
@@ -33,7 +33,7 @@ function sportspress_manage_posts_custom_column( $column, $post_id ) {
);
$outcomes = get_posts( $args );
echo $team->post_title . ( $outcomes ? ' ' . $outcomes[0]->post_title : '' ) . '<br>';
echo $team->post_title . ( $outcomes ? ' &mdash; ' . $outcomes[0]->post_title : '' ) . '<br>';
else:
echo $team->post_title . '<br>';
endif;
@@ -70,19 +70,19 @@ function sportspress_manage_posts_custom_column( $column, $post_id ) {
echo sportspress_the_posts( $post_id, 'sp_player' );
break;
case 'sp_event':
echo get_post_meta ( $post_id, 'sp_event' ) ? sizeof( get_post_meta ( $post_id, 'sp_event' ) ) : '';
echo get_post_meta ( $post_id, 'sp_event' ) ? sizeof( get_post_meta ( $post_id, 'sp_event' ) ) : '&mdash;';
break;
case 'sp_league':
echo get_the_terms ( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : '';
echo get_the_terms ( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : '&mdash;';
break;
case 'sp_season':
echo get_the_terms ( $post_id, 'sp_season' ) ? the_terms( $post_id, 'sp_season' ) : '';
echo get_the_terms ( $post_id, 'sp_season' ) ? the_terms( $post_id, 'sp_season' ) : '&mdash;';
break;
case 'sp_venue':
echo get_the_terms ( $post_id, 'sp_venue' ) ? the_terms( $post_id, 'sp_venue' ) : '';
echo get_the_terms ( $post_id, 'sp_venue' ) ? the_terms( $post_id, 'sp_venue' ) : '&mdash;';
break;
case 'sp_sponsor':
echo get_the_terms ( $post_id, 'sp_sponsor' ) ? the_terms( $post_id, 'sp_sponsor' ) : '';
echo get_the_terms ( $post_id, 'sp_sponsor' ) ? the_terms( $post_id, 'sp_sponsor' ) : '&mdash;';
break;
case 'sp_kickoff':
if ( $post->post_status == 'future' ):
@@ -94,10 +94,10 @@ function sportspress_manage_posts_custom_column( $column, $post_id ) {
else:
_e( 'Pending Review', 'sportspress' );
endif;
echo '<br />' . date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) );
echo '<br />' . date_i18n( __( 'M j, Y @ G:i', 'sportspress' ), strtotime( $post->post_date ) );
break;
case 'sp_address':
echo get_post_meta( $post_id, 'sp_address', true ) ? get_post_meta( $post_id, 'sp_address', true ) : '';
echo get_post_meta( $post_id, 'sp_address', true ) ? get_post_meta( $post_id, 'sp_address', true ) : '&mdash;';
break;
endswitch;
}

View File

@@ -20,7 +20,7 @@ function sportspress_post_updated_messages( $messages ) {
$messages['post'][6] = sprintf( __( '%s published.', 'sportspress' ), $obj->labels->singular_name ) .
' <a href="' . esc_url( get_permalink($post->ID) ) . '">' . $obj->labels->view_item . '</a>';
$messages['post'][7] = sprintf( __( '%s saved.'), $obj->labels->singular_name );
$messages['post'][7] = sprintf( __( '%s saved.', 'sportspress' ), $obj->labels->singular_name );
$messages['post'][8] = sprintf( __( '%s submitted.', 'sportspress' ), $obj->labels->singular_name ) .
' <a target="_blank" href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink($post->ID) ) ) . '">' .
@@ -28,7 +28,7 @@ function sportspress_post_updated_messages( $messages ) {
$messages['post'][9] = sprintf(
__( '%s scheduled for: <strong>%s</strong>.', 'sportspress' ),
date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post->ID) ) ) .
date_i18n( __( 'M j, Y @ G:i', 'sportspress' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post->ID) ) ) .
' <a target="_blank" href="' . esc_url( get_permalink($post->ID) ) . '">' .
sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . '</a>';

View File

@@ -23,7 +23,7 @@ add_action( 'init', 'sportspress_calendar_post_init' );
function sportspress_calendar_edit_columns() {
$columns = array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Title' ),
'title' => __( 'Title', 'sportspress' ),
'sp_league' => __( 'Leagues', 'sportspress' ),
'sp_season' => __( 'Seasons', 'sportspress' ),
'sp_venue' => __( 'Venues', 'sportspress' ),

View File

@@ -23,7 +23,7 @@ add_action( 'init', 'sportspress_list_post_init' );
function sportspress_list_edit_columns() {
$columns = array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Title' ),
'title' => __( 'Title', 'sportspress' ),
'sp_player' => __( 'Players', 'sportspress' ),
'sp_league' => __( 'League', 'sportspress' ),
'sp_season' => __( 'Season', 'sportspress' ),

View File

@@ -38,7 +38,7 @@ function sportspress_player_meta_init( $post ) {
$seasons = (array)get_the_terms( $post->ID, 'sp_season' );
remove_meta_box( 'submitdiv', 'sp_player', 'side' );
add_meta_box( 'submitdiv', __( 'Publish' ), 'post_submit_meta_box', 'sp_player', 'side', 'high' );
add_meta_box( 'submitdiv', __( 'Publish', 'sportspress' ), 'post_submit_meta_box', 'sp_player', 'side', 'high' );
remove_meta_box( 'postimagediv', 'sp_player', 'side' );
add_meta_box( 'postimagediv', __( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_player', 'side', 'low' );
add_meta_box( 'sp_detailsdiv', __( 'Details', 'sportspress' ), 'sportspress_player_details_meta', 'sp_player', 'side', 'high' );
@@ -49,7 +49,7 @@ function sportspress_player_meta_init( $post ) {
endif;
add_meta_box( 'sp_metricsdiv', __( 'Metrics', 'sportspress' ), 'sportspress_player_metrics_meta', 'sp_player', 'normal', 'high' );
add_meta_box( 'sp_profilediv', __( 'Profile' ), 'sportspress_player_profile_meta', 'sp_player', 'normal', 'high' );
add_meta_box( 'sp_profilediv', __( 'Profile', 'sportspress' ), 'sportspress_player_profile_meta', 'sp_player', 'normal', 'high' );
}
function sportspress_player_details_meta( $post ) {

View File

@@ -21,11 +21,11 @@ add_action( 'init', 'sportspress_staff_post_init' );
function sportspress_staff_meta_init() {
remove_meta_box( 'submitdiv', 'sp_staff', 'side' );
add_meta_box( 'submitdiv', __( 'Publish' ), 'post_submit_meta_box', 'sp_staff', 'side', 'high' );
add_meta_box( 'submitdiv', __( 'Publish', 'sportspress' ), 'post_submit_meta_box', 'sp_staff', 'side', 'high' );
remove_meta_box( 'postimagediv', 'sp_staff', 'side' );
add_meta_box( 'postimagediv', __( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_staff', 'side', 'low' );
add_meta_box( 'sp_teamdiv', __( 'Teams', 'sportspress' ), 'sportspress_staff_team_meta', 'sp_staff', 'side', 'high' );
add_meta_box( 'sp_profilediv', __( 'Profile' ), 'sportspress_staff_profile_meta', 'sp_staff', 'normal', 'high' );
add_meta_box( 'sp_profilediv', __( 'Profile', 'sportspress' ), 'sportspress_staff_profile_meta', 'sp_staff', 'normal', 'high' );
}
function sportspress_staff_team_meta( $post ) {
sportspress_post_checklist( $post->ID, 'sp_team' );

View File

@@ -23,7 +23,7 @@ add_action( 'init', 'sportspress_table_post_init' );
function sportspress_table_edit_columns() {
$columns = array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Title' ),
'title' => __( 'Title', 'sportspress' ),
'sp_league' => __( 'League', 'sportspress' ),
'sp_season' => __( 'Season', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),

View File

@@ -24,7 +24,7 @@ function sportspress_team_meta_init( $post ) {
$seasons = get_the_terms( $post->ID, 'sp_season' );
remove_meta_box( 'submitdiv', 'sp_team', 'side' );
add_meta_box( 'submitdiv', __( 'Publish' ), 'post_submit_meta_box', 'sp_team', 'side', 'high' );
add_meta_box( 'submitdiv', __( 'Publish', 'sportspress' ), 'post_submit_meta_box', 'sp_team', 'side', 'high' );
remove_meta_box( 'postimagediv', 'sp_team', 'side' );
add_meta_box( 'postimagediv', __( 'Logo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_team', 'side', 'low' );

View File

@@ -1,184 +0,0 @@
<?php
$args = array(
'post_type' => 'sp_column',
'numberposts' => -1,
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC'
);
$data = get_posts( $args );
?>
<h3 class="title"><?php _e( 'Table Columns', 'sportspress' ); ?></h3>
<table class="widefat sp-admin-config-table">
<thead>
<tr>
<th><?php _e( 'Label', 'sportspress' ); ?></th>
<th><?php _e( 'Key', 'sportspress' ); ?></th>
<th><?php _e( 'Format', 'sportspress' ); ?></th>
<th><?php _e( 'Equation', 'sportspress' ); ?></th>
<th><?php _e( 'Sort Order', 'sportspress' ); ?></th>
</tr>
</thead>
<?php $i = 0; foreach ( $data as $row ): ?>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo $row->post_title; ?></td>
<td><?php echo $row->post_name; ?></td>
<td><?php echo sportspress_get_post_format( $row->ID ); ?></td>
<td><?php echo sportspress_get_post_equation( $row->ID ); ?></td>
<td><?php echo sportspress_get_post_order( $row->ID ); ?></td>
</tr>
<?php $i++; endforeach; ?>
<tfoot>
<tr>
<th colspan="5"><a href="<?php echo admin_url( 'edit.php?post_type=sp_column' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Table Columns', 'sportspress' ) ); ?></a></th>
</tr>
</tfoot>
</table>
<?php
$args = array(
'post_type' => 'sp_statistic',
'numberposts' => -1,
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC'
);
$data = get_posts( $args );
?>
<h3 class="title"><?php _e( 'Player Statistics', 'sportspress' ); ?></h3>
<table class="widefat sp-admin-config-table">
<thead>
<tr>
<th><?php _e( 'Label', 'sportspress' ); ?></th>
<th><?php _e( 'Key', 'sportspress' ); ?></th>
<th><?php _e( 'Format', 'sportspress' ); ?></th>
<th><?php _e( 'Equation', 'sportspress' ); ?></th>
<th><?php _e( 'Sort Order', 'sportspress' ); ?></th>
</tr>
</thead>
<?php $i = 0; foreach ( $data as $row ): ?>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo $row->post_title; ?></td>
<td><?php echo $row->post_name; ?></td>
<td><?php echo sportspress_get_post_format( $row->ID ); ?></td>
<td>&Sigma; <?php echo $row->post_name; ?></td>
<td><?php echo sportspress_get_post_order( $row->ID ); ?></td>
</tr>
<?php $i++; endforeach; ?>
<tfoot>
<tr>
<th colspan="5"><a href="<?php echo admin_url( 'edit.php?post_type=sp_statistic' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Player Statistics', 'sportspress' ) ); ?></a></th>
</tr>
</tfoot>
</table>
<?php
$args = array(
'post_type' => 'sp_metric',
'numberposts' => -1,
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC'
);
$data = get_posts( $args );
?>
<h3 class="title"><?php _e( 'Player Metrics', 'sportspress' ); ?></h3>
<table class="widefat sp-admin-config-table">
<thead>
<tr>
<th><?php _e( 'Label', 'sportspress' ); ?></th>
<th><?php _e( 'Key', 'sportspress' ); ?></th>
<th><?php _e( 'Format', 'sportspress' ); ?></th>
<th><?php _e( 'Equation', 'sportspress' ); ?></th>
<th><?php _e( 'Sort Order', 'sportspress' ); ?></th>
</tr>
</thead>
<?php $i = 0; foreach ( $data as $row ): ?>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo $row->post_title; ?></td>
<td><?php echo $row->post_name; ?></td>
<td><?php echo sportspress_get_post_format( $row->ID ); ?></td>
<td><?php echo sportspress_get_post_equation( $row->ID ); ?></td>
<td><?php echo sportspress_get_post_order( $row->ID ); ?></td>
</tr>
<?php $i++; endforeach; ?>
<tfoot>
<tr>
<th colspan="5"><a href="<?php echo admin_url( 'edit.php?post_type=sp_metric' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Player Metrics', 'sportspress' ) ); ?></a></th>
</tr>
</tfoot>
</table>
<?php
$args = array(
'post_type' => 'sp_result',
'numberposts' => -1,
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC'
);
$data = get_posts( $args );
?>
<h3 class="title"><?php _e( 'Results', 'sportspress' ); ?></h3>
<table class="widefat sp-admin-config-table">
<thead>
<tr>
<th><?php _e( 'Label', 'sportspress' ); ?></th>
<th><?php _e( 'Key', 'sportspress' ); ?></th>
<th><?php _e( 'Format', 'sportspress' ); ?></th>
<th><?php _e( 'Equation', 'sportspress' ); ?></th>
<th><?php _e( 'Sort Order', 'sportspress' ); ?></th>
</tr>
</thead>
<?php $i = 0; foreach ( $data as $row ): ?>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo $row->post_title; ?></td>
<td><?php echo $row->post_name; ?>for / <?php echo $row->post_name; ?>against</td>
<td><?php echo sportspress_get_post_format( $row->ID ); ?></td>
<td>—</td>
<td>—</td>
</tr>
<?php $i++; endforeach; ?>
<tfoot>
<tr>
<th colspan="5"><a href="<?php echo admin_url( 'edit.php?post_type=sp_result' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Results', 'sportspress' ) ); ?></a></th>
</tr>
</tfoot>
</table>
<?php
$args = array(
'post_type' => 'sp_outcome',
'numberposts' => -1,
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC'
);
$data = get_posts( $args );
?>
<h3 class="title"><?php _e( 'Outcomes', 'sportspress' ); ?></h3>
<table class="widefat sp-admin-config-table">
<thead>
<tr>
<th><?php _e( 'Label', 'sportspress' ); ?></th>
<th><?php _e( 'Key', 'sportspress' ); ?></th>
<th><?php _e( 'Format', 'sportspress' ); ?></th>
<th><?php _e( 'Equation', 'sportspress' ); ?></th>
<th><?php _e( 'Sort Order', 'sportspress' ); ?></th>
</tr>
</thead>
<?php $i = 0; foreach ( $data as $row ): ?>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo $row->post_title; ?></td>
<td><?php echo $row->post_name; ?></td>
<td>—</td>
<td>—</td>
<td>—</td>
</tr>
<?php $i++; endforeach; ?>
<tfoot>
<tr>
<th colspan="5"><a href="<?php echo admin_url( 'edit.php?post_type=sp_outcome' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Outcomes', 'sportspress' ) ); ?></a></th>
</tr>
</tfoot>
</table>

View File

@@ -186,3 +186,14 @@ function sportspress_validate( $input ) {
return $input;
}
function sportspress_add_options_page() {
add_options_page(
__( 'SportsPress', 'sportspress' ),
__( 'SportsPress', 'sportspress' ),
'manage_options',
'sportspress',
'sportspress_settings'
);
}
add_action( 'admin_menu', 'sportspress_add_options_page' );

View File

@@ -15,10 +15,10 @@ if ( !function_exists( 'sportspress_event_details' ) ) {
$data = array( __( 'Date', 'sportspress' ) => $date, __( 'Time', 'sportspress' ) => $time );
if ( $leagues )
$data[ __( 'League', 'sportspress' ) ] = sportspress_array_value( $leagues, 0, '' )->name;
$data[ __( 'League', 'sportspress' ) ] = sportspress_array_value( $leagues, 0, '&mdash;' )->name;
if ( $seasons )
$data[ __( 'Season', 'sportspress' ) ] = sportspress_array_value( $seasons, 0, '' )->name;
$data[ __( 'Season', 'sportspress' ) ] = sportspress_array_value( $seasons, 0, '&mdash;' )->name;
$output = '<h3>' . __( 'Details', 'sportspress' ) . '</h3>';

View File

@@ -88,7 +88,7 @@ if ( !function_exists( 'sportspress_event_players' ) ) {
if ( $key == 'name' ):
continue;
endif;
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '' ) . '</td>';
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '&mdash;' ) . '</td>';
endforeach;
$output .= '</tr></tfoot>';

View File

@@ -33,7 +33,7 @@ if ( !function_exists( 'sportspress_event_results' ) ) {
if ( array_key_exists( $key, $result ) && $result[ $key ] != '' ):
$value = $result[ $key ];
else:
$value = '';
$value = '&mdash;';
endif;
$table_rows .= '<td class="data-' . $key . '">' . $value . '</td>';
endforeach;

View File

@@ -56,7 +56,7 @@ if ( !function_exists( 'sportspress_events_calendar' ) ) {
LIMIT 1");
/* translators: Calendar caption: 1: month name, 2: 4-digit year */
$calendar_caption = _x('%1$s %2$s', 'calendar caption');
$calendar_caption = _x('%1$s %2$s', 'calendar caption', 'sportspress');
$calendar_output = '<table id="wp-calendar">
<caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
<thead>
@@ -82,7 +82,7 @@ if ( !function_exists( 'sportspress_events_calendar' ) ) {
<tr>';
if ( $previous ) {
$calendar_output .= "\n\t\t".'<td colspan="3" id="prev"><a href="' . get_month_link($previous->year, $previous->month) . '" title="' . esc_attr( sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($previous->month), date('Y', mktime(0, 0 , 0, $previous->month, 1, $previous->year)))) . '">&laquo; ' . $wp_locale->get_month_abbrev($wp_locale->get_month($previous->month)) . '</a></td>';
$calendar_output .= "\n\t\t".'<td colspan="3" id="prev"><a href="' . get_month_link($previous->year, $previous->month) . '" title="' . esc_attr( sprintf(__('View posts for %1$s %2$s', 'sportspress'), $wp_locale->get_month($previous->month), date('Y', mktime(0, 0 , 0, $previous->month, 1, $previous->year)))) . '">&laquo; ' . $wp_locale->get_month_abbrev($wp_locale->get_month($previous->month)) . '</a></td>';
} else {
$calendar_output .= "\n\t\t".'<td colspan="3" id="prev" class="pad">&nbsp;</td>';
}
@@ -90,7 +90,7 @@ if ( !function_exists( 'sportspress_events_calendar' ) ) {
$calendar_output .= "\n\t\t".'<td class="pad">&nbsp;</td>';
if ( $next ) {
$calendar_output .= "\n\t\t".'<td colspan="3" id="next"><a href="' . get_month_link($next->year, $next->month) . '" title="' . esc_attr( sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($next->month), date('Y', mktime(0, 0 , 0, $next->month, 1, $next->year))) ) . '">' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' &raquo;</a></td>';
$calendar_output .= "\n\t\t".'<td colspan="3" id="next"><a href="' . get_month_link($next->year, $next->month) . '" title="' . esc_attr( sprintf(__('View posts for %1$s %2$s', 'sportspress'), $wp_locale->get_month($next->month), date('Y', mktime(0, 0 , 0, $next->month, 1, $next->year))) ) . '">' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' &raquo;</a></td>';
} else {
$calendar_output .= "\n\t\t".'<td colspan="3" id="next" class="pad">&nbsp;</td>';
}

View File

@@ -55,7 +55,7 @@ if ( !function_exists( 'sportspress_league_table' ) ) {
foreach( $labels as $key => $value ):
if ( $key == 'name' )
continue;
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '' ) . '</td>';
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '&mdash;' ) . '</td>';
endforeach;
$output .= '</tr>';

View File

@@ -31,7 +31,7 @@ if ( !function_exists( 'sportspress_player_league_statistics' ) ) {
$output .= '<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . '">';
foreach( $labels as $key => $value ):
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '' ) . '</td>';
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '&mdash;' ) . '</td>';
endforeach;
$output .= '</tr>';

View File

@@ -42,7 +42,7 @@ if ( !function_exists( 'sportspress_player_list' ) ) {
foreach( $labels as $key => $value ):
if ( $key == 'name' )
continue;
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '' ) . '</td>';
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '&mdash;' ) . '</td>';
endforeach;
$output .= '</tr>';

View File

@@ -17,7 +17,7 @@ if ( !function_exists( 'sportspress_player_metrics' ) ) {
$common = array(
__( 'Number', 'sportspress' ) => $number,
__( 'Nationality', 'sportspress' ) => $flag_image . ' ' . sportspress_array_value( $sportspress_countries, $nationality, '' ),
__( 'Nationality', 'sportspress' ) => $flag_image . ' ' . sportspress_array_value( $sportspress_countries, $nationality, '&mdash;' ),
);
$data = array_merge( $common, $metrics );

View File

@@ -43,7 +43,7 @@ if ( !function_exists( 'sportspress_team_columns' ) ) {
$output .= '<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . '">';
foreach( $labels as $key => $value ):
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '' ) . '</td>';
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '&mdash;' ) . '</td>';
endforeach;
$output .= '</tr>';