Display event date and time as separate columns

This commit is contained in:
Brian Miyaji
2014-03-14 12:36:50 +11:00
parent ffc9a9e659
commit 4fdcdaab48
3 changed files with 4 additions and 11 deletions

View File

@@ -111,8 +111,8 @@ function sportspress_manage_posts_custom_column( $column, $post_id ) {
case 'sp_sponsor':
echo get_the_terms ( $post_id, 'sp_sponsor' ) ? the_terms( $post_id, 'sp_sponsor' ) : '—';
break;
case 'sp_datetime':
echo sportspress_get_post_datetime( $post );
case 'sp_time':
echo get_post_time( 'H:i', false, $post );
break;
case 'sp_events':
echo sizeof( sportspress_get_calendar_data( $post_id ) );

View File

@@ -243,7 +243,8 @@ function sportspress_event_article_meta( $post ) {
function sportspress_event_edit_columns() {
$columns = array(
'cb' => '<input type="checkbox" />',
'sp_datetime' => '<span class="dashicons sp-icon-calendar tips" title="' . __( 'Date/Time', 'sportspress' ) . '"></span>',
'date' => '<span class="dashicons sp-icon-calendar tips" title="' . __( 'Date', 'sportspress' ) . '"></span>',
'sp_time' => '<span class="dashicons sp-icon-clock tips" title="' . __( 'Time', 'sportspress' ) . '"></span>',
'title' => __( 'Event', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),
'sp_league' => __( 'League', 'sportspress' ),

View File

@@ -185,14 +185,6 @@ if ( !function_exists( 'sportspress_set_post_views' ) ) {
}
}
if ( !function_exists( 'sportspress_get_post_datetime' ) ) {
function sportspress_get_post_datetime( $post ) {
$date = get_post_time( 'Y/m/d', false, $post );
$time = get_post_time( '@ H:i', false, $post );
return $date . '<br>' . $time;
}
}
if ( !function_exists( 'sportspress_get_post_precision' ) ) {
function sportspress_get_post_precision( $post_id ) {
$precision = get_post_meta ( $post_id, 'sp_precision', true );