Child Theme Configurator - Version 2.1.2

Version Description

  • Fixes related to testing if CTC Pro is installed.
Download this release

Release Info

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

Code changes from version 2.1.1 to 2.1.2

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.1.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com
12
  Text Domain: child-theme-configurator
@@ -24,12 +24,12 @@ if ( !defined( 'ABSPATH' ) ) exit;
24
  define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
25
 
26
  if ( is_admin() )
27
- include_once( dirname( __FILE__ ) . '/includes/class-ctc.php' );
28
 
29
  if ( isset( $_GET['preview_ctc'] ) ):
30
  // replace core preview function with CTCP function for quick preview
31
  remove_action( 'setup_theme', 'preview_theme' );
32
- include_once( dirname( __FILE__ ) . '/includes/class-ctc-preview.php' );
33
  endif;
34
 
35
  add_filter( 'style_loader_src', 'chld_thm_cfg_version', 10, 2 );
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.1.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com
12
  Text Domain: child-theme-configurator
24
  define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
25
 
26
  if ( is_admin() )
27
+ include_once( CHLD_THM_CFG_DIR . '/includes/class-ctc.php' );
28
 
29
  if ( isset( $_GET['preview_ctc'] ) ):
30
  // replace core preview function with CTCP function for quick preview
31
  remove_action( 'setup_theme', 'preview_theme' );
32
+ include_once( CHLD_THM_CFG_DIR . '/includes/class-ctc-preview.php' );
33
  endif;
34
 
35
  add_filter( 'style_loader_src', 'chld_thm_cfg_version', 10, 2 );
includes/class-ctc-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.1.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: child-theme-configurator
6
  Class: ChildThemeConfiguratorAdmin
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Main Controller Class
9
+ Version: 2.1.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: child-theme-configurator
includes/class-ctc-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.1.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -165,7 +165,7 @@ class ChildThemeConfiguratorCSS {
165
  $this->parnt = '';
166
  $this->ignoreparnt = 0;
167
  $this->qpriority = 10;
168
- $this->version = '2.1.1';
169
 
170
  // do not set enqueue, not being set is used to flag old versions
171
 
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Handles all CSS input, output, parsing, normalization and storage
9
+ Version: 2.1.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
165
  $this->parnt = '';
166
  $this->ignoreparnt = 0;
167
  $this->qpriority = 10;
168
+ $this->version = '2.1.2';
169
 
170
  // do not set enqueue, not being set is used to flag old versions
171
 
includes/class-ctc-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.1.1
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.1.2
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
includes/class-ctc.php CHANGED
@@ -113,7 +113,9 @@ if ( !defined( 'ABSPATH' ) ) exit;
113
 
114
  static function upgrade_ctc_pro_notice() {
115
  $key = 'unregistered';
116
- if ( $options = get_site_option( CHLD_THM_CFG_OPTIONS ) )
 
 
117
  $key = $options[ 'update_key' ];
118
 
119
  $download = '<a href="' . LILAEAMEDIA_URL . '/ctc-pro-latest-version/' . ( empty( $key )
@@ -146,11 +148,12 @@ if ( !defined( 'ABSPATH' ) ) exit;
146
  }
147
 
148
  static function check_ctc_pro() {
149
- $plugindir = '/' . dirname( self::$oldpro );
150
- $pluginhandle = basename( self::$oldpro );
151
- if ( $oldpro = get_plugins( $plugindir ) ):
 
152
  self::deactivate_ctc_pro();
153
- defined( 'CHLD_THM_CFG_PLUGINS_VERSION' ) or define( 'CHLD_THM_CFG_PLUGINS_VERSION', $oldpro[ $pluginhandle ][ 'Version' ] );
154
  add_action( 'admin_notices', 'ChildThemeConfigurator::upgrade_ctc_pro_notice' );
155
  add_action( 'network_admin_notices','ChildThemeConfigurator::upgrade_ctc_pro_notice' );
156
  endif;
@@ -169,7 +172,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
169
  define( 'LILAEAMEDIA_URL', "http://www.lilaeamedia.com" );
170
  defined( 'CHLD_THM_CFG_DOCS_URL' ) or
171
  define( 'CHLD_THM_CFG_DOCS_URL', "http://www.childthemeconfigurator.com" );
172
- define( 'CHLD_THM_CFG_VERSION', '2.1.1' );
173
  define( 'CHLD_THM_CFG_PREV_VERSION', '1.7.9.1' );
174
  define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
175
  define( 'CHLD_THM_CFG_PRO_MIN_VERSION', '2.2.0' );
113
 
114
  static function upgrade_ctc_pro_notice() {
115
  $key = 'unregistered';
116
+ if ( ( $options = get_site_option( CHLD_THM_CFG_OPTIONS ) )
117
+ && is_array( $options )
118
+ && isset( $options[ 'update_key' ] ) ) // old versions were unpacking as object type instead of array type
119
  $key = $options[ 'update_key' ];
120
 
121
  $download = '<a href="' . LILAEAMEDIA_URL . '/ctc-pro-latest-version/' . ( empty( $key )
148
  }
149
 
150
  static function check_ctc_pro() {
151
+
152
+ if ( file_exists( trailingslashit( dirname( CHLD_THM_CFG_DIR ) ) . self::$oldpro )
153
+ && ( $oldpro = get_plugins( '/' . dirname( self::$oldpro ) ) ) ): // get_plugins() throwing a FNF notice for some code checkers
154
+ $version = isset( $oldpro[ basename( self::$oldpro ) ] ) ? $oldpro[ basename( self::$oldpro ) ][ 'Version' ] : '';
155
  self::deactivate_ctc_pro();
156
+ defined( 'CHLD_THM_CFG_PLUGINS_VERSION' ) or define( 'CHLD_THM_CFG_PLUGINS_VERSION', $version );
157
  add_action( 'admin_notices', 'ChildThemeConfigurator::upgrade_ctc_pro_notice' );
158
  add_action( 'network_admin_notices','ChildThemeConfigurator::upgrade_ctc_pro_notice' );
159
  endif;
172
  define( 'LILAEAMEDIA_URL', "http://www.lilaeamedia.com" );
173
  defined( 'CHLD_THM_CFG_DOCS_URL' ) or
174
  define( 'CHLD_THM_CFG_DOCS_URL', "http://www.childthemeconfigurator.com" );
175
+ define( 'CHLD_THM_CFG_VERSION', '2.1.2' );
176
  define( 'CHLD_THM_CFG_PREV_VERSION', '1.7.9.1' );
177
  define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
178
  define( 'CHLD_THM_CFG_PRO_MIN_VERSION', '2.2.0' );
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.1.1
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.1.2
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: lilaeamedia
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8QE5YJ8WE96AJ
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.6
7
- Stable tag: 2.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -287,6 +287,9 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
287
  7. Files tab
288
 
289
  == Changelog ==
 
 
 
290
  = 2.1.1 =
291
  * change packer class to use standard < 5.4 array syntax
292
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8QE5YJ8WE96AJ
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.7
7
+ Stable tag: 2.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
287
  7. Files tab
288
 
289
  == Changelog ==
290
+ = 2.1.2 =
291
+ * Fixes related to testing if CTC Pro is installed.
292
+
293
  = 2.1.1 =
294
  * change packer class to use standard < 5.4 array syntax
295