all of them;-) id is a proxy for added date, so the start & end dates’ columns should be sortable as well, i just haven’t found the right foo/majick incantation yet;-)
yop-poll/admin/models/polls-list.php:101-123:
public function column_start_date( $item )
{
$poll_meta = unserialize( $item['meta_data'] );
$date_format = get_option( 'date_format' );
$time_format = get_option( 'time_format' );
$start_date = $item['added_date'];
if (( 'now' !== $poll_meta['options']['poll']['startDateOption'] )
and ('' !== $poll_meta['options']['poll']['startDateCustom'] ) )
$start_date = $poll_meta['options']['poll']['startDateCustom'];
$item['start_date'] = strtotime($start_date);
return date_i18n( $date_format . ' ' . $time_format, $start_date );
}
public function column_end_date( $item )
{
$poll_meta = unserialize( $item['meta_data'] );
$date_format = get_option( 'date_format' );
$time_format = get_option( 'time_format' );
$item['end_date'] = $end_date = esc_html__( 'Never', 'yop-poll' );
if (( 'never' !== $poll_meta['options']['poll']['endDateOption'] )
and ( '' !== $poll_meta['options']['poll']['endDateCustom'] ))
{
$item['end_date'] = $end_date = strtotime( $poll_meta['options']['poll']['endDateCustom']);
$end_date = date_i18n(
$date_format . ' ' . $time_format,
$end_date );
}
return $end_date;
}