VideoDisplay.php
911 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
<?php
namespace AC\Settings\Column;
use AC\Settings;
use AC\View;
class VideoDisplay extends Settings\Column {
private $video_display;
protected function define_options() {
return [
'video_display' => 'embed',
];
}
public function create_view() {
$setting = $this->create_element( 'select' )
->set_options( [
'embed' => __( 'Embed', 'codepress-admin-columns' ),
'modal' => __( 'Pop Up', 'codepress-admin-columns' ),
] );
return new View( [
'label' => __( 'Display', 'codepress-admin-columns' ),
'setting' => $setting,
] );
}
/**
* @return int
*/
public function get_video_display() {
return $this->video_display;
}
/**
* @param int $video_display
*
* @return bool
*/
public function set_video_display( $video_display ) {
$this->video_display = $video_display;
return true;
}
}