Display match day column in admin

This commit is contained in:
Brian Miyaji
2016-09-01 22:41:44 +10:00
parent 49a039cf13
commit 31c2b44c7b

View File

@@ -122,6 +122,7 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
'sp_league' => __( 'Competition', 'sportspress' ),
'sp_season' => __( 'Season', 'sportspress' ),
'sp_venue' => __( 'Venue', 'sportspress' ),
'sp_day' => __( 'Match Day', 'sportspress' ),
), $existing_columns, array(
'title' => __( 'Event', 'sportspress' ),
) );
@@ -208,6 +209,11 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
case 'sp_venue':
echo get_the_terms ( $post_id, 'sp_venue' ) ? the_terms( $post_id, 'sp_venue' ) : '—';
break;
case 'sp_day':
$day = get_post_meta ( $post_id, 'sp_day', true );
if ( '' === $day ) $day = __( 'Default', 'sportspress' );
echo $day;
break;
endswitch;
}