Kirki - Version 0.5.1

Version Description

= * Fix: Transport defaults to refresh instead of postMessage * Fix: undefined index notice.

=

Download this release

Release Info

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

Code changes from version 0.5 to 0.5.1

includes/class-Kirki_Settings.php CHANGED
@@ -14,7 +14,7 @@ class Kirki_Settings extends Kirki {
14
  'default' => $control['default']['color'],
15
  'type' => 'theme_mod',
16
  'capability' => 'edit_theme_options',
17
- 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'postMessage',
18
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : 'sanitize_hex_color'
19
  ) );
20
 
@@ -22,7 +22,7 @@ class Kirki_Settings extends Kirki {
22
  'default' => $control['default']['image'],
23
  'type' => 'theme_mod',
24
  'capability' => 'edit_theme_options',
25
- 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'postMessage',
26
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : 'esc_url_raw'
27
  ) );
28
 
@@ -30,7 +30,7 @@ class Kirki_Settings extends Kirki {
30
  'default' => $control['default']['repeat'],
31
  'type' => 'theme_mod',
32
  'capability' => 'edit_theme_options',
33
- 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'postMessage',
34
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : array( $this, 'sanitize_bg_repeat' ),
35
  ) );
36
 
@@ -38,7 +38,7 @@ class Kirki_Settings extends Kirki {
38
  'default' => $control['default']['size'],
39
  'type' => 'theme_mod',
40
  'capability' => 'edit_theme_options',
41
- 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'postMessage',
42
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : array( $this, 'sanitize_bg_size' ),
43
  ) );
44
 
@@ -46,7 +46,7 @@ class Kirki_Settings extends Kirki {
46
  'default' => $control['default']['attach'],
47
  'type' => 'theme_mod',
48
  'capability' => 'edit_theme_options',
49
- 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'postMessage',
50
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : array( $this, 'sanitize_bg_attach' ),
51
  ) );
52
 
@@ -54,7 +54,7 @@ class Kirki_Settings extends Kirki {
54
  'default' => $control['default']['position'],
55
  'type' => 'theme_mod',
56
  'capability' => 'edit_theme_options',
57
- 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'postMessage',
58
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : array( $this, 'sanitize_bg_position' ),
59
  ) );
60
 
@@ -64,7 +64,7 @@ class Kirki_Settings extends Kirki {
64
  'default' => $control['default']['opacity'],
65
  'type' => 'theme_mod',
66
  'capability' => 'edit_theme_options',
67
- 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'postMessage',
68
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : 'absint'
69
  ) );
70
 
@@ -106,7 +106,7 @@ class Kirki_Settings extends Kirki {
106
  'default' => isset( $control['default'] ) ? $control['default'] : '',
107
  'type' => 'theme_mod',
108
  'capability' => 'edit_theme_options',
109
- 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'postMessage',
110
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : $sanitize_callback,
111
  ) );
112
 
14
  'default' => $control['default']['color'],
15
  'type' => 'theme_mod',
16
  'capability' => 'edit_theme_options',
17
+ 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'refresh',
18
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : 'sanitize_hex_color'
19
  ) );
20
 
22
  'default' => $control['default']['image'],
23
  'type' => 'theme_mod',
24
  'capability' => 'edit_theme_options',
25
+ 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'refresh',
26
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : 'esc_url_raw'
27
  ) );
28
 
30
  'default' => $control['default']['repeat'],
31
  'type' => 'theme_mod',
32
  'capability' => 'edit_theme_options',
33
+ 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'refresh',
34
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : array( $this, 'sanitize_bg_repeat' ),
35
  ) );
36
 
38
  'default' => $control['default']['size'],
39
  'type' => 'theme_mod',
40
  'capability' => 'edit_theme_options',
41
+ 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'refresh',
42
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : array( $this, 'sanitize_bg_size' ),
43
  ) );
44
 
46
  'default' => $control['default']['attach'],
47
  'type' => 'theme_mod',
48
  'capability' => 'edit_theme_options',
49
+ 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'refresh',
50
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : array( $this, 'sanitize_bg_attach' ),
51
  ) );
