/** * This will only be fired if Advanced Post Manger is active * Helps ensure dates show correctly if only one or the other of * start & end date columns is showing */ public static function column_headers_check($columns) { $active = array_keys($columns); self::$end_col_active = in_array('end-date', $active); self::$start_col_active = in_array('start-date', $active); // What if, oddly, end_col is placed first when both are active? if (self::$end_col_active && self::$start_col_active) { self::$start_col_first = array_search('start-date', $active) < array_search('end-date', $active); } }