Child Theme Configurator - Version 2.2.8

Version Description

  • Fixed CSS class loading FALSE for dictionaries on fresh install
  • Fixed using wrong nonce for plugin mode preview (Pro)
  • Fixed error thrown when packing negative integers (Pro)
Download this release

Release Info

Developer lilaeamedia
Plugin Icon 128x128 Child Theme Configurator
Version 2.2.8
Comparing to
See all releases

Code changes from version 2.2.7 to 2.2.8

child-theme-configurator.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.childthemeconfigurator.com
8
  Description: When using the Customizer is not enough - Create child themes and customize styles, templates, functions and more.
9
- Version: 2.2.7
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com
12
  Text Domain: child-theme-configurator
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.childthemeconfigurator.com
8
  Description: When using the Customizer is not enough - Create child themes and customize styles, templates, functions and more.
9
+ Version: 2.2.8
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com
12
  Text Domain: child-theme-configurator
includes/classes/Admin.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
6
  Class: ChildThemeConfiguratorAdmin
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Main Controller Class
9
- Version: 2.2.7
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: child-theme-configurator
@@ -344,7 +344,8 @@ class ChildThemeConfiguratorAdmin {
344
 
345
  function ajax_analyze() {
346
  $this->is_ajax = TRUE;
347
- if ( $this->validate_post( 'ctc_update' ) ):
 
348
  $analysis = new ChildThemeConfiguratorAnalysis();
349
  $analysis->fetch_page();
350
  die( json_encode( $analysis->get_analysis() ) );
6
  Class: ChildThemeConfiguratorAdmin
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Main Controller Class
9
+ Version: 2.2.8
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: child-theme-configurator
344
 
345
  function ajax_analyze() {
346
  $this->is_ajax = TRUE;
347
+ do_action( 'chld_thm_cfg_pluginmode' );
348
+ if ( $this->validate_post( apply_filters( 'chld_thm_cfg_action', 'ctc_update' ) ) ):
349
  $analysis = new ChildThemeConfiguratorAnalysis();
350
  $analysis->fetch_page();
351
  die( json_encode( $analysis->get_analysis() ) );
includes/classes/CSS.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Handles all CSS input, output, parsing, normalization and storage
9
- Version: 2.2.7
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -167,7 +167,7 @@ class ChildThemeConfiguratorCSS {
167
  $this->parnt = '';
168
  $this->ignoreparnt = 0;
169
  $this->qpriority = 10;
170
- $this->version = '2.2.7';
171
 
172
  // do not set enqueue, not being set is used to flag old versions
173
 
@@ -204,13 +204,20 @@ class ChildThemeConfiguratorCSS {
204
  if ( !$this->dicts[ $key ] ): // dict not loaded yet
205
  //$this->ctc()->debug( 'memory before load: ' . $this->mem_chk(), __FUNCTION__, __CLASS__ );
206
  //$this->ctc()->debug( $option . '_' . $key . ' -- called from ' . $caller, __FUNCTION__, __CLASS__ );
207
- $this->{ $key } = $this->ctc()->is_new ? array() : get_site_option( $option . '_' . $key );
 
 
 
 
 
 
208
  $this->dicts[ $key ] = 1; // flag as loaded
209
  //$this->ctc()->debug( 'memory after load: ' . $this->mem_chk(), __FUNCTION__, __CLASS__ );
210
  else:
211
  //$this->ctc()->debug( $key . ' already loaded -- called from ' . $caller, __FUNCTION__, __CLASS__ );
212
  endif;
213
  endif;
 
214
  if ( empty( $key ) && !isset( $this->enqueue ) ):
215
  $option = CHLD_THM_CFG_OPTIONS . apply_filters( 'chld_thm_cfg_option', '' );
216
  //$this->ctc()->debug( 'loading option: ' . $option . '_' . ( $key ? $key : 'configvars' )
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Handles all CSS input, output, parsing, normalization and storage
9
+ Version: 2.2.8
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
167
  $this->parnt = '';
168
  $this->ignoreparnt = 0;
169
  $this->qpriority = 10;
170
+ $this->version = '2.2.8';
171
 
172
  // do not set enqueue, not being set is used to flag old versions
173
 
204
  if ( !$this->dicts[ $key ] ): // dict not loaded yet
205
  //$this->ctc()->debug( 'memory before load: ' . $this->mem_chk(), __FUNCTION__, __CLASS__ );
206
  //$this->ctc()->debug( $option . '_' . $key . ' -- called from ' . $caller, __FUNCTION__, __CLASS__ );
207
+ //
208
+ if ( !$this->ctc()->is_new && ( $config = get_site_option( $option . '_' . $key ) ) ):
209
+ $this->{ $key } = $config; // if not new child theme and option exists, load it
210
+ else:
211
+ $this->{ $key } = array(); // otherwise load empty array
212
+ endif;
213
+
214
  $this->dicts[ $key ] = 1; // flag as loaded
215
  //$this->ctc()->debug( 'memory after load: ' . $this->mem_chk(), __FUNCTION__, __CLASS__ );
216
  else:
217
  //$this->ctc()->debug( $key . ' already loaded -- called from ' . $caller, __FUNCTION__, __CLASS__ );
218
  endif;
219
  endif;
220
+ // initial setup
221
  if ( empty( $key ) && !isset( $this->enqueue ) ):
222
  $option = CHLD_THM_CFG_OPTIONS . apply_filters( 'chld_thm_cfg_option', '' );
223
  //$this->ctc()->debug( 'loading option: ' . $option . '_' . ( $key ? $key : 'configvars' )
includes/classes/Core.php CHANGED
@@ -14,7 +14,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
14
  define( 'LILAEAMEDIA_URL', "http://www.lilaeamedia.com" );
15
  defined( 'CHLD_THM_CFG_DOCS_URL' ) or
16
  define( 'CHLD_THM_CFG_DOCS_URL', "http://www.childthemeconfigurator.com" );
17
- define( 'CHLD_THM_CFG_VERSION', '2.2.7' );
18
  define( 'CHLD_THM_CFG_PREV_VERSION', '1.7.9.1' );
19
  define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
20
  define( 'CHLD_THM_CFG_PRO_MIN_VERSION', '2.2.0' );
14
  define( 'LILAEAMEDIA_URL', "http://www.lilaeamedia.com" );
15
  defined( 'CHLD_THM_CFG_DOCS_URL' ) or
16
  define( 'CHLD_THM_CFG_DOCS_URL', "http://www.childthemeconfigurator.com" );
17
+ define( 'CHLD_THM_CFG_VERSION', '2.2.8' );
18
  define( 'CHLD_THM_CFG_PREV_VERSION', '1.7.9.1' );
19
  define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
20
  define( 'CHLD_THM_CFG_PRO_MIN_VERSION', '2.2.0' );
includes/classes/Packer.php CHANGED
@@ -173,8 +173,9 @@ class ChildThemeConfiguratorPacker {
173
  }
174
 
175
  }
176
- // no negative integers allowed
177
- throw new PackingFailedException( $value, 'Unsupported type.' );
 
178
  }
179
 
180
  function unpack() {
173
  }
174
 
175
  }
176
+ // treat negative integers as strings
177
+ return $this->packStr( (string) $num );
178
+ //throw new PackingFailedException( $num, 'Unsupported type.' );
179
  }
180
 
181
  function unpack() {
includes/classes/UI.php CHANGED
@@ -5,7 +5,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
5
  Class: ChildThemeConfiguratorUI
6
  Plugin URI: http://www.childthemeconfigurator.com/
7
  Description: Handles the plugin User Interface
8
- Version: 2.2.7
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
5
  Class: ChildThemeConfiguratorUI
6
  Plugin URI: http://www.childthemeconfigurator.com/
7
  Description: Handles the plugin User Interface
8
+ Version: 2.2.8
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
js/chldthmcfg.js CHANGED
@@ -2,14 +2,14 @@
2
  * Script: chldthmcfg.js
3
  * Plugin URI: http://www.childthemeconfigurator.com/
4
  * Description: Handles jQuery, AJAX and other UI
5
- * Version: 2.2.7
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
9
  * Copyright (C) 2014-2017 Lilaea Media
10
  */
11
 
12
- // ** for muliple property values: **
13
  // make sure sequence is passed with rule/val updates
14
  // determine sequence based on sequence of value array
15
  // add sequence to input name
2
  * Script: chldthmcfg.js
3
  * Plugin URI: http://www.childthemeconfigurator.com/
4
  * Description: Handles jQuery, AJAX and other UI
5
+ * Version: 2.2.8
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
9
  * Copyright (C) 2014-2017 Lilaea Media
10
  */
11
 
12
+ // ** for multiple property values: **
13
  // make sure sequence is passed with rule/val updates
14
  // determine sequence based on sequence of value array
15
  // add sequence to input name
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: child, theme, child theme, child themes, custom styles, customize styles, customize theme, css, responsive, css editor, child theme editor, child theme generator, child theme creator, style, stylesheet, customizer, childtheme, childthemes
5
  Requires at least: 4.0
6
  Tested up to: 4.8
7
- Stable tag: 2.2.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -147,7 +147,7 @@ No. Child Theme Configurator is designed to work independently of themes and plu
147
 
148
  = How do I add comments? =
149
 
150
- Arbitrary comments are not supported. Providing a high level of flexibility for previewing and modifying custom styles requires sophisticated parsing and data structures. Maintaining comments that bound to any particular element in the stylesheet is prohibitively expensive compared to the value it would add. Although we are working to include this as an option in the future, currently all comments are stripped from the child theme stylesheet code.
151
 
152
  = Does it work with Multisite? =
153
 
@@ -287,8 +287,14 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
287
  7. Files tab
288
 
289
  == Changelog ==
 
 
 
 
 
290
  = 2.2.7 =
291
  * Disable Pagespeed in preview
 
292
  = 2.2.6 =
293
  * Fixed Preview and Analyzer for some child theme configurations by removing nonce requirement
294
  * Fixed header not being repaired on first pass with "Repair Header" selected
@@ -649,7 +655,7 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
649
  * Initial release.
650
 
651
  == Upgrade Notice ==
652
- 2.2.7 Fixes issues with Google Pageseed in preview and analyzer.
653
 
654
  == Query/Selector Tab ==
655
 
@@ -728,7 +734,7 @@ Some themes (particularly commercial themes) do not correctly load parent templa
728
 
729
  == Caveats ==
730
 
731
- * Arbitrary comments are not supported. Providing a high level of flexibility for previewing and modifying custom styles requires a sophisticated parsing system. Maintaining comments that bound to any particular element in the stylesheet is prohibitively expensive compared to the value it would add. Although we are working to include this as an option in the future, currently all comments are stripped from the child theme stylesheet code.
732
  * No @keyframes or @font-face rules. Child Theme Configurator only supports @media and @import. If you need other @rules, put them in a separate stylesheet and import them into the Child Theme stylesheet.
733
  * Only two-color gradients. Child Theme Configurator is powerful, but we have simplified the gradient interface. You can use any gradient you want as long as it has two colors and no intermediate stops.
734
  * CSS properties are auto-discovered. Child Theme Configurator loads the properties that exist in the Parent stylesheet. You can always add new properties using the “Raw CSS” text area.
4
  Tags: child, theme, child theme, child themes, custom styles, customize styles, customize theme, css, responsive, css editor, child theme editor, child theme generator, child theme creator, style, stylesheet, customizer, childtheme, childthemes
5
  Requires at least: 4.0
6
  Tested up to: 4.8
7
+ Stable tag: 2.2.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
147
 
148
  = How do I add comments? =
149
 
150
+ Arbitrary comments are not supported. Providing a high level of flexibility for previewing and modifying custom styles requires sophisticated parsing and data structures. Maintaining comments that are bound to any particular element in the stylesheet is prohibitively expensive compared to the value it would add. Although we are working to include this as an option in the future, currently all comments are stripped from the child theme stylesheet code.
151
 
152
  = Does it work with Multisite? =
153
 
287
  7. Files tab
288
 
289
  == Changelog ==
290
+ = 2.2.8 =
291
+ * Fixed CSS class loading FALSE for dictionaries on fresh install
292
+ * Fixed using wrong nonce for plugin mode preview (Pro)
293
+ * Fixed error thrown when packing negative integers (Pro)
294
+
295
  = 2.2.7 =
296
  * Disable Pagespeed in preview
297
+
298
  = 2.2.6 =
299
  * Fixed Preview and Analyzer for some child theme configurations by removing nonce requirement
300
  * Fixed header not being repaired on first pass with "Repair Header" selected
655
  * Initial release.
656
 
657
  == Upgrade Notice ==
658
+ 2.2.8 Several bug fixes. See changelog for details.
659
 
660
  == Query/Selector Tab ==
661
 
734
 
735
  == Caveats ==
736
 
737
+ * Arbitrary comments are not supported. Providing a high level of flexibility for previewing and modifying custom styles requires a sophisticated parsing system. Maintaining comments that are bound to any particular element in the stylesheet is prohibitively expensive compared to the value it would add. Although we are working to include this as an option in the future, currently all comments are stripped from the child theme stylesheet code.
738
  * No @keyframes or @font-face rules. Child Theme Configurator only supports @media and @import. If you need other @rules, put them in a separate stylesheet and import them into the Child Theme stylesheet.
739
  * Only two-color gradients. Child Theme Configurator is powerful, but we have simplified the gradient interface. You can use any gradient you want as long as it has two colors and no intermediate stops.
740
  * CSS properties are auto-discovered. Child Theme Configurator loads the properties that exist in the Parent stylesheet. You can always add new properties using the “Raw CSS” text area.