Child Theme Configurator - Version 1.5.3

Version Description

  • Fixed a bug in the way zero values are handled that was breaking css output in certian situations
  • Added regex filter for non-printable (e.g., null) characters in input strings
Download this release

Release Info

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

Code changes from version 1.5.2.2 to 1.5.3

child-theme-configurator.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Create a Child Theme from any installed Theme. Each CSS selector, rule and value can then be searched, previewed and modified.
9
- Version: 1.5.2.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -16,7 +16,7 @@ if ( !defined('ABSPATH')) exit;
16
  */
17
 
18
  defined('LF') or define('LF', "\n");
19
- define('CHLD_THM_CFG_VERSION', '1.5.2.2');
20
  define('CHLD_THM_CFG_MAX_SELECTORS', '50000');
21
  define('CHLD_THM_CFG_MAX_RECURSE_LOOPS', '1000');
22
 
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Create a Child Theme from any installed Theme. Each CSS selector, rule and value can then be searched, previewed and modified.
9
+ Version: 1.5.3
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
16
  */
17
 
18
  defined('LF') or define('LF', "\n");
19
+ define('CHLD_THM_CFG_VERSION', '1.5.3');
20
  define('CHLD_THM_CFG_MAX_SELECTORS', '50000');
21
  define('CHLD_THM_CFG_MAX_RECURSE_LOOPS', '1000');
22
 
