Add match days to event lists and move columns into dedicated meta box

This commit is contained in:
Brian Miyaji
2017-01-11 23:07:24 +11:00
parent 90533c42e5
commit ca8f1099bf
4 changed files with 233 additions and 94 deletions

View File

@@ -154,6 +154,9 @@ endif;
if ( sp_column_active( $usecolumns, 'article' ) )
echo '<th class="data-article">' . __( 'Article', 'sportspress' ) . '</th>';
if ( sp_column_active( $usecolumns, 'day' ) )
echo '<th class="data-day">' . __( 'Match Day', 'sportspress' ) . '</th>';
?>
</tr>
</thead>
@@ -390,6 +393,17 @@ endif;
echo '</td>';
endif;
if ( sp_column_active( $usecolumns, 'day' ) ):
echo '<td class="data-day">';
$day = get_post_meta( $event->ID, 'sp_day', true );
if ( '' == $day ) {
echo '-';
} else {
echo $day;
}
echo '</td>';
endif;
echo '</tr>';
$i++;