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 | global $wp_customize; |
||
33 | if ( $wp_customize ) { |
||
34 | $this->set_url(); |
||
35 | add_action( 'after_setup_theme', array( $this, 'set_url' ) ); |
||
36 | } |
||
37 | add_action( 'wp_loaded', array( $this, 'add_to_customizer' ), 1 ); |
||
38 | |||
39 | new Kirki_Values(); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Properly set the Kirki URL for assets. |
||
44 | * Determines if Kirki is installed as a plugin, in a child theme, or a parent theme |
||
45 | * and then does some calculations to get the proper URL for its CSS & JS assets. |
||
46 | */ |
||
47 | public function set_url() { |
||
94 | |||
95 | /** |
||
96 | * Helper function that adds the fields, sections and panels to the customizer. |
||
97 | * |
||
98 | * @return void |
||
99 | */ |
||
100 | public function add_to_customizer() { |
||
107 | |||
108 | /** |
||
109 | * Register control types |
||
110 | * |
||
111 | * @return void |
||
112 | */ |
||
113 | public function register_section_types() { |
||
121 | |||
122 | /** |
||
123 | * Register our panels to the WordPress Customizer. |
||
124 | * |
||
125 | * @access public |
||
126 | */ |
||
127 | public function add_panels() { |
||
142 | |||
143 | /** |
||
144 | * Register our sections to the WordPress Customizer. |
||
145 | * |
||
146 | * @var object The WordPress Customizer object |
||
147 | * @return void |
||
148 | */ |
||
149 | public function add_sections() { |
||
168 | |||
169 | /** |
||
170 | * Create the settings and controls from the $fields array and register them. |
||
171 | * |
||
172 | * @var object The WordPress Customizer object. |
||
173 | * @return void |
||
174 | */ |
||
175 | public function add_fields() { |
||
194 | |||
195 | /** |
||
196 | * Process fields added using the 'kirki/fields' and 'kirki/controls' filter. |
||
197 | * These filters are no longer used, this is simply for backwards-compatibility. |
||
198 | * |
||
199 | * @access private |
||
200 | * @since 2.0.0 |
||
201 | */ |
||
202 | private function fields_from_filters() { |
||
213 | |||
214 | /** |
||
215 | * Alias for the is_plugin static method in the Kirki_Util class. |
||
216 | * This is here for backwards-compatibility purposes. |
||
217 | * |
||
218 | * @static |
||
219 | * @access public |
||
220 | * @since 3.0.0 |
||
221 | * @return bool |
||
222 | */ |
||
223 | public static function is_plugin() { |
||
227 | |||
228 | /** |
||
229 | * Alias for the get_variables static method in the Kirki_Util class. |
||
230 | * This is here for backwards-compatibility purposes. |
||
231 | * |
||
232 | * @static |
||
233 | * @access public |
||
234 | * @since 2.0.0 |
||
235 | * @return array Formatted as array( 'variable-name' => value ). |
||
236 | */ |
||
237 | public static function get_variables() { |
||
243 | |||
244 | } |
||
245 |
This check marks private properties in classes that are never used. Those properties can be removed.