1 | <?php |
||
17 | class Kirki_Control_Base extends WP_Customize_Control { |
||
18 | |||
19 | /** |
||
20 | * Used to automatically generate all CSS output. |
||
21 | * |
||
22 | * @access public |
||
23 | * @var array |
||
24 | */ |
||
25 | public $output = array(); |
||
26 | |||
27 | /** |
||
28 | * Data type |
||
29 | * |
||
30 | * @access public |
||
31 | * @var string |
||
32 | */ |
||
33 | public $option_type = 'theme_mod'; |
||
34 | |||
35 | /** |
||
36 | * The kirki_config we're using for this control |
||
37 | * |
||
38 | * @access public |
||
39 | * @var string |
||
40 | */ |
||
41 | public $kirki_config = 'global'; |
||
42 | |||
43 | /** |
||
44 | * Extra script dependencies. |
||
45 | * |
||
46 | * @since 3.1.0 |
||
47 | * @return array |
||
48 | */ |
||
49 | public function kirki_script_dependencies() { |
||
52 | |||
53 | /** |
||
54 | * Enqueue control related scripts/styles. |
||
55 | * |
||
56 | * @access public |
||
57 | */ |
||
58 | public function enqueue() { |
||
107 | |||
108 | /** |
||
109 | * Refresh the parameters passed to the JavaScript via JSON. |
||
110 | * |
||
111 | * @see WP_Customize_Control::to_json() |
||
112 | */ |
||
113 | public function to_json() { |
||
141 | |||
142 | /** |
||
143 | * Render the control's content. |
||
144 | * |
||
145 | * Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`. |
||
146 | * |
||
147 | * Supports basic input types `text`, `checkbox`, `textarea`, `radio`, `select` and `dropdown-pages`. |
||
148 | * Additional input types such as `email`, `url`, `number`, `hidden` and `date` are supported implicitly. |
||
149 | * |
||
150 | * Control content can alternately be rendered in JS. See WP_Customize_Control::print_template(). |
||
151 | * |
||
152 | * @since 3.4.0 |
||
153 | */ |
||
154 | protected function render_content() {} |
||
155 | |||
156 | /** |
||
157 | * An Underscore (JS) template for this control's content (but not its container). |
||
158 | * |
||
159 | * Class variables for this control class are available in the `data` JS object; |
||
160 | * export custom variables by overriding {@see WP_Customize_Control::to_json()}. |
||
161 | * |
||
162 | * @see WP_Customize_Control::print_template() |
||
163 | * |
||
164 | * @access protected |
||
165 | */ |
||
166 | protected function content_template() {} |
||
167 | |||
168 | /** |
||
169 | * Returns an array of translation strings. |
||
170 | * |
||
171 | * @access protected |
||
172 | * @since 3.0.0 |
||
173 | * @return array |
||
174 | */ |
||
175 | protected function l10n() { |
||
178 | } |
||
179 |