Kirki - Version 2.0.9

Version Description

February 13, 2016, dev time: 1 hour.

  • FIX: Google fonts bug (use double quotes when font name contains a space character)
  • FIX: Checkbox control bug (checkboxes were always displayed as checked, regardless of their actual value)
  • NEW: Intruducing KIRKI_NO_OUTPUT constant that disables CSS output completely when set to true.
Download this release

Release Info

Developer aristath
Plugin Icon 128x128 Kirki
Version 2.0.9
Comparing to
See all releases

Code changes from version 2.0.8 to 2.0.9

includes/class-kirki-styles-frontend.php CHANGED
@@ -29,7 +29,7 @@ if ( ! class_exists( 'Kirki_Styles_Frontend' ) ) {
29
  $config = apply_filters( 'kirki/config', array() );
30
  $priority = ( isset( $config['styles_priority'] ) ) ? intval( $config['styles_priority'] ) : 999;
31
 
32
- if ( isset( $config['disable_output'] ) && true !== $config['disable_output'] ) {
33
  return;
34
  }
35
 
29
  $config = apply_filters( 'kirki/config', array() );
30
  $priority = ( isset( $config['styles_priority'] ) ) ? intval( $config['styles_priority'] ) : 999;
31
 
32
+ if ( ( defined( 'KIRKI_NO_OUTPUT' ) && KIRKI_NO_OUTPUT ) || ( isset( $config['disable_output'] ) && true !== $config['disable_output'] ) ) {
33
  return;
34
  }
35
 
includes/class-kirki-styles-output-css.php CHANGED
@@ -219,7 +219,12 @@ if ( ! class_exists( 'Kirki_Styles_Output_CSS' ) ) {
219
  if ( Kirki()->font_registry->is_google_font( $value ) ) {
220
  if ( isset( $google_fonts_array[ $value ] ) && isset( $google_fonts_array[ $value ]['category'] ) ) {
221
  if ( isset( $backup_fonts[ $google_fonts_array[ $value ]['category'] ] ) ) {
222
- $value .= ', ' . $backup_fonts[ $google_fonts_array[ $value ]['category'] ];
 
 
 
 
 
223
  }
224
  }
225
  }
@@ -243,12 +248,22 @@ if ( ! class_exists( 'Kirki_Styles_Output_CSS' ) ) {
243
  $styles[ $output['media_query'] ][ $element ]['text-decoration'] = 'strikethrough';
244
  }
245
  if ( isset( $value['font-family'] ) ) {
246
- $styles[ $output['media_query'] ][ $element ]['font-family'] = $value['font-family'];
 
 
 
 
 
247
  // Add backup font
248
  if ( Kirki()->font_registry->is_google_font( $value['font-family'] ) ) {
249
  if ( isset( $google_fonts_array[ $value['font-family'] ] ) && isset( $google_fonts_array[ $value['font-family'] ]['category'] ) ) {
250
  if ( isset( $backup_fonts[ $google_fonts_array[ $value['font-family'] ]['category'] ] ) ) {
251
- $styles[ $output['media_query'] ][ $element ]['font-family'] = $value['font-family'] . ', ' . $backup_fonts[ $google_fonts_array[ $value['font-family'] ]['category'] ];
 
 
 
 
 
252
  }
253
  }
254
  }
219
  if ( Kirki()->font_registry->is_google_font( $value ) ) {
220
  if ( isset( $google_fonts_array[ $value ] ) && isset( $google_fonts_array[ $value ]['category'] ) ) {
221
  if ( isset( $backup_fonts[ $google_fonts_array[ $value ]['category'] ] ) ) {
222
+ // add double quotes if needed
223
+ if ( false !== strpos( $value, ' ' ) && false === strpos( $value, '"' ) ) {
224
+ $value = '"' . $value . '", ' . $backup_fonts[ $google_fonts_array[ $value ]['category'] ];
225
+ } else {
226
+ $value .= ', ' . $backup_fonts[ $google_fonts_array[ $value ]['category'] ];
227
+ }
228
  }
229
  }
230
  }
248
  $styles[ $output['media_query'] ][ $element ]['text-decoration'] = 'strikethrough';
249
  }
250
  if ( isset( $value['font-family'] ) ) {
251
+ // add double quotes if needed
252
+ if ( false !== strpos( $value['font-family'], ' ' ) && false === strpos( $value['font-family'], '"' ) ) {
253
+ $styles[ $output['media_query'] ][ $element ]['font-family'] = '"' . $value['font-family'] . '"';
254
+ } else {
255
+ $styles[ $output['media_query'] ][ $element ]['font-family'] = $value['font-family'];
256
+ }
257
  // Add backup font
258
  if ( Kirki()->font_registry->is_google_font( $value['font-family'] ) ) {
259
  if ( isset( $google_fonts_array[ $value['font-family'] ] ) && isset( $google_fonts_array[ $value['font-family'] ]['category'] ) ) {
260
  if ( isset( $backup_fonts[ $google_fonts_array[ $value['font-family'] ]['category'] ] ) ) {
261
+ // add double quotes if needed
262
+ if ( false !== strpos( $value['font-family'], ' ' ) && false === strpos( $value['font-family'], '"' ) ) {
263
+ $styles[ $output['media_query'] ][ $element ]['font-family'] = '"' . $value['font-family'] . '", ' . $backup_fonts[ $google_fonts_array[ $value['font-family'] ]['category'] ];
264
+ } else {
265
+ $styles[ $output['media_query'] ][ $element ]['font-family'] = $value['font-family'] . ', ' . $backup_fonts[ $google_fonts_array[ $value['font-family'] ]['category'] ];
266
+ }
267
  }
268
  }
269
  }
includes/class-kirki-toolkit.php CHANGED
@@ -21,7 +21,7 @@ if ( ! class_exists( 'Kirki_Toolkit' ) ) {
21
  /** @var Kirki The only instance of this class */
22
  public static $instance = null;
23
 
24
- public static $version = '2.0.8';
25
 
26
  public $font_registry = null;
27
  public $scripts = null;
21
  /** @var Kirki The only instance of this class */
22
  public static $instance = null;
23
 
24
+ public static $version = '2.0.9';
25
 
26
  public $font_registry = null;
27
  public $scripts = null;
includes/controls/class-kirki-controls-checkbox-control.php CHANGED
@@ -25,7 +25,7 @@ if ( ! class_exists( 'Kirki_Controls_Checkbox_Control' ) ) {
25
  <a href="#" class="tooltip hint--left" data-hint="{{ data.help }}"><span class='dashicons dashicons-info'></span></a>
26
  <# } #>
27
  <label>
28
- <input type="checkbox" value="{{ data.value }}" {{{ data.link }}}<# if ( data.value !== 'false' ) { #> checked<# } #> />
29
  {{ data.label }}
30
  <# if ( data.description ) { #>
31
  <span class="description customize-control-description">{{{ data.description }}}</span>
25
  <a href="#" class="tooltip hint--left" data-hint="{{ data.help }}"><span class='dashicons dashicons-info'></span></a>
26
  <# } #>
27
  <label>
28
+ <input type="checkbox" value="{{ data.value }}" {{{ data.link }}}<# if ( data.value !== false ) { #> checked<# } #> />
29
  {{ data.label }}
30
  <# if ( data.description ) { #>
31
  <span class="description customize-control-description">{{{ data.description }}}</span>
kirki.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The ultimate WordPress Customizer Toolkit
6
  * Author: Aristeides Stathopoulos
7
  * Author URI: http://aristeides.com
8
- * Version: 2.0.8
9
  * Text Domain: kirki
10
  *
11
  * GitHub Plugin URI: aristath/kirki
5
  * Description: The ultimate WordPress Customizer Toolkit
6
  * Author: Aristeides Stathopoulos
7
  * Author URI: http://aristeides.com
8
+ * Version: 2.0.9
9
  * Text Domain: kirki
10
  *
11
  * GitHub Plugin URI: aristath/kirki
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: customizer,options framework, theme, mods, toolkit
4
  Donate link: http://kirki.org/
5
  Requires at least: 4.0
6
  Tested up to: 4.3
7
- Stable tag: 2.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -119,6 +119,14 @@ To get an idea on how to include Kirki in your next project, you can take a look
119
 
120
  == Changelog ==
121
 
 
 
 
 
 
 
 
 
122
  = 2.0.8 =
123
 
124
  February 10, 2016, dev time: 2 hours
4
  Donate link: http://kirki.org/
5
  Requires at least: 4.0
6
  Tested up to: 4.3
7
+ Stable tag: 2.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
119
 
120
  == Changelog ==
121
 
122
+ = 2.0.9 =
123
+
124
+ February 13, 2016, dev time: 1 hour.
125
+
126
+ * FIX: Google fonts bug (use double quotes when font name contains a space character)
127
+ * FIX: Checkbox control bug (checkboxes were always displayed as checked, regardless of their actual value)
128
+ * NEW: Intruducing KIRKI_NO_OUTPUT constant that disables CSS output completely when set to true.
129
+
130
  = 2.0.8 =
131
 
132
  February 10, 2016, dev time: 2 hours