1 | <?php |
||
16 | class Kirki_Init { |
||
17 | |||
18 | /** |
||
19 | * Control types. |
||
20 | * |
||
21 | * @access private |
||
22 | * @since 3.0.0 |
||
23 | * @var array |
||
24 | */ |
||
25 | private $control_types = array(); |
||
|
|||
26 | |||
27 | /** |
||
28 | * The class constructor. |
||
29 | */ |
||
30 | public function __construct() { |
||
31 | |||
32 | $this->set_url(); |
||
33 | add_action( 'after_setup_theme', array( $this, 'set_url' ) ); |
||
34 | add_action( 'wp_loaded', array( $this, 'add_to_customizer' ), 1 ); |
||
35 | |||
36 | new Kirki_Values(); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Properly set the Kirki URL for assets. |
||
41 | * Determines if Kirki is installed as a plugin, in a child theme, or a parent theme |
||
42 | * and then does some calculations to get the proper URL for its CSS & JS assets. |
||
43 | */ |
||
44 | public function set_url() { |
||
91 | |||
92 | /** |
||
93 | * Helper function that adds the fields, sections and panels to the customizer. |
||
94 | * |
||
95 | * @return void |
||
96 | */ |
||
97 | public function add_to_customizer() { |
||
104 | |||
105 | /** |
||
106 | * Register control types |
||
107 | * |
||
108 | * @return void |
||
109 | */ |
||
110 | public function register_section_types() { |
||
118 | |||
119 | /** |
||
120 | * Register our panels to the WordPress Customizer. |
||
121 | * |
||
122 | * @access public |
||
123 | */ |
||
124 | public function add_panels() { |
||
139 | |||
140 | /** |
||
141 | * Register our sections to the WordPress Customizer. |
||
142 | * |
||
143 | * @var object The WordPress Customizer object |
||
144 | * @return void |
||
145 | */ |
||
146 | public function add_sections() { |
||
165 | |||
166 | /** |
||
167 | * Create the settings and controls from the $fields array and register them. |
||
168 | * |
||
169 | * @var object The WordPress Customizer object. |
||
170 | * @return void |
||
171 | */ |
||
172 | public function add_fields() { |
||
191 | |||
192 | /** |
||
193 | * Process fields added using the 'kirki/fields' and 'kirki/controls' filter. |
||
194 | * These filters are no longer used, this is simply for backwards-compatibility. |
||
195 | * |
||
196 | * @access private |
||
197 | * @since 2.0.0 |
||
198 | */ |
||
199 | private function fields_from_filters() { |
||
210 | |||
211 | /** |
||
212 | * Alias for the is_plugin static method in the Kirki_Util class. |
||
213 | * This is here for backwards-compatibility purposes. |
||
214 | * |
||
215 | * @static |
||
216 | * @access public |
||
217 | * @since 3.0.0 |
||
218 | * @return bool |
||
219 | */ |
||
220 | public static function is_plugin() { |
||
224 | |||
225 | /** |
||
226 | * Alias for the get_variables static method in the Kirki_Util class. |
||
227 | * This is here for backwards-compatibility purposes. |
||
228 | * |
||
229 | * @static |
||
230 | * @access public |
||
231 | * @since 2.0.0 |
||
232 | * @return array Formatted as array( 'variable-name' => value ). |
||
233 | */ |
||
234 | public static function get_variables() { |
||
240 | |||
241 | } |
||
242 |
This check marks private properties in classes that are never used. Those properties can be removed.