includes/class-ctc-css.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
6
  Class: Child_Theme_Configurator_CSS
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Handles all CSS output, parsing, normalization
9
- Version: 1.5.2.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -46,7 +46,7 @@ class Child_Theme_Configurator_CSS {
46
 
47
  function __construct($parent = '') {
48
  // scalars
49
- $this->version = '1.5.2.2';
50
  $this->querykey = 0;
51
  $this->selkey = 0;
52
  $this->qskey = 0;
@@ -202,6 +202,7 @@ class Child_Theme_Configurator_CSS {
202
  ),
203
  );
204
  endif;
 
205
  if (!isset($this->dict_seq[$this->qskey]))
206
  $this->dict_seq[$this->qskey] = $this->qskey;
207
  // set data and value
@@ -418,7 +419,7 @@ class Child_Theme_Configurator_CSS {
418
  }
419
 
420
  function sanitize($styles) {
421
- return sanitize_text_field($styles);
422
  }
423
 
424
  function esc_octal($styles){
@@ -521,7 +522,7 @@ class Child_Theme_Configurator_CSS {
521
  foreach ($rules as $rule):
522
  $value = trim(array_shift($values));
523
  // normalize zero values
524
- $value = preg_replace('#([: ])0(px|r?em)#', "$1\0", $value);
525
  // normalize gradients
526
  if (FALSE !== strpos($value, 'gradient')):
527
  if (FALSE !== strpos($rule, 'filter')):
@@ -573,9 +574,13 @@ class Child_Theme_Configurator_CSS {
573
  if (!empty($this->val_ndx[$qsid])):
574
  $shorthand = array();
575
  foreach ($this->val_ndx[$qsid] as $ruleid => $valid):
576
- if (isset($valid['child']) && isset($valarr[$valid['child']]) && '' !== $valarr[$valid['child']]):
 
 
 
577
  if (! $has_value):
578
- $sel_output .= isset($this->dict_seq[$qsid])?'/*' . $this->dict_seq[$qsid] . '*/' . LF:''; // show load order
 
579
  $sel_output .= $sel . ' {' . LF;
580
  $has_value = 1;
581
  $has_selector = 1;
6
  Class: Child_Theme_Configurator_CSS
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Handles all CSS output, parsing, normalization
9
+ Version: 1.5.3
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
46
 
47
  function __construct($parent = '') {
48
  // scalars
49
+ $this->version = '1.5.3';
50
  $this->querykey = 0;
51
  $this->selkey = 0;
52
  $this->qskey = 0;
202
  ),
203
  );
204
  endif;
205
+ // update sequence for this selector if this is a later instance to keep cascade priority
206
  if (!isset($this->dict_seq[$this->qskey]))
207
  $this->dict_seq[$this->qskey] = $this->qskey;
208
  // set data and value
419
  }
420
 
421
  function sanitize($styles) {
422
+ return sanitize_text_field(preg_replace( '/[^[:print:]]/', '', $styles));
423
  }
424
 
425
  function esc_octal($styles){
522
  foreach ($rules as $rule):
523
  $value = trim(array_shift($values));
524
  // normalize zero values
525
+ $value = preg_replace('#\b0(px|r?em)#', '0', $value);
526
  // normalize gradients
527
  if (FALSE !== strpos($value, 'gradient')):
528
  if (FALSE !== strpos($rule, 'filter')):
574
  if (!empty($this->val_ndx[$qsid])):
575
  $shorthand = array();
576
  foreach ($this->val_ndx[$qsid] as $ruleid => $valid):
577
+ if (isset($valid['child'])
578
+ && isset($valarr[$valid['child']])
579
+ && '' !== $valarr[$valid['child']]
580
+ && (!isset($valid['parnt']) || $valid['parnt'] != $valid['child'])):
581
  if (! $has_value):
582
+ $sel_output .= isset($this->dict_seq[$qsid])?'/*' . $this->dict_seq[$qsid] . '*/' . LF:'';
583
+ // show load order
584
  $sel_output .= $sel . ' {' . LF;
585
  $has_value = 1;
586
  $has_selector = 1;
includes/class-ctc-ui.php CHANGED
@@ -5,7 +5,7 @@ if ( !defined('ABSPATH')) exit;
5
  Class: Child_Theme_Configurator_UI
6
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
7
  Description: Handles the plugin User Interface
8
- Version: 1.5.2.2
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
5
  Class: Child_Theme_Configurator_UI
6
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
7
  Description: Handles the plugin User Interface
8
+ Version: 1.5.3
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
includes/class-ctc.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Main Controller Class
9
- Version: 1.5.2.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Main Controller Class
9
+ Version: 1.5.3
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
js/chld-thm-cfg.js CHANGED
@@ -2,7 +2,7 @@
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
4
  * Description: Handles jQuery, AJAX and other UI
5
- * Version: 1.5.2.2
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
4
  * Description: Handles jQuery, AJAX and other UI
5
+ * Version: 1.5.3
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
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, custom theme, CSS, responsive design, CSS editor, theme generator
5
  Requires at least: 3.7
6
  Tested up to: 4.0
7
- Stable tag: 1.5.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -83,6 +83,16 @@ Learn more at http://www.lilaeamedia.com/plugins/intelliwidget-responsive-menu
83
 
84
  == Frequently Asked Questions ==
85
 
 
 
 
 
 
 
 
 
 
 
86
  = Why are my menus displaying incorrectly when I activate the new child theme? =
87
  ...or...
88
  = Why is my custom header missing when I activate the new child theme? =
@@ -226,9 +236,12 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
226
 
227
  == Changelog ==
228
 
 
 
 
 
229
  = 1.5.2.2 =
230
- * Adding the additional styles to the parent CSS preview in v1.5.2(.1) introduced a bug
231
- * that copied all of the parent styles to the child stylesheet. This is fixed in v1.5.2.2.
232
  * Rolled back changes to the javascript controller that introduced a number of type errors.
233
  * Tweaked preview ajax call to handle ssl.
234
 
@@ -378,7 +391,7 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
378
 
379
  == Upgrade Notice ==
380
 
381
- v.1.5.2.2 fixes a number of bugs that were introduced in v1.5.2(.1). See changelog for details.
382
 
383
  == Create Your Child Theme ==
384
 
4
  Tags: child theme, custom theme, CSS, responsive design, CSS editor, theme generator
5
  Requires at least: 3.7
6
  Tested up to: 4.0
7
+ Stable tag: 1.5.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
83
 
84
  == Frequently Asked Questions ==
85
 
86
+ = HELP! I changed a file and now I am unable to access my website or login to wp-admin to fix it! =
87
+
88
+ To back out of a broken theme you have to manually rename the offending theme directory name (via FTP, SSH or your web host control panel file manager) so that WordPress can’t find it. WordPress will then throw an error and revert back to the default theme (currently twenty-fourteen).
89
+
90
+ The child theme is in your themes folder, usually
91
+
92
+ [wordpress]/wp-content/themes/[child-theme]
93
+
94
+ To prevent this in the future, always test your child themes with Live Preview before activating them.
95
+
96
  = Why are my menus displaying incorrectly when I activate the new child theme? =
97
  ...or...
98
  = Why is my custom header missing when I activate the new child theme? =
236
 
237
  == Changelog ==
238
 
239
+ = 1.5.3 =
240
+ * Fixed a bug in the way zero values are handled that was breaking css output in certian situations
241
+ * Added regex filter for non-printable (e.g., null) characters in input strings
242
+
243
  = 1.5.2.2 =
244
+ * Fixed a bug introduced in v1.5.2(.1) that copied all of the parent styles to the child stylesheet. This should only be an issue for 'background-image' styles that reference images in the parent theme and do not have child theme overrides. If you need to remove all styles generated by this bug, install the development version, otherwise delete the redundant child values or just wait for the v1.5.3 release.
 
245
  * Rolled back changes to the javascript controller that introduced a number of type errors.
246
  * Tweaked preview ajax call to handle ssl.
247
 
391
 
392
  == Upgrade Notice ==
393
 
394
+ v.1.5.3 fixes a number of bugs. See changelog for details.
395
 
396
  == Create Your Child Theme ==
397