EventDates.php
926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace ACA\EC\Settings;
use AC;
use AC\View;
class EventDates extends AC\Settings\Column {
/**
* @var string
*/
private $event_date;
/**
* @return string
*/
public function get_event_date() {
return $this->event_date;
}
/**
* @param string $event_date
*/
public function set_event_date( $event_date ) {
$this->event_date = $event_date;
}
protected function define_options() {
return [
'event_date' => '_EventStartDate',
];
}
public function create_view() {
$select = $this->create_element( 'select' )
->set_options( $this->get_date_options() );
$view = new View( [
'label' => __( 'Event Date', 'codepress-admin-columns' ),
'setting' => $select,
] );
return $view;
}
protected function get_date_options() {
$options = [
'_EventStartDate' => __( 'Start Date' ),
'_EventEndDate' => __( 'End Date' ),
];
return $options;
}
}