52
 
54
  'default' => $control['default']['position'],
55
  'type' => 'theme_mod',
56
  'capability' => 'edit_theme_options',
57
+ 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'refresh',
58
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : array( $this, 'sanitize_bg_position' ),
59
  ) );
60
 
64
  'default' => $control['default']['opacity'],
65
  'type' => 'theme_mod',
66
  'capability' => 'edit_theme_options',
67
+ 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'refresh',
68
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : 'absint'
69
  ) );
70
 
106
  'default' => isset( $control['default'] ) ? $control['default'] : '',
107
  'type' => 'theme_mod',
108
  'capability' => 'edit_theme_options',
109
+ 'transport' => isset( $control['transport'] ) ? $control['transport'] : 'refresh',
110
  'sanitize_callback' => isset( $control['sanitize_callback'] ) ? $control['sanitize_callback'] : $sanitize_callback,
111
  ) );
112
 
includes/class-Kirki_Style_Generic.php CHANGED
@@ -58,9 +58,11 @@ class Kirki_Style_Generic {
58
  // Do we have a unit specified?
59
  $units = ( isset( $control['output']['units'] ) ) ? $control['output']['units'] : null;
60
  // Generate the styles
61
- $styles = $control['output']['element'] . '{' . $control['output']['property'] . ':' . $value . $units . ';}';
62
-
63
- return $styles;
 
 
64
 
65
  }
66
 
58
  // Do we have a unit specified?
59
  $units = ( isset( $control['output']['units'] ) ) ? $control['output']['units'] : null;
60
  // Generate the styles
61
+ if ( isset( $control['output']['element'] ) ) {
62
+ return $control['output']['element'] . '{' . $control['output']['property'] . ':' . $value . $units . ';}';
63
+ } else {
64
+ return null;
65
+ }
66
 
67
  }
68
 
kirki.php CHANGED
@@ -5,15 +5,15 @@ Plugin URI: http://kirki.org
5
  Description: An options framework using and extending the WordPress Customizer
6
  Author: Aristeides Stathopoulos
7
  Author URI: http://press.codes
8
- Version: 0.5
9
  */
10
 
11
  // Load Kirki_Fonts before everything else
12
  include_once( dirname( __FILE__ ) . '/includes/class-Kirki_Fonts.php' );
13
 
14
  /**
15
- * The main Kirki class
16
- */
17
  if ( ! class_exists( 'Kirki' ) ) :
18
  class Kirki {
19
 
5
  Description: An options framework using and extending the WordPress Customizer
6
  Author: Aristeides Stathopoulos
7
  Author URI: http://press.codes
8
+ Version: 0.5.1
9
  */
10
 
11
  // Load Kirki_Fonts before everything else
12
  include_once( dirname( __FILE__ ) . '/includes/class-Kirki_Fonts.php' );
13
 
14
  /**
15
+ * The main Kirki class
16
+ */
17
  if ( ! class_exists( 'Kirki' ) ) :
18
  class Kirki {
19
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://kirki.org
4
  Tags: customizer
5
  Requires at least: 3.9
6
  Tested up to: 4.1
7
- Stable tag: 0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -39,6 +39,10 @@ In addition you can also automatically generate the CSS for a lot of controls an
39
  Just install this plugin and activate it.
40
  For configuration instructions please visit http://kirki.org/#configuration
41
 
 
 
 
 
42
  == 0.5 ==
43
  * New: Automatic output of styles for generic controls.
44
  * New: Automatic output of styles + scripts for fonts (including googlefonts )
4
  Tags: customizer
5
  Requires at least: 3.9
6
  Tested up to: 4.1
7
+ Stable tag: 0.5.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
39
  Just install this plugin and activate it.
40
  For configuration instructions please visit http://kirki.org/#configuration
41
 
42
+ == 0.5.1 ==
43
+ * Fix: Transport defaults to refresh instead of postMessage
44
+ * Fix: undefined index notice.
45
+
46
  == 0.5 ==
47
  * New: Automatic output of styles for generic controls.
48
  * New: Automatic output of styles + scripts for fonts (including googlefonts )