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() { |
||
55 | |||
56 | /** |
||
57 | * Enqueue control related scripts/styles. |
||
58 | * |
||
59 | * @access public |
||
60 | */ |
||
61 | public function enqueue() { |
||
74 | |||
75 | /** |
||
76 | * Refresh the parameters passed to the JavaScript via JSON. |
||
77 | * |
||
78 | * @see WP_Customize_Control::to_json() |
||
79 | */ |
||
80 | public function to_json() { |
||
108 | |||
109 | /** |
||
110 | * Render the control's content. |
||
111 | * |
||
112 | * Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`. |
||
113 | * |
||
114 | * Supports basic input types `text`, `checkbox`, `textarea`, `radio`, `select` and `dropdown-pages`. |
||
115 | * Additional input types such as `email`, `url`, `number`, `hidden` and `date` are supported implicitly. |
||
116 | * |
||
117 | * Control content can alternately be rendered in JS. See WP_Customize_Control::print_template(). |
||
118 | * |
||
119 | * @since 3.4.0 |
||
120 | */ |
||
121 | protected function render_content() {} |
||
122 | |||
123 | /** |
||
124 | * An Underscore (JS) template for this control's content (but not its container). |
||
125 | * |
||
126 | * Class variables for this control class are available in the `data` JS object; |
||
127 | * export custom variables by overriding {@see WP_Customize_Control::to_json()}. |
||
128 | * |
||
129 | * @see WP_Customize_Control::print_template() |
||
130 | * |
||
131 | * @access protected |
||
132 | */ |
||
133 | protected function content_template() { |
||
137 | |||
138 | /** |
||
139 | * Returns an array of translation strings. |
||
140 | * |
||
141 | * @access protected |
||
142 | * @since 3.0.0 |
||
143 | * @return array |
||
144 | */ |
||
145 | protected function l10n() { |
||
148 | } |
||
149 |