aristath /
kirki
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Plugin Name: Kirki Toolkit |
||
| 4 | * Plugin URI: http://aristath.github.io/kirki |
||
| 5 | * Description: The ultimate WordPress Customizer Toolkit |
||
| 6 | * Author: Aristeides Stathopoulos |
||
| 7 | * Author URI: http://aristath.github.io |
||
| 8 | * Version: 3.0.25 |
||
| 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) 2017, 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 | require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'class-kirki-autoload.php'; |
||
| 34 | new Kirki_Autoload(); |
||
| 35 | |||
| 36 | if ( ! defined( 'KIRKI_PLUGIN_FILE' ) ) { |
||
| 37 | define( 'KIRKI_PLUGIN_FILE', __FILE__ ); |
||
| 38 | } |
||
| 39 | |||
| 40 | // Define the KIRKI_VERSION constant. |
||
| 41 | if ( ! defined( 'KIRKI_VERSION' ) ) { |
||
| 42 | if ( ! function_exists( 'get_plugin_data' ) ) { |
||
| 43 | include_once ABSPATH . 'wp-admin/includes/plugin.php'; |
||
| 44 | } |
||
| 45 | $data = get_plugin_data( KIRKI_PLUGIN_FILE ); |
||
| 46 | $version = ( isset( $data['Version'] ) ) ? $data['Version'] : false; |
||
| 47 | define( 'KIRKI_VERSION', $version ); |
||
| 48 | } |
||
| 49 | |||
| 50 | // Make sure the path is properly set. |
||
| 51 | Kirki::$path = wp_normalize_path( dirname( __FILE__ ) ); |
||
| 52 | Kirki_Init::set_url(); |
||
| 53 | |||
| 54 | new Kirki_Controls(); |
||
| 55 | |||
| 56 | if ( ! function_exists( 'Kirki' ) ) { |
||
| 57 | /** |
||
| 58 | * Returns an instance of the Kirki object. |
||
| 59 | */ |
||
| 60 | function kirki() { |
||
| 61 | $kirki = Kirki_Toolkit::get_instance(); |
||
| 62 | return $kirki; |
||
| 63 | } |
||
| 64 | } |
||
| 65 | |||
| 66 | // Start Kirki. |
||
| 67 | global $kirki; |
||
| 68 | $kirki = kirki(); |
||
| 69 | |||
| 70 | // Instantiate the modules. |
||
| 71 | $kirki->modules = new Kirki_Modules(); |
||
| 72 | |||
| 73 | Kirki::$url = plugins_url( '', __FILE__ ); |
||
| 74 | |||
| 75 | // Instantiate classes. |
||
| 76 | new Kirki(); |
||
| 77 | new Kirki_L10n(); |
||
|
0 ignored issues
–
show
|
|||
| 78 | |||
| 79 | // Include deprecated functions & methods. |
||
| 80 | require_once wp_normalize_path( dirname( __FILE__ ) . '/deprecated/deprecated.php' ); |
||
| 81 | |||
| 82 | // Include the ariColor library. |
||
| 83 | require_once wp_normalize_path( dirname( __FILE__ ) . '/lib/class-aricolor.php' ); |
||
| 84 | |||
| 85 | // Add an empty config for global fields. |
||
| 86 | Kirki::add_config( '' ); |
||
| 87 | |||
| 88 | $custom_config_path = dirname( __FILE__ ) . '/custom-config.php'; |
||
| 89 | $custom_config_path = wp_normalize_path( $custom_config_path ); |
||
| 90 | if ( file_exists( $custom_config_path ) ) { |
||
| 91 | require_once $custom_config_path; |
||
| 92 | } |
||
| 93 | |||
| 94 | // Add upgrade notifications. |
||
| 95 | require_once wp_normalize_path( dirname( __FILE__ ) . '/upgrade-notifications.php' ); |
||
| 96 | |||
| 97 | /** |
||
| 98 | * To enable tests, add this line to your wp-config.php file (or anywhere alse): |
||
| 99 | * define( 'KIRKI_TEST', true ); |
||
| 100 | * |
||
| 101 | * Please note that the example.php file is not included in the wordpress.org distribution |
||
| 102 | * and will only be included in dev versions of the plugin in the github repository. |
||
| 103 | */ |
||
| 104 | if ( defined( 'KIRKI_TEST' ) && true === KIRKI_TEST && file_exists( dirname( __FILE__ ) . '/example.php' ) ) { |
||
| 105 | include_once dirname( __FILE__ ) . '/example.php'; |
||
| 106 | } |
||
| 107 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths