Pro.php
763 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
<?php
namespace AC\Settings\Column;
use AC\Settings;
use AC\View;
abstract class Pro extends Settings\Column {
/**
* @return string
*/
abstract protected function get_label();
/**
* @return View
*/
abstract protected function get_instructions();
public function create_view() {
$setting = $this->create_element( 'radio' )
->set_options( [
'on' => __( 'Yes' ),
'off' => __( 'No' ),
] )
->set_value( 'off' );
$view = new View();
$view->set( 'label', $this->get_label() )
->set( 'instructions', $this->get_instructions()->render() )
->set( 'setting', $setting )
->set_template( 'settings/setting-pro' );
return $view;
}
}