Created
August 30, 2016 23:20
-
-
Save cliffordp/bb50c2fcd7f1fc9442e76d433ff5916b to your computer and use it in GitHub Desktop.
Display the Start Time and Date (not just the Date) in wp-admin > Events -- events list columns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Display the Start Time and Date (not just the Date) in wp-admin > Events -- events list columns | |
// By Barry | |
// from https://gist.github.com/cliffordp/bb50c2fcd7f1fc9442e76d433ff5916b | |
function cliff_events_admin_add_start_time( $column_id, $post_id ) { | |
if ( 'start-date' !== $column_id ) return; | |
$time = tribe_get_start_date( $post_id, true, get_option( 'time_format' ) ); | |
echo " @ <span class='event-start-time'> $time </span> "; | |
} | |
add_action( 'manage_tribe_events_posts_custom_column', 'cliff_events_admin_add_start_time', 20, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment