Child Theme Configurator - Version 1.6.5.1

Version Description

  • Fix: undefined constant LILAEAMEDIA_URL
  • Fix: logic to determine whether to display config notice
Download this release

Release Info

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

Code changes from version 1.6.5 to 1.6.5.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 and customize the stylesheet and templates. Fast CSS editor lets you search, preview and modify by selector, rule or value.
9
- Version: 1.6.5
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -15,15 +15,23 @@ if ( !defined( 'ABSPATH' ) ) exit;
15
  Copyright (C) 2014-2015 Lilaea Media
16
  */
17
 
18
- defined( 'LF' ) or define( 'LF', "\n" );
19
- define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
20
- define( 'CHLD_THM_CFG_VERSION', '1.6.5' );
21
- define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
22
- define( 'CHLD_THM_CFG_BPSEL', '2500' );
23
- define( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS', '1000' );
24
- define( 'CHLD_THM_CFG_MENU', 'chld_thm_cfg_menu' );
25
- define( 'CHLD_THM_CFG_DIR', dirname( __FILE__ ) );
26
- define( 'CHLD_THM_CFG_URL', plugin_dir_url( __FILE__ ) );
 
 
 
 
 
 
 
 
27
 
28
  class ChildThemeConfigurator {
29
  static $instance;
@@ -100,7 +108,9 @@ if ( !defined( 'ABSPATH' ) ) exit;
100
  static function version_notice() {
101
  deactivate_plugins( plugin_basename( __FILE__ ) );
102
  unset( $_GET[ 'activate' ] );
103
- echo '<div class="update-nag"><p>' . sprintf( __( 'Child Theme Configurator requires WordPress version %s or later.', 'chld_thm_cfg' ), CHLD_THM_CFG_MIN_WP_VERSION ) . '</p></div>' . LF;
 
 
104
  }
105
  }
106
 
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Create a Child Theme and customize the stylesheet and templates. Fast CSS editor lets you search, preview and modify by selector, rule or value.
9
+ Version: 1.6.5.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
15
  Copyright (C) 2014-2015 Lilaea Media
16
  */
17
 
18
+ defined( 'LF' ) or define( 'LF', "\n" );
19
+ defined( 'LILAEAMEDIA_URL' ) or
20
+ define( 'LILAEAMEDIA_URL', "http://www.lilaeamedia.com" );
21
+ defined( 'CHLD_THM_CFG_OPTIONS' ) or
22
+ define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
23
+ define( 'CHLD_THM_CFG_VERSION', '1.6.5.1' );
24
+ define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
25
+ defined( 'CHLD_THM_CFG_BPSEL' ) or
26
+ define( 'CHLD_THM_CFG_BPSEL', '2500' );
27
+ defined( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS' ) or
28
+ define( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS', '1000' );
29
+ defined( 'CHLD_THM_CFG_MENU' ) or
30
+ define( 'CHLD_THM_CFG_MENU', 'chld_thm_cfg_menu' );
31
+ defined( 'CHLD_THM_CFG_DIR' ) or
32
+ define( 'CHLD_THM_CFG_DIR', dirname( __FILE__ ) );
33
+ defined( 'CHLD_THM_CFG_URL' ) or
34
+ define( 'CHLD_THM_CFG_URL', plugin_dir_url( __FILE__ ) );
35
 
36
  class ChildThemeConfigurator {
37
  static $instance;
108
  static function version_notice() {
109
  deactivate_plugins( plugin_basename( __FILE__ ) );
110
  unset( $_GET[ 'activate' ] );
111
+ echo '<div class="update-nag"><p>' .
112
+ sprintf( __( 'Child Theme Configurator requires WordPress version %s or later.', 'chld_thm_cfg' ),
113
+ CHLD_THM_CFG_MIN_WP_VERSION ) . '</p></div>' . LF;
114
  }
115
  }
116
 
includes/class-ctc-css.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Handles all CSS output, parsing, normalization
9
- Version: 1.6.5
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Handles all CSS output, parsing, normalization
9
+ Version: 1.6.5.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
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.6.5
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.6.5.1
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.6.5
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -104,7 +104,7 @@ class ChildThemeConfiguratorAdmin {
104
  $this->ui->render();
105
  }
106
  function enqueue_scripts() {
107
- wp_enqueue_style( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'css/chld-thm-cfg.css', array(), '1.6.5' );
108
 
109
  // we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
110
  // this will be updated in a later release to use WP Core scripts when it is widely adopted
@@ -237,11 +237,17 @@ class ChildThemeConfiguratorAdmin {
237
  function load_config() {
238
  include_once( CHLD_THM_CFG_DIR . '/includes/class-ctc-css.php' );
239
  $this->css = new ChildThemeConfiguratorCSS();
240
- // if not new format or themes do not exist reinitialize
241
- if ( FALSE === $this->css->load_config()
242
- || ! $this->check_theme_exists( $this->css->get_prop( 'child' ) )
243
- || ! $this->check_theme_exists( $this->css->get_prop( 'parnt' ) ) ):
244
- $this->css = new ChildThemeConfiguratorCSS();
 
 
 
 
 
 
245
  endif;
246
  if ( $this->is_get ):
247
  if ( $this->css->get_prop( 'child' ) ):
@@ -256,9 +262,6 @@ class ChildThemeConfiguratorAdmin {
256
  if ( !isset( $this->css->enqueue ) ):
257
  add_action( 'admin_notices', array( $this, 'enqueue_notice' ) );
258
  endif;
259
- // check for first run
260
- elseif ( !isset( $this->css->enqueue ) ):
261
- add_action( 'admin_notices', array( $this, 'config_notice' ) );
262
  endif;
263
  // check if max selectors reached
264
  if ( isset( $this->css->max_sel ) && $this->css->max_sel ):
@@ -1179,7 +1182,7 @@ add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
1179
  function config_notice() {
1180
  ?>
1181
  <div class="update-nag">
1182
- <p><?php _e( 'Child Theme Configurator did not detect any configuration data, either because this is the first time it has been used, or because a previously configured Child Theme has been removed. Please set your preferences below and click "Generate Child Theme Files".', 'chld_thm_cfg' ) ?></p>
1183
  </div>
1184
  <?php
1185
  }
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Main Controller Class
9
+ Version: 1.6.5.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
104
  $this->ui->render();
105
  }
106
  function enqueue_scripts() {
107
+ wp_enqueue_style( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'css/chld-thm-cfg.css', array(), '1.6.5.1' );
108
 
109
  // we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
110
  // this will be updated in a later release to use WP Core scripts when it is widely adopted
237
  function load_config() {
238
  include_once( CHLD_THM_CFG_DIR . '/includes/class-ctc-css.php' );
239
  $this->css = new ChildThemeConfiguratorCSS();
240
+ $is_rebuild = $this->css->load_config();
241
+ if ( FALSE !== $is_rebuild ):
242
+ // if themes do not exist reinitialize
243
+ if ( ! $this->check_theme_exists( $this->css->get_prop( 'child' ) )
244
+ || ! $this->check_theme_exists( $this->css->get_prop( 'parnt' ) ) ):
245
+ add_action( 'admin_notices', array( $this, 'config_notice' ) );
246
+ $this->css = new ChildThemeConfiguratorCSS();
247
+ $this->css->enqueue = 'enqueue';
248
+ endif;
249
+ else:
250
+ $this->css->enqueue = 'enqueue';
251
  endif;
252
  if ( $this->is_get ):
253
  if ( $this->css->get_prop( 'child' ) ):
262
  if ( !isset( $this->css->enqueue ) ):
263
  add_action( 'admin_notices', array( $this, 'enqueue_notice' ) );
264
  endif;
 
 
 
265
  endif;
266
  // check if max selectors reached
267
  if ( isset( $this->css->max_sel ) && $this->css->max_sel ):
1182
  function config_notice() {
1183
  ?>
1184
  <div class="update-nag">
1185
+ <p><?php _e( 'Child Theme Configurator did not detect any configuration data because a previously configured Child Theme has been removed. Please set your preferences below and click "Generate Child Theme Files".', 'chld_thm_cfg' ) ?></p>
1186
  </div>
1187
  <?php
1188
  }
includes/forms/addl_panels.php CHANGED
@@ -5,15 +5,15 @@ if ( !defined( 'CHLD_THM_CFG_PLUGINS_VERSION' ) ):
5
  ?><div id="get_pro_panel" class="ctc-option-panel<?php echo 'get_pro' == $active_tab ? ' ctc-option-panel-active' : ''; ?>" <?php echo $hidechild; ?> >
6
  <div class="ctc-input-row clearfix">
7
  <div class="ctc-input-cell"><div style="padding:0 40px">
8
- <a href="<?php echo LILAEAMEDIA_URL; ?>/plugins/intelliwidget/" title="<?php _e( 'Learn more about IntelliWidget', 'chld_thm_cfg' ); ?>"><img src="<?php echo CHLD_THM_CFG_URL . 'css/iw-banner.jpg'; ?>" width="430" height="430" /></a>
9
- <p><?php _e( 'IntelliWidget is a versatile widget manager that does the work of multiple plugins by combining custom page menus, featured posts, sliders and other dynamic content features into a single plugin that can display on a per-page or site-wide basis.', 'chld_thm_cfg' ); ?> <a href="<?php echo LILAEAMEDIA_URL; ?>/plugins/intelliwidget/" title="<?php _e( 'Learn more about IntelliWidget', 'chld_thm_cfg' ); ?>">
10
- <?php _e( 'Learn more', 'chld_thm_cfg'); ?></a></p><hr style="margin:20px 0" />
11
- <a href="<?php echo LILAEAMEDIA_URL; ?>/plugins/intelliwidget-responsive-menu/" title="<?php _e( 'Learn more about IW Responsive Menu', 'chld_thm_cfg' ); ?>"><img src="<?php echo CHLD_THM_CFG_URL . 'css/iwrm-banner.jpg'; ?>" width="430" height="430" /></a>
12
- <p><?php _e( 'IntelliWidget Responsive Menu lets you break free from your theme’s built-in responsive menu options and gives you complete control over the user experience.', 'chld_thm_cfg' ); ?> <a href="<?php echo LILAEAMEDIA_URL; ?>/intelliwidget-responsive-menu/" title="<?php _e( 'Learn more about IW Responsive Menu', 'chld_thm_cfg' ); ?>">
13
- <?php _e( 'Learn more', 'chld_thm_cfg'); ?></a></p>
14
  </div></div>
15
  <div class="ctc-input-cell-wide">
16
- <a href="<?php echo LILAEAMEDIA_URL; ?>/child-theme-configurator-pro/" title="<?php _e( 'Learn more about CTC Pro', 'chld_thm_cfg' ); ?>"><img src="<?php echo CHLD_THM_CFG_URL . 'css/pro-banner.jpg'; ?>" width="610" height="197" /></a>
17
  <h1><?php _e( 'Customizing WordPress just got even easier.', 'chld_thm_cfg' ); ?></h1>
18
  <p><?php _e( 'Thousands of users have already seen the benefits of using Child Theme Configurator. If you spend any amount of time customizing WordPress, CTC Pro will help maximize your productivity.', 'chld_thm_cfg' ); ?></p>
19
  <h1><?php _e( 'Designed by Developers Who Use It Every Day.', 'chld_thm_cfg' ); ?></h1>
@@ -30,6 +30,6 @@ if ( !defined( 'CHLD_THM_CFG_PLUGINS_VERSION' ) ):
30
  <li><h3><?php _e( 'Tutorial Videos', 'chld_thm_cfg' ); ?></h3></li>
31
  </ul>
32
  <p><?php _e( 'For a limited time save over 15% off Child Theme Configurator Pro.', 'chld_thm_cfg' ); ?></p>
33
- <h3><a href="<?php echo LILAEAMEDIA_URL; ?>/cart/?add-to-cart=1710" title="<?php _e( 'Upgrade Now', 'chld_thm_cfg' ); ?>"><?php _e( 'Buy Now - Only $12.95 USD*', 'chld_thm_cfg' ); ?></a></h3><small><?php _e( '*Prices subject to change.', 'chld_thm_cfg' ); ?></small></div>
34
  </div></div><?php
35
  endif;
5
  ?><div id="get_pro_panel" class="ctc-option-panel<?php echo 'get_pro' == $active_tab ? ' ctc-option-panel-active' : ''; ?>" <?php echo $hidechild; ?> >
6
  <div class="ctc-input-row clearfix">
7
  <div class="ctc-input-cell"><div style="padding:0 40px">
8
+ <a target="_blank" href="<?php echo LILAEAMEDIA_URL; ?>/plugins/intelliwidget/" title="<?php _e( 'Learn more about IntelliWidget', 'chld_thm_cfg' ); ?>"><img src="<?php echo CHLD_THM_CFG_URL . 'css/iw-banner.jpg'; ?>" width="430" height="430" /></a>
9
+ <p><?php _e( 'IntelliWidget is a versatile widget manager that does the work of multiple plugins by combining custom page menus, featured posts, sliders and other dynamic content features into a single plugin that can display on a per-page or site-wide basis.', 'chld_thm_cfg' ); ?> <a target="_blank" href="<?php echo LILAEAMEDIA_URL; ?>/plugins/intelliwidget/" title="<?php _e( 'Learn more about IntelliWidget', 'chld_thm_cfg' ); ?>">
10
+ <?php _e( 'Learn more', 'chld_thm_cfg'); ?><i class="dashicons dashicons-external" style="text-decoration:none"></i></a></p><hr style="margin:20px 0" />
11
+ <a target="_blank" href="<?php echo LILAEAMEDIA_URL; ?>/plugins/intelliwidget-responsive-menu/" title="<?php _e( 'Learn more about IW Responsive Menu', 'chld_thm_cfg' ); ?>"><img src="<?php echo CHLD_THM_CFG_URL . 'css/iwrm-banner.jpg'; ?>" width="430" height="430" /></a>
12
+ <p><?php _e( 'IntelliWidget Responsive Menu lets you break free from your theme’s built-in responsive menu options and gives you complete control over the user experience.', 'chld_thm_cfg' ); ?> <a target="_blank" href="<?php echo LILAEAMEDIA_URL; ?>/intelliwidget-responsive-menu/" title="<?php _e( 'Learn more about IW Responsive Menu', 'chld_thm_cfg' ); ?>">
13
+ <?php _e( 'Learn more', 'chld_thm_cfg'); ?><i class="dashicons dashicons-external" style="text-decoration:none"></i></a></p>
14
  </div></div>
15
  <div class="ctc-input-cell-wide">
16
+ <a target="_blank" href="<?php echo LILAEAMEDIA_URL; ?>/child-theme-configurator-pro/" title="<?php _e( 'Learn more about CTC Pro', 'chld_thm_cfg' ); ?>"><img src="<?php echo CHLD_THM_CFG_URL . 'css/pro-banner.jpg'; ?>" width="610" height="197" /></a>
17
  <h1><?php _e( 'Customizing WordPress just got even easier.', 'chld_thm_cfg' ); ?></h1>
18
  <p><?php _e( 'Thousands of users have already seen the benefits of using Child Theme Configurator. If you spend any amount of time customizing WordPress, CTC Pro will help maximize your productivity.', 'chld_thm_cfg' ); ?></p>
19
  <h1><?php _e( 'Designed by Developers Who Use It Every Day.', 'chld_thm_cfg' ); ?></h1>
30
  <li><h3><?php _e( 'Tutorial Videos', 'chld_thm_cfg' ); ?></h3></li>
31
  </ul>
32
  <p><?php _e( 'For a limited time save over 15% off Child Theme Configurator Pro.', 'chld_thm_cfg' ); ?></p>
33
+ <h3><a target="_blank" href="<?php echo LILAEAMEDIA_URL; ?>/cart/?add-to-cart=1710" title="<?php _e( 'Upgrade Now', 'chld_thm_cfg' ); ?>"><?php _e( 'Buy Now - Only $12.95 USD*', 'chld_thm_cfg' ); ?></a></h3><small><?php _e( '*Prices subject to change.', 'chld_thm_cfg' ); ?></small></div>
34
  </div></div><?php
35
  endif;
includes/forms/related.php CHANGED
@@ -1 +1 @@
1
- <span style="float:right;margin-left:2em;margin-top:-6px;text-shadow:1px 2px 0 #fff"><strong><?php _e( 'New user?','chld_thm_cfg' ); ?> <span style="color:#F1823B"><?php _e( 'Click help', 'chld_thm_cfg' ); ?></span></strong> <i class="dashicons dashicons-arrow-right-alt" style="color:#F1823B"></i></span><a href="http://www.lilaeamedia.com/child-theme-configurator-pro/" target="_blank" title="<?php _e( 'Get CTC Pro and other tools', 'chld_thm_cfg' ); ?>" style="float:right"><img src="<?php echo CHLD_THM_CFG_URL; ?>css/lilaea-logo.png" height="36" width="145" alt="<?php _e( 'Lilaea Media - Responsive Tools for a Mobile World', 'chld_thm_cfg' ); ?>" /></a>
1
+ <span style="float:right;margin-left:2em;margin-top:-6px;text-shadow:1px 2px 0 #fff"><strong><?php _e( 'New user?','chld_thm_cfg' ); ?> <span style="color:#F1823B"><?php _e( 'Click help', 'chld_thm_cfg' ); ?></span></strong> <i class="dashicons dashicons-arrow-right-alt" style="color:#F1823B"></i></span><a href="<?php echo LILAEAMEDIA_URL; ?>/child-theme-configurator-pro/" target="_blank" title="<?php _e( 'Get CTC Pro and other tools', 'chld_thm_cfg' ); ?>" style="float:right"><img src="<?php echo CHLD_THM_CFG_URL; ?>css/lilaea-logo.png" height="36" width="145" alt="<?php _e( 'Lilaea Media - Responsive Tools for a Mobile World', 'chld_thm_cfg' ); ?>" /></a>
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.6.5
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.6.5.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, customize, CSS, responsive, css editor, theme generator, stylesheet, customizer
5
  Requires at least: 3.9
6
  Tested up to: 4.1
7
- Stable tag: 1.6.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -256,6 +256,10 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
256
  7. Files tab
257
 
258
  == Changelog ==
 
 
 
 
259
  = 1.6.5 =
260
  * Fix: incorrect path generation and validation on Windows servers
261
  * Added error handling and notification to prevent jQuery conflicts and out of memory conditions
@@ -456,7 +460,7 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
456
  * Initial release.
457
 
458
  == Upgrade Notice ==
459
- 1.6.5 improves error handling and reporting of potential issues.
460
 
461
  == Override Parent Styles ==
462
 
4
  Tags: child theme, customize, CSS, responsive, css editor, theme generator, stylesheet, customizer
5
  Requires at least: 3.9
6
  Tested up to: 4.1
7
+ Stable tag: 1.6.5.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
256
  7. Files tab
257
 
258
  == Changelog ==
259
+ = 1.6.5.1 =
260
+ * Fix: undefined constant LILAEAMEDIA_URL
261
+ * Fix: logic to determine whether to display config notice
262
+
263
  = 1.6.5 =
264
  * Fix: incorrect path generation and validation on Windows servers
265
  * Added error handling and notification to prevent jQuery conflicts and out of memory conditions
460
  * Initial release.
461
 
462
  == Upgrade Notice ==
463
+ 1.6.5.1 Fixes an undefined constant.
464
 
465
  == Override Parent Styles ==
466