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