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

@@ -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, '—' )->name;
if ( $seasons )
$data[ __( 'Season', 'sportspress' ) ] = sportspress_array_value( $seasons, 0, '' )->name;
$data[ __( 'Season', 'sportspress' ) ] = sportspress_array_value( $seasons, 0, '—' )->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>';