Child Theme Configurator - Version 1.4.8.1

Version Description

Removed backtrace in main CSS parser regex due to high memory usage. This should fix the 500 Server errors from large parent stylesheets

Download this release

Release Info

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

Code changes from version 1.4.8 to 1.4.8.1

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.4.8
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.4.8');
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.4.8.1
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.4.8.1');
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.4.8
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -45,7 +45,7 @@ class Child_Theme_Configurator_CSS {
45
 
46
  function __construct($parent = '') {
47
  // scalars
48
- $this->version = '1.4.8';
49
  $this->querykey = 0;
50
  $this->selkey = 0;
51
  $this->qskey = 0;
@@ -460,13 +460,18 @@ class Child_Theme_Configurator_CSS {
460
  endif;
461
  endif;
462
  // break into @ segments
463
- $regex = '#(\@media[^\{]+?)\{(.*?\})\s*?\}#s'; // (((?!\@media).) backtrace too memory intensive - rolled back in v 1.4.8
464
- preg_match_all($regex, $this->styles, $matches);
465
- foreach ($matches[1] as $segment):
466
- $ruleset[trim($segment)] = array_shift($matches[2]) . (isset($ruleset[trim($segment)])?$ruleset[trim($segment)]:'');
 
 
 
 
 
 
467
  endforeach;
468
- // stripping rulesets leaves base styles
469
- $ruleset[$basequery] = preg_replace($regex, '', $this->styles);
470
  foreach ($ruleset as $query => $segment):
471
  // make sure there is semicolon before closing brace
472
  $segment = preg_replace('#(\})#', ";$1", $segment);
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.4.8.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
45
 
46
  function __construct($parent = '') {
47
  // scalars
48
+ $this->version = '1.4.8.1';
49
  $this->querykey = 0;
50
  $this->selkey = 0;
51
  $this->qskey = 0;
460
  endif;
461
  endif;
462
  // break into @ segments
463
+ foreach (array(
464
+ '#(\@media[^\{]+?)\{(\s*?)\}#', // get an placehoder (empty) media queries
465
+ '#(\@media[^\{]+?)\{(.*?\})?\s*?\}#s', // get all other media queries
466
+ ) as $regex): // (((?!\@media).) backtrace too memory intensive - rolled back in v 1.4.8.1
467
+ preg_match_all($regex, $this->styles, $matches);
468
+ foreach ($matches[1] as $segment):
469
+ $ruleset[trim($segment)] = array_shift($matches[2]) . (isset($ruleset[trim($segment)])?$ruleset[trim($segment)]:'');
470
+ endforeach;
471
+ // stripping rulesets leaves base styles
472
+ $this->styles = preg_replace($regex, '', $this->styles);
473
  endforeach;
474
+ $ruleset[$basequery] = $this->styles;
 
475
  foreach ($ruleset as $query => $segment):
476
  // make sure there is semicolon before closing brace
477
  $segment = preg_replace('#(\})#', ";$1", $segment);
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.4.8
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
@@ -20,7 +20,7 @@ class Child_Theme_Configurator_UI {
20
 
21
  function __construct() {
22
  $this->swatch_text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
23
- $this->extLink = '<a href="http://www.lilaeamedia.com/plugins/child-theme-configurator-plugins/" target="_blank" title="' . __('Easily customize your plugins with the CTC Plugin Extension', 'chld_thm_cfg') . '" style="float:right">' . __('Use this to customize your plugins', 'chld_thm_cfg') . '</a>';
24
  }
25
 
26
  function render_options() {
@@ -38,7 +38,7 @@ class Child_Theme_Configurator_UI {
38
  <div class="wrap">
39
  <div id="icon-tools" class="icon32"></div>
40
  <?php echo $this->extLink; ?>
41
- <h2><?php echo $chld_thm_cfg->pluginName; ?></h2>
42
  <div id="ctc_error_notice">
43
  <?php $this->settings_errors(); ?>
44
  </div>
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.4.8.1
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
20
 
21
  function __construct() {
22
  $this->swatch_text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
23
+ $this->extLink = '<a href="http://www.lilaeamedia.com/total-wordpress-customization-pagecells-responsive-theme-framework/" target="_blank" title="' . __('Total WordPress Customization with PageCells Responsive Theme Framework', 'chld_thm_cfg') . '" style="float:right">' . __('Need a theme that gives you total control?', 'chld_thm_cfg') . '</a>';
24
  }
25
 
26
  function render_options() {
38
  <div class="wrap">
39
  <div id="icon-tools" class="icon32"></div>
40
  <?php echo $this->extLink; ?>
41
+ <h2><?php echo $chld_thm_cfg->pluginName; ?> v.<?php echo CHLD_THM_CFG_VERSION;?></h2>
42
  <div id="ctc_error_notice">
43
  <?php $this->settings_errors(); ?>
44
  </div>
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.4.8
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.4.8.1
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.4.8
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.4.8.1
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.4.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -48,6 +48,14 @@ https://www.youtube.com/watch?v=mJ3i6gsuL1E
48
 
49
  Learn more at http://www.lilaeamedia.com/plugins/child-theme-plugin-styles
50
 
 
 
 
 
 
 
 
 
51
  = IntelliWidget Responsive Menu =
52
 
53
  Break free from your theme's built-in responsive menu options and take control over the mobile user experience with our premium menu plugin.
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.4.8.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
48
 
49
  Learn more at http://www.lilaeamedia.com/plugins/child-theme-plugin-styles
50
 
51
+ = Build your WordPress website exactly the way you want it. =
52
+
53
+ PageCells is a WordPress theme framework aimed at web developers and website designers who use WordPress to build multiple websites. Everything about the site is configurable through an innovative drag-and-drop interface, from the number and position of sidebar widget areas to the sequence and behavior of post meta data.
54
+
55
+ https://www.youtube.com/watch?v=q6g2Jm7bf3U
56
+
57
+ Learn more at http://www.lilaeamedia.com/total-wordpress-customization-pagecells-responsive-theme-framework
58
+
59
  = IntelliWidget Responsive Menu =
60
 
61
  Break free from your theme's built-in responsive menu options and take control over the mobile user experience with our premium menu plugin.