Update to Kirki 4.0.22

This commit is contained in:
AlxMedia 2022-03-15 14:29:17 +01:00
parent 2b6ac38550
commit 78edeb1b25
492 changed files with 29668 additions and 39884 deletions

View file

@ -1,25 +1,28 @@
<?php
/**
* Plugin Name: Kirki Customizer Framework
* Plugin URI: https://kirki.org
* Description: The Ultimate WordPress Customizer Framework
* Author: David Vongries
* Author URI: https://wp-pagebuilderframework.com/
* Version: 3.1.9
* Text Domain: kirki
* Requires WP: 4.9
* Requires PHP: 5.3
* GitHub Plugin URI: kirki-framework/kirki
* GitHub Plugin URI: https://github.com/kirki-framework/kirki
* Plugin Name: Kirki Customizer Framework
* Plugin URI: https://kirki.org
* Description: The Ultimate WordPress Customizer Framework
* Author: David Vongries
* Author URI: https://davidvongries.com/
* Version: 4.0.22
* Text Domain: kirki
* Requires at least: 5.2
* Requires PHP: 7.0
*
* @package Kirki
* @category Core
* @author Ari Stathopoulos (@aristath)
* @copyright Copyright (c) 2020, David Vongries
* @license https://opensource.org/licenses/MIT
* @since 1.0
* @package Kirki
* @category Core
* @author Ari Stathopoulos (@aristath)
* @copyright Copyright (c) 2021, David Vongries
* @license https://opensource.org/licenses/MIT
* @since 1.0
*/
use Kirki\L10n;
use Kirki\Compatibility\Modules;
use Kirki\Compatibility\Framework;
use Kirki\Compatibility\Kirki;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
@ -30,31 +33,26 @@ if ( class_exists( 'Kirki' ) ) {
return;
}
// Include the autoloader.
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'class-kirki-autoload.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
new Kirki_Autoload();
if ( ! defined( 'KIRKI_PLUGIN_FILE' ) ) {
define( 'KIRKI_PLUGIN_FILE', __FILE__ );
}
require_once __DIR__ . '/lib/class-aricolor.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
require_once __DIR__ . '/lib/class-kirki-color.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
require_once __DIR__ . '/packages/autoload.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
require_once __DIR__ . '/inc/bootstrap.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
// Define the KIRKI_VERSION constant.
if ( ! defined( 'KIRKI_VERSION' ) ) {
define( 'KIRKI_VERSION', '3.1.9' );
define( 'KIRKI_VERSION', '4.0.22' );
}
// Make sure the path is properly set.
Kirki::$path = wp_normalize_path( dirname( __FILE__ ) ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride
Kirki_Init::set_url();
new Kirki_Controls();
if ( ! function_exists( 'Kirki' ) ) {
/**
* Returns an instance of the Kirki object.
*/
function kirki() {
$kirki = Kirki_Toolkit::get_instance();
$kirki = Framework::get_instance();
return $kirki;
}
}
@ -64,23 +62,20 @@ global $kirki;
$kirki = kirki();
// Instantiate the modules.
$kirki->modules = new Kirki_Modules();
Kirki::$url = plugins_url( '', __FILE__ );
$kirki->modules = new Modules();
// Instantiate classes.
new Kirki();
new Kirki_L10n();
// Include deprecated functions & methods.
require_once wp_normalize_path( dirname( __FILE__ ) . '/deprecated/deprecated.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
new L10n( 'kirki', __DIR__ . '/languages' );
// ? Bagus: Do we really need to-reinclude this file? It was included above.
// Include the ariColor library.
require_once wp_normalize_path( dirname( __FILE__ ) . '/lib/class-aricolor.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
// Add an empty config for global fields.
Kirki::add_config( '' );
Kirki::add_config( '' ); // ? Bagus: what is this for? Adding empty config.
// ? Bagus: Do we really need this line? custom-config.php here is supposed to inside this plugin. Or is this just in case we need it in the future?
$custom_config_path = dirname( __FILE__ ) . '/custom-config.php';
$custom_config_path = wp_normalize_path( $custom_config_path );
if ( file_exists( $custom_config_path ) ) {