Display match day column in admin
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user