PluginProbe
Kirki – Freeform Page Builder, Website Builder & Customizer / 3.0.42
Kirki – Freeform Page Builder, Website Builder & Customizer v3.0.42
6.3.0 6.2.5 6.2.4 6.2.3 6.2.2 6.2.1 6.2.0 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 All 56 releases
kirki / kirki.php
kirki.php
103 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Kirki Customizer Framework
4 * Plugin URI: https://kirki.org
5 * Description: The Ultimate WordPress Customizer Framework
6 * Author: Ari Stathopoulos (@aristath)
7 * Author URI: https://aristath.github.io
8 * Version: 3.0.42
9 * Text Domain: kirki
10 * Requires WP: 4.9
11 * Requires PHP: 5.3
12 * GitHub Plugin URI: aristath/kirki
13 * GitHub Plugin URI: https://github.com/aristath/kirki
14 *
15 * @package Kirki
16 * @category Core
17 * @author Ari Stathopoulos (@aristath)
18 * @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
19 * @license https://opensource.org/licenses/MIT
20 * @since 1.0
21 */
22
23 // Exit if accessed directly.
24 if ( ! defined( 'ABSPATH' ) ) {
25 exit;
26 }
27
28 // No need to proceed if Kirki already exists.
29 if ( class_exists( 'Kirki' ) ) {
30 return;
31 }
32
33 // Include the autoloader.
34 require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'class-kirki-autoload.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
35 new Kirki_Autoload();
36
37 if ( ! defined( 'KIRKI_PLUGIN_FILE' ) ) {
38 define( 'KIRKI_PLUGIN_FILE', __FILE__ );
39 }
40
41 // Define the KIRKI_VERSION constant.
42 if ( ! defined( 'KIRKI_VERSION' ) ) {
43 define( 'KIRKI_VERSION', '3.0.42' );
44 }
45
46 // Make sure the path is properly set.
47 Kirki::$path = wp_normalize_path( dirname( __FILE__ ) ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride
48 Kirki_Init::set_url();
49
50 new Kirki_Controls();
51
52 if ( ! function_exists( 'Kirki' ) ) {
53 /**
54 * Returns an instance of the Kirki object.
55 */
56 function kirki() {
57 $kirki = Kirki_Toolkit::get_instance();
58 return $kirki;
59 }
60 }
61
62 // Start Kirki.
63 global $kirki;
64 $kirki = kirki();
65
66 // Instantiate the modules.
67 $kirki->modules = new Kirki_Modules();
68
69 Kirki::$url = plugins_url( '', __FILE__ );
70
71 // Instantiate classes.
72 new Kirki();
73 new Kirki_L10n();
74
75 // Include deprecated functions & methods.
76 require_once wp_normalize_path( dirname( __FILE__ ) . '/deprecated/deprecated.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
77
78 // Include the ariColor library.
79 require_once wp_normalize_path( dirname( __FILE__ ) . '/lib/class-aricolor.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
80
81 // Add an empty config for global fields.
82 Kirki::add_config( '' );
83
84 $custom_config_path = dirname( __FILE__ ) . '/custom-config.php';
85 $custom_config_path = wp_normalize_path( $custom_config_path );
86 if ( file_exists( $custom_config_path ) ) {
87 require_once $custom_config_path; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
88 }
89
90 // Add upgrade notifications.
91 require_once wp_normalize_path( dirname( __FILE__ ) . '/upgrade-notifications.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
92
93 /**
94 * To enable tests, add this line to your wp-config.php file (or anywhere alse):
95 * define( 'KIRKI_TEST', true );
96 *
97 * Please note that the example.php file is not included in the wordpress.org distribution
98 * and will only be included in dev versions of the plugin in the github repository.
99 */
100 if ( defined( 'KIRKI_TEST' ) && true === KIRKI_TEST && file_exists( dirname( __FILE__ ) . '/example.php' ) ) {
101 include_once dirname( __FILE__ ) . '/example.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
102 }
103