PluginProbe ʕ •ᴥ•ʔ
Kirki – Freeform Page Builder, Website Builder & Customizer / 6.0.13
Kirki – Freeform Page Builder, Website Builder & Customizer v6.0.13
6.1.1 6.1.0 6.0.14 6.0.13 6.0.12 6.0.11 6.0.10 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.19 4.0.20 4.0.21 4.0.22 4.0.23 4.0.24 4.1 4.2.0 5.0.0 5.1.0 5.1.1 5.2.0 5.2.1 5.2.2 5.2.3 6.0.0 trunk 3.0.40 3.0.41 3.0.42 3.0.43 3.0.44 3.0.45 3.1.0 3.1.1 3.1.2
kirki / customizer / packages / index.php
kirki / customizer / packages Last commit date
compatibility 1 month ago controls 2 months ago fields 2 months ago modules 2 months ago utils 3 weeks ago autoload.php 5 months ago index.php 5 months ago
index.php
80 lines
1 <?php
2 defined( 'ABSPATH' ) || exit;
3
4 if ( ! function_exists( 'kirki_init_controls' ) ) {
5
6 /**
7 * Init Kirki controls.
8 */
9 function kirki_init_controls() {
10
11 $autoload_path = __DIR__ . '/autoload.php';
12
13 if ( file_exists( $autoload_path ) ) {
14 require_once $autoload_path;
15 }
16
17 // Load Pro namespace compatibility for backward compatibility.
18 $compatibility_path = __DIR__ . '/compatibility/src/Pro_Namespace_Compatibility.php';
19 if ( file_exists( $compatibility_path ) ) {
20 require_once $compatibility_path;
21 }
22
23 $packages = array(
24 __DIR__ . '/controls/headline-divider',
25 __DIR__ . '/controls/input-slider',
26 __DIR__ . '/controls/margin-padding',
27 __DIR__ . '/controls/responsive',
28 __DIR__ . '/controls/tabs',
29 );
30
31 foreach ( $packages as $package ) {
32 $package_name = basename( $package );
33 $init_class_name = str_ireplace( '-', ' ', $package_name );
34 $init_class_name = ucwords( $init_class_name );
35 $init_class_name = str_ireplace( ' ', '', $init_class_name );
36 $init_class_name = '\\Kirki\\' . $init_class_name . '\\Init';
37
38 $init_file_path = $package . '/' . basename( $package ) . '.php';
39
40 if ( file_exists( $init_file_path ) ) {
41 include_once $init_file_path;
42 }
43
44 if ( class_exists( $init_class_name ) ) {
45 new $init_class_name();
46 }
47 }
48
49 }
50 }
51
52 if ( ! function_exists( 'kirki_load_controls' ) ) {
53
54 /**
55 * Load Kirki controls.
56 */
57 function kirki_load_controls() {
58
59 // Stop, if Kirki is not installed.
60 if ( ! defined( 'KIRKI_VERSION' ) ) {
61 return;
62 }
63
64 // Stop, if Kirki controls are already loaded.
65 if ( defined( 'KIRKI_CONTROLS_VERSION' ) ) {
66 return;
67 }
68
69 $plugin_file = defined( 'KIRKI_PLUGIN_FILE' ) ? KIRKI_PLUGIN_FILE : __FILE__;
70 define( 'KIRKI_CONTROLS_VERSION', KIRKI_VERSION );
71 define( 'KIRKI_CONTROLS_PLUGIN_FILE', $plugin_file );
72
73 kirki_init_controls();
74
75 }
76
77 add_action( 'plugins_loaded', 'kirki_load_controls' );
78
79 }
80