1 | <?php |
||
5 | class Sidebar_Field extends Select_Field { |
||
6 | |||
7 | /** |
||
8 | * Allow the user to add new sidebars |
||
9 | * |
||
10 | * @var boolean |
||
11 | */ |
||
12 | private $enable_add_new = true; |
||
13 | |||
14 | /** |
||
15 | * Array of sidebars to exclude from the select menu |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | private $excluded_sidebars = array(); |
||
20 | |||
21 | /** |
||
22 | * Disable adding new sidebars. |
||
23 | * |
||
24 | * @return Field $this |
||
25 | */ |
||
26 | public function disable_add_new() { |
||
30 | |||
31 | /** |
||
32 | * Specify sidebars to be excluded. |
||
33 | * |
||
34 | * @param array $sidebars |
||
35 | * @return Field $this |
||
36 | */ |
||
37 | public function set_excluded_sidebars( $sidebars ) { |
||
41 | |||
42 | /** |
||
43 | * Returns an array that holds the field data, suitable for JSON representation. |
||
44 | * |
||
45 | * @param bool $load Should the value be loaded from the database or use the value from the current instance. |
||
46 | * @return array |
||
47 | */ |
||
48 | public function to_json( $load ) { |
||
73 | } |
||
74 |