mirror of
https://ghproxy.net/https://github.com/AlxMedia/curver.git
synced 2025-08-28 00:58:03 +08:00
1.0.1
This commit is contained in:
parent
b14ccb1b03
commit
7e3774b663
168 changed files with 2453 additions and 2788 deletions
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2017 Aristeides Stathopoulos
|
Copyright (c) 2019 Ari Stathopoulos (@aristath)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -1,36 +1,28 @@
|
||||||
.select2-dropdown {
|
.select2-dropdown {
|
||||||
border-color: rgba(0, 0, 0, 0.1);
|
border-color: rgba(0, 0, 0, 0.1);
|
||||||
border-radius: 0;
|
border-radius: 0; }
|
||||||
}
|
|
||||||
|
|
||||||
.select2-container {
|
.select2-container {
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
width: 100% !important;
|
width: 100% !important; }
|
||||||
}
|
.select2-container--open .select2-dropdown--above,
|
||||||
.select2-container--open .select2-dropdown--above,
|
.select2-container--open .select2-dropdown--below {
|
||||||
.select2-container--open .select2-dropdown--below {
|
z-index: 9999999;
|
||||||
z-index: 9999999;
|
min-width: 100px; }
|
||||||
min-width: 100px;
|
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||||
}
|
border-color: rgba(0, 0, 0, 0.1); }
|
||||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
.select2-container--default .select2-selection--multiple, .select2-container--default .select2-selection--single {
|
||||||
border-color: rgba(0, 0, 0, 0.1);
|
border-color: rgba(0, 0, 0, 0.1);
|
||||||
}
|
border-radius: 0; }
|
||||||
.select2-container--default .select2-selection--multiple, .select2-container--default .select2-selection--single {
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||||
border-color: rgba(0, 0, 0, 0.1);
|
background-color: rgba(255, 255, 255, 0);
|
||||||
border-radius: 0;
|
background-color: transparent;
|
||||||
}
|
border: none;
|
||||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
border-radius: 0; }
|
||||||
background-color: rgba(255, 255, 255, 0);
|
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-customizer .select2-container {
|
.wp-customizer .select2-container {
|
||||||
z-index: 8 !important;
|
z-index: 8 !important; }
|
||||||
}
|
.wp-customizer .select2-container.select2-container--open {
|
||||||
.wp-customizer .select2-container.select2-container--open {
|
z-index: 999999 !important; }
|
||||||
z-index: 999999 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*# sourceMappingURL=kirki.css.map */
|
/*# sourceMappingURL=kirki.css.map */
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"sourceRoot":"","sources":["kirki.scss"],"names":[],"mappings":"AAAA;EACE;EACA;;;AAGF;EACE;EACA;;AAGE;AAAA;EAEE;EACA;;AAMA;EACE;;AAKF;EAEE;EACA;;AAIA;EACE;EACA;EACA;EACA;;;AAOV;EACE;;AAGE;EAEE","file":"kirki.css"}
|
|
|
@ -1,53 +0,0 @@
|
||||||
.select2-dropdown {
|
|
||||||
border-color: rgba(0,0,0,.1);
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select2-container {
|
|
||||||
min-width: 100px;
|
|
||||||
width: 100% !important;
|
|
||||||
|
|
||||||
&--open {
|
|
||||||
.select2-dropdown--above,
|
|
||||||
.select2-dropdown--below {
|
|
||||||
z-index: 9999999;
|
|
||||||
min-width: 100px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&--default {
|
|
||||||
.select2-search--dropdown {
|
|
||||||
.select2-search__field {
|
|
||||||
border-color: rgba(0,0,0,.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.select2-selection {
|
|
||||||
&--multiple,
|
|
||||||
&--single {
|
|
||||||
border-color: rgba(0,0,0,.1);
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--multiple {
|
|
||||||
.select2-selection__choice {
|
|
||||||
background-color: rgba(255,255,255,0);
|
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-customizer .select2-container {
|
|
||||||
z-index: 8 !important;
|
|
||||||
|
|
||||||
&.select2-container {
|
|
||||||
&--open {
|
|
||||||
// @See https://github.com/aristath/kirki/issues/1418
|
|
||||||
z-index: 999999 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,8 +5,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
@ -55,7 +55,7 @@ class Kirki_Autoload {
|
||||||
|
|
||||||
// Check if we've got it cached and ready.
|
// Check if we've got it cached and ready.
|
||||||
if ( isset( $this->cached_paths[ $class_name ] ) && file_exists( $this->cached_paths[ $class_name ] ) ) {
|
if ( isset( $this->cached_paths[ $class_name ] ) && file_exists( $this->cached_paths[ $class_name ] ) ) {
|
||||||
include_once $this->cached_paths[ $class_name ];
|
include_once $this->cached_paths[ $class_name ]; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ class Kirki_Autoload {
|
||||||
$path = wp_normalize_path( $path );
|
$path = wp_normalize_path( $path );
|
||||||
if ( file_exists( $path ) ) {
|
if ( file_exists( $path ) ) {
|
||||||
$this->cached_paths[ $class_name ] = $path;
|
$this->cached_paths[ $class_name ] = $path;
|
||||||
include_once $path;
|
include_once $path; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.17
|
* @since 3.0.17
|
||||||
*/
|
*/
|
||||||
|
@ -64,7 +64,7 @@ class Kirki_Controls {
|
||||||
foreach ( $this->templates as $template ) {
|
foreach ( $this->templates as $template ) {
|
||||||
if ( file_exists( $this->views_path . $template . '.php' ) ) {
|
if ( file_exists( $this->views_path . $template . '.php' ) ) {
|
||||||
echo '<script type="text/html" id="tmpl-kirki-input-' . esc_attr( $template ) . '">';
|
echo '<script type="text/html" id="tmpl-kirki-input-' . esc_attr( $template ) . '">';
|
||||||
include $this->views_path . $template . '.php';
|
include $this->views_path . $template . '.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
|
||||||
echo '</script>';
|
echo '</script>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -830,7 +830,13 @@ kirki = jQuery.extend( kirki, {
|
||||||
} );
|
} );
|
||||||
|
|
||||||
element.on( 'change keyup paste click', function() {
|
element.on( 'change keyup paste click', function() {
|
||||||
kirki.setting.set( control.id, jQuery( this ).val() );
|
var val = jQuery( this ).val();
|
||||||
|
if ( isNaN( val ) ) {
|
||||||
|
val = parseFloat( val, 10 );
|
||||||
|
val = ( isNaN( val ) ) ? 0 : val;
|
||||||
|
jQuery( this ).attr( 'value', val );
|
||||||
|
}
|
||||||
|
kirki.setting.set( control.id, val );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -899,7 +905,7 @@ kirki = jQuery.extend( kirki, {
|
||||||
previewImage = jsonImg.url;
|
previewImage = jsonImg.url;
|
||||||
|
|
||||||
if ( ! _.isUndefined( jsonImg.sizes ) ) {
|
if ( ! _.isUndefined( jsonImg.sizes ) ) {
|
||||||
previewImg = jsonImg.sizes.full.url;
|
previewImage = jsonImg.sizes.full.url;
|
||||||
if ( ! _.isUndefined( jsonImg.sizes.medium ) ) {
|
if ( ! _.isUndefined( jsonImg.sizes.medium ) ) {
|
||||||
previewImage = jsonImg.sizes.medium.url;
|
previewImage = jsonImg.sizes.medium.url;
|
||||||
} else if ( ! _.isUndefined( jsonImg.sizes.thumbnail ) ) {
|
} else if ( ! _.isUndefined( jsonImg.sizes.thumbnail ) ) {
|
||||||
|
@ -3170,7 +3176,6 @@ wp.customize.controlConstructor['kirki-typography'] = wp.customize.kirkiDynamicC
|
||||||
control.renderFontSelector();
|
control.renderFontSelector();
|
||||||
control.renderBackupFontSelector();
|
control.renderBackupFontSelector();
|
||||||
control.renderVariantSelector();
|
control.renderVariantSelector();
|
||||||
control.localFontsCheckbox();
|
|
||||||
|
|
||||||
// Font-size.
|
// Font-size.
|
||||||
if ( 'undefined' !== typeof control.params.default['font-size'] ) {
|
if ( 'undefined' !== typeof control.params.default['font-size'] ) {
|
||||||
|
@ -3568,22 +3573,6 @@ wp.customize.controlConstructor['kirki-typography'] = wp.customize.kirkiDynamicC
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
localFontsCheckbox: function() {
|
|
||||||
var control = this,
|
|
||||||
checkboxContainer = control.container.find( '.kirki-host-font-locally' ),
|
|
||||||
checkbox = control.container.find( '.kirki-host-font-locally input' ),
|
|
||||||
checked = jQuery( checkbox ).is( ':checked' );
|
|
||||||
|
|
||||||
if ( control.setting._value && control.setting._value.downloadFont ) {
|
|
||||||
jQuery( checkbox ).attr( 'checked', 'checked' );
|
|
||||||
}
|
|
||||||
|
|
||||||
jQuery( checkbox ).on( 'change', function() {
|
|
||||||
checked = jQuery( checkbox ).is( ':checked' );
|
|
||||||
control.saveValue( 'downloadFont', checked );
|
|
||||||
} );
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves the value.
|
* Saves the value.
|
||||||
*/
|
*/
|
||||||
|
|
2
functions/kirki/controls/js/script.min.js
vendored
2
functions/kirki/controls/js/script.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.12
|
* @since 3.0.12
|
||||||
*/
|
*/
|
||||||
|
@ -218,9 +218,6 @@ class Kirki_Control_Base extends WP_Customize_Control {
|
||||||
*
|
*
|
||||||
* Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`.
|
* Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`.
|
||||||
*
|
*
|
||||||
* Supports basic input types `text`, `checkbox`, `textarea`, `radio`, `select` and `dropdown-pages`.
|
|
||||||
* Additional input types such as `email`, `url`, `number`, `hidden` and `date` are supported implicitly.
|
|
||||||
*
|
|
||||||
* Control content can alternately be rendered in JS. See WP_Customize_Control::print_template().
|
* Control content can alternately be rendered in JS. See WP_Customize_Control::print_template().
|
||||||
*
|
*
|
||||||
* @since 3.4.0
|
* @since 3.4.0
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.26
|
* @since 3.0.26
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,70 +5,43 @@
|
||||||
* Creates a new custom control.
|
* Creates a new custom control.
|
||||||
* Custom controls accept raw HTML/JS.
|
* Custom controls accept raw HTML/JS.
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @codingStandardsIgnoreFile Generic.Files.OneClassPerFile.MultipleFound Generic.Classes.DuplicateClassName.Found
|
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show warning if old WordPress.
|
* Adds a "code" control, alias of the WP_Customize_Code_Editor_Control class.
|
||||||
*/
|
*/
|
||||||
if ( ! class_exists( 'WP_Customize_Code_Editor_Control' ) ) {
|
class Kirki_Control_Code extends WP_Customize_Code_Editor_Control {
|
||||||
/**
|
|
||||||
* Adds a warning message instead of the control.
|
|
||||||
*/
|
|
||||||
class Kirki_Control_Code extends Kirki_Control_Base {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The message.
|
|
||||||
*
|
|
||||||
* @since 3.0.21
|
|
||||||
*/
|
|
||||||
protected function content_template() {
|
|
||||||
?>
|
|
||||||
<div class="notice notice-error" data-type="error"><div class="notification-message">
|
|
||||||
<?php esc_html_e( 'Please update your WordPress installation to a version newer than 4.9 to access the code control.', 'kirki' ); ?>
|
|
||||||
</div></div>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a "code" control, alias of the WP_Customize_Code_Editor_Control class.
|
* Whitelisting the "required" argument.
|
||||||
|
*
|
||||||
|
* @since 3.0.17
|
||||||
|
* @access public
|
||||||
|
* @var array
|
||||||
*/
|
*/
|
||||||
class Kirki_Control_Code extends WP_Customize_Code_Editor_Control {
|
public $required = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whitelisting the "required" argument.
|
* Refresh the parameters passed to the JavaScript via JSON.
|
||||||
*
|
*
|
||||||
* @since 3.0.17
|
* @see WP_Customize_Control::to_json()
|
||||||
* @access public
|
*/
|
||||||
* @var array
|
public function to_json() {
|
||||||
*/
|
|
||||||
public $required = array();
|
|
||||||
|
|
||||||
/**
|
// Get the basics from the parent class.
|
||||||
* Refresh the parameters passed to the JavaScript via JSON.
|
parent::to_json();
|
||||||
*
|
|
||||||
* @see WP_Customize_Control::to_json()
|
|
||||||
*/
|
|
||||||
public function to_json() {
|
|
||||||
|
|
||||||
// Get the basics from the parent class.
|
// Required.
|
||||||
parent::to_json();
|
$this->json['required'] = $this->required;
|
||||||
|
|
||||||
// Required.
|
|
||||||
$this->json['required'] = $this->required;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.6
|
* @since 2.2.6
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.23
|
* @since 3.0.23
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.4
|
* @since 2.2.4
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2
|
* @since 2.2
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
@ -35,7 +35,9 @@ class Kirki_Control_Dimension extends Kirki_Control_Base {
|
||||||
public function enqueue() {
|
public function enqueue() {
|
||||||
parent::enqueue();
|
parent::enqueue();
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'kirki-script', 'dimensionkirkiL10n', array(
|
'kirki-script',
|
||||||
|
'dimensionkirkiL10n',
|
||||||
|
array(
|
||||||
'invalid-value' => esc_html__( 'Invalid Value', 'kirki' ),
|
'invalid-value' => esc_html__( 'Invalid Value', 'kirki' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
@ -39,7 +39,7 @@ class Kirki_Control_FontAwesome extends Kirki_Control_Base {
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
$json_path = wp_normalize_path( Kirki::$path . '/assets/vendor/fontawesome/fontawesome.json' );
|
$json_path = wp_normalize_path( Kirki::$path . '/assets/vendor/fontawesome/fontawesome.json' );
|
||||||
include $json_path;
|
include $json_path; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
|
||||||
$font_awesome_json = ob_get_clean();
|
$font_awesome_json = ob_get_clean();
|
||||||
|
|
||||||
wp_localize_script( 'kirki-script', 'fontAwesomeJSON', $font_awesome_json );
|
wp_localize_script( 'kirki-script', 'fontAwesomeJSON', $font_awesome_json );
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
@ -108,13 +108,11 @@ class Kirki_Control_Repeater extends Kirki_Control_Base {
|
||||||
case 'image':
|
case 'image':
|
||||||
case 'cropped_image':
|
case 'cropped_image':
|
||||||
case 'upload':
|
case 'upload':
|
||||||
|
|
||||||
// We add it to the list of fields that need some extra filtering/processing.
|
// We add it to the list of fields that need some extra filtering/processing.
|
||||||
$media_fields_to_filter[ $key ] = true;
|
$media_fields_to_filter[ $key ] = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'dropdown-pages':
|
case 'dropdown-pages':
|
||||||
|
|
||||||
// If the field is a dropdown-pages field then add it to args.
|
// If the field is a dropdown-pages field then add it to args.
|
||||||
$dropdown = wp_dropdown_pages(
|
$dropdown = wp_dropdown_pages(
|
||||||
array(
|
array(
|
||||||
|
@ -127,7 +125,7 @@ class Kirki_Control_Repeater extends Kirki_Control_Base {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Hackily add in the data link parameter.
|
// Hackily add in the data link parameter.
|
||||||
$dropdown = str_replace( '<select', '<select data-field="' . esc_attr( $args['fields'][ $key ]['id'] ) . '"' . $this->get_link(), $dropdown ); // phpcs:ignore Generic.Formatting.MultipleStatementAlignment.NotSameWarning
|
$dropdown = str_replace( '<select', '<select data-field="' . esc_attr( $args['fields'][ $key ]['id'] ) . '"' . $this->get_link(), $dropdown ); // phpcs:ignore Generic.Formatting.MultipleStatementAlignment
|
||||||
$args['fields'][ $key ]['dropdown'] = $dropdown;
|
$args['fields'][ $key ]['dropdown'] = $dropdown;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -417,7 +415,7 @@ class Kirki_Control_Repeater extends Kirki_Control_Base {
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button type="button" class="button remove-button<# if ( ! field.default ) { #> hidden<# } #>"></button>
|
<button type="button" class="button remove-button<# if ( ! field.default ) { #> hidden<# } #>"><?php esc_html_e( 'Remove', 'kirki' ); ?></button>
|
||||||
<button type="button" class="button upload-button" data-label="<?php esc_attr_e( 'Add File', 'kirki' ); ?>" data-alt-label="<?php esc_attr_e( 'Change File', 'kirki' ); ?>">
|
<button type="button" class="button upload-button" data-label="<?php esc_attr_e( 'Add File', 'kirki' ); ?>" data-alt-label="<?php esc_attr_e( 'Change File', 'kirki' ); ?>">
|
||||||
<# if ( field.default ) { #>
|
<# if ( field.default ) { #>
|
||||||
<?php esc_html_e( 'Change File', 'kirki' ); ?>
|
<?php esc_html_e( 'Change File', 'kirki' ); ?>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
@ -37,7 +37,8 @@ class Kirki_Control_Slider extends Kirki_Control_Base {
|
||||||
public function to_json() {
|
public function to_json() {
|
||||||
parent::to_json();
|
parent::to_json();
|
||||||
$this->json['choices'] = wp_parse_args(
|
$this->json['choices'] = wp_parse_args(
|
||||||
$this->json['choices'], array(
|
$this->json['choices'],
|
||||||
|
array(
|
||||||
'min' => '0',
|
'min' => '0',
|
||||||
'max' => '100',
|
'max' => '100',
|
||||||
'step' => '1',
|
'step' => '1',
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
@ -94,12 +94,6 @@ class Kirki_Control_Typography extends Kirki_Control_Base {
|
||||||
<select {{{ data.inputAttrs }}} class="variant" id="kirki-typography-variant-{{{ data.id }}}"></select>
|
<select {{{ data.inputAttrs }}} class="variant" id="kirki-typography-variant-{{{ data.id }}}"></select>
|
||||||
</div>
|
</div>
|
||||||
<# } #>
|
<# } #>
|
||||||
<div class="kirki-host-font-locally">
|
|
||||||
<label>
|
|
||||||
<input type="checkbox">
|
|
||||||
<?php esc_html_e( 'Download font-family to server instead of using the Google CDN.', 'kirki' ); ?>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<# } #>
|
<# } #>
|
||||||
|
|
||||||
<# if ( ! _.isUndefined( data.default['font-size'] ) ) { #>
|
<# if ( ! _.isUndefined( data.default['font-size'] ) ) { #>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.23
|
* @since 3.0.23
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.17
|
* @since 3.0.17
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.17
|
* @since 3.0.17
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.17
|
* @since 3.0.17
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.34
|
* @since 3.0.34
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.27
|
* @since 3.0.27
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.17
|
* @since 3.0.17
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.17
|
* @since 3.0.17
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.17
|
* @since 3.0.17
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
@ -34,8 +34,16 @@ class Kirki_Helper {
|
||||||
return array_replace_recursive( $array, $array1 );
|
return array_replace_recursive( $array, $array1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle the arguments, merge one by one.
|
/**
|
||||||
$args = func_get_args();
|
* Handle the arguments, merge one by one.
|
||||||
|
*
|
||||||
|
* In PHP 7 func_get_args() changed the way it behaves but this doesn't mean anything in this case
|
||||||
|
* sinc ethis method is only used when the array_replace_recursive() function doesn't exist
|
||||||
|
* and that was introduced in PHP v5.3.
|
||||||
|
*
|
||||||
|
* Once WordPress-Core raises its minimum requirements we''' be able to remove this fallback completely.
|
||||||
|
*/
|
||||||
|
$args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue
|
||||||
$array = $args[0];
|
$array = $args[0];
|
||||||
if ( ! is_array( $array ) ) {
|
if ( ! is_array( $array ) ) {
|
||||||
return $array;
|
return $array;
|
||||||
|
@ -121,7 +129,7 @@ class Kirki_Helper {
|
||||||
global $wp_filesystem;
|
global $wp_filesystem;
|
||||||
|
|
||||||
if ( empty( $wp_filesystem ) ) {
|
if ( empty( $wp_filesystem ) ) {
|
||||||
require_once wp_normalize_path( ABSPATH . '/wp-admin/includes/file.php' );
|
require_once wp_normalize_path( ABSPATH . '/wp-admin/includes/file.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
|
||||||
WP_Filesystem( $credentials );
|
WP_Filesystem( $credentials );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +255,8 @@ class Kirki_Helper {
|
||||||
$post_types = get_post_types(
|
$post_types = get_post_types(
|
||||||
array(
|
array(
|
||||||
'public' => true,
|
'public' => true,
|
||||||
), 'objects'
|
),
|
||||||
|
'objects'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Build the array.
|
// Build the array.
|
||||||
|
@ -411,7 +420,7 @@ class Kirki_Helper {
|
||||||
return $value1 !== $value2;
|
return $value1 !== $value2;
|
||||||
}
|
}
|
||||||
if ( ( '!=' === $operator || 'not equal' === $operator ) ) {
|
if ( ( '!=' === $operator || 'not equal' === $operator ) ) {
|
||||||
return $value1 != $value2; // WPCS: loose comparison ok.
|
return $value1 != $value2; // phpcs:ignore WordPress.PHP.StrictComparisons
|
||||||
}
|
}
|
||||||
if ( ( '>=' === $operator || 'greater or equal' === $operator || 'equal or greater' === $operator ) ) {
|
if ( ( '>=' === $operator || 'greater or equal' === $operator || 'equal or greater' === $operator ) ) {
|
||||||
return $value2 >= $value1;
|
return $value2 >= $value1;
|
||||||
|
@ -428,20 +437,20 @@ class Kirki_Helper {
|
||||||
if ( 'contains' === $operator || 'in' === $operator ) {
|
if ( 'contains' === $operator || 'in' === $operator ) {
|
||||||
if ( is_array( $value1 ) && is_array( $value2 ) ) {
|
if ( is_array( $value1 ) && is_array( $value2 ) ) {
|
||||||
foreach ( $value2 as $val ) {
|
foreach ( $value2 as $val ) {
|
||||||
if ( in_array( $val, $value1 ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
|
if ( in_array( $val, $value1 ) ) { // phpcs:ignore WordPress.PHP.StrictInArray
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ( is_array( $value1 ) && ! is_array( $value2 ) ) {
|
if ( is_array( $value1 ) && ! is_array( $value2 ) ) {
|
||||||
return in_array( $value2, $value1 ); // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
|
return in_array( $value2, $value1 ); // phpcs:ignore WordPress.PHP.StrictInArray
|
||||||
}
|
}
|
||||||
if ( is_array( $value2 ) && ! is_array( $value1 ) ) {
|
if ( is_array( $value2 ) && ! is_array( $value1 ) ) {
|
||||||
return in_array( $value1, $value2 ); // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
|
return in_array( $value1, $value2 ); // phpcs:ignore WordPress.PHP.StrictInArray
|
||||||
}
|
}
|
||||||
return ( false !== strrpos( $value1, $value2 ) || false !== strpos( $value2, $value1 ) );
|
return ( false !== strrpos( $value1, $value2 ) || false !== strpos( $value2, $value1 ) );
|
||||||
}
|
}
|
||||||
return $value1 == $value2; // WPCS: loose comparison ok.
|
return $value1 == $value2; // phpcs:ignore WordPress.PHP.StrictComparisons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
@ -147,7 +147,8 @@ class Kirki_Init {
|
||||||
}
|
}
|
||||||
|
|
||||||
$skip_control_types = apply_filters(
|
$skip_control_types = apply_filters(
|
||||||
'kirki_control_types_exclude', array(
|
'kirki_control_types_exclude',
|
||||||
|
array(
|
||||||
'Kirki_Control_Repeater',
|
'Kirki_Control_Repeater',
|
||||||
'WP_Customize_Control',
|
'WP_Customize_Control',
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
@ -110,7 +110,7 @@ class Kirki_L10n {
|
||||||
public function override_load_textdomain( $override, $domain, $mofile ) {
|
public function override_load_textdomain( $override, $domain, $mofile ) {
|
||||||
global $l10n;
|
global $l10n;
|
||||||
if ( isset( $l10n[ $this->get_theme_textdomain() ] ) ) {
|
if ( isset( $l10n[ $this->get_theme_textdomain() ] ) ) {
|
||||||
$l10n['kirki'] = $l10n[ $this->get_theme_textdomain() ]; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
|
$l10n['kirki'] = $l10n[ $this->get_theme_textdomain() ]; // phpcs:ignore WordPress.WP.GlobalVariablesOverride
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the domain is "kirki".
|
// Check if the domain is "kirki".
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
|
@ -56,7 +56,8 @@ class Kirki_Modules {
|
||||||
*/
|
*/
|
||||||
public function setup_default_modules() {
|
public function setup_default_modules() {
|
||||||
self::$modules = apply_filters(
|
self::$modules = apply_filters(
|
||||||
'kirki_modules', array(
|
'kirki_modules',
|
||||||
|
array(
|
||||||
'css' => 'Kirki_Modules_CSS',
|
'css' => 'Kirki_Modules_CSS',
|
||||||
'css-vars' => 'Kirki_Modules_CSS_Vars',
|
'css-vars' => 'Kirki_Modules_CSS_Vars',
|
||||||
'customizer-styling' => 'Kirki_Modules_Customizer_Styling',
|
'customizer-styling' => 'Kirki_Modules_Customizer_Styling',
|
||||||
|
@ -72,6 +73,7 @@ class Kirki_Modules {
|
||||||
'webfont-loader' => 'Kirki_Modules_Webfont_Loader',
|
'webfont-loader' => 'Kirki_Modules_Webfont_Loader',
|
||||||
'preset' => 'Kirki_Modules_Preset',
|
'preset' => 'Kirki_Modules_Preset',
|
||||||
'gutenberg' => 'Kirki_Modules_Gutenberg',
|
'gutenberg' => 'Kirki_Modules_Gutenberg',
|
||||||
|
'telemetry' => 'Kirki_Modules_Telemetry',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.17
|
* @since 3.0.17
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
@ -110,7 +110,9 @@ class Kirki_Settings {
|
||||||
|
|
||||||
$this->wp_customize->add_setting(
|
$this->wp_customize->add_setting(
|
||||||
new $classname(
|
new $classname(
|
||||||
$this->wp_customize, $setting, array(
|
$this->wp_customize,
|
||||||
|
$setting,
|
||||||
|
array(
|
||||||
'default' => $default,
|
'default' => $default,
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'capability' => $capability,
|
'capability' => $capability,
|
||||||
|
@ -132,7 +134,8 @@ class Kirki_Settings {
|
||||||
|
|
||||||
// Apply the kirki_setting_types filter.
|
// Apply the kirki_setting_types filter.
|
||||||
$this->setting_types = apply_filters(
|
$this->setting_types = apply_filters(
|
||||||
'kirki_setting_types', array(
|
'kirki_setting_types',
|
||||||
|
array(
|
||||||
'default' => 'WP_Customize_Setting',
|
'default' => 'WP_Customize_Setting',
|
||||||
'repeater' => 'Kirki_Settings_Repeater_Setting',
|
'repeater' => 'Kirki_Settings_Repeater_Setting',
|
||||||
'user_meta' => 'Kirki_Setting_User_Meta',
|
'user_meta' => 'Kirki_Setting_User_Meta',
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.9
|
* @since 3.0.9
|
||||||
*/
|
*/
|
||||||
|
@ -36,7 +36,7 @@ class Kirki_Util {
|
||||||
public static function is_plugin() {
|
public static function is_plugin() {
|
||||||
$is_plugin = false;
|
$is_plugin = false;
|
||||||
if ( ! function_exists( 'get_plugins' ) ) {
|
if ( ! function_exists( 'get_plugins' ) ) {
|
||||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
require_once ABSPATH . 'wp-admin/includes/plugin.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get all plugins.
|
// Get all plugins.
|
||||||
|
@ -55,7 +55,7 @@ class Kirki_Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the is_plugins_loaded function is loaded.
|
// Make sure the is_plugins_loaded function is loaded.
|
||||||
include_once ABSPATH . 'wp-admin/includes/plugin.php';
|
include_once ABSPATH . 'wp-admin/includes/plugin.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
|
||||||
|
|
||||||
// Extra logic in case the plugin is installed but not activated.
|
// Extra logic in case the plugin is installed but not activated.
|
||||||
if ( $_plugin && is_plugin_inactive( $_plugin ) ) {
|
if ( $_plugin && is_plugin_inactive( $_plugin ) ) {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Generates & echo the styles when using the AJAx method.
|
|
||||||
*
|
|
||||||
* @package Kirki
|
|
||||||
* @category Core
|
|
||||||
* @author Aristeides Stathopoulos
|
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
|
||||||
* @license https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Do not allow directly accessing this file.
|
|
||||||
if ( ! class_exists( 'Kirki' ) ) {
|
|
||||||
die( 'File can\'t be accessed directly' );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure we set the correct MIME type.
|
|
||||||
header( 'Content-Type: text/css' );
|
|
||||||
|
|
||||||
// Echo the styles.
|
|
||||||
$configs = Kirki::$config;
|
|
||||||
foreach ( $configs as $config_id => $args ) {
|
|
||||||
if ( true === $args['disable_output'] ) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$styles = Kirki_Modules_CSS::loop_controls( $config_id );
|
|
||||||
$styles = apply_filters( "kirki_{$config_id}_dynamic_css", $styles );
|
|
||||||
|
|
||||||
// Some people put weird stuff in their CSS, KSES tends to be greedy.
|
|
||||||
$styles = str_replace( '<=', '<=', $styles );
|
|
||||||
|
|
||||||
$styles = wp_kses_post( $styles );
|
|
||||||
|
|
||||||
// Why both KSES and strip_tags? Because we just added some '>'.
|
|
||||||
// kses replaces lone '>' with >.
|
|
||||||
// @codingStandardsIgnoreLine WordPress.WP.AlternativeFunctions.strip_tags_strip_tags WordPress.Security.EscapeOutput.OutputNotEscaped
|
|
||||||
echo strip_tags( str_replace( '>', '>', $styles ) );
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
// @codingStandardsIgnoreFile
|
// phpcs:ignoreFile
|
||||||
|
|
||||||
if ( ! class_exists( 'Kirki_Active_Callback' ) ) {
|
if ( ! class_exists( 'Kirki_Active_Callback' ) ) {
|
||||||
// Removed in https://github.com/aristath/kirki/pull/1682/files
|
// Removed in https://github.com/aristath/kirki/pull/1682/files
|
||||||
|
@ -18,3 +18,18 @@ if ( ! class_exists( 'Kirki_Active_Callback' ) ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deprecated in v3.0.36
|
||||||
|
*
|
||||||
|
* keeping it here in case a theme or plugin was using one of its public methods.
|
||||||
|
* This is just to avoid fatal errors, it does not do anything.
|
||||||
|
*/
|
||||||
|
if ( ! class_exists( 'Kirki_CSS_To_File' ) ) {
|
||||||
|
class Kirki_CSS_To_File {
|
||||||
|
public function __construct() {}
|
||||||
|
public function get_url() {}
|
||||||
|
public function get_timestamp() {}
|
||||||
|
public function write_file() {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @category Core
|
* @category Core
|
||||||
* @author Aristeides Stathopoulos
|
* @author Ari Stathopoulos (@aristath)
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @codingStandardsIgnoreFile
|
// phpcs:ignoreFile
|
||||||
|
|
||||||
require_once wp_normalize_path( dirname( __FILE__ ) . '/functions.php' );
|
require_once wp_normalize_path( dirname( __FILE__ ) . '/functions.php' );
|
||||||
require_once wp_normalize_path( dirname( __FILE__ ) . '/classes.php' );
|
require_once wp_normalize_path( dirname( __FILE__ ) . '/classes.php' );
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
// @codingStandardsIgnoreFile
|
// phpcs:ignoreFile
|
||||||
|
|
||||||
add_filter( 'kirki_config', function( $args ) {
|
add_filter( 'kirki_config', function( $args ) {
|
||||||
return apply_filters( 'kirki/config', $args );
|
return apply_filters( 'kirki/config', $args );
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
// @codingStandardsIgnoreFile
|
// phpcs:ignoreFile
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.3.2
|
* @since 2.3.2
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.3.2
|
* @since 2.3.2
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
29
functions/kirki/field/class-kirki-field-dropdown-pages.php
Normal file
29
functions/kirki/field/class-kirki-field-dropdown-pages.php
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Override field methods
|
||||||
|
*
|
||||||
|
* @package Kirki
|
||||||
|
* @subpackage Controls
|
||||||
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
|
* @license https://opensource.org/licenses/MIT
|
||||||
|
* @since 3.0.36
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field overrides.
|
||||||
|
*/
|
||||||
|
class Kirki_Field_Dropdown_Pages extends Kirki_Field_Select {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the default value.
|
||||||
|
*
|
||||||
|
* @access protected
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
protected function set_choices() {
|
||||||
|
$all_pages = get_pages();
|
||||||
|
foreach ( $all_pages as $page ) {
|
||||||
|
$this->choices[ $page->ID ] = $page->post_title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.3.2
|
* @since 2.3.2
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @package Kirki
|
* @package Kirki
|
||||||
* @subpackage Controls
|
* @subpackage Controls
|
||||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||||
* @license https://opensource.org/licenses/MIT
|
* @license https://opensource.org/licenses/MIT
|
||||||
* @since 2.2.7
|
* @since 2.2.7
|
||||||
*/
|
*/
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue