aristath /
kirki
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 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.2.0.beta.3 |
||
| 9 | * Text Domain: kirki |
||
| 10 | * |
||
| 11 | * GitHub Plugin URI: aristath/kirki |
||
| 12 | * GitHub Plugin URI: https://github.com/aristath/kirki |
||
| 13 | * |
||
| 14 | * |
||
| 15 | * @package Kirki |
||
| 16 | * @category Core |
||
| 17 | * @author Aristeides Stathopoulos |
||
| 18 | * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
||
| 19 | * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
||
| 20 | * @since 1.0 |
||
| 21 | */ |
||
| 22 | |||
| 23 | // Exit if accessed directly |
||
| 24 | if ( ! defined( 'ABSPATH' ) ) { |
||
| 25 | exit; |
||
| 26 | } |
||
| 27 | |||
| 28 | // Include the autoloader |
||
| 29 | include_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'autoloader.php' ); |
||
| 30 | |||
| 31 | // Gets an instance of the main Kirki object. |
||
| 32 | if ( ! function_exists( 'Kirki' ) ) { |
||
| 33 | function Kirki() { |
||
|
1 ignored issue
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 34 | $kirki = Kirki_Toolkit::get_instance(); |
||
| 35 | return $kirki; |
||
| 36 | } |
||
| 37 | } |
||
| 38 | // Start Kirki |
||
| 39 | global $kirki; |
||
| 40 | $kirki = Kirki(); |
||
| 41 | // Make sure the path is properly set |
||
| 42 | Kirki::$path = wp_normalize_path( dirname( __FILE__ ) ); |
||
| 43 | // Instantiate 2ndary classes |
||
| 44 | new Kirki_l10n(); |
||
| 45 | new Kirki_Scripts_Registry(); |
||
| 46 | new Kirki_Styles_Customizer(); |
||
| 47 | new Kirki_Styles_Frontend(); |
||
| 48 | new Kirki_Selective_Refresh(); |
||
| 49 | new Kirki(); |
||
| 50 | |||
| 51 | // apply the kirki/config filter to the URL |
||
| 52 | if ( ! function_exists( 'kirki_filtered_url' ) ) { |
||
| 53 | function kirki_filtered_url() { |
||
| 54 | $config = apply_filters( 'kirki/config', array() ); |
||
| 55 | if ( isset( $config['url_path'] ) ) { |
||
| 56 | Kirki::$url = esc_url_raw( $config['url_path'] ); |
||
| 57 | } |
||
| 58 | } |
||
| 59 | } |
||
| 60 | if ( ! Kirki_Toolkit::is_plugin() ) { |
||
| 61 | add_action( 'after_setup_theme', 'kirki_filtered_url' ); |
||
| 62 | } |
||
| 63 | // Include deprectaed functions & methods |
||
| 64 | include_once( Kirki::$path . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'deprecated.php' ); |
||
| 65 | // Include the ariColor library |
||
| 66 | include_once( wp_normalize_path( Kirki::$path . '/includes/lib/class-aricolor.php' ) ); |
||
| 67 | |||
| 68 | // Add an empty config for global fields |
||
| 69 | Kirki::add_config( '' ); |
||
| 70 |