forked from themeum/kirki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkirki.php
executable file
·65 lines (56 loc) · 1.66 KB
/
kirki.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* Plugin Name: Kirki Toolkit
* Plugin URI: http://kirki.org
* Description: The ultimate WordPress Customizer Toolkit
* Author: Aristeides Stathopoulos
* Author URI: http://aristeides.com
* Version: 2.3.4
* Text Domain: kirki
*
* GitHub Plugin URI: aristath/kirki
* GitHub Plugin URI: https://github.com/aristath/kirki
*
*
* @package Kirki
* @category Core
* @author Aristeides Stathopoulos
* @copyright Copyright (c) 2016, Aristeides Stathopoulos
* @license http://opensource.org/licenses/https://opensource.org/licenses/MIT
* @since 1.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// No need to proceed if Kirki already exists
if ( class_exists( 'Kirki' ) ) {
return;
}
// Include the autoloader
include_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'autoloader.php' );
// Gets an instance of the main Kirki object.
if ( ! function_exists( 'Kirki' ) ) {
function Kirki() {
$kirki = Kirki_Toolkit::get_instance();
return $kirki;
}
}
// Start Kirki
global $kirki;
$kirki = Kirki();
// Make sure the path is properly set
Kirki::$path = wp_normalize_path( dirname( __FILE__ ) );
// Instantiate 2ndary classes
new Kirki_l10n();
new Kirki_Scripts_Registry();
new Kirki_Styles_Customizer();
new Kirki_Styles_Frontend();
new Kirki_Selective_Refresh();
new Kirki();
// Include deprecated functions & methods
include_once wp_normalize_path( dirname( __FILE__ ) . '/includes/deprecated.php' );
// Include the ariColor library
include_once wp_normalize_path( dirname( __FILE__ ) . '/includes/lib/class-aricolor.php' );
// Add an empty config for global fields
Kirki::add_config( '' );