Child Theme Configurator - Version 2.3.0.3

Version Description

  • check file size during template scan to prevent timeout
  • changed syntax of statement that was being flagged by WP Defender
Download this release

Release Info

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

Code changes from version 2.3.0.2 to 2.3.0.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.childthemeconfigurator.com
8
  Description: When using the Customizer is not enough - Create child themes and customize styles, templates, functions and more.
9
- Version: 2.3.0.2
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.3.0.3
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.3.0.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: child-theme-configurator
@@ -1236,18 +1236,22 @@ defined( 'CHLD_THM_CFG_IGNORE_PARENT' ) or define( 'CHLD_THM_CFG_IGNORE_PARENT',
1236
  $this->debug( 'scanning ' . $file_verified . '... ', __FUNCTION__, __CLASS__ );
1237
  // read 2k at a time and bail if code detected
1238
  $template = FALSE;
 
1239
  if ( $handle = fopen( $file_verified, "rb") ):
1240
- while ( !feof( $handle ) ) {
1241
- $contents = fread($handle, 2048);
1242
- if ( preg_match( "/\w+\s*\(/", $contents ) ):
1243
- $template = TRUE;
1244
- if ( preg_match( "/(function \w+?|require(_once)?)\s*\(/", $contents ) ):
1245
- $template = FALSE;
1246
  break;
 
 
 
 
 
 
 
1247
  endif;
1248
- endif;
1249
- }
1250
- fclose( $handle );
1251
  endif;
1252
  if ( $template )
1253
  $this->files[ $theme ][ 'template' ][] = $file;
6
  Class: ChildThemeConfiguratorAdmin
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Main Controller Class
9
+ Version: 2.3.0.3
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: child-theme-configurator
1236
  $this->debug( 'scanning ' . $file_verified . '... ', __FUNCTION__, __CLASS__ );
1237
  // read 2k at a time and bail if code detected
1238
  $template = FALSE;
1239
+ $size = 0;
1240
  if ( $handle = fopen( $file_verified, "rb") ):
1241
+ while ( !feof( $handle ) ):
1242
+ $size += 2048;
1243
+ if ( $size > 2048 * 10 ) // if larger than 20k this ain't a template
 
 
 
1244
  break;
1245
+ $contents = fread($handle, 2048);
1246
+ if ( preg_match( "/\w+\s*\(/", $contents ) ):
1247
+ $template = TRUE;
1248
+ if ( preg_match( "/(function \w+?|require(_once)?)\s*\(/", $contents ) ):
1249
+ $template = FALSE;
1250
+ break;
1251
+ endif;
1252
  endif;
1253
+ endwhile;
1254
+ fclose( $handle );
 
1255
  endif;
1256
  if ( $template )
1257
  $this->files[ $theme ][ 'template' ][] = $file;
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.3.0.2
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.3.0.2';
171
 
172
  // do not set enqueue, not being set is used to flag old versions
173
 
@@ -1484,8 +1484,10 @@ class ChildThemeConfiguratorCSS {
1484
  if ( $gradient = $this->decode_gradient( $value ) ):
1485
  // standard gradient
1486
  foreach( array( 'moz', 'webkit', 'o', 'ms' ) as $prefix ):
1487
- $rule_output[ 'background-image: -' . $prefix . '-' . 'linear-gradient(' . $gradient[ 'origin' ] . ', '
1488
- . $gradient[ 'color1' ] . ', ' . $gradient[ 'color2' ] . ')' . $importantstr ] = $this->sortstr( $rule, $rulevalid++ );
 
 
1489
  endforeach;
1490
  // W3C standard gradient
1491
  // rotate origin 90 degrees
@@ -1501,8 +1503,10 @@ class ChildThemeConfiguratorCSS {
1501
  endforeach;
1502
  $org = 'to ' . implode( ' ', $dirs );
1503
  endif;
1504
- $rule_output[ 'background-image: linear-gradient(' . $org . ', '
1505
- . $gradient[ 'color1' ] . ', ' . $gradient[ 'color2' ] . ')' . $importantstr ] = $this->sortstr( $rule, $rulevalid );
 
 
1506
 
1507
  // legacy webkit gradient - we'll add if there is demand
1508
  // '-webkit-gradient(linear,' .$origin . ', ' . $color1 . ', '. $color2 . ')';
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Handles all CSS input, output, parsing, normalization and storage
9
+ Version: 2.3.0.3
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.3.0.3';
171
 
172
  // do not set enqueue, not being set is used to flag old versions
173
 
1484
  if ( $gradient = $this->decode_gradient( $value ) ):
1485
  // standard gradient
1486
  foreach( array( 'moz', 'webkit', 'o', 'ms' ) as $prefix ):
1487
+ // build key before dereferencing array - v.2.3.0.3
1488
+ $propkey = 'background-image: -' . $prefix . '-' . 'linear-gradient(' . $gradient[ 'origin' ] . ', '
1489
+ . $gradient[ 'color1' ] . ', ' . $gradient[ 'color2' ] . ')' . $importantstr;
1490
+ $rule_output[ $propkey ] = $this->sortstr( $rule, $rulevalid++ );
1491
  endforeach;
1492
  // W3C standard gradient
1493
  // rotate origin 90 degrees
1503
  endforeach;
1504
  $org = 'to ' . implode( ' ', $dirs );
1505
  endif;
1506
+ // build key before dereferencing array - v.2.3.0.3
1507
+ $propkey = 'background-image: linear-gradient(' . $org . ', '
1508
+ . $gradient[ 'color1' ] . ', ' . $gradient[ 'color2' ] . ')' . $importantstr;
1509
+ $rule_output[ $propkey ] = $this->sortstr( $rule, $rulevalid );
1510
 
1511
  // legacy webkit gradient - we'll add if there is demand
1512
  // '-webkit-gradient(linear,' .$origin . ', ' . $color1 . ', '. $color2 . ')';
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.3.0.2' );
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.3.0.3' );
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/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.3.0.2
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.3.0.3
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
js/chldthmcfg.js CHANGED
@@ -2,7 +2,7 @@
2
  * Script: chldthmcfg.js
3
  * Plugin URI: http://www.childthemeconfigurator.com/
4
  * Description: Handles jQuery, AJAX and other UI
5
- * Version: 2.3.0.2
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
2
  * Script: chldthmcfg.js
3
  * Plugin URI: http://www.childthemeconfigurator.com/
4
  * Description: Handles jQuery, AJAX and other UI
5
+ * Version: 2.3.0.3
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: child, theme, child theme, child themes, custom styles, customize styles,
5
  Requires at least: 4.0
6
  Requires PHP: 5.6.36
7
  Tested up to: 4.9
8
- Stable tag: 2.3.0.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -288,7 +288,9 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
288
  7. Files tab
289
 
290
  == Changelog ==
291
-
 
 
292
  = 2.3.0.2 =
293
  * Fixed bug in screenshot copy.
294
  = 2.3.0.1 =
@@ -542,7 +544,7 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
542
  * Initial release.
543
 
544
  == Upgrade Notice ==
545
- 2.3.0 Several bug fixes and functionality improvements. See changelog for details.
546
 
547
  == Query/Selector Tab ==
548
 
5
  Requires at least: 4.0
6
  Requires PHP: 5.6.36
7
  Tested up to: 4.9
8
+ Stable tag: 2.3.0.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
288
  7. Files tab
289
 
290
  == Changelog ==
291
+ = 2.3.0.3 =
292
+ * check file size during template scan to prevent timeout
293
+ * changed syntax of statement that was being flagged by WP Defender
294
  = 2.3.0.2 =
295
  * Fixed bug in screenshot copy.
296
  = 2.3.0.1 =
544
  * Initial release.
545
 
546
  == Upgrade Notice ==
547
+ 2.3.0.x Several bug fixes and functionality improvements. See changelog for details.
548
 
549
  == Query/Selector Tab ==
550