From f9bd2ea21e6c7be2e0d6cbec705f8a3e07a6d48b Mon Sep 17 00:00:00 2001 From: Takumi Date: Sun, 28 Jul 2013 04:00:04 +1000 Subject: [PATCH] Display scheduled or played in kick-off column --- actions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actions.php b/actions.php index 43febbd3..e5789c9d 100644 --- a/actions.php +++ b/actions.php @@ -11,6 +11,7 @@ function sp_after_theme_setup() { add_action( 'after_theme_setup', 'sp_after_theme_setup' ); function sp_manage_posts_custom_column( $column, $post_id ) { + global $post; switch ( $column ): case 'sp_icon': the_post_thumbnail( 'sp_icon' ); @@ -31,7 +32,7 @@ function sp_manage_posts_custom_column( $column, $post_id ) { echo get_the_terms ( $post_id, 'sp_sponsor' ) ? the_terms( $post_id, 'sp_sponsor' ) : '—'; break; case 'sp_kickoff': - echo get_the_date ( get_option ( 'date_format' ) ) . '
' . get_the_time ( get_option ( 'time_format' ) ); + echo ( $post->post_status == 'future' ? __( 'Scheduled' ) : __( 'Played', 'sportspress' ) ) . '
' . date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ); break; case 'sp_address': echo get_post_meta( $post_id, 'sp_address', true ) ? get_post_meta( $post_id, 'sp_address', true ) : '—';