Child Theme Configurator - Version 2.0.2

Version Description

  • Automatically set priority of enqueue hook based on value from parent theme
  • Made file scan routine more efficient
  • Support for background-image as base64 data
  • Tweaked analyzer signals
Download this release

Release Info

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

Code changes from version 2.0.1 to 2.0.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.0.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com
12
  Text Domain: chld_thm_cfg
@@ -14,6 +14,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
14
  License: GPLv2
15
  Copyright (C) 2014-2016 Lilaea Media
16
  */
 
17
 
18
  defined( 'CHLD_THM_CFG_DIR' ) or
19
  define( 'CHLD_THM_CFG_DIR', dirname( __FILE__ ) );
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.0.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com
12
  Text Domain: chld_thm_cfg
14
  License: GPLv2
15
  Copyright (C) 2014-2016 Lilaea Media
16
  */
17
+ defined( 'LF' ) or define( 'LF', "\n" );
18
 
19
  defined( 'CHLD_THM_CFG_DIR' ) or
20
  define( 'CHLD_THM_CFG_DIR', dirname( __FILE__ ) );
includes/class-ctc-admin.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Main Controller Class
9
- Version: 2.0.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: child-theme-configurator
@@ -234,10 +234,9 @@ class ChildThemeConfiguratorAdmin {
234
  // by comparing owner of plugin to owner of child theme:
235
  if ( fileowner( $this->css->get_child_target( '' ) ) != fileowner( CHLD_THM_CFG_DIR ) )
236
  add_action( 'admin_notices', array( $this, 'owner_notice' ) );
237
- //add_action( 'admin_footer', array( $this, 'dump_css_object' ) );
238
  endif;
239
  }
240
-
241
  function cache_debug() {
242
  $this->updates[] = array(
243
  'obj' => 'debug',
@@ -756,6 +755,7 @@ class ChildThemeConfiguratorAdmin {
756
  }
757
 
758
  function update_redirect( $msg = 1 ) {
 
759
  if ( empty( $this->is_ajax ) ):
760
  $ctcpage = apply_filters( 'chld_thm_cfg_admin_page', CHLD_THM_CFG_MENU );
761
  $screen = get_current_screen()->id;
@@ -856,23 +856,23 @@ if ( !defined( 'ABSPATH' ) ) exit;
856
  */
857
  function enqueue_parent_code(){
858
  //$this->debug( print_r( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), TRUE ), __FUNCTION__ );
859
- $imports = $this->get( 'imports' );
860
- $enqueues = array();
861
- $code = "// AUTO GENERATED - Do not modify or remove comment markers above or below:" . LF;
862
- $deps = $this->get( 'parnt_deps' );
863
- //echo '<h3>DEPS</h3><pre><code>' . print_r( $deps, TRUE ) . "</code></pre>\n";
864
- $enq = $this->get( 'enqueue' );
865
- $handling = $this->get( 'handling' );
866
- $hasstyles = $this->get( 'hasstyles' );
867
- $childloaded= $this->get( 'childloaded' );
868
- $parntloaded= $this->get( 'parntloaded' );
869
- $cssunreg = $this->get( 'cssunreg' );
870
- $csswphead = $this->get( 'csswphead' );
871
- $cssnotheme = $this->get( 'cssnotheme' );
872
- $ignoreparnt= $this->get( 'ignoreparnt' );
873
  $this->debug( 'deps: ' . print_r( $deps, TRUE ) . ' enq: ' . $enq . ' handling: ' . $handling
874
  . ' hasstyles: ' . $hasstyles . ' parntloaded: ' . $parntloaded . ' childloaded: ' . $childloaded
875
- . ' ignoreparnt: ' . $ignoreparnt . ' childtype: ' . $this->childtype, __FUNCTION__ );
876
  // enqueue parent stylesheet
877
  if ( 'enqueue' == $enq && $hasstyles && !$parntloaded && !$ignoreparnt ):
878
  $code .= "
@@ -881,7 +881,7 @@ if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
881
  wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( " . implode( ',', $deps ) . " ) );
882
  }
883
  endif;
884
- add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
885
  ";
886
  // if loading parent theme, reset deps and add parent stylesheet
887
  $deps = array( "'chld_thm_cfg_parent'" );
@@ -1201,20 +1201,23 @@ defined( 'CHLD_THM_CFG_IGNORE_PARENT' ) or define( 'CHLD_THM_CFG_IGNORE_PARENT',
1201
 
1202
  if ( ( $file_verified = $this->css->is_file_ok( $this->css->get_parent_source( $file, $theme ) , 'read' ) ) ):
1203
  $this->debug( 'scanning ' . $file_verified . '... ', __FUNCTION__ );
1204
- $contents = @file_get_contents( $file_verified );
1205
- // if file contains code it may be a template
1206
- if ( preg_match( "/\w+\s*\(/", $contents ) ):
1207
- //$this->debug( 'code detected ...', __FUNCTION__ );
1208
- // if file contains functions, it is not a template
1209
- if ( !preg_match( "/(function \w+?|require(_once)?)\s*\(/", $contents ) ):
1210
- //$this->debug( 'No functions detected, adding to templates.', __FUNCTION__ );
1211
- $this->files[ $theme ][ 'template' ][] = $file;
1212
- else:
1213
- //$this->debug( 'Functions detected, skipping.', __FUNCTION__ );
 
1214
  endif;
1215
- else:
1216
- //$this->debug( 'No code, skipping.', __FUNCTION__ );
1217
  endif;
 
 
1218
  endif;
1219
  else:
1220
  //$this->debug( 'Child PHP, adding to templates', __FUNCTION__ );
@@ -1962,31 +1965,39 @@ defined( 'CHLD_THM_CFG_IGNORE_PARENT' ) or define( 'CHLD_THM_CFG_IGNORE_PARENT',
1962
  $this->css->addl_css = array();
1963
 
1964
  // store stylesheet dependencies
1965
- if ( isset( $analysis->{ $baseline } ) && isset( $analysis->{ $baseline }->deps ) ):
1966
- foreach ( $analysis->{ $baseline }->deps[ 0 ] as $deparray ):
1967
- if ( !in_array( $deparray[ 0 ], $unregs ) ):
1968
- $this->css->parnt_deps[] = $deparray[ 0 ];
1969
- endif;
1970
- if ( !preg_match( "/^style([\-\.]min)?\.css$/", $deparray[ 1 ] ) ):
1971
- $this->css->addl_css[] = sanitize_text_field( $deparray[ 1 ] );
1972
- endif;
1973
- endforeach;
1974
- foreach ( $analysis->{ $baseline }->deps[ 1 ] as $deparray ):
1975
- if ( !in_array( $deparray[ 0 ], $unregs ) ):
1976
- $this->css->child_deps[] = $deparray[ 0 ];
1977
- endif;
1978
- if ( 'separate' == $this->get( 'handling' ) || !empty( $analysis->{ $baseline }->signals->ctc_child_loaded ) ):
1979
  if ( !preg_match( "/^style([\-\.]min)?\.css$/", $deparray[ 1 ] ) ):
1980
- $this->css->addl_css[] = sanitize_text_field( $deparray[ 1 ] );
 
 
1981
  endif;
1982
- endif;
1983
- endforeach;
 
 
 
 
 
 
 
 
 
 
 
1984
  endif;
1985
  // store parent theme signals
1986
  if ( isset( $analysis->{ $baseline }->signals ) ):
1987
- $this->css->set_prop( 'hasstyles', isset( $analysis->{ $baseline }->signals->thm_has_styles ) ? 1 : 0 );
1988
  $this->css->set_prop( 'csswphead', isset( $analysis->{ $baseline }->signals->thm_past_wphead ) ? 1 : 0 );
1989
  $this->css->set_prop( 'cssunreg', isset( $analysis->{ $baseline }->signals->thm_unregistered ) ? 1 : 0 );
 
 
 
1990
  endif;
1991
  if ( isset( $analysis->child->signals ) ):
1992
  // test these again for child theme
@@ -1994,7 +2005,12 @@ defined( 'CHLD_THM_CFG_IGNORE_PARENT' ) or define( 'CHLD_THM_CFG_IGNORE_PARENT',
1994
  $this->css->set_prop( 'cssunreg', isset( $analysis->child->signals->thm_unregistered ) ? 1 : 0 );
1995
  // special case where theme does not link child stylesheet at all
1996
  $this->css->set_prop( 'cssnotheme', isset( $analysis->child->signals->thm_notheme ) ? 1 : 0 );
1997
- $this->css->set_prop( 'childloaded', isset( $analysis->child->signals->thm_child_loaded ) ? $analysis->child->signals->thm_child_loaded : 0 );
 
 
 
 
 
1998
  // if theme loads parent theme when is_child_theme, add child dependency
1999
  if ( isset( $analysis->child->signals->thm_parnt_loaded ) ):
2000
  $this->css->set_prop( 'parntloaded', $analysis->child->signals->thm_parnt_loaded );
@@ -2004,6 +2020,7 @@ defined( 'CHLD_THM_CFG_IGNORE_PARENT' ) or define( 'CHLD_THM_CFG_IGNORE_PARENT',
2004
  else:
2005
  $this->css->set_prop( 'parntloaded', 0 );
2006
  endif;
 
2007
  // if main styleheet is loading out of sequence, force dependency
2008
  if ( isset( $analysis->child->signals->ctc_parnt_reorder ) )
2009
  $this->reorder = TRUE;
@@ -2012,11 +2029,22 @@ defined( 'CHLD_THM_CFG_IGNORE_PARENT' ) or define( 'CHLD_THM_CFG_IGNORE_PARENT',
2012
  $this->genesis = TRUE;
2013
  endif;
2014
  }
2015
-
2016
-
2017
- function dump_css_object(){
2018
- echo '<!-- CSS OBJECT:' . LF . LF;
2019
- print_r( $this->css );;
2020
- echo LF . LF . '-->' . LF;
 
 
 
 
 
 
 
 
 
 
 
2021
  }
2022
  }
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Main Controller Class
9
+ Version: 2.0.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: child-theme-configurator
234
  // by comparing owner of plugin to owner of child theme:
235
  if ( fileowner( $this->css->get_child_target( '' ) ) != fileowner( CHLD_THM_CFG_DIR ) )
236
  add_action( 'admin_notices', array( $this, 'owner_notice' ) );
 
237
  endif;
238
  }
239
+
240
  function cache_debug() {
241
  $this->updates[] = array(
242
  'obj' => 'debug',
755
  }
756
 
757
  function update_redirect( $msg = 1 ) {
758
+ $this->print_debug( TRUE );
759
  if ( empty( $this->is_ajax ) ):
760
  $ctcpage = apply_filters( 'chld_thm_cfg_admin_page', CHLD_THM_CFG_MENU );
761
  $screen = get_current_screen()->id;
856
  */
857
  function enqueue_parent_code(){
858
  //$this->debug( print_r( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), TRUE ), __FUNCTION__ );
859
+ $imports = $this->get( 'imports' );
860
+ $enqueues = array();
861
+ $code = "// AUTO GENERATED - Do not modify or remove comment markers above or below:" . LF;
862
+ $deps = $this->get( 'parnt_deps' );
863
+ $enq = $this->get( 'enqueue' );
864
+ $handling = $this->get( 'handling' );
865
+ $hasstyles = $this->get( 'hasstyles' );
866
+ $childloaded = $this->get( 'childloaded' );
867
+ $parntloaded = $this->get( 'parntloaded' );
868
+ $cssunreg = $this->get( 'cssunreg' );
869
+ $csswphead = $this->get( 'csswphead' );
870
+ $cssnotheme = $this->get( 'cssnotheme' );
871
+ $ignoreparnt = $this->get( 'ignoreparnt' );
872
+ $priority = $this->get( 'qpriority' );
873
  $this->debug( 'deps: ' . print_r( $deps, TRUE ) . ' enq: ' . $enq . ' handling: ' . $handling
874
  . ' hasstyles: ' . $hasstyles . ' parntloaded: ' . $parntloaded . ' childloaded: ' . $childloaded
875
+ . ' ignoreparnt: ' . $ignoreparnt . ' priority: ' . $priority . ' childtype: ' . $this->childtype, __FUNCTION__ );
876
  // enqueue parent stylesheet
877
  if ( 'enqueue' == $enq && $hasstyles && !$parntloaded && !$ignoreparnt ):
878
  $code .= "
881
  wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( " . implode( ',', $deps ) . " ) );
882
  }
883
  endif;
884
+ add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', " . $priority . " );
885
  ";
886
  // if loading parent theme, reset deps and add parent stylesheet
887
  $deps = array( "'chld_thm_cfg_parent'" );
1201
 
1202
  if ( ( $file_verified = $this->css->is_file_ok( $this->css->get_parent_source( $file, $theme ) , 'read' ) ) ):
1203
  $this->debug( 'scanning ' . $file_verified . '... ', __FUNCTION__ );
1204
+ // read 2k at a time and bail if code detected
1205
+ $template = FALSE;
1206
+ if ( $handle = fopen( $file_verified, "rb") ):
1207
+ while ( !feof( $handle ) ) {
1208
+ $contents = fread($handle, 2048);
1209
+ if ( preg_match( "/\w+\s*\(/", $contents ) ):
1210
+ $template = TRUE;
1211
+ if ( preg_match( "/(function \w+?|require(_once)?)\s*\(/", $contents ) ):
1212
+ $template = FALSE;
1213
+ break;
1214
+ endif;
1215
  endif;
1216
+ }
1217
+ fclose( $handle );
1218
  endif;
1219
+ if ( $template )
1220
+ $this->files[ $theme ][ 'template' ][] = $file;
1221
  endif;
1222
  else:
1223
  //$this->debug( 'Child PHP, adding to templates', __FUNCTION__ );
1965
  $this->css->addl_css = array();
1966
 
1967
  // store stylesheet dependencies
1968
+ if ( isset( $analysis->{ $baseline } ) ):
1969
+ if ( isset( $analysis->{ $baseline }->deps ) ):
1970
+ foreach ( $analysis->{ $baseline }->deps[ 0 ] as $deparray ):
1971
+ if ( !in_array( $deparray[ 0 ], $unregs ) ):
1972
+ $this->css->parnt_deps[] = $deparray[ 0 ];
1973
+ endif;
 
 
 
 
 
 
 
 
1974
  if ( !preg_match( "/^style([\-\.]min)?\.css$/", $deparray[ 1 ] ) ):
1975
+ // bootstrap wastes memory among other resources
1976
+ if ( !preg_match( "/bootstrap/i", $deparray[ 0 ] ) && !preg_match( "/bootstrap/i", $deparray[ 1 ] ) )
1977
+ $this->css->addl_css[] = sanitize_text_field( $deparray[ 1 ] );
1978
  endif;
1979
+ endforeach;
1980
+ foreach ( $analysis->{ $baseline }->deps[ 1 ] as $deparray ):
1981
+ if ( !in_array( $deparray[ 0 ], $unregs ) ):
1982
+ $this->css->child_deps[] = $deparray[ 0 ];
1983
+ endif;
1984
+ if ( 'separate' == $this->get( 'handling' ) || !empty( $analysis->{ $baseline }->signals->ctc_child_loaded ) ):
1985
+ if ( !preg_match( "/^style([\-\.]min)?\.css$/", $deparray[ 1 ] ) ):
1986
+ if ( !preg_match( "/bootstrap/", $deparray[ 0 ] ) && !preg_match( "/bootstrap/", $deparray[ 1 ] ) )
1987
+ $this->css->addl_css[] = sanitize_text_field( $deparray[ 1 ] );
1988
+ endif;
1989
+ endif;
1990
+ endforeach;
1991
+ endif;
1992
  endif;
1993
  // store parent theme signals
1994
  if ( isset( $analysis->{ $baseline }->signals ) ):
1995
+ $this->css->set_prop( 'hasstyles', isset( $analysis->{ $baseline }->signals->thm_no_styles ) ? 0 : 1 );
1996
  $this->css->set_prop( 'csswphead', isset( $analysis->{ $baseline }->signals->thm_past_wphead ) ? 1 : 0 );
1997
  $this->css->set_prop( 'cssunreg', isset( $analysis->{ $baseline }->signals->thm_unregistered ) ? 1 : 0 );
1998
+ if ( isset( $analysis->{ $baseline }->signals->thm_parnt_loaded ) ):
1999
+ $this->set_enqueue_priority( $analysis, $baseline );
2000
+ endif;
2001
  endif;
2002
  if ( isset( $analysis->child->signals ) ):
2003
  // test these again for child theme
2005
  $this->css->set_prop( 'cssunreg', isset( $analysis->child->signals->thm_unregistered ) ? 1 : 0 );
2006
  // special case where theme does not link child stylesheet at all
2007
  $this->css->set_prop( 'cssnotheme', isset( $analysis->child->signals->thm_notheme ) ? 1 : 0 );
2008
+ if ( isset( $analysis->child->signals->thm_child_loaded ) ):
2009
+ $this->css->set_prop( 'childloaded', $analysis->child->signals->thm_child_loaded );
2010
+ $this->set_enqueue_priority( $analysis, 'child' );
2011
+ else:
2012
+ $this->css->set_prop( 'childloaded', 0 );
2013
+ endif;
2014
  // if theme loads parent theme when is_child_theme, add child dependency
2015
  if ( isset( $analysis->child->signals->thm_parnt_loaded ) ):
2016
  $this->css->set_prop( 'parntloaded', $analysis->child->signals->thm_parnt_loaded );
2020
  else:
2021
  $this->css->set_prop( 'parntloaded', 0 );
2022
  endif;
2023
+
2024
  // if main styleheet is loading out of sequence, force dependency
2025
  if ( isset( $analysis->child->signals->ctc_parnt_reorder ) )
2026
  $this->reorder = TRUE;
2029
  $this->genesis = TRUE;
2030
  endif;
2031
  }
2032
+ /**
2033
+ * Set the priority of the enqueue hook
2034
+ * by matching the hook handle of the primary stylesheet ( thm_parnt_loaded or thm_child_loaded )
2035
+ * to the hook handles that were passed by the preview fetched by the analyzer.
2036
+ * This allows the stylesheets to be enqueued in the correct order.
2037
+ */
2038
+ function set_enqueue_priority( $analysis, $baseline ){
2039
+ foreach ( $analysis->{ $baseline }->irreg as $irreg ):
2040
+ $handles = explode( ',', $irreg );
2041
+ $priority = array_shift( $handles );
2042
+ $handle = $analysis->{ $baseline }->signals->{ 'thm_' . $baseline . '_loaded' };
2043
+ if ( in_array( $handle, $handles ) ):
2044
+ $this->debug( '(baseline: ' . $baseline . ') match: ' . $handle . ' setting priority: ' . $priority, __FUNCTION__ );
2045
+ $this->css->set_prop( 'qpriority', $priority );
2046
+ break;
2047
+ endif;
2048
+ endforeach;
2049
  }
2050
  }
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.0.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -40,11 +40,12 @@ class ChildThemeConfiguratorCSS {
40
  var $handling; // child stylesheet handling option
41
  var $enqueue; // whether or not to load parent theme
42
  var $ignoreparnt; // no not parse or enqueue parent
 
43
  var $hasstyles;
44
  var $parntloaded;
45
  var $childloaded;
46
  var $parnt_deps; //
47
- var $child_deps; //
48
  var $addl_css;
49
  var $cssunreg;
50
  var $csswphead;
@@ -95,6 +96,7 @@ class ChildThemeConfiguratorCSS {
95
  'parntloaded',
96
  'childloaded',
97
  'ignoreparnt',
 
98
  'enqueue',
99
  'handling',
100
  'templates',
@@ -151,6 +153,7 @@ class ChildThemeConfiguratorCSS {
151
  $this->child = '';
152
  $this->parnt = '';
153
  $this->ignoreparnt = 0;
 
154
 
155
  // do not set enqueue, not being set is used to flag old versions
156
 
@@ -290,6 +293,8 @@ class ChildThemeConfiguratorCSS {
290
  return empty( $this->templates ) ? FALSE : $this->templates;
291
  case 'ignoreparnt':
292
  return empty( $this->ignoreparnt ) ? 0 : 1;
 
 
293
  case 'parntloaded':
294
  return empty( $this->parntloaded ) ? FALSE : $this->parntloaded;
295
  case 'childloaded':
@@ -1121,6 +1126,7 @@ class ChildThemeConfiguratorCSS {
1121
 
1122
  // converts relative path to absolute path for preview
1123
  function convert_rel_url( $value, $relpath, $url = TRUE ) {
 
1124
  $path = preg_replace( '%url\([\'" ]*(.+?)[\'" ]*\)%', "$1", $value );
1125
  if ( preg_match( '%(https?:)?//%', $path ) ) return $value;
1126
  $pathparts = explode( '/', $path );
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Handles all CSS input, output, parsing, normalization and storage
9
+ Version: 2.0.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
40
  var $handling; // child stylesheet handling option
41
  var $enqueue; // whether or not to load parent theme
42
  var $ignoreparnt; // no not parse or enqueue parent
43
+ var $qpriority;
44
  var $hasstyles;
45
  var $parntloaded;
46
  var $childloaded;
47
  var $parnt_deps; //
48
+ var $child_deps; //
49
  var $addl_css;
50
  var $cssunreg;
51
  var $csswphead;
96
  'parntloaded',
97
  'childloaded',
98
  'ignoreparnt',
99
+ 'qpriority',
100
  'enqueue',
101
  'handling',
102
  'templates',
153
  $this->child = '';
154
  $this->parnt = '';
155
  $this->ignoreparnt = 0;
156
+ $this->qpriority = 10;
157
 
158
  // do not set enqueue, not being set is used to flag old versions
159
 
293
  return empty( $this->templates ) ? FALSE : $this->templates;
294
  case 'ignoreparnt':
295
  return empty( $this->ignoreparnt ) ? 0 : 1;
296
+ case 'qpriority':
297
+ return empty( $this->qpriority ) ? 10 : $this->qpriority;
298
  case 'parntloaded':
299
  return empty( $this->parntloaded ) ? FALSE : $this->parntloaded;
300
  case 'childloaded':
1126
 
1127
  // converts relative path to absolute path for preview
1128
  function convert_rel_url( $value, $relpath, $url = TRUE ) {
1129
+ if ( preg_match( '/data:/', $value ) ) return $value;
1130
  $path = preg_replace( '%url\([\'" ]*(.+?)[\'" ]*\)%', "$1", $value );
1131
  if ( preg_match( '%(https?:)?//%', $path ) ) return $value;
1132
  $pathparts = explode( '/', $path );
includes/class-ctc-preview.php CHANGED
@@ -42,7 +42,7 @@ ini_set( 'display_errors', 1 );
42
  // impossibly high priority to test for stylesheets loaded after wp_head()
43
  add_action( 'wp_print_styles', 'ChildThemeConfiguratorPreview::test_css', 999999 );
44
  // pass the wp_styles queue back to use for stylesheet handle verification
45
- add_action( 'wp_footer', 'ChildThemeConfiguratorPreview::current_queue' );
46
 
47
  }
48
 
@@ -72,43 +72,69 @@ ini_set( 'display_errors', 1 );
72
  return ( isset( $_GET['stylesheet'] ) && current_user_can( 'switch_themes' ) ) ? $_GET['stylesheet'] : '';
73
  }
74
 
75
- // retrieve wp_styles queue and pass back to configurator to verify stylesheet handles
76
- static function current_queue() {
77
- global $wp_styles;
78
- $queue = implode( "\n", $wp_styles->queue );
79
- echo "\n\n\n<!-- BEGIN WP QUEUE\n" . $queue . "\nEND WP QUEUE -->\n\n\n";
80
- self::parse_stylesheet();
81
- }
82
-
83
  // enqueue dummy stylesheet with extremely high priority to test wp_head()
84
  static function test_css() {
85
  wp_enqueue_style( 'ctc-test', get_stylesheet_directory_uri() . '/ctc-test.css' );
86
  }
87
 
88
  static function parse_stylesheet() {
 
 
 
 
89
  if ( is_child_theme() ):
 
90
  $file = get_stylesheet_directory() . '/style.css';
91
  if ( file_exists( $file ) && ( $styles = @file_get_contents( $file ) ) ):
 
92
  if ( defined( 'CHLD_THM_CFG_IGNORE_PARENT' ) ):
93
- echo "\n\n\n<!-- CHLD_THM_CFG_IGNORE_PARENT -->\n\n\n";
94
  endif;
 
95
  if ( preg_match( '#\nUpdated: \d\d\d\d\-\d\d\-\d\d \d\d:\d\d:\d\d\n#s', $styles ) ):
96
- echo "\n\n\n<!-- IS_CTC_THEME -->\n\n\n";
97
  endif;
98
-
99
  if ( preg_match( '#\@import\s+url\(.+?\/' . preg_quote( get_template() ) . '\/style\.css.*?\);#s', $styles ) ):
100
- echo "\n\n\n<!-- HAS_CTC_IMPORT -->\n\n\n";
101
  endif;
102
  endif;
103
  else:
 
104
  $file = get_template_directory() . '/style.css';
105
  if ( file_exists( $file ) && ( $styles = @file_get_contents( $file ) ) ):
106
  $styles = preg_replace( '#\/\*.*?\*\/#s', '', $styles );
107
- if ( preg_match( '#\n\s*([\[\.\#\:\w][\w\-\s\(\)\[\]\'\^\*\.\#\+:,"=>]+?)\s*\{(.*?)\}#s', $styles ) ):
108
- echo "\n\n\n<!-- HAS_CTC_STYLES -->\n\n\n";
109
  endif;
110
  endif;
111
  endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  }
113
  }
114
 
42
  // impossibly high priority to test for stylesheets loaded after wp_head()
43
  add_action( 'wp_print_styles', 'ChildThemeConfiguratorPreview::test_css', 999999 );
44
  // pass the wp_styles queue back to use for stylesheet handle verification
45
+ add_action( 'wp_footer', 'ChildThemeConfiguratorPreview::parse_stylesheet' );
46
 
47
  }
48
 
72
  return ( isset( $_GET['stylesheet'] ) && current_user_can( 'switch_themes' ) ) ? $_GET['stylesheet'] : '';
73
  }
74
 
 
 
 
 
 
 
 
 
75
  // enqueue dummy stylesheet with extremely high priority to test wp_head()
76
  static function test_css() {
77
  wp_enqueue_style( 'ctc-test', get_stylesheet_directory_uri() . '/ctc-test.css' );
78
  }
79
 
80
  static function parse_stylesheet() {
81
+ echo '<script>/*<![CDATA[' . LF;
82
+ global $wp_styles, $wp_filter;
83
+ $queue = implode( "\n", $wp_styles->queue );
84
+ echo 'BEGIN WP QUEUE' . LF . $queue . LF . 'END WP QUEUE' . LF;
85
  if ( is_child_theme() ):
86
+ // check for signals that indicate specific settings
87
  $file = get_stylesheet_directory() . '/style.css';
88
  if ( file_exists( $file ) && ( $styles = @file_get_contents( $file ) ) ):
89
+ // is this child theme a standalone ( framework ) theme?
90
  if ( defined( 'CHLD_THM_CFG_IGNORE_PARENT' ) ):
91
+ echo 'CHLD_THM_CFG_IGNORE_PARENT' . LF;
92
  endif;
93
+ // has this child theme been configured by CTC? ( If it has the timestamp, it is one of ours. )
94
  if ( preg_match( '#\nUpdated: \d\d\d\d\-\d\d\-\d\d \d\d:\d\d:\d\d\n#s', $styles ) ):
95
+ echo 'IS_CTC_THEME' . LF;
96
  endif;
97
+ // is this child theme using the @import method?
98
  if ( preg_match( '#\@import\s+url\(.+?\/' . preg_quote( get_template() ) . '\/style\.css.*?\);#s', $styles ) ):
99
+ echo 'HAS_CTC_IMPORT' . LF;
100
  endif;
101
  endif;
102
  else:
103
+ // Check if the parent style.css file is used at all. If not we can skip the parent stylesheet handling altogether.
104
  $file = get_template_directory() . '/style.css';
105
  if ( file_exists( $file ) && ( $styles = @file_get_contents( $file ) ) ):
106
  $styles = preg_replace( '#\/\*.*?\*\/#s', '', $styles );
107
+ if ( !preg_match( '#\n\s*([\[\.\#\:\w][\w\-\s\(\)\[\]\'\^\*\.\#\+:,"=>]+?)\s*\{(.*?)\}#s', $styles ) ):
108
+ echo 'NO_CTC_STYLES' . LF;
109
  endif;
110
  endif;
111
  endif;
112
+ /**
113
+ * Use the filter api to determine the parent stylesheet enqueue priority
114
+ * because some themes do not use the standard 10 for various reasons.
115
+ * We need to match this priority so that the stylesheets load in the correct order.
116
+ */
117
+ echo 'BEGIN CTC IRREGULAR' . LF;
118
+ // Iterate through all the added hook priorities
119
+ foreach ( $wp_filter[ 'wp_enqueue_scripts' ] as $priority => $arr ):
120
+ // If this is a non-standard priority hook, determine which handles are being enqueued.
121
+ // These will then be compared to the primary handle ( style.css )
122
+ // to determine the enqueue priority to use for the parent stylesheet.
123
+ if ( $priority != 10 ):
124
+ // iterate through each hook in this priority group
125
+ foreach ( $arr as $funcarr ):
126
+ // clear the queue
127
+ $wp_styles->queue = array();
128
+ // now call the hooked function to populate the queue
129
+ if ( !is_null($funcarr['function']) )
130
+ call_user_func_array( $funcarr[ 'function' ], array() );
131
+ endforeach;
132
+ // report the priority, and any handles that were added
133
+ echo $priority . ',' . implode( ",", $wp_styles->queue ) . LF;
134
+ endif;
135
+ endforeach;
136
+ echo 'END CTC IRREGULAR' . LF;
137
+ echo '*/]]></script>' . LF;
138
  }
139
  }
140
 
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.childthemeconfigurator.com/
7
  Description: Handles the plugin User Interface
8
- Version: 2.0.1
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
@@ -28,10 +28,9 @@ class ChildThemeConfiguratorUI {
28
  add_action( 'admin_notices', array( $this, 'get_colors' ) );
29
  // temporary hook until Pro is updated
30
  add_filter( 'chld_thm_cfg_localize_array', array( $this, 'filter_localize_array' ) );
31
- if ( $this->ctc()->is_debug ):
32
  //$this->ctc()->debug( 'adding new debug action...', __FUNCTION__ );
33
  add_action( 'chld_thm_cfg_print_debug', array( $this->ctc(), 'print_debug' ) );
34
- endif;
35
  $this->swatch_txt = __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'child-theme-configurator' );
36
  }
37
  // helper function to globalize ctc object
@@ -245,17 +244,19 @@ class ChildThemeConfiguratorUI {
245
  }
246
 
247
  function enqueue_scripts() {
248
- wp_enqueue_style( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'css/chldthmcfg.css', array(), '2.0.1' );
249
 
250
  // we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
251
  // this will be updated in a later release to use WP Core scripts when it is widely adopted
 
252
  if ( !wp_script_is( 'jquery-ui-selectmenu', 'registered' ) ): // selectmenu.min.js
253
  wp_enqueue_script( 'jquery-ui-selectmenu', CHLD_THM_CFG_URL . 'js/selectmenu.min.js',
254
  array( 'jquery','jquery-ui-core','jquery-ui-position' ), FALSE, TRUE );
255
  endif;
 
256
  wp_enqueue_script( 'chld-thm-cfg-spectrum', CHLD_THM_CFG_URL . 'js/spectrum.min.js', array( 'jquery' ), FALSE, TRUE );
257
  wp_enqueue_script( 'chld-thm-cfg-ctcgrad', CHLD_THM_CFG_URL . 'js/ctcgrad.min.js', array( 'jquery' ), FALSE, TRUE );
258
- wp_enqueue_script( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'js/chldthmcfg.min.js',
259
  array(
260
  'jquery-ui-autocomplete',
261
  'jquery-ui-selectmenu',
@@ -311,8 +312,8 @@ class ChildThemeConfiguratorUI {
311
  'anlz1_txt' => __( 'Updating', 'child-theme-configurator' ),
312
  'anlz2_txt' => __( 'Checking', 'child-theme-configurator' ),
313
  'anlz3_txt' => __( 'The theme "%s" generated unexpected PHP debug output.', 'child-theme-configurator' ),
314
- 'anlz4_txt' => __( 'The theme "%s" could not be loaded.', 'child-theme-configurator' ),
315
- 'anlz5_txt' => __( '<p>Please verify the theme has been installed correctly.</p>', 'child-theme-configurator' ),
316
  'anlz6_txt' => __( 'Show Debug Output', 'child-theme-configurator' ),
317
  'anlz7_txt' => __( "<p>You may not be able to use this Theme as a Child Theme while these conditions exist.</p><p>It is possible that this theme has specific requirements to work correctly as a child theme. Check your theme's documentation for more information.</p><p>Please make sure you are using the latest version of this theme. If so, please contact this Theme's author and report the error list above.</p>", 'child-theme-configurator' ),
318
  'anlz8_txt' => __( 'Do Not Activate "%s"! A PHP FATAL ERROR has been detected.', 'child-theme-configurator' ),
5
  Class: Child_Theme_Configurator_UI
6
  Plugin URI: http://www.childthemeconfigurator.com/
7
  Description: Handles the plugin User Interface
8
+ Version: 2.0.2
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
28
  add_action( 'admin_notices', array( $this, 'get_colors' ) );
29
  // temporary hook until Pro is updated
30
  add_filter( 'chld_thm_cfg_localize_array', array( $this, 'filter_localize_array' ) );
31
+ if ( $this->ctc()->is_debug )
32
  //$this->ctc()->debug( 'adding new debug action...', __FUNCTION__ );
33
  add_action( 'chld_thm_cfg_print_debug', array( $this->ctc(), 'print_debug' ) );
 
34
  $this->swatch_txt = __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'child-theme-configurator' );
35
  }
36
  // helper function to globalize ctc object
244
  }
245
 
246
  function enqueue_scripts() {
247
+ wp_enqueue_style( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'css/chldthmcfg.css', array(), CHLD_THM_CFG_VERSION );
248
 
249
  // we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
250
  // this will be updated in a later release to use WP Core scripts when it is widely adopted
251
+
252
  if ( !wp_script_is( 'jquery-ui-selectmenu', 'registered' ) ): // selectmenu.min.js
253
  wp_enqueue_script( 'jquery-ui-selectmenu', CHLD_THM_CFG_URL . 'js/selectmenu.min.js',
254
  array( 'jquery','jquery-ui-core','jquery-ui-position' ), FALSE, TRUE );
255
  endif;
256
+
257
  wp_enqueue_script( 'chld-thm-cfg-spectrum', CHLD_THM_CFG_URL . 'js/spectrum.min.js', array( 'jquery' ), FALSE, TRUE );
258
  wp_enqueue_script( 'chld-thm-cfg-ctcgrad', CHLD_THM_CFG_URL . 'js/ctcgrad.min.js', array( 'jquery' ), FALSE, TRUE );
259
+ wp_enqueue_script( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'js/chldthmcfg' . ( $this->ctc()->is_debug ? '' : '.min' ) . '.js',
260
  array(
261
  'jquery-ui-autocomplete',
262
  'jquery-ui-selectmenu',
312
  'anlz1_txt' => __( 'Updating', 'child-theme-configurator' ),
313
  'anlz2_txt' => __( 'Checking', 'child-theme-configurator' ),
314
  'anlz3_txt' => __( 'The theme "%s" generated unexpected PHP debug output.', 'child-theme-configurator' ),
315
+ 'anlz4_txt' => __( 'The theme "%s" could not be analyzed.', 'child-theme-configurator' ),
316
+ 'anlz5_txt' => __( '<p>Please try temporarily disabling plugins that <strong>minify CSS</strong> or that <strong>force redirects between HTTP and HTTPS</strong>.</p>', 'child-theme-configurator' ),
317
  'anlz6_txt' => __( 'Show Debug Output', 'child-theme-configurator' ),
318
  'anlz7_txt' => __( "<p>You may not be able to use this Theme as a Child Theme while these conditions exist.</p><p>It is possible that this theme has specific requirements to work correctly as a child theme. Check your theme's documentation for more information.</p><p>Please make sure you are using the latest version of this theme. If so, please contact this Theme's author and report the error list above.</p>", 'child-theme-configurator' ),
319
  'anlz8_txt' => __( 'Do Not Activate "%s"! A PHP FATAL ERROR has been detected.', 'child-theme-configurator' ),
includes/class-ctc.php CHANGED
@@ -90,12 +90,11 @@ if ( !defined( 'ABSPATH' ) ) exit;
90
  self::ctc()->ajax_dismiss_notice();
91
  }
92
  }
93
- defined( 'LF' ) or define( 'LF', "\n" );
94
  defined( 'LILAEAMEDIA_URL' ) or
95
  define( 'LILAEAMEDIA_URL', "http://www.lilaeamedia.com" );
96
  defined( 'CHLD_THM_CFG_DOCS_URL' ) or
97
  define( 'CHLD_THM_CFG_DOCS_URL', "http://www.childthemeconfigurator.com" );
98
- define( 'CHLD_THM_CFG_VERSION', '2.0.1' );
99
  define( 'CHLD_THM_CFG_PREV_VERSION', '1.7.9.1' );
100
  define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
101
  defined( 'CHLD_THM_CFG_BPSEL' ) or
90
  self::ctc()->ajax_dismiss_notice();
91
  }
92
  }
 
93
  defined( 'LILAEAMEDIA_URL' ) or
94
  define( 'LILAEAMEDIA_URL', "http://www.lilaeamedia.com" );
95
  defined( 'CHLD_THM_CFG_DOCS_URL' ) or
96
  define( 'CHLD_THM_CFG_DOCS_URL', "http://www.childthemeconfigurator.com" );
97
+ define( 'CHLD_THM_CFG_VERSION', '2.0.2' );
98
  define( 'CHLD_THM_CFG_PREV_VERSION', '1.7.9.1' );
99
  define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
100
  defined( 'CHLD_THM_CFG_BPSEL' ) or
includes/forms/parent-child.php CHANGED
@@ -127,11 +127,12 @@ if ( !defined( 'ABSPATH' ) ) exit;
127
  <?php
128
  $handling = $this->ctc()->get( 'handling' );
129
  $ignoreparnt = $this->ctc()->get( 'ignoreparnt' );
 
130
  $enqueue = $this->ctc()->get( 'enqueue' );
131
- $this->ctc()->debug( 'handling: ' . $handling . ' ignore: ' . $ignoreparnt . ' enqueue: ' . $enqueue, 'parent-child.php' );
132
  ?>
133
- <div class="ctc-input-row clearfix ctc-themeonly-container<?php echo $disabledclass; ?>" id="input_row_stylesheet_handling_container">
134
- <div class="ctc-input-cell clear" id="input_row_stylesheet_handling" title="<?php _e( 'Click to expand', 'child-theme-configurator' ); ?>"><span class="ctc-step ctc-step-number">5</span><strong class="shift">
135
  <?php _e( 'Select where to save new styles:', 'child-theme-configurator' ); ?>
136
  </strong> </div>
137
  <div class="ctc-input-cell-wide sep"><div id="child_handling_notice"></div>
127
  <?php
128
  $handling = $this->ctc()->get( 'handling' );
129
  $ignoreparnt = $this->ctc()->get( 'ignoreparnt' );
130
+ $keepdeps = $this->ctc()->get( 'keepdeps' );
131
  $enqueue = $this->ctc()->get( 'enqueue' );
132
+ $this->ctc()->debug( 'handling: ' . $handling . ' ignore: ' . $ignoreparnt . ' enqueue: ' . $enqueue . ' keepdeps: ' . $keepdeps, 'parent-child.php' );
133
  ?>
134
+ <div class="ctc-input-row clearfix ctc-themeonly-container<?php echo $disabledclass; ?>" id="input_row_stylesheet_handling_container" style="display:none">
135
+ <div class="ctc-input-cell clear" id="input_row_stylesheet_handling" ><span class="ctc-step ctc-step-number">5</span><strong class="shift">
136
  <?php _e( 'Select where to save new styles:', 'child-theme-configurator' ); ?>
137
  </strong> </div>
138
  <div class="ctc-input-cell-wide sep"><div id="child_handling_notice"></div>
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.0.1
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
@@ -1408,6 +1408,7 @@
1408
  init: function() {
1409
  //console.log( 'initializing...' )
1410
  var self = this;
 
1411
  // try to initialize theme menus
1412
  if ( !$( '#ctc_theme_parnt' ).is( 'input' ) ) {
1413
  //console.log( 'initializing theme select menus...' );
@@ -1703,15 +1704,16 @@
1703
  analyze_theme: function( template ) {
1704
  //console.log( 'analyze_theme' );
1705
  var self = this,
 
1706
  //template = $.chldthmcfg.existing ? 'child' : 'parnt',
1707
  stylesheet = ( 'child' === template ? $.chldthmcfg.currchild : $.chldthmcfg.currparnt ),
1708
- testparams = '&template=' + $.chldthmcfg.currparnt + '&stylesheet=' + stylesheet,
1709
  homeurl = self.setssl( window.ctcAjax.homeurl ),
1710
  themepath = window.ctcAjax.theme_uri.replace( /^https?:\/\//, '' ),
1711
  url = homeurl + testparams,
1712
  escaped = self.escrgx( $.chldthmcfg.currparnt ) + ( 'child' === template ? '|' + self.escrgx( stylesheet ) : '' ),
1713
  regex_link = new RegExp( "<link( rel=[\"']stylesheet[\"'] id=['\"]([^'\"]+?)['\"])?[^>]+?" +
1714
- self.escrgx( themepath ) + '/(' + escaped + ')/(.+?\\.css)[^>]+?>', 'gi' ),
1715
  regex_err = /<br \/>\n[^\n]+?(fatal|strict|notice|warning|error)[\s\S]+?<br \/>/gi,
1716
  msg,
1717
  queue,
@@ -1734,41 +1736,52 @@
1734
  thm_parnt_loaded: 0,
1735
  thm_child_loaded: 0,
1736
  thm_is_ctc: 0,
1737
- thm_has_styles: 0,
1738
  thm_notheme: 0
1739
  */
1740
  },
1741
- queue: []
 
1742
  };
1743
 
1744
  //console.log( 'Fetching home page: ' + url );
1745
  $.get( url, function( data ) {
1746
 
1747
- // console.log( data );
 
 
1748
  // retrieve enqueued stylesheet ids
1749
- if ( ( queue = data.match( /BEGIN WP QUEUE\n([\n\w\-\.]*?)END WP QUEUE/ ) ) ) {
1750
  analysis.queue = queue[ 1 ].split(/\n/);
1751
  //console.log( 'QUEUE:' );
1752
  //console.log( analysis.queue );
1753
  } else {
1754
- //console.log( 'NO QUEUE' );
1755
  analysis.queue = [];
1756
  analysis.signals.thm_noqueue = 1;
1757
  //analysis.signals.failure = 1;
 
 
 
 
 
 
1758
  }
1759
- if ( data.match( /<!\-\- CHLD_THM_CFG_IGNORE_PARENT \-\->/ ) ) {
1760
  analysis.signals.thm_ignoreparnt = 1;
 
1761
  }
1762
-
1763
- if ( data.match( /<!\-\- IS_CTC_THEME \-\->/ ) ) {
1764
  analysis.signals.thm_is_ctc = 1;
 
1765
  }
1766
 
1767
- if ( data.match( /<!\-\- HAS_CTC_STYLES \-\->/ ) ) {
1768
- analysis.signals.thm_has_styles = 1;
 
1769
  }
1770
- if ( data.match( /<!\-\- HAS_CTC_IMPORT \-\->/ ) ) {
1771
  analysis.signals.thm_has_import = 1;
 
1772
  }
1773
 
1774
  // remove comments to avoid flagging conditional stylesheets ( IE compatability, etc. )
@@ -1785,14 +1798,13 @@
1785
  }
1786
  }
1787
  while ( ( csslink = regex_link.exec( data ) ) ) {
1788
- //console.log( csslink );
1789
  var stylesheetid = self.trmcss( csslink[ 2 ] ),
1790
  stylesheettheme = csslink[ 3 ],
1791
  stylesheetpath = csslink[ 4 ],
1792
  linktheme = $.chldthmcfg.currparnt === stylesheettheme ? 'parnt' : 'child',
1793
  noid = 0;
1794
- //console.log( 'stylesheetid: ' + stylesheetid );
1795
- // flag stylesheet links that have no id or are not in wp_styles
1796
  if ( '' === stylesheetid || -1 === $.inArray( stylesheetid, analysis.queue ) ) {
1797
  noid = 1;
1798
  //console.log( 'no id for ' + stylesheetpath + '!' );
@@ -1994,7 +2006,7 @@
1994
  style: 'notice-warning'
1995
  } );
1996
  }
1997
- if ( self.analysis.parnt.signals.thm_has_styles &&
1998
  !self.analysis.child.signals.ctc_gen_loaded &&
1999
  !self.analysis.child.signals.thm_parnt_loaded &&
2000
  !self.analysis.child.signals.ctc_parnt_loaded &&
@@ -2063,6 +2075,11 @@
2063
  } else {
2064
  $( '#ctc_ignoreparnt' ).prop( 'checked', false );
2065
  }
 
 
 
 
 
2066
  if ( !self.analysis[ template ].signals.ctc_sep_loaded &&
2067
  !self.analysis[ template ].signals.ctc_gen_loaded &&
2068
  !self.analysis[ template ].signals.ctc_child_loaded &&
@@ -2096,7 +2113,7 @@
2096
  resubmitdata.ctc_enqueue = 'none';
2097
  }
2098
  // if no parent styles, no need to enqueue
2099
- if ( !self.analysis.parnt.signals.thm_has_styles ) {
2100
  //if ( !$( '#ctc_enqueue_none' ).is( ':checked' ) ) {
2101
  notice.notices.push( {
2102
  headline: $.chldthmcfg.getxt( 'anlz27' ),
2
  * Script: chldthmcfg.js
3
  * Plugin URI: http://www.childthemeconfigurator.com/
4
  * Description: Handles jQuery, AJAX and other UI
5
+ * Version: 2.0.2
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
1408
  init: function() {
1409
  //console.log( 'initializing...' )
1410
  var self = this;
1411
+ //self.jquery_exception( { 'message':'testing' }, 'Testing' );
1412
  // try to initialize theme menus
1413
  if ( !$( '#ctc_theme_parnt' ).is( 'input' ) ) {
1414
  //console.log( 'initializing theme select menus...' );
1704
  analyze_theme: function( template ) {
1705
  //console.log( 'analyze_theme' );
1706
  var self = this,
1707
+ now = Math.floor( $.now() / 1000 ),
1708
  //template = $.chldthmcfg.existing ? 'child' : 'parnt',
1709
  stylesheet = ( 'child' === template ? $.chldthmcfg.currchild : $.chldthmcfg.currparnt ),
1710
+ testparams = '&template=' + $.chldthmcfg.currparnt + '&stylesheet=' + stylesheet + '&now=' + now,
1711
  homeurl = self.setssl( window.ctcAjax.homeurl ),
1712
  themepath = window.ctcAjax.theme_uri.replace( /^https?:\/\//, '' ),
1713
  url = homeurl + testparams,
1714
  escaped = self.escrgx( $.chldthmcfg.currparnt ) + ( 'child' === template ? '|' + self.escrgx( stylesheet ) : '' ),
1715
  regex_link = new RegExp( "<link( rel=[\"']stylesheet[\"'] id=['\"]([^'\"]+?)['\"])?[^>]+?" +
1716
+ self.escrgx( themepath ) + '/(' + escaped + ')/([^"\']+\\.css)(\\?[^"\']+)?["\'][^>]+>', 'gi' ),
1717
  regex_err = /<br \/>\n[^\n]+?(fatal|strict|notice|warning|error)[\s\S]+?<br \/>/gi,
1718
  msg,
1719
  queue,
1736
  thm_parnt_loaded: 0,
1737
  thm_child_loaded: 0,
1738
  thm_is_ctc: 0,
1739
+ thm_no_styles: 0,
1740
  thm_notheme: 0
1741
  */
1742
  },
1743
+ queue: [],
1744
+ irreg: []
1745
  };
1746
 
1747
  //console.log( 'Fetching home page: ' + url );
1748
  $.get( url, function( data ) {
1749
 
1750
+ //if ( 'child' === template ) {
1751
+ //console.log( data );
1752
+ //}
1753
  // retrieve enqueued stylesheet ids
1754
+ if ( ( queue = data.match( /BEGIN WP QUEUE\n([\n\w\-\.]*?)\nEND WP QUEUE/ ) ) ) {
1755
  analysis.queue = queue[ 1 ].split(/\n/);
1756
  //console.log( 'QUEUE:' );
1757
  //console.log( analysis.queue );
1758
  } else {
 
1759
  analysis.queue = [];
1760
  analysis.signals.thm_noqueue = 1;
1761
  //analysis.signals.failure = 1;
1762
+ //console.log( 'NO QUEUE' );
1763
+ }
1764
+ if ( ( queue = data.match( /BEGIN CTC IRREGULAR\n([\n\w\-\.,]*?)\nEND CTC IRREGULAR/ ) ) ) {
1765
+ analysis.irreg = queue[ 1 ].split(/\n/);
1766
+ } else {
1767
+ analysis.irreg = [];
1768
  }
1769
+ if ( data.match( /CHLD_THM_CFG_IGNORE_PARENT/ ) ) {
1770
  analysis.signals.thm_ignoreparnt = 1;
1771
+ //console.log( 'thm_ignoreparnt' );
1772
  }
1773
+ if ( data.match( /IS_CTC_THEME/ ) ) {
 
1774
  analysis.signals.thm_is_ctc = 1;
1775
+ //console.log( 'thm_is_ctc' );
1776
  }
1777
 
1778
+ if ( data.match( /NO_CTC_STYLES/ ) ) {
1779
+ analysis.signals.thm_no_styles = 1;
1780
+ //console.log( 'thm_no_styles' );
1781
  }
1782
+ if ( data.match( /HAS_CTC_IMPORT/ ) ) {
1783
  analysis.signals.thm_has_import = 1;
1784
+ //console.log( 'thm_has_import' );
1785
  }
1786
 
1787
  // remove comments to avoid flagging conditional stylesheets ( IE compatability, etc. )
1798
  }
1799
  }
1800
  while ( ( csslink = regex_link.exec( data ) ) ) {
 
1801
  var stylesheetid = self.trmcss( csslink[ 2 ] ),
1802
  stylesheettheme = csslink[ 3 ],
1803
  stylesheetpath = csslink[ 4 ],
1804
  linktheme = $.chldthmcfg.currparnt === stylesheettheme ? 'parnt' : 'child',
1805
  noid = 0;
1806
+ //console.log( 'stylesheetid: ' + stylesheetid + ' stylesheetpath: ' + stylesheetpath );
1807
+ // flag stylesheet links that have no id or are not in wp_styles
1808
  if ( '' === stylesheetid || -1 === $.inArray( stylesheetid, analysis.queue ) ) {
1809
  noid = 1;
1810
  //console.log( 'no id for ' + stylesheetpath + '!' );
2006
  style: 'notice-warning'
2007
  } );
2008
  }
2009
+ if ( !self.analysis.parnt.signals.thm_no_styles &&
2010
  !self.analysis.child.signals.ctc_gen_loaded &&
2011
  !self.analysis.child.signals.thm_parnt_loaded &&
2012
  !self.analysis.child.signals.ctc_parnt_loaded &&
2075
  } else {
2076
  $( '#ctc_ignoreparnt' ).prop( 'checked', false );
2077
  }
2078
+ if ( self.analysis[ template ].signals.thm_keepdeps ){
2079
+ $( '#ctc_keepdeps' ).prop( 'checked', true );
2080
+ } else {
2081
+ $( '#ctc_keepdeps' ).prop( 'checked', false );
2082
+ }
2083
  if ( !self.analysis[ template ].signals.ctc_sep_loaded &&
2084
  !self.analysis[ template ].signals.ctc_gen_loaded &&
2085
  !self.analysis[ template ].signals.ctc_child_loaded &&
2113
  resubmitdata.ctc_enqueue = 'none';
2114
  }
2115
  // if no parent styles, no need to enqueue
2116
+ if ( self.analysis.parnt.signals.thm_no_styles ) {
2117
  //if ( !$( '#ctc_enqueue_none' ).is( ':checked' ) ) {
2118
  notice.notices.push( {
2119
  headline: $.chldthmcfg.getxt( 'anlz27' ),
js/chldthmcfg.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e){"use strict";e.chldthmcfg={escquo:function(e){var t=this;return t.is_empty(e)?e:e.toString().replace(/"/g,"&quot;")},getxt:function(e,t){var c=window.ctcAjax[e+"_txt"];return c?(t&&(c=c.replace(/%s/,t)),c):""},frascii:function(e){var t=parseInt(e),c=String.fromCharCode(t);return c},toascii:function(e){var t=e.charCodeAt(0);return t},is_empty:function(e,t){if("undefined"==typeof e||!1===e||null===e||""===e)return!0;if("undefined"!=typeof t&&"0"===e||0===e)return!0;if(!0===e||"string"==typeof e||"number"==typeof e)return!1;if("object"==typeof e){for(var c in e)if(e.hasOwnProperty(c))return!1;return!0}return!1},theme_exists:function(t,c){var n=!1;return e.each(window.ctcAjax.themes,function(i,s){return e.each(s,function(e,s){return s=null,e.toLowerCase()!==t.toLowerCase()||"parnt"!==i&&"new"!==c?void 0:(n=!0,!1)}),n?!1:void 0}),n},validate:function(){var t=this,c=/[^\w\-]/,n=e("#ctc_child_template").length?e("#ctc_child_template").val().toString().replace(c):"",i=e("#ctc_theme_child").length?e("#ctc_theme_child").val().toString().replace(c):n,s=e("input[name=ctc_child_type]:checked").val(),a=[];return"new"===s&&(i=n),t.theme_exists(i,s)&&a.push(t.getxt("theme_exists").toString().replace(/%s/,i)),t.is_empty(i)&&a.push(t.getxt("inval_theme")),a.length?(t.set_notice({error:a}),!1):"reset"===s?confirm(t.getxt("load"))?!0:!1:!0},autogen_slugs:function(){if(e("#ctc_theme_parnt").length){for(var t=this,c=e("#ctc_theme_parnt").val(),n=c+"-child",i=n,s=window.ctcAjax.themes.parnt[c].Name+" Child",a="",l="",r="00";t.theme_exists(i,"new");)a=t.is_empty(a)?2:a+1,l=r.substring(0,r.length-a.toString().length)+a.toString(),i=n+l;t.testslug=i,t.testname=s+(l.length?" "+l:"")}},focus_panel:function(t){var c=t+"_panel";e(".nav-tab").removeClass("nav-tab-active"),e(".ctc-option-panel").removeClass("ctc-option-panel-active"),e(t).addClass("nav-tab-active"),e(".ctc-option-panel-container").scrollTop(0),e(c).addClass("ctc-option-panel-active")},selector_input_toggle:function(t){var c,n=this;e("#ctc_rewrite_selector").length?(c=e("#ctc_rewrite_selector_orig").val(),e("#ctc_sel_ovrd_selector_selected").text(c),e(t).text(n.getxt("rename"))):(c=e("#ctc_sel_ovrd_selector_selected").text(),e("#ctc_sel_ovrd_selector_selected").html('<textarea id="ctc_rewrite_selector" name="ctc_rewrite_selector" autocomplete="off"></textarea><input id="ctc_rewrite_selector_orig" name="ctc_rewrite_selector_orig" type="hidden" value="'+n.escquo(c)+'"/>'),e("#ctc_rewrite_selector").val(c),e(t).text(n.getxt("cancel")))},coalesce_inputs:function(t){var c=this,n=e(t).attr("id"),i=/^(ctc_(ovrd|\d+)_(parent|child)_([0-9a-z\-]+)_(\d+?)(_(\d+))?)(_\w+)?$/,s=e(t).parents(".ctc-selector-row, .ctc-parent-row").first(),a=s.find(".ctc-swatch").first(),l={parent:{},child:{}},r={parent:{origin:"",start:"",end:""},child:{origin:"",start:"",end:""}},o={child:!1,parent:!1},_={};return s.find(".ctc-parent-value, .ctc-child-value").each(function(){var t,s,a=e(this).attr("id"),d=a.toString().match(i),u=d[2],h=d[3],p="undefined"==typeof d[4]?"":d[4],m=d[7],g=d[5],f="undefined"==typeof d[7]?"":d[8],v="parent"===h?e(this).text().replace(/!$/,""):"seq"!==p&&"ctc_delete_query_selector"===n?"":e(this).val(),y="seq"===p?!1:"ctc_"+u+"_child_"+p+"_i_"+g+"_"+m;if("child"===h&&(c.is_empty(e(this).data("color"))||(v=c.color_text(e(this).data("color")),e(this).data("color",null)),_[a]=v,y&&(_[y]=e("#"+y).is(":checked")?1:0)),""!==v)if(c.is_empty(f))if(t=p.toString().match(/^border(\-(top|right|bottom|left))?$/)&&!v.match(/none/)){var w=new RegExp(c.border_regx+c.color_regx,"i");s=v.toString().match(w),c.is_empty(s)||(s.shift(),l[h][p+"-width"]=s.shift()||"",s.shift(),l[h][p+"-style"]=s.shift()||"",l[h][p+"-color"]=s.shift()||"")}else if("background-image"!==p||v.match(/none/))"seq"!==p&&(l[h][p]=v);else if(v.toString().match(/url\(/))l[h]["background-image"]=c.image_url(h,v);else{var x=new RegExp(c.grad_regx+c.color_regx+c.color_regx,"i");s=v.toString().match(x),!c.is_empty(s)&&s.length>2?(s.shift(),r[h].origin=s.shift()||"top",r[h].start=s.shift()||"transparent",r[h].end=s.shift()||"transparent",o[h]=!0):l[h]["background-image"]=v}else switch(f){case"_border_width":l[h][p+"-width"]="none"===v?0:v;break;case"_border_style":l[h][p+"-style"]=v;break;case"_border_color":l[h][p+"-color"]=v;break;case"_background_url":l[h]["background-image"]=c.image_url(h,v);break;case"_background_color":l[h]["background-color"]=v;break;case"_background_color1":r[h].start=v,o[h]=!0;break;case"_background_color2":r[h].end=v,o[h]=!0;break;case"_background_origin":r[h].origin=v,o[h]=!0}}),"undefined"==typeof a||c.is_empty(a.attr("id"))||(a.removeAttr("style"),o.parent&&a.ctcgrad(r.parent.origin,[r.parent.start,r.parent.end]),a.css(l.parent),a.attr("id").toString().match(/parent/)||(o.child&&a.ctcgrad(r.child.origin,[r.child.start,r.child.end]),a.css(l.child)),a.css({"z-index":-1})),_},decode_value:function(e,t){t="undefined"==typeof t?"":t;var c,n=this,i={orig:t,names:[""],values:[t]};if(e.toString().match(/^border(\-(top|right|bottom|left))?$/)){var s,a=new RegExp(n.border_regx+"("+n.color_regx+")?","i");c=t.toString().match(a),n.is_empty(c)&&(c=[]),i.names=["_border_width","_border_style","_border_color"],s=c.shift(),i.values[0]=c.shift()||"",c.shift(),i.values[1]=c.shift()||"",c.shift(),i.values[2]=c.shift()||""}else if(e.toString().match(/^background\-image/))if(i.names=["_background_url","_background_origin","_background_color1","_background_color2"],i.values=["","","",""],n.is_empty(t)||t.toString().match(/(url|none)/))i.values[0]=t;else{var l,r;c=t.toString().split(/:/),i.values[1]=c.shift()||"",i.values[2]=c.shift()||"",l=c.shift()||"",i.values[3]=c.shift()||"",r=c.shift()||"",i.orig=[i.values[1],i.values[2],i.values[3]].join(" ")}return i},image_url:function(e,t){var c,n=this,i=t.toString().match(/url\(['" ]*(.+?)['" ]*\)/),s=n.is_empty(i)?null:i[1],a=window.ctcAjax.theme_uri+"/"+("parent"===e?window.ctcAjax.parnt:window.ctcAjax.child)+"/";return s?c=s.toString().match(/^(data:|https?:|\/)/)?t:"url("+a+s+")":!1},setup_menus:function(){var e=this;e.setup_query_menu(),e.setup_selector_menu(),e.setup_rule_menu(),e.setup_new_rule_menu(),e.load_queries(),e.load_rules(),e.set_query(e.currquery)},load_queries:function(){var e=this;e.query_css("queries",null)},load_selectors:function(){var e=this;e.query_css("selectors",e.currquery)},load_rules:function(){var e=this;e.query_css("rules",null)},load_selector_values:function(){var e=this;e.query_css("qsid",e.currqsid)},get_queries:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.chldthmcfg.is_empty(this.element.data("menu"))?n.push({label:window.ctcAjax.nosels_txt,value:null}):e.each(this.element.data("menu"),function(e,t){i.test(t)&&n.push({label:t,value:t})}),c(n)},get_selectors:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.chldthmcfg.is_empty(this.element.data("menu"))?n.push({label:window.ctcAjax.nosels_txt,value:null}):e.each(this.element.data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},get_rules:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.chldthmcfg.is_empty(this.element.data("menu"))?n.push({label:window.ctcAjax.nosels_txt,value:null}):e.each(this.element.data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},get_filtered_rules:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.each(e("#ctc_rule_menu").data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},merge_ruleval_arrays:function(t,c,n){var i=this,s={},a=n?c.child.pop():null;return e.each(["parnt","child"],function(t,l){i.is_empty(c[l])||e.each(c[l],function(e,t){n?parseInt(t[2])>=parseInt(a[2])&&(a[2]=parseInt(t[2])+1):(i.is_empty(s[t[2]])&&(s[t[2]]={}),s[t[2]][l]=t)})}),n&&(s[a[2]]={parnt:[],child:a}),s},input_row:function(t,c,n,i,s){var a=this,l="";if(!a.is_empty(i)&&!a.is_empty(i.value)&&!a.is_empty(i.value[c])){var r=i.value[c],o=a.merge_ruleval_arrays(c,r,s);e.each(o,function(s,r){var o=a.decode_value(c,a.is_empty(r.parnt)?"":r.parnt[0]),_=a.is_empty(r.parnt)||a.is_empty(r.parnt[1],1)?0:1,d=a.decode_value(c,a.is_empty(r.child)?"":r.child[0]),u=a.is_empty(r.child)||a.is_empty(r.child[1],1)?0:1;if(l+='<div class="ctc-'+("ovrd"===n?"input":"selector")+'-row clearfix"><div class="ctc-input-cell">',l+="ovrd"===n?c.replace(/\d+/g,a.frascii):i.selector+'<br/><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+t+'" >'+a.getxt("edit")+"</a> "+(a.is_empty(o.orig)?a.getxt("child_only"):""),l+='</div><div class="ctc-parent-value ctc-input-cell"'+("ovrd"!==n?' style="display:none"':"")+' id="ctc_'+n+"_parent_"+c+"_"+t+"_"+s+'">'+(a.is_empty(o.orig)?"[no value]":o.orig+(_?a.getxt("important"):""))+'</div><div class="ctc-input-cell">',!a.is_empty(o.names)){e.each(o.names,function(e,i){i=a.is_empty(i)?"":i,l+='<div class="ctc-child-input-cell clear">';var r,o="ctc_"+n+"_child_"+c+"_"+t+"_"+s+i;!1===(r=d.values.shift())&&(r=""),l+=(a.is_empty(i)?"":a.getxt(i)+":<br/>")+'<input type="text" id="'+o+'" name="'+o+'" class="ctc-child-value'+((i+c).toString().match(/color/)?" color-picker":"")+(i.toString().match(/url/)?" ctc-input-wide":"")+'" value="'+a.escquo(r)+'" /></div>'});var h="ctc_"+n+"_child_"+c+"_i_"+t+"_"+s;l+='<label for="'+h+'"><input type="checkbox" id="'+h+'" name="'+h+'" value="1" '+(u?"checked":"")+" />"+a.getxt("important")+"</label>"}l+="</div>","ovrd"!==n&&(l+='<div class="ctc-swatch ctc-specific" id="ctc_child_'+c+"_"+t+"_"+s+'_swatch">'+a.getxt("swatch")+'</div><div class="ctc-child-input-cell ctc-button-cell" id="ctc_save_'+c+"_"+t+"_"+s+'_cell"><input type="button" class="button ctc-save-input" id="ctc_save_'+c+"_"+t+"_"+s+'" name="ctc_save_'+c+"_"+t+"_"+s+'" value="Save" /></div>'),l+="</div><!-- end input row -->\n"})}return l},scrolltop:function(){e("html, body, .ctc-option-panel-container").animate({scrollTop:0})},css_preview:function(e){var t=this;(e=e.match(/(child|parnt)/)[1])||(e="child"),t.query_css("preview",e)},setup_iris:function(e){var t=this;t.setup_spectrum(e)},setup_spectrum:function(t){var c=this,n=!c.is_empty(window.ctcAjax.palette);try{e(t).spectrum({showInput:!0,allowEmpty:!0,showAlpha:!0,showInitial:!0,preferredFormat:"hex",clickoutFiresChange:!0,move:function(n){e(t).data("color",n),c.coalesce_inputs(t)},showPalette:n?!0:!1,showSelectionPalette:n?!0:!1,palette:[],maxSelectionSize:36,localStorageKey:"ctc-palette."+window.ctcAjax.child,hideAfterPaletteSelect:!0}).on("change",function(){c.coalesce_inputs(this)}).on("keyup",function(){var t=this,n=c.addhash(e(this).val());e(t).val(n),clearTimeout(e(this).data("spectrumTimer")),e(this).data("spectrumTimer",setTimeout(function(){c.coalesce_inputs(t),e(t).spectrum("set",n)},500))})}catch(i){c.jquery_exception(i,"Spectrum Color Picker")}},addhash:function(e){return e.replace(/^#?([a-f0-9]{3,6}.*)/,"#$1")},color_text:function(e){var t=this;return t.is_empty(e)?"":e.getAlpha()<1?e.toRgbString():e.toHexString()},setup_query_menu:function(){var t=this;try{e("#ctc_sel_ovrd_query").autocomplete({source:t.get_queries,minLength:0,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_query(c.item.value),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Query Menu")}},setup_selector_menu:function(){var t=this;try{e("#ctc_sel_ovrd_selector").autocomplete({source:t.get_selectors,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_selector(c.item.value,c.item.label),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Selector Menu")}},setup_rule_menu:function(){var t=this;try{e("#ctc_rule_menu").autocomplete({source:t.get_rules,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_rule(c.item.value,c.item.label),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Property Menu")}},setup_new_rule_menu:function(){var t=this;try{e("#ctc_new_rule_menu").autocomplete({source:t.get_filtered_rules,selectFirst:!0,autoFocus:!0,select:function(c,n){c.preventDefault();var i,s,a=n.item.label.replace(/[^\w\-]/g,t.toascii);return t.is_empty(t.currdata.value)&&(t.currdata.value={}),t.is_empty(t.currdata.value[n.item.label])&&(t.currdata.value[n.item.label]={}),t.is_empty(t.currdata.value[n.item.label].child)&&(t.currdata.value[n.item.label].child=[]),t.currdata.value[n.item.label].child.push(["",0,1,1]),i=e(t.input_row(t.currqsid,a,"ovrd",t.currdata,!0)),e("#ctc_sel_ovrd_rule_inputs").append(i),e("#ctc_new_rule_menu").val(""),i.find('input[type="text"]').each(function(c,n){s||(s=n),e(n).hasClass("color-picker")&&t.setup_spectrum(n)}),s&&e(s).focus(),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"New Property Menu")}},set_theme_params:function(t,c){e("#ctc_child_author").val(window.ctcAjax.themes[t][c].Author),e("#ctc_child_version").val(window.ctcAjax.themes[t][c].Version),e("#ctc_child_authoruri").val(window.ctcAjax.themes[t][c].AuthorURI),e("#ctc_child_themeuri").val(window.ctcAjax.themes[t][c].ThemeURI),e("#ctc_child_descr").val(window.ctcAjax.themes[t][c].Descr),e("#ctc_child_tags").val(window.ctcAjax.themes[t][c].Tags)},update_form:function(){var t,c=this;e("#input_row_stylesheet_handling_container,#input_row_parent_handling_container,#ctc_additional_css_files_container,#input_row_new_theme_slug,#input_row_duplicate_theme_slug,#ctc_copy_theme_mods,#ctc_child_header_parameters,#ctc_configure_submit,#input_row_theme_slug").slideUp("fast"),e("#ctc_configure_submit .ctc-step").text("9"),e("#ctc_theme_child").length&&!e("#ctc_child_type_new").is(":checked")?(t=e("#ctc_theme_child").val(),c.existing=1,c.currparnt=window.ctcAjax.themes.child[t].Template,c.autogen_slugs(),e("#ctc_theme_parnt").val(c.currparnt),e("#ctc_theme_parnt-button .ui-selectmenu-text").text(window.ctcAjax.themes.parnt[c.currparnt].Name),c.set_theme_params("child",t),e("#ctc_child_type_duplicate").is(":checked")?(e("#ctc_child_template").val(c.testslug),e("#ctc_child_name").val(c.testname),e(".ctc-analyze-theme, .ctc-analyze-howto").show(),e("#ctc_load_styles").val("Duplicate Child Theme")):e("#ctc_child_type_reset").is(":checked")?(e("#ctc_configure_submit .ctc-step").text("3"),e("#ctc_configure_submit").slideDown("fast"),e("#theme_slug_container").text(t),e(".ctc-analyze-theme, .ctc-analyze-howto").hide(),e("#ctc_enqueue_none").prop("checked",!0),e("#ctc_load_styles").val("Reset Child Theme to Previous State")):(e("#ctc_child_template").val(""),e("#theme_slug_container").text(t),e(".ctc-analyze-theme, .ctc-analyze-howto").show(),e("#ctc_child_name").val(window.ctcAjax.themes.child[t].Name),e("#ctc_load_styles").val("Configure Child Theme")),e("#input_row_existing_theme_option").slideDown("fast"),e("#input_row_new_theme_option").slideUp("fast")):(c.existing=0,c.autogen_slugs(),e("#ctc_theme_parnt").val(c.currparnt),e("#ctc_theme_parnt-button .ui-selectmenu-text").text(window.ctcAjax.themes.parnt[c.currparnt].Name),c.set_theme_params("parnt",c.currparnt),e("#input_row_existing_theme_option,#input_row_duplicate_theme_container,#input_row_theme_slug").slideUp("fast"),e("#input_row_new_theme_option").slideDown("fast"),e("#ctc_child_name").val(c.testname),e("#ctc_child_template").val(c.testslug),e(".ctc-analyze-theme, .ctc-analyze-howto").show(),e("#ctc_load_styles").val("Create New Child Theme"))},set_notice:function(t){var c,n=this,i="";n.is_empty(t)||e.each(t,function(t,c){i+='<div class="'+t+' notice is-dismissible dashicons-before"><ul>\n',e(c).each(function(e,t){i+="<li>"+t.toString()+"</li>\n"}),i+="</ul></div>"}),c=e(i),e("#ctc_error_notice").html(c),n.bind_dismiss(c),e("html, body").animate({scrollTop:0},"slow")},set_parent_menu:function(e){var t=this;t.currparnt=e.value,t.update_form()},set_child_menu:function(e){var t=this;t.currchild=e.value,t.update_form()},set_query:function(t){var c=this;return c.is_empty(t)?!1:(c.currquery=t,e("#ctc_sel_ovrd_query").val(""),e("#ctc_sel_ovrd_query_selected").text(t),e("#ctc_sel_ovrd_selector").val(""),e("#ctc_sel_ovrd_selector_selected").html("&nbsp;"),c.load_selectors(),void c.scrolltop())},set_selector:function(t,c){var n=this;return c=null,n.is_empty(t)?!1:(e("#ctc_sel_ovrd_selector").val(""),n.currqsid=t,n.reload=!1,n.load_selector_values(),void n.scrolltop())},set_rule:function(t,c){var n=this;return n.is_empty(t)?!1:(e("#ctc_rule_menu").val(""),e("#ctc_rule_menu_selected").text(c),e(".ctc-rewrite-toggle").text(n.getxt("rename")),e("#ctc_rule_value_inputs, #ctc_input_row_rule_header").show(),n.query_css("rule_val",t),void n.scrolltop())},set_qsid:function(t){var c=this;c.currqsid=e(t).attr("id").match(/_(\d+)$/)[1],c.focus_panel("#query_selector_options"),c.reload=!0,c.load_selector_values()},query_css:function(t,c,n){var i=this,s={ctc_query_obj:t,ctc_query_key:c},a="#ctc_status_"+t+("val_qry"===t?"_"+c:"");"object"==typeof n&&e.each(n,function(e,t){s["ctc_query_"+e]=t}),e(".query-icon,.ctc-status-icon").remove(),e(a+" .ctc-status-icon").remove(),e(a).append('<span class="ctc-status-icon spinner is-active query-icon"></span>'),s.action=i.is_empty(e("#ctc_action").val())||"plugin"!==e("#ctc_action").val()?"ctc_query":"ctc_plgqry",s._wpnonce=e("#_wpnonce").val(),i.ajax_post(t,s)},save:function(t){var c,n,i,s,a,l=this,r={},o=e(t).attr("id");e(t).prop("disabled",!0),e(".ctc-query-icon,.ctc-status-icon").remove(),e(t).parent(".ctc-textarea-button-cell, .ctc-button-cell").append('<span class="ctc-status-icon spinner save-icon"></span>'),o.match(/ctc_configtype/)?(e(t).parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner save-icon"></span>'),r.ctc_configtype=e(t).val()):(c=e("#ctc_new_selectors"))&&"ctc_save_new_selectors"===e(t).attr("id")?(r.ctc_new_selectors=c.val(),(n=e("#ctc_sel_ovrd_query_selected"))&&(r.ctc_sel_ovrd_query=n.text()),l.reload=!0):(i=e("#ctc_child_imports"))&&"ctc_save_imports"===o?r.ctc_child_imports=i.val():"ctc_is_debug"===o?r.ctc_is_debug=e("#ctc_is_debug").is(":checked")?1:0:r=l.coalesce_inputs(t),e(".save-icon").addClass("is-active"),e("#ctc_sel_ovrd_selector_selected").find("#ctc_rewrite_selector").each(function(){s=e("#ctc_rewrite_selector").val(),a=e("#ctc_rewrite_selector_orig").val(),l.is_empty(s)||!s.toString().match(/\w/)?s=a:(r.ctc_rewrite_selector=s,l.reload=!0),e(".ctc-rewrite-toggle").text(l.getxt("rename")),e("#ctc_sel_ovrd_selector_selected").html(s)}),r.action=l.is_empty(e("#ctc_action").val())||"plugin"!==e("#ctc_action").val()?"ctc_update":"ctc_plugin",r._wpnonce=e("#_wpnonce").val(),l.ajax_post("qsid",r)},ajax_post:function(t,c,n){var i=this;e.ajax({url:window.ctcAjax.ajaxurl,data:c,dataType:i.is_empty(n)?"json":n,type:"POST"}).done(function(e){i.handle_success(t,e)}).fail(function(){i.handle_failure(t)}).always(function(){i.jqueryerr.length&&i.jquery_notice()})},handle_failure:function(t){var c=this;e(".query-icon, .save-icon").removeClass("spinner").addClass("failure"),e("input[type=submit], input[type=button], input[type=checkbox],.ctc-delete-input").prop("disabled",!1),e(".ajax-pending").removeClass("ajax-pending"),"preview"===t&&e("#view_parnt_options_panel,#view_child_options_panel").text(c.getxt("css_fail"))},handle_success:function(t,c){var n=this;e(".query-icon, .save-icon").removeClass("spinner"),e(".ajax-pending").removeClass("ajax-pending"),n.is_empty(c)?n.handle_failure(t):(e("#ctc_new_selectors").val(""),e(".query-icon, .save-icon").addClass("success"),e("input[type=submit], input[type=button], input[type=checkbox],.ctc-delete-input").prop("disabled",!1),e(c).each(function(){"function"==typeof n.update[this.obj]&&n.update[this.obj].call(n,this)}))},jquery_exception:function(e,t){var c=this,n=c.is_empty(e.lineNumber)?"":" line: "+e.lineNumber,i=c.is_empty(e.fileName)?"":" "+e.fileName.split(/\?/)[0];c.jqueryerr.push("<code><small>"+t+": "+e.message+i+n+"</small></code>")},jquery_notice:function(t){t=null;var c=this,n=[],i=[];c.jqueryerr.length&&(e("input[type=submit], input[type=button]").prop("disabled",!0),e("script").each(function(){var t=e(this).prop("src");c.is_empty(t)||!t.match(/jquery(\.min|\.js|\-?ui)/i)||t.match(/load\-scripts.php/)||n.push("<code><small>"+t.split(/\?/)[0]+"</small></code>")}),i.push("<strong>"+c.getxt("js")+"</strong> "+c.getxt("contact")),i.push(c.jqueryerr.join("<br/>")),n.length&&i.push(c.getxt("jquery")+"<br/>"+n.join("<br/>")),i.push(c.getxt("plugin"))),c.set_notice({error:i})},update:{qsid:function(t){var c,n,i,s,a=this;a.currqsid=t.key,a.currdata=t.data,e("#ctc_sel_ovrd_qsid").val(a.currqsid),a.is_empty(a.currdata.seq)?e("#ctc_child_load_order_container").empty():(c="ctc_ovrd_child_seq_"+a.currqsid,i=parseInt(a.currdata.seq),n='<input type="text" id="'+c+'" name="'+c+'" class="ctc-child-value" value="'+i+'" />',e("#ctc_child_load_order_container").html(n)),a.is_empty(a.currdata.value)?(s=!0,e("#ctc_sel_ovrd_rule_inputs").empty()):(s=!1,n="",e.each(a.currdata.value,function(e,t){t=null,n+=a.input_row(a.currqsid,e,"ovrd",a.currdata)}),e("#ctc_sel_ovrd_rule_inputs").html(n).find(".color-picker").each(function(){a.setup_spectrum(this)}),a.coalesce_inputs("#ctc_child_all_0_swatch")),a.reload&&(a.load_queries(),a.set_query(a.currdata.query),a.load_rules()),e("#ctc_sel_ovrd_selector_selected").text(a.currdata.selector),e(".ctc-rewrite-toggle").text(a.getxt("rename")),e(".ctc-rewrite-toggle").show(),s?e("#ctc_sel_ovrd_rule_header,#ctc_sel_ovrd_new_rule,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs").hide():e("#ctc_sel_ovrd_rule_header,#ctc_sel_ovrd_new_rule,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs").show()},rule_val:function(t){var c=this,n=e("#ctc_rule_menu_selected").text(),i='<div class="ctc-input-row clearfix" id="ctc_rule_row_'+n+'">\n';c.is_empty(t.data)||(e.each(t.data,function(e,t){var s=c.decode_value(n,t);i+='<div class="ctc-parent-row clearfix" id="ctc_rule_row_'+n+"_"+e+'">\n<div class="ctc-input-cell ctc-parent-value" id="ctc_'+e+"_parent_"+n+"_"+e+'">'+s.orig+'</div>\n<div class="ctc-input-cell">\n<div class="ctc-swatch ctc-specific" id="ctc_'+e+"_parent_"+n+"_"+e+'_swatch">'+c.getxt("swatch")+'</div></div>\n<div class="ctc-input-cell"><a href="#" class="ctc-selector-handle" id="ctc_selector_'+n+"_"+e+'">'+c.getxt("selector")+'</a></div>\n<div id="ctc_selector_'+n+"_"+e+'_container" class="ctc-selector-container">\n<a href="#" id="ctc_selector_'+n+"_"+e+'_close" class="ctc-selector-handle ctc-exit" title="'+c.getxt("close")+'"></a><div id="ctc_selector_'+n+"_"+e+'_inner_container" class="ctc-selector-inner-container clearfix">\n<div id="ctc_status_val_qry_'+e+'"></div>\n<div id="ctc_selector_'+n+"_"+e+'_rows"></div>\n</div></div></div>\n'}),i+="</div>\n"),e("#ctc_rule_value_inputs").html(i).find(".ctc-swatch").each(function(){c.coalesce_inputs(this)})},val_qry:function(t){var c,n,i=this,s="";i.is_empty(t.data)||e.each(t.data,function(n,a){c=n,e.each(a,function(c,a){s+='<h4 class="ctc-query-heading">'+c+"</h4>\n",i.is_empty(a)||e.each(a,function(e,c){s+=i.input_row(e,n,t.key,c)})})}),n="#ctc_selector_"+c+"_"+t.key+"_rows",e(n).html(s).find(".color-picker").each(function(){i.setup_spectrum(this)}),e(n).find(".ctc-swatch").each(function(){i.coalesce_inputs(this)})},queries:function(t){e("#ctc_sel_ovrd_query").data("menu",t.data)},selectors:function(t){e("#ctc_sel_ovrd_selector").data("menu",t.data)},rules:function(t){e("#ctc_rule_menu").data("menu",t.data)},debug:function(t){e("#ctc_debug_container").html(t.data)},preview:function(t){e("#view_"+t.key+"_options_panel").text(t.data)},dismiss:function(){}},bind_dismiss:function(t){var c=this,n=e(t),i=e('<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>'),s=window.commonL10n.dismiss||"";i.find(".screen-reader-text").text(s),n.append(i),i.on("click.wp-dismiss-notice",function(e){e.preventDefault(),c.dismiss_notice(t)})},dismiss_notice:function(t){e(t).fadeTo(100,0,function(){e(this).slideUp(100,function(){e(this).remove()})})},reset_handling:function(){e("#parnt_analysis_notice .notice, #child_analysis_notice .notice").slideUp(),e("#ctc_enqueue_enqueue").prop("checked",!0),e("#ctc_handling_primary").prop("checked",!0),e("#ctc_ignoreparnt").prop("checked",!1),e("#ctc_repairheader").prop("checked",!1)},init:function(){var t=this;if(!e("#ctc_theme_parnt").is("input")){try{e.widget("ctc.themeMenu",e.ui.selectmenu,{_renderItem:function(t,c){var n=e("<li>"),i=c.value.replace(/[^\w\-]/,"");return e("#ctc_theme_option_"+i).detach().appendTo(n),n.appendTo(t)}})}catch(c){t.jquery_exception(c,"Theme Menu")}try{e("#ctc_theme_parnt").themeMenu({select:function(e,c){t.reset_handling(),t.set_parent_menu(c.item)}})}catch(c){"function"==typeof themeMenu?e("#ctc_theme_parnt").themeMenu("destroy"):e("#ctc_theme_parnt-button").remove(),t.jquery_exception(c,"Parent Theme Menu")}if(t.is_empty(window.ctcAjax.themes.child))e("#ctc_child_name").length&&(e("#ctc_child_name").val(t.testname),e("#ctc_child_template").val(t.testslug));else try{e("#ctc_theme_child").themeMenu({select:function(e,c){t.reset_handling(),t.set_child_menu(c.item)}})}catch(c){"function"==typeof themeMenu?e("#ctc_theme_child").themeMenu("destroy"):e("#ctc_theme_child-button").remove(),t.jquery_exception(c,"Child Theme Menu")}}t.currparnt=e("#ctc_theme_parnt").val(),t.currchild=e("#ctc_theme_child").length?e("#ctc_theme_child").val():"",e("#ctc_main").on("click",".ctc-section-toggle",function(t){t.preventDefault(),e(this).parents(".ctc-input-row, .notice-warning, .updated, .error").first().find(".ctc-section-toggle").each(function(){e(this).toggleClass("open")});var c=e(this).attr("id").replace(/\d$/,"")+"_content";return e("#"+c).stop().slideToggle("fast"),!1}),e("#ctc_main").on("click",".ctc-upgrade-notice .notice-dismiss",function(){var c={action:"ctc_dismiss",_wpnonce:e("#_wpnonce").val()};t.ajax_post("dismiss",c)}),t.is_empty(t.jqueryerr)&&(e("#ctc_main").on("click",".ctc-selector-handle",function(c){if(c.preventDefault(),e(this).hasClass("ajax-pending"))return!1;e(this).addClass("ajax-pending");var n,i,s=e(this).attr("id").toString().replace("_close",""),a=s.toString().match(/_([^_]+)_(\d+)$/);e("#"+s+"_container").is(":hidden")&&(t.is_empty(a[1])||t.is_empty(a[2])||(n=a[1],i=a[2],t.query_css("val_qry",i,{rule:n}))),e("#"+s+"_container").fadeToggle("fast"),e(".ctc-selector-container").not("#"+s+"_container").fadeOut("fast")}),e("#ctc_main").on("click",".ctc-save-input[type=button], .ctc-delete-input",function(c){return c.preventDefault(),e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),t.save(this),!1)}),e("#ctc_main").on("keydown",".ctc-selector-container .ctc-child-value[type=text]",function(c){if(13===c.which){var n=e(this).parents(".ctc-selector-row").find(".ctc-save-input[type=button]").first();if(n.length)return c.preventDefault(),n.hasClass("ajax-pending")?!1:(n.addClass("ajax-pending"),t.save(n),!1)}}),e("#ctc_main").on("click",".ctc-selector-edit",function(c){return c.preventDefault(),e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),void t.set_qsid(this))}),e("#ctc_main").on("click",".ctc-rewrite-toggle",function(e){e.preventDefault(),t.selector_input_toggle(this)}),e("#ctc_main").on("click","#ctc_copy_selector",function(){var c=e("#ctc_sel_ovrd_selector_selected").text().trim();t.is_empty(c)||e("#ctc_new_selectors").val(e("#ctc_new_selectors").val()+"\n"+c+" {\n\n}")}),e("#ctc_configtype").on("change",function(){var c=e(this).val();if(t.is_empty(c)||"theme"===c){e(".ctc-theme-only, .ctc-themeonly-container").removeClass("ctc-disabled"),e(".ctc-theme-only, .ctc-themeonly-container input").prop("disabled",!1);try{e("#ctc_theme_parnt, #ctc_theme_child").themeMenu("enable")}catch(n){t.jquery_exception(n,"Theme Menu")}}else{e(".ctc-theme-only, .ctc-themeonly-container").addClass("ctc-disabled"),e(".ctc-theme-only, .ctc-themeonly-container input").prop("disabled",!0);try{e("#ctc_theme_parnt, #ctc_theme_child").themeMenu("disable")}catch(n){t.jquery_exception(n,"Theme Menu")}}}),e(".nav-tab").on("click",function(c){c.preventDefault(),e(".ctc-query-icon,.ctc-status-icon").remove();var n="#"+e(this).attr("id");t.focus_panel(n)}),e("#view_child_options, #view_parnt_options").on("click",function(){return e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),void t.css_preview(e(this).attr("id")))}),e("#ctc_load_form").on("submit",function(){return t.validate()}),e("#ctc_query_selector_form").on("submit",function(c){c.preventDefault();var n=e("#ctc_save_query_selector");return n.hasClass("ajax-pending")?!1:(n.addClass("ajax-pending"),t.save(n),!1)}),e("#ctc_rule_value_form").on("submit",function(e){return e.preventDefault(),!1}),e("#ctc_child_type_new,#ctc_child_type_existing,#ctc_child_type_duplicate,#ctc_child_type_reset").on("focus click",function(){t.reset_handling(),t.update_form()}),e("#ctc_is_debug").on("change",function(){t.save(this)}),e(".ctc-live-preview").on("click",function(t){return t.stopImmediatePropagation(),t.preventDefault(),document.location=e(this).prop("href"),!1}),t.setup_menus(),e("input[type=submit], input[type=button]").prop("disabled",!1),t.scrolltop(),t.update_form()),t.jqueryerr.length&&t.jquery_notice()},testslug:"",testname:"",reload:!1,currquery:"base",currqsid:null,currdata:{},currparnt:"",currchild:"",existing:!1,jqueryerr:[],color_regx:"\\s+(\\#[a-f0-9]{3,6}|rgba?\\([\\d., ]+?\\)|hsla?\\([\\d%., ]+?\\)|[a-z]+)",border_regx:"(\\w+)(\\s+(\\w+))?",grad_regx:"(\\w+)"},e.chldthmanalyze={escrgx:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},trmcss:function(e){return"undefined"==typeof e?"":e.replace(/\-css$/,"")},show_loading:function(t){var c=e.chldthmcfg.existing?"child":"parnt",n="child"===c?e.chldthmcfg.currchild:e.chldthmcfg.currparnt,i=window.ctcAjax.themes[c][n].Name,s='<strong class="ctc_analyze_loading"><span class="spinner is-active"></span>'+e.chldthmcfg.getxt(t?"anlz1":"anlz2")+" "+i+"...</strong>";self.noticediv="",e("#"+c+"_analysis_notice").html(s)},hide_loading:function(){e(".ctc_analyze_loading").fadeTo(200,0,function(){e(this).slideUp(200,function(){e(this).remove()})})},setssl:function(e){return e.replace(/^https?/,window.ctcAjax.ssl?"https":"http")},analyze_theme:function(t){var c,n,i,s=this,a="child"===t?e.chldthmcfg.currchild:e.chldthmcfg.currparnt,l="&template="+e.chldthmcfg.currparnt+"&stylesheet="+a,r=s.setssl(window.ctcAjax.homeurl),o=window.ctcAjax.theme_uri.replace(/^https?:\/\//,""),_=r+l,d=s.escrgx(e.chldthmcfg.currparnt)+("child"===t?"|"+s.escrgx(a):""),u=new RegExp("<link( rel=[\"']stylesheet[\"'] id=['\"]([^'\"]+?)['\"])?[^>]+?"+s.escrgx(o)+"/("+d+")/(.+?\\.css)[^>]+?>","gi"),h=/<br \/>\n[^\n]+?(fatal|strict|notice|warning|error)[\s\S]+?<br \/>/gi,p=0,m=0,g={deps:[[],[]],signals:{},queue:[]};e.get(_,function(a){for((n=a.match(/BEGIN WP QUEUE\n([\n\w\-\.]*?)END WP QUEUE/))?g.queue=n[1].split(/\n/):(g.queue=[],g.signals.thm_noqueue=1),a.match(/<!\-\- CHLD_THM_CFG_IGNORE_PARENT \-\->/)&&(g.signals.thm_ignoreparnt=1),a.match(/<!\-\- IS_CTC_THEME \-\->/)&&(g.signals.thm_is_ctc=1),a.match(/<!\-\- HAS_CTC_STYLES \-\->/)&&(g.signals.thm_has_styles=1),a.match(/<!\-\- HAS_CTC_IMPORT \-\->/)&&(g.signals.thm_has_import=1),a=a.replace(/<!\-\-[\s\S]*?\-\->/g,"");c=h.exec(a);){var l=c[0].replace(/<.*?>/g,"");s.phperr[t].push(l),g.signals.err_php=1,l.match(/Fatal error/i)?g.signals.err_fatal=1:l.match(/(FileNotFoundException|Failed opening|failed to open stream)/i)&&(g.signals.err_fnf=1)}for(;i=u.exec(a);){var r=s.trmcss(i[2]),o=i[3],_=i[4],d=e.chldthmcfg.currparnt===o?"parnt":"child",f=0;if(""===r||-1===e.inArray(r,g.queue))f=1;else if(0===r.indexOf("chld_thm_cfg")){_.match(/^ctc\-style([\-\.]min)?\.css$/)?(p=1,g.signals.ctc_sep_loaded=1):_.match(/^ctc\-genesis([\-\.]min)?\.css$/)?(p=1,g.signals.ctc_gen_loaded=1):r.match(/$chld_thm_cfg_ext/)?(g.signals.ctc_ext_loaded=1,g.deps[p].push([r,_])):"chld_thm_cfg_child"===r?(g.signals.ctc_child_loaded=1,g.deps[p].push([r,_])):"chld_thm_cfg_parent"===r&&(g.signals.ctc_parnt_loaded=1,
2
- g.deps[p].push([r,_]),p&&(g.signals.ctc_parnt_reorder=1));continue}if(_.match(/^style([\-\.]min)?\.css$/))p=1,"parnt"===d?g.signals.thm_parnt_loaded=f?"thm_unregistered":r:g.signals.thm_child_loaded=f?"thm_unregistered":r,f?m?(g.signals.thm_past_wphead=1,g.deps[p].push(["thm_past_wphead",_])):(g.signals.thm_unregistered=1,g.deps[p].push(["thm_unregistered",_])):g.deps[p].push([r,_]);else if("ctc-test.css"===_)m=1;else{var v=null;f&&(v="dep_unregistered"),m&&(v=p?"css_past_wphead":"dep_past_wphead"),v&&(g.signals[v]=1,r=v),g.deps[p].push([r,_])}}p||(g.signals.thm_notheme=1),a=null,s.analysis[t]=g,e(document).trigger("analysisdone")}).fail(function(){g.signals.failure=1,s.analysis[t]=g,e(document).trigger("analysisdone")})},css_notice:function(){var t,c=this,n=e.chldthmcfg.existing?"child":"parnt",i="child"===n?e.chldthmcfg.currchild:e.chldthmcfg.currparnt,s=window.ctcAjax.themes[n][i].Name,a="",l={notices:[]},r={style:"notice-warning",headline:e.chldthmcfg.getxt("anlz3",s),errlist:""},o=0,_={};if(e(window.ctcAjax.addl_css).each(function(t,c){e("#ctc_stylesheet_files .ctc_checkbox").each(function(){c===e(this).val()&&e(this).prop("checked",!0)})}),c.analysis[n].signals.failure||c.analysis[n].signals.thm_noqueue&&!c.phperr[n].length)l.notices.push({headline:e.chldthmcfg.getxt("anlz4",s),msg:e.chldthmcfg.getxt("anlz5"),style:"error"});else{if(c.phperr[n].length&&(e.each(c.phperr[n],function(t,c){c.match(/Fatal error/i)&&(r.style="error",r.headline=e.chldthmcfg.getxt("anlz8",s)),r.errlist+=c+"\n"}),r.msg='<div style="background-color:#ffeebb;padding:6px"><div class="ctc-section-toggle" id="ctc_analysis_errs">'+e.chldthmcfg.getxt("anlz6")+'</div><div id="ctc_analysis_errs_content" style="display:none"><textarea>'+r.errlist+"</textarea></div></div>"+e.chldthmcfg.getxt("anlz7"),l.notices.push(r)),(c.analysis[n].signals.thm_past_wphead||c.analysis[n].signals.dep_past_wphead)&&(l.notices.push({headline:e.chldthmcfg.getxt("anlz9"),style:"notice-warning",msg:e.chldthmcfg.getxt("anlz10")}),e("#ctc_repairheader").prop("checked",!0),e("#ctc_repairheader_container").show()),c.analysis[n].signals.thm_unregistered&&(c.analysis[n].signals.ctc_child_loaded||c.analysis[n].signals.ctc_sep_loaded||(l.notices.push({headline:e.chldthmcfg.getxt("anlz11"),style:"notice-warning",msg:e.chldthmcfg.getxt("anlz12")}),e("#ctc_repairheader_container").show(),e("#ctc_repairheader").prop("checked",!0))),"child"===n&&(c.analysis.child.signals.ctc_parnt_reorder&&(o=1),c.analysis.child.signals.ctc_child_loaded||c.analysis.child.signals.ctc_sep_loaded||c.analysis.child.signals.thm_child_loaded||(l.notices.push({headline:e.chldthmcfg.getxt("anlz13"),style:"notice-warning",msg:e.chldthmcfg.getxt("anlz14")}),o=1),c.analysis[n].signals.ctc_gen_loaded&&l.notices.push({headline:e.chldthmcfg.getxt("anlz31"),msg:e.chldthmcfg.getxt("anlz32"),style:"notice-warning"}),!c.analysis.parnt.signals.thm_has_styles||c.analysis.child.signals.ctc_gen_loaded||c.analysis.child.signals.thm_parnt_loaded||c.analysis.child.signals.ctc_parnt_loaded||c.analysis.child.signals.thm_ignoreparnt||c.analysis.child.signals.thm_has_import||(l.notices.push({headline:e.chldthmcfg.getxt("anlz15"),style:"notice-warning",msg:e.chldthmcfg.getxt("anlz16")}),o=1),c.analysis.child.signals.thm_unregistered&&c.analysis.child.signals.thm_child_loaded&&"thm_unregistered"===c.analysis.child.signals.thm_child_loaded&&c.analysis.child.signals.ctc_child_loaded&&c.analysis.child.signals.ctc_parnt_loaded&&(l.notices.push({headline:e.chldthmcfg.getxt("anlz28"),style:"notice-warning",msg:e.chldthmcfg.getxt("anlz29")}),e("#ctc_repairheader_container").show(),e("#ctc_repairheader").prop("checked",!0)),c.analysis.child.signals.thm_is_ctc||e("#ctc_child_type_duplicate").is(":checked")||l.notices.push({headline:e.chldthmcfg.getxt("anlz19"),msg:e.chldthmcfg.getxt("anlz20"),style:"notice-warning"})),(c.analysis[n].signals.ctc_sep_loaded||c.analysis[n].signals.ctc_gen_loaded)&&e("#ctc_handling_separate").prop("checked",!0),l.notices.length||l.notices.push({headline:""+("child"===n?e.chldthmcfg.getxt("anlz17"):e.chldthmcfg.getxt("anlz18")),style:"updated",msg:""}),"child"===n&&c.analysis.child.signals.thm_has_import&&(l.notices.push({headline:e.chldthmcfg.getxt("anlz21"),msg:e.chldthmcfg.getxt("anlz22"),style:"notice-warning"}),e("#ctc_enqueue_import").prop("checked",!0)),c.analysis[n].signals.thm_ignoreparnt||c.analysis[n].signals.ctc_gen_loaded?(e("#ctc_ignoreparnt").prop("checked",!0),e("#ctc_enqueue_none").is(":checked")||(e("#ctc_enqueue_none").prop("checked",!0),o=1,_.ctc_enqueue="none")):e("#ctc_ignoreparnt").prop("checked",!1),!c.analysis[n].signals.ctc_sep_loaded&&!c.analysis[n].signals.ctc_gen_loaded&&!c.analysis[n].signals.ctc_child_loaded&&!c.analysis[n].signals.thm_unregistered&&!c.analysis[n].signals.thm_past_wphead&&c.analysis[n].deps[1].length){var d="";e.each(c.analysis[n].deps[1],function(e,t){t[1].match(/^style([\-\.]min)?\.css$/)||(d+="<li>"+t[1]+"</li>\n")}),""!==d&&(d="<ul class='howto' style='padding-left:1em'>\n"+d+"</ul>\n",l.notices.push({headline:e.chldthmcfg.getxt("anlz23"),msg:d+e.chldthmcfg.getxt("anlz24"),style:"updated"}))}"child"===n&&c.analysis[n].signals.thm_parnt_loaded&&(l.notices.push({headline:e.chldthmcfg.getxt("anlz25"),msg:e.chldthmcfg.getxt("anlz26"),style:"updated"}),e("#ctc_enqueue_none").prop("checked",!0),o=1,_.ctc_enqueue="none"),c.analysis.parnt.signals.thm_has_styles||(l.notices.push({headline:e.chldthmcfg.getxt("anlz27"),msg:e.chldthmcfg.getxt("anlz26"),style:"updated"}),e("#ctc_enqueue_none").prop("checked",!0),o=1,_.ctc_enqueue="none")}return a=encodeURIComponent(JSON.stringify(c.analysis)),e('input[name="ctc_analysis"]').val(a),_.ctc_analysis=a,c.is_success()&&o&&!c.resubmitting?(c.resubmitting=1,void c.resubmit(_)):(c.resubmitting=0,c.hide_loading(),e.each(l.notices,function(t,c){var i=e('<div class="'+c.style+' notice is-dismissible dashicons-before" ><h4>'+c.headline+"</h4>"+c.msg+"</div>");e.chldthmcfg.bind_dismiss(i),i.hide().appendTo("#"+n+"_analysis_notice").slideDown()}),e("#ctc_is_debug").is(":checked")&&(t='<div style="background-color:#ddd;padding:6px"><div class="ctc-section-toggle" id="ctc_analysis_obj">'+e.chldthmcfg.getxt("anlz30")+'</div><div id="ctc_analysis_obj_content" style="display:none"><textarea style="font-family:monospace;font-size:10px">'+JSON.stringify(c.analysis,null,2)+"</textarea></div></div>",e(t).appendTo("#"+n+"_analysis_notice")),e("#ctc_child_type_reset").is(":checked")||(e("#input_row_stylesheet_handling_container,#input_row_parent_handling_container,#ctc_child_header_parameters,#ctc_configure_submit").slideDown("fast"),e("#ctc_child_type_duplicate").is(":checked")?(e("#ctc_configure_submit .ctc-step").text("8"),e("#ctc_copy_theme_mods").find("input").prop("checked",!1)):(e("#ctc_configure_submit .ctc-step").text("9"),e("#ctc_copy_theme_mods").slideDown("fast")),e("#ctc_child_type_duplicate").is(":checked")||e("#ctc_child_type_new").is(":checked")?(e("#input_row_theme_slug").hide(),e("#input_row_new_theme_slug").slideDown("fast")):(e("#input_row_new_theme_slug").hide(),e("#input_row_theme_slug").slideDown("fast"))),void 0)},resubmit:function(t){var c=this;c.hide_loading(),c.show_loading(!0),t.action="ctc_update",t._wpnonce=e("#_wpnonce").val(),e.ajax({url:window.ctcAjax.ajaxurl,data:t,type:"POST"}).done(function(){c.hide_loading(),c.do_analysis()}).fail(function(){c.hide_loading()})},do_analysis:function(){var t=this;t.analysis={parnt:{},child:{}},t.phperr={parnt:[],child:[]},t.done=0,t.show_loading(!1),t.analyze_theme("parnt"),e.chldthmcfg.existing&&t.analyze_theme("child")},init:function(){var t=this;e(document).on("analysisdone",function(){t.done++,t.done>e.chldthmcfg.existing&&(t.done=0,t.css_notice())}),e("#ctc_main").on("click",".ctc-analyze-theme",function(){t.is_success()&&e.chldthmcfg.dismiss_notice(e(".ctc-success-response").parent(".notice")),t.do_analysis()}),(t.is_success()||window.ctcAjax.pluginmode)&&t.do_analysis()},analysis:{},done:0,resubmitting:0,is_success:function(){return e(".ctc-success-response").length}},e("#request-filesystem-credentials-form").length||(e.chldthmcfg.init(),e.chldthmanalyze.init())}(jQuery);
1
+ !function(e){"use strict";e.chldthmcfg={escquo:function(e){var t=this;return t.is_empty(e)?e:e.toString().replace(/"/g,"&quot;")},getxt:function(e,t){var c=window.ctcAjax[e+"_txt"];return c?(t&&(c=c.replace(/%s/,t)),c):""},frascii:function(e){var t=parseInt(e),c=String.fromCharCode(t);return c},toascii:function(e){var t=e.charCodeAt(0);return t},is_empty:function(e,t){if("undefined"==typeof e||!1===e||null===e||""===e)return!0;if("undefined"!=typeof t&&"0"===e||0===e)return!0;if(!0===e||"string"==typeof e||"number"==typeof e)return!1;if("object"==typeof e){for(var c in e)if(e.hasOwnProperty(c))return!1;return!0}return!1},theme_exists:function(t,c){var n=!1;return e.each(window.ctcAjax.themes,function(i,s){return e.each(s,function(e,s){return s=null,e.toLowerCase()!==t.toLowerCase()||"parnt"!==i&&"new"!==c?void 0:(n=!0,!1)}),n?!1:void 0}),n},validate:function(){var t=this,c=/[^\w\-]/,n=e("#ctc_child_template").length?e("#ctc_child_template").val().toString().replace(c):"",i=e("#ctc_theme_child").length?e("#ctc_theme_child").val().toString().replace(c):n,s=e("input[name=ctc_child_type]:checked").val(),a=[];return"new"===s&&(i=n),t.theme_exists(i,s)&&a.push(t.getxt("theme_exists").toString().replace(/%s/,i)),t.is_empty(i)&&a.push(t.getxt("inval_theme")),a.length?(t.set_notice({error:a}),!1):"reset"===s?confirm(t.getxt("load"))?!0:!1:!0},autogen_slugs:function(){if(e("#ctc_theme_parnt").length){for(var t=this,c=e("#ctc_theme_parnt").val(),n=c+"-child",i=n,s=window.ctcAjax.themes.parnt[c].Name+" Child",a="",l="",r="00";t.theme_exists(i,"new");)a=t.is_empty(a)?2:a+1,l=r.substring(0,r.length-a.toString().length)+a.toString(),i=n+l;t.testslug=i,t.testname=s+(l.length?" "+l:"")}},focus_panel:function(t){var c=t+"_panel";e(".nav-tab").removeClass("nav-tab-active"),e(".ctc-option-panel").removeClass("ctc-option-panel-active"),e(t).addClass("nav-tab-active"),e(".ctc-option-panel-container").scrollTop(0),e(c).addClass("ctc-option-panel-active")},selector_input_toggle:function(t){var c,n=this;e("#ctc_rewrite_selector").length?(c=e("#ctc_rewrite_selector_orig").val(),e("#ctc_sel_ovrd_selector_selected").text(c),e(t).text(n.getxt("rename"))):(c=e("#ctc_sel_ovrd_selector_selected").text(),e("#ctc_sel_ovrd_selector_selected").html('<textarea id="ctc_rewrite_selector" name="ctc_rewrite_selector" autocomplete="off"></textarea><input id="ctc_rewrite_selector_orig" name="ctc_rewrite_selector_orig" type="hidden" value="'+n.escquo(c)+'"/>'),e("#ctc_rewrite_selector").val(c),e(t).text(n.getxt("cancel")))},coalesce_inputs:function(t){var c=this,n=e(t).attr("id"),i=/^(ctc_(ovrd|\d+)_(parent|child)_([0-9a-z\-]+)_(\d+?)(_(\d+))?)(_\w+)?$/,s=e(t).parents(".ctc-selector-row, .ctc-parent-row").first(),a=s.find(".ctc-swatch").first(),l={parent:{},child:{}},r={parent:{origin:"",start:"",end:""},child:{origin:"",start:"",end:""}},o={child:!1,parent:!1},_={};return s.find(".ctc-parent-value, .ctc-child-value").each(function(){var t,s,a=e(this).attr("id"),d=a.toString().match(i),u=d[2],h=d[3],p="undefined"==typeof d[4]?"":d[4],m=d[7],g=d[5],f="undefined"==typeof d[7]?"":d[8],v="parent"===h?e(this).text().replace(/!$/,""):"seq"!==p&&"ctc_delete_query_selector"===n?"":e(this).val(),y="seq"===p?!1:"ctc_"+u+"_child_"+p+"_i_"+g+"_"+m;if("child"===h&&(c.is_empty(e(this).data("color"))||(v=c.color_text(e(this).data("color")),e(this).data("color",null)),_[a]=v,y&&(_[y]=e("#"+y).is(":checked")?1:0)),""!==v)if(c.is_empty(f))if(t=p.toString().match(/^border(\-(top|right|bottom|left))?$/)&&!v.match(/none/)){var w=new RegExp(c.border_regx+c.color_regx,"i");s=v.toString().match(w),c.is_empty(s)||(s.shift(),l[h][p+"-width"]=s.shift()||"",s.shift(),l[h][p+"-style"]=s.shift()||"",l[h][p+"-color"]=s.shift()||"")}else if("background-image"!==p||v.match(/none/))"seq"!==p&&(l[h][p]=v);else if(v.toString().match(/url\(/))l[h]["background-image"]=c.image_url(h,v);else{var x=new RegExp(c.grad_regx+c.color_regx+c.color_regx,"i");s=v.toString().match(x),!c.is_empty(s)&&s.length>2?(s.shift(),r[h].origin=s.shift()||"top",r[h].start=s.shift()||"transparent",r[h].end=s.shift()||"transparent",o[h]=!0):l[h]["background-image"]=v}else switch(f){case"_border_width":l[h][p+"-width"]="none"===v?0:v;break;case"_border_style":l[h][p+"-style"]=v;break;case"_border_color":l[h][p+"-color"]=v;break;case"_background_url":l[h]["background-image"]=c.image_url(h,v);break;case"_background_color":l[h]["background-color"]=v;break;case"_background_color1":r[h].start=v,o[h]=!0;break;case"_background_color2":r[h].end=v,o[h]=!0;break;case"_background_origin":r[h].origin=v,o[h]=!0}}),"undefined"==typeof a||c.is_empty(a.attr("id"))||(a.removeAttr("style"),o.parent&&a.ctcgrad(r.parent.origin,[r.parent.start,r.parent.end]),a.css(l.parent),a.attr("id").toString().match(/parent/)||(o.child&&a.ctcgrad(r.child.origin,[r.child.start,r.child.end]),a.css(l.child)),a.css({"z-index":-1})),_},decode_value:function(e,t){t="undefined"==typeof t?"":t;var c,n=this,i={orig:t,names:[""],values:[t]};if(e.toString().match(/^border(\-(top|right|bottom|left))?$/)){var s,a=new RegExp(n.border_regx+"("+n.color_regx+")?","i");c=t.toString().match(a),n.is_empty(c)&&(c=[]),i.names=["_border_width","_border_style","_border_color"],s=c.shift(),i.values[0]=c.shift()||"",c.shift(),i.values[1]=c.shift()||"",c.shift(),i.values[2]=c.shift()||""}else if(e.toString().match(/^background\-image/))if(i.names=["_background_url","_background_origin","_background_color1","_background_color2"],i.values=["","","",""],n.is_empty(t)||t.toString().match(/(url|none)/))i.values[0]=t;else{var l,r;c=t.toString().split(/:/),i.values[1]=c.shift()||"",i.values[2]=c.shift()||"",l=c.shift()||"",i.values[3]=c.shift()||"",r=c.shift()||"",i.orig=[i.values[1],i.values[2],i.values[3]].join(" ")}return i},image_url:function(e,t){var c,n=this,i=t.toString().match(/url\(['" ]*(.+?)['" ]*\)/),s=n.is_empty(i)?null:i[1],a=window.ctcAjax.theme_uri+"/"+("parent"===e?window.ctcAjax.parnt:window.ctcAjax.child)+"/";return s?c=s.toString().match(/^(data:|https?:|\/)/)?t:"url("+a+s+")":!1},setup_menus:function(){var e=this;e.setup_query_menu(),e.setup_selector_menu(),e.setup_rule_menu(),e.setup_new_rule_menu(),e.load_queries(),e.load_rules(),e.set_query(e.currquery)},load_queries:function(){var e=this;e.query_css("queries",null)},load_selectors:function(){var e=this;e.query_css("selectors",e.currquery)},load_rules:function(){var e=this;e.query_css("rules",null)},load_selector_values:function(){var e=this;e.query_css("qsid",e.currqsid)},get_queries:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.chldthmcfg.is_empty(this.element.data("menu"))?n.push({label:window.ctcAjax.nosels_txt,value:null}):e.each(this.element.data("menu"),function(e,t){i.test(t)&&n.push({label:t,value:t})}),c(n)},get_selectors:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.chldthmcfg.is_empty(this.element.data("menu"))?n.push({label:window.ctcAjax.nosels_txt,value:null}):e.each(this.element.data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},get_rules:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.chldthmcfg.is_empty(this.element.data("menu"))?n.push({label:window.ctcAjax.nosels_txt,value:null}):e.each(this.element.data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},get_filtered_rules:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.each(e("#ctc_rule_menu").data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},merge_ruleval_arrays:function(t,c,n){var i=this,s={},a=n?c.child.pop():null;return e.each(["parnt","child"],function(t,l){i.is_empty(c[l])||e.each(c[l],function(e,t){n?parseInt(t[2])>=parseInt(a[2])&&(a[2]=parseInt(t[2])+1):(i.is_empty(s[t[2]])&&(s[t[2]]={}),s[t[2]][l]=t)})}),n&&(s[a[2]]={parnt:[],child:a}),s},input_row:function(t,c,n,i,s){var a=this,l="";if(!a.is_empty(i)&&!a.is_empty(i.value)&&!a.is_empty(i.value[c])){var r=i.value[c],o=a.merge_ruleval_arrays(c,r,s);e.each(o,function(s,r){var o=a.decode_value(c,a.is_empty(r.parnt)?"":r.parnt[0]),_=a.is_empty(r.parnt)||a.is_empty(r.parnt[1],1)?0:1,d=a.decode_value(c,a.is_empty(r.child)?"":r.child[0]),u=a.is_empty(r.child)||a.is_empty(r.child[1],1)?0:1;if(l+='<div class="ctc-'+("ovrd"===n?"input":"selector")+'-row clearfix"><div class="ctc-input-cell">',l+="ovrd"===n?c.replace(/\d+/g,a.frascii):i.selector+'<br/><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+t+'" >'+a.getxt("edit")+"</a> "+(a.is_empty(o.orig)?a.getxt("child_only"):""),l+='</div><div class="ctc-parent-value ctc-input-cell"'+("ovrd"!==n?' style="display:none"':"")+' id="ctc_'+n+"_parent_"+c+"_"+t+"_"+s+'">'+(a.is_empty(o.orig)?"[no value]":o.orig+(_?a.getxt("important"):""))+'</div><div class="ctc-input-cell">',!a.is_empty(o.names)){e.each(o.names,function(e,i){i=a.is_empty(i)?"":i,l+='<div class="ctc-child-input-cell clear">';var r,o="ctc_"+n+"_child_"+c+"_"+t+"_"+s+i;!1===(r=d.values.shift())&&(r=""),l+=(a.is_empty(i)?"":a.getxt(i)+":<br/>")+'<input type="text" id="'+o+'" name="'+o+'" class="ctc-child-value'+((i+c).toString().match(/color/)?" color-picker":"")+(i.toString().match(/url/)?" ctc-input-wide":"")+'" value="'+a.escquo(r)+'" /></div>'});var h="ctc_"+n+"_child_"+c+"_i_"+t+"_"+s;l+='<label for="'+h+'"><input type="checkbox" id="'+h+'" name="'+h+'" value="1" '+(u?"checked":"")+" />"+a.getxt("important")+"</label>"}l+="</div>","ovrd"!==n&&(l+='<div class="ctc-swatch ctc-specific" id="ctc_child_'+c+"_"+t+"_"+s+'_swatch">'+a.getxt("swatch")+'</div><div class="ctc-child-input-cell ctc-button-cell" id="ctc_save_'+c+"_"+t+"_"+s+'_cell"><input type="button" class="button ctc-save-input" id="ctc_save_'+c+"_"+t+"_"+s+'" name="ctc_save_'+c+"_"+t+"_"+s+'" value="Save" /></div>'),l+="</div><!-- end input row -->\n"})}return l},scrolltop:function(){e("html, body, .ctc-option-panel-container").animate({scrollTop:0})},css_preview:function(e){var t=this;(e=e.match(/(child|parnt)/)[1])||(e="child"),t.query_css("preview",e)},setup_iris:function(e){var t=this;t.setup_spectrum(e)},setup_spectrum:function(t){var c=this,n=!c.is_empty(window.ctcAjax.palette);try{e(t).spectrum({showInput:!0,allowEmpty:!0,showAlpha:!0,showInitial:!0,preferredFormat:"hex",clickoutFiresChange:!0,move:function(n){e(t).data("color",n),c.coalesce_inputs(t)},showPalette:n?!0:!1,showSelectionPalette:n?!0:!1,palette:[],maxSelectionSize:36,localStorageKey:"ctc-palette."+window.ctcAjax.child,hideAfterPaletteSelect:!0}).on("change",function(){c.coalesce_inputs(this)}).on("keyup",function(){var t=this,n=c.addhash(e(this).val());e(t).val(n),clearTimeout(e(this).data("spectrumTimer")),e(this).data("spectrumTimer",setTimeout(function(){c.coalesce_inputs(t),e(t).spectrum("set",n)},500))})}catch(i){c.jquery_exception(i,"Spectrum Color Picker")}},addhash:function(e){return e.replace(/^#?([a-f0-9]{3,6}.*)/,"#$1")},color_text:function(e){var t=this;return t.is_empty(e)?"":e.getAlpha()<1?e.toRgbString():e.toHexString()},setup_query_menu:function(){var t=this;try{e("#ctc_sel_ovrd_query").autocomplete({source:t.get_queries,minLength:0,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_query(c.item.value),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Query Menu")}},setup_selector_menu:function(){var t=this;try{e("#ctc_sel_ovrd_selector").autocomplete({source:t.get_selectors,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_selector(c.item.value,c.item.label),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Selector Menu")}},setup_rule_menu:function(){var t=this;try{e("#ctc_rule_menu").autocomplete({source:t.get_rules,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_rule(c.item.value,c.item.label),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Property Menu")}},setup_new_rule_menu:function(){var t=this;try{e("#ctc_new_rule_menu").autocomplete({source:t.get_filtered_rules,selectFirst:!0,autoFocus:!0,select:function(c,n){c.preventDefault();var i,s,a=n.item.label.replace(/[^\w\-]/g,t.toascii);return t.is_empty(t.currdata.value)&&(t.currdata.value={}),t.is_empty(t.currdata.value[n.item.label])&&(t.currdata.value[n.item.label]={}),t.is_empty(t.currdata.value[n.item.label].child)&&(t.currdata.value[n.item.label].child=[]),t.currdata.value[n.item.label].child.push(["",0,1,1]),i=e(t.input_row(t.currqsid,a,"ovrd",t.currdata,!0)),e("#ctc_sel_ovrd_rule_inputs").append(i),e("#ctc_new_rule_menu").val(""),i.find('input[type="text"]').each(function(c,n){s||(s=n),e(n).hasClass("color-picker")&&t.setup_spectrum(n)}),s&&e(s).focus(),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"New Property Menu")}},set_theme_params:function(t,c){e("#ctc_child_author").val(window.ctcAjax.themes[t][c].Author),e("#ctc_child_version").val(window.ctcAjax.themes[t][c].Version),e("#ctc_child_authoruri").val(window.ctcAjax.themes[t][c].AuthorURI),e("#ctc_child_themeuri").val(window.ctcAjax.themes[t][c].ThemeURI),e("#ctc_child_descr").val(window.ctcAjax.themes[t][c].Descr),e("#ctc_child_tags").val(window.ctcAjax.themes[t][c].Tags)},update_form:function(){var t,c=this;e("#input_row_stylesheet_handling_container,#input_row_parent_handling_container,#ctc_additional_css_files_container,#input_row_new_theme_slug,#input_row_duplicate_theme_slug,#ctc_copy_theme_mods,#ctc_child_header_parameters,#ctc_configure_submit,#input_row_theme_slug").slideUp("fast"),e("#ctc_configure_submit .ctc-step").text("9"),e("#ctc_theme_child").length&&!e("#ctc_child_type_new").is(":checked")?(t=e("#ctc_theme_child").val(),c.existing=1,c.currparnt=window.ctcAjax.themes.child[t].Template,c.autogen_slugs(),e("#ctc_theme_parnt").val(c.currparnt),e("#ctc_theme_parnt-button .ui-selectmenu-text").text(window.ctcAjax.themes.parnt[c.currparnt].Name),c.set_theme_params("child",t),e("#ctc_child_type_duplicate").is(":checked")?(e("#ctc_child_template").val(c.testslug),e("#ctc_child_name").val(c.testname),e(".ctc-analyze-theme, .ctc-analyze-howto").show(),e("#ctc_load_styles").val("Duplicate Child Theme")):e("#ctc_child_type_reset").is(":checked")?(e("#ctc_configure_submit .ctc-step").text("3"),e("#ctc_configure_submit").slideDown("fast"),e("#theme_slug_container").text(t),e(".ctc-analyze-theme, .ctc-analyze-howto").hide(),e("#ctc_enqueue_none").prop("checked",!0),e("#ctc_load_styles").val("Reset Child Theme to Previous State")):(e("#ctc_child_template").val(""),e("#theme_slug_container").text(t),e(".ctc-analyze-theme, .ctc-analyze-howto").show(),e("#ctc_child_name").val(window.ctcAjax.themes.child[t].Name),e("#ctc_load_styles").val("Configure Child Theme")),e("#input_row_existing_theme_option").slideDown("fast"),e("#input_row_new_theme_option").slideUp("fast")):(c.existing=0,c.autogen_slugs(),e("#ctc_theme_parnt").val(c.currparnt),e("#ctc_theme_parnt-button .ui-selectmenu-text").text(window.ctcAjax.themes.parnt[c.currparnt].Name),c.set_theme_params("parnt",c.currparnt),e("#input_row_existing_theme_option,#input_row_duplicate_theme_container,#input_row_theme_slug").slideUp("fast"),e("#input_row_new_theme_option").slideDown("fast"),e("#ctc_child_name").val(c.testname),e("#ctc_child_template").val(c.testslug),e(".ctc-analyze-theme, .ctc-analyze-howto").show(),e("#ctc_load_styles").val("Create New Child Theme"))},set_notice:function(t){var c,n=this,i="";n.is_empty(t)||e.each(t,function(t,c){i+='<div class="'+t+' notice is-dismissible dashicons-before"><ul>\n',e(c).each(function(e,t){i+="<li>"+t.toString()+"</li>\n"}),i+="</ul></div>"}),c=e(i),e("#ctc_error_notice").html(c),n.bind_dismiss(c),e("html, body").animate({scrollTop:0},"slow")},set_parent_menu:function(e){var t=this;t.currparnt=e.value,t.update_form()},set_child_menu:function(e){var t=this;t.currchild=e.value,t.update_form()},set_query:function(t){var c=this;return c.is_empty(t)?!1:(c.currquery=t,e("#ctc_sel_ovrd_query").val(""),e("#ctc_sel_ovrd_query_selected").text(t),e("#ctc_sel_ovrd_selector").val(""),e("#ctc_sel_ovrd_selector_selected").html("&nbsp;"),c.load_selectors(),void c.scrolltop())},set_selector:function(t,c){var n=this;return c=null,n.is_empty(t)?!1:(e("#ctc_sel_ovrd_selector").val(""),n.currqsid=t,n.reload=!1,n.load_selector_values(),void n.scrolltop())},set_rule:function(t,c){var n=this;return n.is_empty(t)?!1:(e("#ctc_rule_menu").val(""),e("#ctc_rule_menu_selected").text(c),e(".ctc-rewrite-toggle").text(n.getxt("rename")),e("#ctc_rule_value_inputs, #ctc_input_row_rule_header").show(),n.query_css("rule_val",t),void n.scrolltop())},set_qsid:function(t){var c=this;c.currqsid=e(t).attr("id").match(/_(\d+)$/)[1],c.focus_panel("#query_selector_options"),c.reload=!0,c.load_selector_values()},query_css:function(t,c,n){var i=this,s={ctc_query_obj:t,ctc_query_key:c},a="#ctc_status_"+t+("val_qry"===t?"_"+c:"");"object"==typeof n&&e.each(n,function(e,t){s["ctc_query_"+e]=t}),e(".query-icon,.ctc-status-icon").remove(),e(a+" .ctc-status-icon").remove(),e(a).append('<span class="ctc-status-icon spinner is-active query-icon"></span>'),s.action=i.is_empty(e("#ctc_action").val())||"plugin"!==e("#ctc_action").val()?"ctc_query":"ctc_plgqry",s._wpnonce=e("#_wpnonce").val(),i.ajax_post(t,s)},save:function(t){var c,n,i,s,a,l=this,r={},o=e(t).attr("id");e(t).prop("disabled",!0),e(".ctc-query-icon,.ctc-status-icon").remove(),e(t).parent(".ctc-textarea-button-cell, .ctc-button-cell").append('<span class="ctc-status-icon spinner save-icon"></span>'),o.match(/ctc_configtype/)?(e(t).parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner save-icon"></span>'),r.ctc_configtype=e(t).val()):(c=e("#ctc_new_selectors"))&&"ctc_save_new_selectors"===e(t).attr("id")?(r.ctc_new_selectors=c.val(),(n=e("#ctc_sel_ovrd_query_selected"))&&(r.ctc_sel_ovrd_query=n.text()),l.reload=!0):(i=e("#ctc_child_imports"))&&"ctc_save_imports"===o?r.ctc_child_imports=i.val():"ctc_is_debug"===o?r.ctc_is_debug=e("#ctc_is_debug").is(":checked")?1:0:r=l.coalesce_inputs(t),e(".save-icon").addClass("is-active"),e("#ctc_sel_ovrd_selector_selected").find("#ctc_rewrite_selector").each(function(){s=e("#ctc_rewrite_selector").val(),a=e("#ctc_rewrite_selector_orig").val(),l.is_empty(s)||!s.toString().match(/\w/)?s=a:(r.ctc_rewrite_selector=s,l.reload=!0),e(".ctc-rewrite-toggle").text(l.getxt("rename")),e("#ctc_sel_ovrd_selector_selected").html(s)}),r.action=l.is_empty(e("#ctc_action").val())||"plugin"!==e("#ctc_action").val()?"ctc_update":"ctc_plugin",r._wpnonce=e("#_wpnonce").val(),l.ajax_post("qsid",r)},ajax_post:function(t,c,n){var i=this;e.ajax({url:window.ctcAjax.ajaxurl,data:c,dataType:i.is_empty(n)?"json":n,type:"POST"}).done(function(e){i.handle_success(t,e)}).fail(function(){i.handle_failure(t)}).always(function(){i.jqueryerr.length&&i.jquery_notice()})},handle_failure:function(t){var c=this;e(".query-icon, .save-icon").removeClass("spinner").addClass("failure"),e("input[type=submit], input[type=button], input[type=checkbox],.ctc-delete-input").prop("disabled",!1),e(".ajax-pending").removeClass("ajax-pending"),"preview"===t&&e("#view_parnt_options_panel,#view_child_options_panel").text(c.getxt("css_fail"))},handle_success:function(t,c){var n=this;e(".query-icon, .save-icon").removeClass("spinner"),e(".ajax-pending").removeClass("ajax-pending"),n.is_empty(c)?n.handle_failure(t):(e("#ctc_new_selectors").val(""),e(".query-icon, .save-icon").addClass("success"),e("input[type=submit], input[type=button], input[type=checkbox],.ctc-delete-input").prop("disabled",!1),e(c).each(function(){"function"==typeof n.update[this.obj]&&n.update[this.obj].call(n,this)}))},jquery_exception:function(e,t){var c=this,n=c.is_empty(e.lineNumber)?"":" line: "+e.lineNumber,i=c.is_empty(e.fileName)?"":" "+e.fileName.split(/\?/)[0];c.jqueryerr.push("<code><small>"+t+": "+e.message+i+n+"</small></code>")},jquery_notice:function(t){t=null;var c=this,n=[],i=[];c.jqueryerr.length&&(e("input[type=submit], input[type=button]").prop("disabled",!0),e("script").each(function(){var t=e(this).prop("src");c.is_empty(t)||!t.match(/jquery(\.min|\.js|\-?ui)/i)||t.match(/load\-scripts.php/)||n.push("<code><small>"+t.split(/\?/)[0]+"</small></code>")}),i.push("<strong>"+c.getxt("js")+"</strong> "+c.getxt("contact")),i.push(c.jqueryerr.join("<br/>")),n.length&&i.push(c.getxt("jquery")+"<br/>"+n.join("<br/>")),i.push(c.getxt("plugin"))),c.set_notice({error:i})},update:{qsid:function(t){var c,n,i,s,a=this;a.currqsid=t.key,a.currdata=t.data,e("#ctc_sel_ovrd_qsid").val(a.currqsid),a.is_empty(a.currdata.seq)?e("#ctc_child_load_order_container").empty():(c="ctc_ovrd_child_seq_"+a.currqsid,i=parseInt(a.currdata.seq),n='<input type="text" id="'+c+'" name="'+c+'" class="ctc-child-value" value="'+i+'" />',e("#ctc_child_load_order_container").html(n)),a.is_empty(a.currdata.value)?(s=!0,e("#ctc_sel_ovrd_rule_inputs").empty()):(s=!1,n="",e.each(a.currdata.value,function(e,t){t=null,n+=a.input_row(a.currqsid,e,"ovrd",a.currdata)}),e("#ctc_sel_ovrd_rule_inputs").html(n).find(".color-picker").each(function(){a.setup_spectrum(this)}),a.coalesce_inputs("#ctc_child_all_0_swatch")),a.reload&&(a.load_queries(),a.set_query(a.currdata.query),a.load_rules()),e("#ctc_sel_ovrd_selector_selected").text(a.currdata.selector),e(".ctc-rewrite-toggle").text(a.getxt("rename")),e(".ctc-rewrite-toggle").show(),s?e("#ctc_sel_ovrd_rule_header,#ctc_sel_ovrd_new_rule,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs").hide():e("#ctc_sel_ovrd_rule_header,#ctc_sel_ovrd_new_rule,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs").show()},rule_val:function(t){var c=this,n=e("#ctc_rule_menu_selected").text(),i='<div class="ctc-input-row clearfix" id="ctc_rule_row_'+n+'">\n';c.is_empty(t.data)||(e.each(t.data,function(e,t){var s=c.decode_value(n,t);i+='<div class="ctc-parent-row clearfix" id="ctc_rule_row_'+n+"_"+e+'">\n<div class="ctc-input-cell ctc-parent-value" id="ctc_'+e+"_parent_"+n+"_"+e+'">'+s.orig+'</div>\n<div class="ctc-input-cell">\n<div class="ctc-swatch ctc-specific" id="ctc_'+e+"_parent_"+n+"_"+e+'_swatch">'+c.getxt("swatch")+'</div></div>\n<div class="ctc-input-cell"><a href="#" class="ctc-selector-handle" id="ctc_selector_'+n+"_"+e+'">'+c.getxt("selector")+'</a></div>\n<div id="ctc_selector_'+n+"_"+e+'_container" class="ctc-selector-container">\n<a href="#" id="ctc_selector_'+n+"_"+e+'_close" class="ctc-selector-handle ctc-exit" title="'+c.getxt("close")+'"></a><div id="ctc_selector_'+n+"_"+e+'_inner_container" class="ctc-selector-inner-container clearfix">\n<div id="ctc_status_val_qry_'+e+'"></div>\n<div id="ctc_selector_'+n+"_"+e+'_rows"></div>\n</div></div></div>\n'}),i+="</div>\n"),e("#ctc_rule_value_inputs").html(i).find(".ctc-swatch").each(function(){c.coalesce_inputs(this)})},val_qry:function(t){var c,n,i=this,s="";i.is_empty(t.data)||e.each(t.data,function(n,a){c=n,e.each(a,function(c,a){s+='<h4 class="ctc-query-heading">'+c+"</h4>\n",i.is_empty(a)||e.each(a,function(e,c){s+=i.input_row(e,n,t.key,c)})})}),n="#ctc_selector_"+c+"_"+t.key+"_rows",e(n).html(s).find(".color-picker").each(function(){i.setup_spectrum(this)}),e(n).find(".ctc-swatch").each(function(){i.coalesce_inputs(this)})},queries:function(t){e("#ctc_sel_ovrd_query").data("menu",t.data)},selectors:function(t){e("#ctc_sel_ovrd_selector").data("menu",t.data)},rules:function(t){e("#ctc_rule_menu").data("menu",t.data)},debug:function(t){e("#ctc_debug_container").html(t.data)},preview:function(t){e("#view_"+t.key+"_options_panel").text(t.data)},dismiss:function(){}},bind_dismiss:function(t){var c=this,n=e(t),i=e('<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>'),s=window.commonL10n.dismiss||"";i.find(".screen-reader-text").text(s),n.append(i),i.on("click.wp-dismiss-notice",function(e){e.preventDefault(),c.dismiss_notice(t)})},dismiss_notice:function(t){e(t).fadeTo(100,0,function(){e(this).slideUp(100,function(){e(this).remove()})})},reset_handling:function(){e("#parnt_analysis_notice .notice, #child_analysis_notice .notice").slideUp(),e("#ctc_enqueue_enqueue").prop("checked",!0),e("#ctc_handling_primary").prop("checked",!0),e("#ctc_ignoreparnt").prop("checked",!1),e("#ctc_repairheader").prop("checked",!1)},init:function(){var t=this;if(!e("#ctc_theme_parnt").is("input")){try{e.widget("ctc.themeMenu",e.ui.selectmenu,{_renderItem:function(t,c){var n=e("<li>"),i=c.value.replace(/[^\w\-]/,"");return e("#ctc_theme_option_"+i).detach().appendTo(n),n.appendTo(t)}})}catch(c){t.jquery_exception(c,"Theme Menu")}try{e("#ctc_theme_parnt").themeMenu({select:function(e,c){t.reset_handling(),t.set_parent_menu(c.item)}})}catch(c){"function"==typeof themeMenu?e("#ctc_theme_parnt").themeMenu("destroy"):e("#ctc_theme_parnt-button").remove(),t.jquery_exception(c,"Parent Theme Menu")}if(t.is_empty(window.ctcAjax.themes.child))e("#ctc_child_name").length&&(e("#ctc_child_name").val(t.testname),e("#ctc_child_template").val(t.testslug));else try{e("#ctc_theme_child").themeMenu({select:function(e,c){t.reset_handling(),t.set_child_menu(c.item)}})}catch(c){"function"==typeof themeMenu?e("#ctc_theme_child").themeMenu("destroy"):e("#ctc_theme_child-button").remove(),t.jquery_exception(c,"Child Theme Menu")}}t.currparnt=e("#ctc_theme_parnt").val(),t.currchild=e("#ctc_theme_child").length?e("#ctc_theme_child").val():"",e("#ctc_main").on("click",".ctc-section-toggle",function(t){t.preventDefault(),e(this).parents(".ctc-input-row, .notice-warning, .updated, .error").first().find(".ctc-section-toggle").each(function(){e(this).toggleClass("open")});var c=e(this).attr("id").replace(/\d$/,"")+"_content";return e("#"+c).stop().slideToggle("fast"),!1}),e("#ctc_main").on("click",".ctc-upgrade-notice .notice-dismiss",function(){var c={action:"ctc_dismiss",_wpnonce:e("#_wpnonce").val()};t.ajax_post("dismiss",c)}),t.is_empty(t.jqueryerr)&&(e("#ctc_main").on("click",".ctc-selector-handle",function(c){if(c.preventDefault(),e(this).hasClass("ajax-pending"))return!1;e(this).addClass("ajax-pending");var n,i,s=e(this).attr("id").toString().replace("_close",""),a=s.toString().match(/_([^_]+)_(\d+)$/);e("#"+s+"_container").is(":hidden")&&(t.is_empty(a[1])||t.is_empty(a[2])||(n=a[1],i=a[2],t.query_css("val_qry",i,{rule:n}))),e("#"+s+"_container").fadeToggle("fast"),e(".ctc-selector-container").not("#"+s+"_container").fadeOut("fast")}),e("#ctc_main").on("click",".ctc-save-input[type=button], .ctc-delete-input",function(c){return c.preventDefault(),e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),t.save(this),!1)}),e("#ctc_main").on("keydown",".ctc-selector-container .ctc-child-value[type=text]",function(c){if(13===c.which){var n=e(this).parents(".ctc-selector-row").find(".ctc-save-input[type=button]").first();if(n.length)return c.preventDefault(),n.hasClass("ajax-pending")?!1:(n.addClass("ajax-pending"),t.save(n),!1)}}),e("#ctc_main").on("click",".ctc-selector-edit",function(c){return c.preventDefault(),e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),void t.set_qsid(this))}),e("#ctc_main").on("click",".ctc-rewrite-toggle",function(e){e.preventDefault(),t.selector_input_toggle(this)}),e("#ctc_main").on("click","#ctc_copy_selector",function(){var c=e("#ctc_sel_ovrd_selector_selected").text().trim();t.is_empty(c)||e("#ctc_new_selectors").val(e("#ctc_new_selectors").val()+"\n"+c+" {\n\n}")}),e("#ctc_configtype").on("change",function(){var c=e(this).val();if(t.is_empty(c)||"theme"===c){e(".ctc-theme-only, .ctc-themeonly-container").removeClass("ctc-disabled"),e(".ctc-theme-only, .ctc-themeonly-container input").prop("disabled",!1);try{e("#ctc_theme_parnt, #ctc_theme_child").themeMenu("enable")}catch(n){t.jquery_exception(n,"Theme Menu")}}else{e(".ctc-theme-only, .ctc-themeonly-container").addClass("ctc-disabled"),e(".ctc-theme-only, .ctc-themeonly-container input").prop("disabled",!0);try{e("#ctc_theme_parnt, #ctc_theme_child").themeMenu("disable")}catch(n){t.jquery_exception(n,"Theme Menu")}}}),e(".nav-tab").on("click",function(c){c.preventDefault(),e(".ctc-query-icon,.ctc-status-icon").remove();var n="#"+e(this).attr("id");t.focus_panel(n)}),e("#view_child_options, #view_parnt_options").on("click",function(){return e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),void t.css_preview(e(this).attr("id")))}),e("#ctc_load_form").on("submit",function(){return t.validate()}),e("#ctc_query_selector_form").on("submit",function(c){c.preventDefault();var n=e("#ctc_save_query_selector");return n.hasClass("ajax-pending")?!1:(n.addClass("ajax-pending"),t.save(n),!1)}),e("#ctc_rule_value_form").on("submit",function(e){return e.preventDefault(),!1}),e("#ctc_child_type_new,#ctc_child_type_existing,#ctc_child_type_duplicate,#ctc_child_type_reset").on("focus click",function(){t.reset_handling(),t.update_form()}),e("#ctc_is_debug").on("change",function(){t.save(this)}),e(".ctc-live-preview").on("click",function(t){return t.stopImmediatePropagation(),t.preventDefault(),document.location=e(this).prop("href"),!1}),t.setup_menus(),e("input[type=submit], input[type=button]").prop("disabled",!1),t.scrolltop(),t.update_form()),t.jqueryerr.length&&t.jquery_notice()},testslug:"",testname:"",reload:!1,currquery:"base",currqsid:null,currdata:{},currparnt:"",currchild:"",existing:!1,jqueryerr:[],color_regx:"\\s+(\\#[a-f0-9]{3,6}|rgba?\\([\\d., ]+?\\)|hsla?\\([\\d%., ]+?\\)|[a-z]+)",border_regx:"(\\w+)(\\s+(\\w+))?",grad_regx:"(\\w+)"},e.chldthmanalyze={escrgx:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},trmcss:function(e){return"undefined"==typeof e?"":e.replace(/\-css$/,"")},show_loading:function(t){var c=e.chldthmcfg.existing?"child":"parnt",n="child"===c?e.chldthmcfg.currchild:e.chldthmcfg.currparnt,i=window.ctcAjax.themes[c][n].Name,s='<strong class="ctc_analyze_loading"><span class="spinner is-active"></span>'+e.chldthmcfg.getxt(t?"anlz1":"anlz2")+" "+i+"...</strong>";self.noticediv="",e("#"+c+"_analysis_notice").html(s)},hide_loading:function(){e(".ctc_analyze_loading").fadeTo(200,0,function(){e(this).slideUp(200,function(){e(this).remove()})})},setssl:function(e){return e.replace(/^https?/,window.ctcAjax.ssl?"https":"http")},analyze_theme:function(t){var c,n,i,s=this,a=Math.floor(e.now()/1e3),l="child"===t?e.chldthmcfg.currchild:e.chldthmcfg.currparnt,r="&template="+e.chldthmcfg.currparnt+"&stylesheet="+l+"&now="+a,o=s.setssl(window.ctcAjax.homeurl),_=window.ctcAjax.theme_uri.replace(/^https?:\/\//,""),d=o+r,u=s.escrgx(e.chldthmcfg.currparnt)+("child"===t?"|"+s.escrgx(l):""),h=new RegExp("<link( rel=[\"']stylesheet[\"'] id=['\"]([^'\"]+?)['\"])?[^>]+?"+s.escrgx(_)+"/("+u+")/([^\"']+\\.css)(\\?[^\"']+)?[\"'][^>]+>","gi"),p=/<br \/>\n[^\n]+?(fatal|strict|notice|warning|error)[\s\S]+?<br \/>/gi,m=0,g=0,f={deps:[[],[]],signals:{},queue:[],irreg:[]};e.get(d,function(a){for((n=a.match(/BEGIN WP QUEUE\n([\n\w\-\.]*?)\nEND WP QUEUE/))?f.queue=n[1].split(/\n/):(f.queue=[],f.signals.thm_noqueue=1),(n=a.match(/BEGIN CTC IRREGULAR\n([\n\w\-\.,]*?)\nEND CTC IRREGULAR/))?f.irreg=n[1].split(/\n/):f.irreg=[],a.match(/CHLD_THM_CFG_IGNORE_PARENT/)&&(f.signals.thm_ignoreparnt=1),a.match(/IS_CTC_THEME/)&&(f.signals.thm_is_ctc=1),a.match(/NO_CTC_STYLES/)&&(f.signals.thm_no_styles=1),a.match(/HAS_CTC_IMPORT/)&&(f.signals.thm_has_import=1),a=a.replace(/<!\-\-[\s\S]*?\-\->/g,"");c=p.exec(a);){var l=c[0].replace(/<.*?>/g,"");s.phperr[t].push(l),f.signals.err_php=1,l.match(/Fatal error/i)?f.signals.err_fatal=1:l.match(/(FileNotFoundException|Failed opening|failed to open stream)/i)&&(f.signals.err_fnf=1)}for(;i=h.exec(a);){var r=s.trmcss(i[2]),o=i[3],_=i[4],d=e.chldthmcfg.currparnt===o?"parnt":"child",u=0;if(""===r||-1===e.inArray(r,f.queue))u=1;else if(0===r.indexOf("chld_thm_cfg")){_.match(/^ctc\-style([\-\.]min)?\.css$/)?(m=1,f.signals.ctc_sep_loaded=1):_.match(/^ctc\-genesis([\-\.]min)?\.css$/)?(m=1,f.signals.ctc_gen_loaded=1):r.match(/$chld_thm_cfg_ext/)?(f.signals.ctc_ext_loaded=1,f.deps[m].push([r,_])):"chld_thm_cfg_child"===r?(f.signals.ctc_child_loaded=1,
2
+ f.deps[m].push([r,_])):"chld_thm_cfg_parent"===r&&(f.signals.ctc_parnt_loaded=1,f.deps[m].push([r,_]),m&&(f.signals.ctc_parnt_reorder=1));continue}if(_.match(/^style([\-\.]min)?\.css$/))m=1,"parnt"===d?f.signals.thm_parnt_loaded=u?"thm_unregistered":r:f.signals.thm_child_loaded=u?"thm_unregistered":r,u?g?(f.signals.thm_past_wphead=1,f.deps[m].push(["thm_past_wphead",_])):(f.signals.thm_unregistered=1,f.deps[m].push(["thm_unregistered",_])):f.deps[m].push([r,_]);else if("ctc-test.css"===_)g=1;else{var v=null;u&&(v="dep_unregistered"),g&&(v=m?"css_past_wphead":"dep_past_wphead"),v&&(f.signals[v]=1,r=v),f.deps[m].push([r,_])}}m||(f.signals.thm_notheme=1),a=null,s.analysis[t]=f,e(document).trigger("analysisdone")}).fail(function(){f.signals.failure=1,s.analysis[t]=f,e(document).trigger("analysisdone")})},css_notice:function(){var t,c=this,n=e.chldthmcfg.existing?"child":"parnt",i="child"===n?e.chldthmcfg.currchild:e.chldthmcfg.currparnt,s=window.ctcAjax.themes[n][i].Name,a="",l={notices:[]},r={style:"notice-warning",headline:e.chldthmcfg.getxt("anlz3",s),errlist:""},o=0,_={};if(e(window.ctcAjax.addl_css).each(function(t,c){e("#ctc_stylesheet_files .ctc_checkbox").each(function(){c===e(this).val()&&e(this).prop("checked",!0)})}),c.analysis[n].signals.failure||c.analysis[n].signals.thm_noqueue&&!c.phperr[n].length)l.notices.push({headline:e.chldthmcfg.getxt("anlz4",s),msg:e.chldthmcfg.getxt("anlz5"),style:"error"});else{if(c.phperr[n].length&&(e.each(c.phperr[n],function(t,c){c.match(/Fatal error/i)&&(r.style="error",r.headline=e.chldthmcfg.getxt("anlz8",s)),r.errlist+=c+"\n"}),r.msg='<div style="background-color:#ffeebb;padding:6px"><div class="ctc-section-toggle" id="ctc_analysis_errs">'+e.chldthmcfg.getxt("anlz6")+'</div><div id="ctc_analysis_errs_content" style="display:none"><textarea>'+r.errlist+"</textarea></div></div>"+e.chldthmcfg.getxt("anlz7"),l.notices.push(r)),(c.analysis[n].signals.thm_past_wphead||c.analysis[n].signals.dep_past_wphead)&&(l.notices.push({headline:e.chldthmcfg.getxt("anlz9"),style:"notice-warning",msg:e.chldthmcfg.getxt("anlz10")}),e("#ctc_repairheader").prop("checked",!0),e("#ctc_repairheader_container").show()),c.analysis[n].signals.thm_unregistered&&(c.analysis[n].signals.ctc_child_loaded||c.analysis[n].signals.ctc_sep_loaded||(l.notices.push({headline:e.chldthmcfg.getxt("anlz11"),style:"notice-warning",msg:e.chldthmcfg.getxt("anlz12")}),e("#ctc_repairheader_container").show(),e("#ctc_repairheader").prop("checked",!0))),"child"===n&&(c.analysis.child.signals.ctc_parnt_reorder&&(o=1),c.analysis.child.signals.ctc_child_loaded||c.analysis.child.signals.ctc_sep_loaded||c.analysis.child.signals.thm_child_loaded||(l.notices.push({headline:e.chldthmcfg.getxt("anlz13"),style:"notice-warning",msg:e.chldthmcfg.getxt("anlz14")}),o=1),c.analysis[n].signals.ctc_gen_loaded&&l.notices.push({headline:e.chldthmcfg.getxt("anlz31"),msg:e.chldthmcfg.getxt("anlz32"),style:"notice-warning"}),c.analysis.parnt.signals.thm_no_styles||c.analysis.child.signals.ctc_gen_loaded||c.analysis.child.signals.thm_parnt_loaded||c.analysis.child.signals.ctc_parnt_loaded||c.analysis.child.signals.thm_ignoreparnt||c.analysis.child.signals.thm_has_import||(l.notices.push({headline:e.chldthmcfg.getxt("anlz15"),style:"notice-warning",msg:e.chldthmcfg.getxt("anlz16")}),o=1),c.analysis.child.signals.thm_unregistered&&c.analysis.child.signals.thm_child_loaded&&"thm_unregistered"===c.analysis.child.signals.thm_child_loaded&&c.analysis.child.signals.ctc_child_loaded&&c.analysis.child.signals.ctc_parnt_loaded&&(l.notices.push({headline:e.chldthmcfg.getxt("anlz28"),style:"notice-warning",msg:e.chldthmcfg.getxt("anlz29")}),e("#ctc_repairheader_container").show(),e("#ctc_repairheader").prop("checked",!0)),c.analysis.child.signals.thm_is_ctc||e("#ctc_child_type_duplicate").is(":checked")||l.notices.push({headline:e.chldthmcfg.getxt("anlz19"),msg:e.chldthmcfg.getxt("anlz20"),style:"notice-warning"})),(c.analysis[n].signals.ctc_sep_loaded||c.analysis[n].signals.ctc_gen_loaded)&&e("#ctc_handling_separate").prop("checked",!0),l.notices.length||l.notices.push({headline:""+("child"===n?e.chldthmcfg.getxt("anlz17"):e.chldthmcfg.getxt("anlz18")),style:"updated",msg:""}),"child"===n&&c.analysis.child.signals.thm_has_import&&(l.notices.push({headline:e.chldthmcfg.getxt("anlz21"),msg:e.chldthmcfg.getxt("anlz22"),style:"notice-warning"}),e("#ctc_enqueue_import").prop("checked",!0)),c.analysis[n].signals.thm_ignoreparnt||c.analysis[n].signals.ctc_gen_loaded?(e("#ctc_ignoreparnt").prop("checked",!0),e("#ctc_enqueue_none").is(":checked")||(e("#ctc_enqueue_none").prop("checked",!0),o=1,_.ctc_enqueue="none")):e("#ctc_ignoreparnt").prop("checked",!1),c.analysis[n].signals.thm_keepdeps?e("#ctc_keepdeps").prop("checked",!0):e("#ctc_keepdeps").prop("checked",!1),!c.analysis[n].signals.ctc_sep_loaded&&!c.analysis[n].signals.ctc_gen_loaded&&!c.analysis[n].signals.ctc_child_loaded&&!c.analysis[n].signals.thm_unregistered&&!c.analysis[n].signals.thm_past_wphead&&c.analysis[n].deps[1].length){var d="";e.each(c.analysis[n].deps[1],function(e,t){t[1].match(/^style([\-\.]min)?\.css$/)||(d+="<li>"+t[1]+"</li>\n")}),""!==d&&(d="<ul class='howto' style='padding-left:1em'>\n"+d+"</ul>\n",l.notices.push({headline:e.chldthmcfg.getxt("anlz23"),msg:d+e.chldthmcfg.getxt("anlz24"),style:"updated"}))}"child"===n&&c.analysis[n].signals.thm_parnt_loaded&&(l.notices.push({headline:e.chldthmcfg.getxt("anlz25"),msg:e.chldthmcfg.getxt("anlz26"),style:"updated"}),e("#ctc_enqueue_none").prop("checked",!0),o=1,_.ctc_enqueue="none"),c.analysis.parnt.signals.thm_no_styles&&(l.notices.push({headline:e.chldthmcfg.getxt("anlz27"),msg:e.chldthmcfg.getxt("anlz26"),style:"updated"}),e("#ctc_enqueue_none").prop("checked",!0),o=1,_.ctc_enqueue="none")}return a=encodeURIComponent(JSON.stringify(c.analysis)),e('input[name="ctc_analysis"]').val(a),_.ctc_analysis=a,c.is_success()&&o&&!c.resubmitting?(c.resubmitting=1,void c.resubmit(_)):(c.resubmitting=0,c.hide_loading(),e.each(l.notices,function(t,c){var i=e('<div class="'+c.style+' notice is-dismissible dashicons-before" ><h4>'+c.headline+"</h4>"+c.msg+"</div>");e.chldthmcfg.bind_dismiss(i),i.hide().appendTo("#"+n+"_analysis_notice").slideDown()}),e("#ctc_is_debug").is(":checked")&&(t='<div style="background-color:#ddd;padding:6px"><div class="ctc-section-toggle" id="ctc_analysis_obj">'+e.chldthmcfg.getxt("anlz30")+'</div><div id="ctc_analysis_obj_content" style="display:none"><textarea style="font-family:monospace;font-size:10px">'+JSON.stringify(c.analysis,null,2)+"</textarea></div></div>",e(t).appendTo("#"+n+"_analysis_notice")),e("#ctc_child_type_reset").is(":checked")||(e("#input_row_stylesheet_handling_container,#input_row_parent_handling_container,#ctc_child_header_parameters,#ctc_configure_submit").slideDown("fast"),e("#ctc_child_type_duplicate").is(":checked")?(e("#ctc_configure_submit .ctc-step").text("8"),e("#ctc_copy_theme_mods").find("input").prop("checked",!1)):(e("#ctc_configure_submit .ctc-step").text("9"),e("#ctc_copy_theme_mods").slideDown("fast")),e("#ctc_child_type_duplicate").is(":checked")||e("#ctc_child_type_new").is(":checked")?(e("#input_row_theme_slug").hide(),e("#input_row_new_theme_slug").slideDown("fast")):(e("#input_row_new_theme_slug").hide(),e("#input_row_theme_slug").slideDown("fast"))),void 0)},resubmit:function(t){var c=this;c.hide_loading(),c.show_loading(!0),t.action="ctc_update",t._wpnonce=e("#_wpnonce").val(),e.ajax({url:window.ctcAjax.ajaxurl,data:t,type:"POST"}).done(function(){c.hide_loading(),c.do_analysis()}).fail(function(){c.hide_loading()})},do_analysis:function(){var t=this;t.analysis={parnt:{},child:{}},t.phperr={parnt:[],child:[]},t.done=0,t.show_loading(!1),t.analyze_theme("parnt"),e.chldthmcfg.existing&&t.analyze_theme("child")},init:function(){var t=this;e(document).on("analysisdone",function(){t.done++,t.done>e.chldthmcfg.existing&&(t.done=0,t.css_notice())}),e("#ctc_main").on("click",".ctc-analyze-theme",function(){t.is_success()&&e.chldthmcfg.dismiss_notice(e(".ctc-success-response").parent(".notice")),t.do_analysis()}),(t.is_success()||window.ctcAjax.pluginmode)&&t.do_analysis()},analysis:{},done:0,resubmitting:0,is_success:function(){return e(".ctc-success-response").length}},e("#request-filesystem-credentials-form").length||(e.chldthmcfg.init(),e.chldthmanalyze.init())}(jQuery);
lang/child-theme-configurator.pot CHANGED
@@ -1,10 +1,10 @@
1
- # Copyright (C) 2016 Child Theme Configurator
2
  # This file is distributed under the same license as the Child Theme Configurator package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Child Theme Configurator 2.0.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/child-theme-configurator\n"
7
- "POT-Creation-Date: 2016-03-29 15:21:05+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -12,234 +12,236 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: includes/class-ctc-admin.php:373
16
  msgid "Zip file creation failed."
17
  msgstr ""
18
 
19
- #: includes/class-ctc-admin.php:409
20
  msgid "The Functions file is required and cannot be deleted."
21
  msgstr ""
22
 
23
- #: includes/class-ctc-admin.php:493
24
  msgid "You do not have permission to configure child themes."
25
  msgstr ""
26
 
27
- #: includes/class-ctc-admin.php:522
28
  msgid "%s does not exist. Please select a valid Parent Theme."
29
  msgstr ""
30
 
31
- #: includes/class-ctc-admin.php:525
32
  msgid "Please select a valid Parent Theme."
33
  msgstr ""
34
 
35
- #: includes/class-ctc-admin.php:530
36
  msgid "Please select a valid Child Theme."
37
  msgstr ""
38
 
39
- #: includes/class-ctc-admin.php:534
40
  msgid "Please enter a valid Child Theme directory name."
41
  msgstr ""
42
 
43
- #: includes/class-ctc-admin.php:539
44
  msgid ""
45
  "<strong>%s</strong> exists. Please enter a different Child Theme template "
46
  "name."
47
  msgstr ""
48
 
49
- #: includes/class-ctc-admin.php:558
50
  msgid "Your theme directories are not writable."
51
  msgstr ""
52
 
53
- #: includes/class-ctc-admin.php:632
54
  msgid "Could not upgrade child theme"
55
  msgstr ""
56
 
57
- #: includes/class-ctc-admin.php:722
58
  msgid "Your stylesheet is not writable."
59
  msgstr ""
60
 
61
- #: includes/class-ctc-admin.php:1283
62
  msgid "Could not set write permissions."
63
  msgstr ""
64
 
65
- #: includes/class-ctc-admin.php:1384
66
  msgid "There were errors while resetting permissions."
67
  msgstr ""
68
 
69
- #: includes/class-ctc-admin.php:1426
70
  msgid "Could not upload file."
71
  msgstr ""
72
 
73
- #: includes/class-ctc-ui.php:35
74
  msgid "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
75
  msgstr ""
76
 
77
- #: includes/class-ctc-ui.php:166
78
  msgid "Child Theme files modified successfully."
79
  msgstr ""
80
 
81
- #: includes/class-ctc-ui.php:168
82
  msgid ""
83
  "Child Theme <strong>%s</strong> has been reset. Please configure it using "
84
  "the settings below."
85
  msgstr ""
86
 
87
- #: includes/class-ctc-ui.php:170
88
  msgid "Child Theme <strong>%s</strong> has been generated successfully."
89
  msgstr ""
90
 
91
- #: includes/class-ctc-ui.php:172
92
  msgid "IMPORTANT:"
93
  msgstr ""
94
 
95
- #: includes/class-ctc-ui.php:174 includes/forms/themepreview.php:20
96
  msgid "Go to Themes"
97
  msgstr ""
98
 
99
- #: includes/class-ctc-ui.php:174
100
  msgid "Network enable"
101
  msgstr ""
102
 
103
- #: includes/class-ctc-ui.php:174
104
  msgid "your child theme."
105
  msgstr ""
106
 
107
- #: includes/class-ctc-ui.php:176 includes/forms/themepreview.php:18
108
  msgid "Live Preview"
109
  msgstr ""
110
 
111
- #: includes/class-ctc-ui.php:176
112
  msgid "Preview your child theme"
113
  msgstr ""
114
 
115
- #: includes/class-ctc-ui.php:176
116
  msgid "before activating."
117
  msgstr ""
118
 
119
- #: includes/class-ctc-ui.php:284
120
  msgid "URL/None"
121
  msgstr ""
122
 
123
- #: includes/class-ctc-ui.php:285
124
  msgid "Origin"
125
  msgstr ""
126
 
127
- #: includes/class-ctc-ui.php:286
128
  msgid "Color 1"
129
  msgstr ""
130
 
131
- #: includes/class-ctc-ui.php:287
132
  msgid "Color 2"
133
  msgstr ""
134
 
135
- #: includes/class-ctc-ui.php:288
136
  msgid "Width/None"
137
  msgstr ""
138
 
139
- #: includes/class-ctc-ui.php:289
140
  msgid "Style"
141
  msgstr ""
142
 
143
- #: includes/class-ctc-ui.php:290
144
  msgid "Color"
145
  msgstr ""
146
 
147
- #: includes/class-ctc-ui.php:292
148
  msgid ""
149
  "Are you sure you wish to RESET? This will destroy any work you have done in "
150
  "the Configurator."
151
  msgstr ""
152
 
153
- #: includes/class-ctc-ui.php:293
154
  msgid "<span style=\"font-size:10px\">!</span>"
155
  msgstr ""
156
 
157
- #: includes/class-ctc-ui.php:294 includes/forms/rule-value.php:32
158
  msgid "Selectors"
159
  msgstr ""
160
 
161
- #: includes/class-ctc-ui.php:295
162
  msgid "Close"
163
  msgstr ""
164
 
165
- #: includes/class-ctc-ui.php:296
166
  msgid "Edit Selector"
167
  msgstr ""
168
 
169
- #: includes/class-ctc-ui.php:297
170
  msgid "Cancel"
171
  msgstr ""
172
 
173
- #: includes/class-ctc-ui.php:298
174
  msgid "Rename"
175
  msgstr ""
176
 
177
- #: includes/class-ctc-ui.php:299
178
  msgid "The stylesheet cannot be displayed."
179
  msgstr ""
180
 
181
- #: includes/class-ctc-ui.php:300
182
  msgid "(Child Only)"
183
  msgstr ""
184
 
185
- #: includes/class-ctc-ui.php:301
186
  msgid "Please enter a valid Child Theme."
187
  msgstr ""
188
 
189
- #: includes/class-ctc-ui.php:302
190
  msgid "Please enter a valid Child Theme name."
191
  msgstr ""
192
 
193
- #: includes/class-ctc-ui.php:303
194
  msgid "<strong>%s</strong> exists. Please enter a different Child Theme"
195
  msgstr ""
196
 
197
- #: includes/class-ctc-ui.php:304
198
  msgid "The page could not be loaded correctly."
199
  msgstr ""
200
 
201
- #: includes/class-ctc-ui.php:305
202
  msgid ""
203
  "Conflicting or out-of-date jQuery libraries were loaded by another plugin:"
204
  msgstr ""
205
 
206
- #: includes/class-ctc-ui.php:306
207
  msgid "Deactivating or replacing plugins may resolve this issue."
208
  msgstr ""
209
 
210
- #: includes/class-ctc-ui.php:307
211
  msgid "%sWhy am I seeing this?%s"
212
  msgstr ""
213
 
214
- #: includes/class-ctc-ui.php:310
215
- msgid "No Styles Available. Check Parent/Child settings."
216
- msgstr ""
217
-
218
  #: includes/class-ctc-ui.php:311
219
- msgid "Updating"
220
  msgstr ""
221
 
222
  #: includes/class-ctc-ui.php:312
223
- msgid "Checking"
224
  msgstr ""
225
 
226
  #: includes/class-ctc-ui.php:313
227
- msgid "The theme \"%s\" generated unexpected PHP debug output."
228
  msgstr ""
229
 
230
  #: includes/class-ctc-ui.php:314
231
- msgid "The theme \"%s\" could not be loaded."
232
  msgstr ""
233
 
234
  #: includes/class-ctc-ui.php:315
235
- msgid "<p>Please verify the theme has been installed correctly.</p>"
236
  msgstr ""
237
 
238
  #: includes/class-ctc-ui.php:316
239
- msgid "Show Debug Output"
 
 
240
  msgstr ""
241
 
242
  #: includes/class-ctc-ui.php:317
 
 
 
 
243
  msgid ""
244
  "<p>You may not be able to use this Theme as a Child Theme while these "
245
  "conditions exist.</p><p>It is possible that this theme has specific "
@@ -249,28 +251,28 @@ msgid ""
249
  "report the error list above.</p>"
250
  msgstr ""
251
 
252
- #: includes/class-ctc-ui.php:318
253
  msgid "Do Not Activate \"%s\"! A PHP FATAL ERROR has been detected."
254
  msgstr ""
255
 
256
- #: includes/class-ctc-ui.php:319
257
  msgid "This theme loads stylesheets after the wp_styles queue."
258
  msgstr ""
259
 
260
- #: includes/class-ctc-ui.php:320
261
  msgid ""
262
  "<p>This makes it difficult for plugins to override these styles. You can try "
263
  "to resolve this using the \"Repair header template\" option (Step 6, "
264
  "\"Additional handling options\", below).</p>"
265
  msgstr ""
266
 
267
- #: includes/class-ctc-ui.php:321
268
  msgid ""
269
  "This theme loads the parent theme's <code>style.css</code> file outside the "
270
  "wp_styles queue."
271
  msgstr ""
272
 
273
- #: includes/class-ctc-ui.php:322
274
  msgid ""
275
  "<p>This is common with older themes but requires the use of <code>@import</"
276
  "code>, which is no longer recommended. You can try to resolve this using the "
@@ -278,41 +280,41 @@ msgid ""
278
  "\", below).</p>"
279
  msgstr ""
280
 
281
- #: includes/class-ctc-ui.php:323
282
  msgid "This child theme does not load a Configurator stylesheet."
283
  msgstr ""
284
 
285
- #: includes/class-ctc-ui.php:324
286
  msgid ""
287
  "<p>If you want to customize styles using this plugin, please click "
288
  "\"Configure Child Theme\" again to add this to the settings.</p>"
289
  msgstr ""
290
 
291
- #: includes/class-ctc-ui.php:325
292
  msgid ""
293
  "This child theme uses the parent stylesheet but does not load the parent "
294
  "theme's <code>style.css</code> file."
295
  msgstr ""
296
 
297
- #: includes/class-ctc-ui.php:326
298
  msgid ""
299
  "<p>Please select a stylesheet handling method or check \"Ignore parent theme "
300
  "stylesheets\" (see step 6, below).</p>"
301
  msgstr ""
302
 
303
- #: includes/class-ctc-ui.php:327
304
  msgid "This child theme appears to be functioning correctly."
305
  msgstr ""
306
 
307
- #: includes/class-ctc-ui.php:328
308
  msgid "This theme appears OK to use as a Child theme."
309
  msgstr ""
310
 
311
- #: includes/class-ctc-ui.php:329
312
  msgid "This Child Theme has not been configured for this plugin."
313
  msgstr ""
314
 
315
- #: includes/class-ctc-ui.php:330
316
  msgid ""
317
  "<p>The Configurator makes significant modifications to the child theme, "
318
  "including stylesheet changes and additional php functions. Please consider "
@@ -320,101 +322,100 @@ msgid ""
320
  "original as a backup.</p>"
321
  msgstr ""
322
 
323
- #: includes/class-ctc-ui.php:331
324
  msgid ""
325
  "This child theme uses <code>@import</code> to load the parent theme's "
326
  "<code>style.css</code> file."
327
  msgstr ""
328
 
329
- #: includes/class-ctc-ui.php:332
330
  msgid ""
331
  "<p>Please consider selecting \"Use the WordPress style queue\" for the "
332
  "parent stylesheet handling option (see step 6, below).</p>"
333
  msgstr ""
334
 
335
- #: includes/class-ctc-ui.php:333
336
  msgid ""
337
  "This theme loads additional stylesheets after the <code>style.css</code> "
338
  "file:"
339
  msgstr ""
340
 
341
- #: includes/class-ctc-ui.php:334
342
  msgid ""
343
  "<p>Consider saving new custom styles to a \"Separate stylesheet\" (see step "
344
  "5, below) so that you can customize these styles.</p>"
345
  msgstr ""
346
 
347
- #: includes/class-ctc-ui.php:335
348
  msgid ""
349
  "The parent theme's <code>style.css</code> file is being loaded automatically."
350
  msgstr ""
351
 
352
- #: includes/class-ctc-ui.php:336
353
  msgid ""
354
- "<p>The Configurator has been selected \"Do not add any parent stylesheet "
355
- "handling\" for the \"Parent stylesheet handling\" option (see step 6, below)."
356
- "</p>"
357
  msgstr ""
358
 
359
- #: includes/class-ctc-ui.php:337
360
  msgid ""
361
  "This theme does not require the parent theme's <code>style.css</code> file "
362
  "for its appearance."
363
  msgstr ""
364
 
365
- #: includes/class-ctc-ui.php:338
366
  msgid "This Child Theme was configured with an earlier version."
367
  msgstr ""
368
 
369
- #: includes/class-ctc-ui.php:339
370
  msgid ""
371
  "<p>The selected stylesheet handling method is no longer used. Please update "
372
  "the configuration using the \"Repair header template\" option (see step 6, "
373
  "\"Additional handling options\", below).</p>"
374
  msgstr ""
375
 
376
- #: includes/class-ctc-ui.php:340
377
  msgid "Show Analysis Object"
378
  msgstr ""
379
 
380
- #: includes/class-ctc-ui.php:341
381
  msgid ""
382
  "This child theme was configured using the CTC Pro \"Genesis stylesheet "
383
  "handling\" method."
384
  msgstr ""
385
 
386
- #: includes/class-ctc-ui.php:342
387
  msgid ""
388
  "<p>This method has been replaced by the \"Separate stylesheet\" and \"Ignore "
389
  "Parent Theme\" options ( selected below ) for broader framework "
390
  "compatability.</p>"
391
  msgstr ""
392
 
393
- #: includes/class-ctc-ui.php:362
394
  msgid ""
395
  "The child theme is in read-only mode and Child Theme Configurator cannot "
396
  "apply changes. Click to see options"
397
  msgstr ""
398
 
399
- #: includes/class-ctc-ui.php:365
400
  msgid ""
401
  "<li>Temporarily set write permissions by clicking the button below. When you "
402
  "are finished editing, revert to read-only by clicking \"Make read-only\" "
403
  "under the \"Files\" tab.</li>"
404
  msgstr ""
405
 
406
- #: includes/class-ctc-ui.php:368
407
  msgid "Make files writable"
408
  msgstr ""
409
 
410
- #: includes/class-ctc-ui.php:369
411
  msgid ""
412
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/Editing_wp-"
413
  "config.php#WordPress_Upgrade_Constants\" title=\"Editin wp-config.php\">Add "
414
  "your FTP/SSH credentials to the WordPress config file</a>.</li>"
415
  msgstr ""
416
 
417
- #: includes/class-ctc-ui.php:371
418
  msgid ""
419
  "<li><a target=\"_blank\" href=\"http://technet.microsoft.com/en-us/library/"
420
  "cc771170\" title=\"Setting Application Pool Identity\">Assign WordPress to "
@@ -422,18 +423,18 @@ msgid ""
422
  "li>"
423
  msgstr ""
424
 
425
- #: includes/class-ctc-ui.php:372
426
  msgid ""
427
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/"
428
  "Changing_File_Permissions\" title=\"Changing File Permissions\">Set write "
429
  "permissions on the server manually</a> (not recommended).</li>"
430
  msgstr ""
431
 
432
- #: includes/class-ctc-ui.php:374
433
  msgid "<li>Run PHP under Apache with suEXEC (contact your web host).</li>"
434
  msgstr ""
435
 
436
- #: includes/class-ctc-ui.php:383
437
  msgid ""
438
  "This Child Theme is not owned by your website account. It may have been "
439
  "created by a prior version of this plugin or by another program. Moving "
@@ -442,68 +443,68 @@ msgid ""
442
  "below."
443
  msgstr ""
444
 
445
- #: includes/class-ctc-ui.php:391
446
  msgid ""
447
  "Child Theme Configurator needs to update its internal data. Please set your "
448
  "preferences below and click \"Generate Child Theme Files\" to update your "
449
  "configuration."
450
  msgstr ""
451
 
452
- #: includes/class-ctc-ui.php:397
453
  msgid ""
454
  "<strong>However, some styles could not be parsed due to memory limits.</"
455
  "strong> Try deselecting \"Additional Stylesheets\" below and click "
456
  "\"Generate/Rebuild Child Theme Files\". %sWhy am I seeing this?%s"
457
  msgstr ""
458
 
459
- #: includes/class-ctc-ui.php:405
460
  msgid ""
461
  "Child Theme Configurator did not detect any configuration data because a "
462
  "previously configured Child Theme has been removed. Please follow the steps "
463
  "for \"CONFIGURE an existing Child Theme\" under the \"Parent/Child\" Tab."
464
  msgstr ""
465
 
466
- #: includes/class-ctc-ui.php:411
467
  msgid ""
468
  "Your stylesheet has changed since the last time you used the Configurator. "
469
  "Please follow the steps for \"CONFIGURE an existing Child Theme\" under the "
470
  "\"Parent/Child\" Tab or you will lose these changes."
471
  msgstr ""
472
 
473
- #: includes/class-ctc-ui.php:423
474
  msgid "This version of Child Theme Configurator includes significant updates."
475
  msgstr ""
476
 
477
- #: includes/class-ctc-ui.php:424
478
  msgid ""
479
  "A lot of time and testing has gone into this release but there are always "
480
  "edge cases. If you have any questions, please"
481
  msgstr ""
482
 
483
- #: includes/class-ctc-ui.php:424
484
  msgid "Contact Us."
485
  msgstr ""
486
 
487
- #: includes/class-ctc-ui.php:425
488
  msgid "For more information, please open the Help tab at the top right or "
489
  msgstr ""
490
 
491
- #: includes/class-ctc-ui.php:425
492
  msgid "click here to view the latest videos."
493
  msgstr ""
494
 
495
- #: includes/class-ctc-ui.php:427
496
  msgid ""
497
  "It is a good idea to save a Zip Archive of your Child Theme before using "
498
  "this version for the first time (click the button to the right to download). "
499
  "Remember you can always export your child themes from the \"Files\" Tab."
500
  msgstr ""
501
 
502
- #: includes/class-ctc-ui.php:429
503
  msgid "Backup Child Theme"
504
  msgstr ""
505
 
506
- #. #-#-#-#-# child-theme-configurator.pot (Child Theme Configurator 2.0.0) #-#-#-#-#
507
  #. Plugin Name of the plugin/theme
508
  #: includes/class-ctc.php:50 includes/class-ctc.php:60
509
  #: includes/forms/main.php:34
@@ -814,111 +815,107 @@ msgstr ""
814
  msgid "Currently Loaded"
815
  msgstr ""
816
 
817
- #: includes/forms/parent-child.php:22
818
  msgid "Select an action:"
819
  msgstr ""
820
 
821
- #: includes/forms/parent-child.php:29
822
  msgid "CREATE a new Child Theme"
823
  msgstr ""
824
 
825
- #: includes/forms/parent-child.php:32
826
  msgid ""
827
  "Install a new customizable child theme using an installed theme as a parent."
828
  msgstr ""
829
 
830
- #: includes/forms/parent-child.php:43
831
  msgid "CONFIGURE an existing Child Theme"
832
  msgstr ""
833
 
834
- #: includes/forms/parent-child.php:46
835
  msgid ""
836
  "Set up a previously installed child theme for use with the Configurator or "
837
  "to modify current settings."
838
  msgstr ""
839
 
840
- #: includes/forms/parent-child.php:55
841
  msgid "DUPLICATE an existing Child Theme"
842
  msgstr ""
843
 
844
- #: includes/forms/parent-child.php:58
845
  msgid ""
846
  "Make a complete copy of an existing Child Theme in a new directory, "
847
  "including any menus, widgets and other Customizer settings. The option to "
848
  "copy the Parent Theme settings (step 8, below) is disabled with this action."
849
  msgstr ""
850
 
851
- #: includes/forms/parent-child.php:67
852
  msgid ""
853
  "RESET an existing Child Theme (this will destroy any work you have done in "
854
  "the Configurator)"
855
  msgstr ""
856
 
857
- #: includes/forms/parent-child.php:70
858
  msgid ""
859
  "Revert the Child theme stylesheet and functions files to their state before "
860
  "the initial configuration or last reset. Additional child theme files will "
861
  "not be removed, but you can delete them under the Files tab."
862
  msgstr ""
863
 
864
- #: includes/forms/parent-child.php:79
865
  msgid "Select a Parent Theme:"
866
  msgstr ""
867
 
868
- #: includes/forms/parent-child.php:83 includes/forms/parent-child.php:96
869
  msgid "Analyze"
870
  msgstr ""
871
 
872
- #: includes/forms/parent-child.php:85
873
  msgid "Analyze Parent Theme"
874
  msgstr ""
875
 
876
- #: includes/forms/parent-child.php:85 includes/forms/parent-child.php:98
877
  msgid ""
878
  "Click \"Analyze\" to determine stylesheet dependencies and other potential "
879
  "issues."
880
  msgstr ""
881
 
882
- #: includes/forms/parent-child.php:92
883
  msgid "Select a Child Theme:"
884
  msgstr ""
885
 
886
- #: includes/forms/parent-child.php:98
887
  msgid "Analyze Child Theme"
888
  msgstr ""
889
 
890
- #: includes/forms/parent-child.php:106
891
  msgid "Name the new theme directory:"
892
  msgstr ""
893
 
894
- #: includes/forms/parent-child.php:109
895
  msgid "Directory Name"
896
  msgstr ""
897
 
898
- #: includes/forms/parent-child.php:113 includes/forms/parent-child.php:307
899
  msgid "NOTE:"
900
  msgstr ""
901
 
902
- #: includes/forms/parent-child.php:115
903
  msgid ""
904
  "This is NOT the name of the Child Theme. You can customize the name, "
905
  "description, etc. in step 7, below."
906
  msgstr ""
907
 
908
- #: includes/forms/parent-child.php:119
909
  msgid "Verify Child Theme directory:"
910
  msgstr ""
911
 
912
- #: includes/forms/parent-child.php:125
913
  msgid ""
914
  "For verification only (you cannot modify the directory of an existing Child "
915
  "Theme)."
916
  msgstr ""
917
 
918
- #: includes/forms/parent-child.php:135 includes/forms/parent-child.php:165
919
- msgid "Click to expand"
920
- msgstr ""
921
-
922
  #: includes/forms/parent-child.php:136
923
  msgid "Select where to save new styles:"
924
  msgstr ""
@@ -946,6 +943,10 @@ msgid ""
946
  "allows you to customize stylesheets that load after the primary stylesheet."
947
  msgstr ""
948
 
 
 
 
 
949
  #: includes/forms/parent-child.php:166
950
  msgid "Select Parent Theme stylesheet handling:"
951
  msgstr ""
1
+ # Copyright (C) 2016 Lilaea Media
2
  # This file is distributed under the same license as the Child Theme Configurator package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Child Theme Configurator 2.0.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/child-theme-configurator\n"
7
+ "POT-Creation-Date: 2016-04-06 02:18:30+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: includes/class-ctc-admin.php:374
16
  msgid "Zip file creation failed."
17
  msgstr ""
18
 
19
+ #: includes/class-ctc-admin.php:410
20
  msgid "The Functions file is required and cannot be deleted."
21
  msgstr ""
22
 
23
+ #: includes/class-ctc-admin.php:494
24
  msgid "You do not have permission to configure child themes."
25
  msgstr ""
26
 
27
+ #: includes/class-ctc-admin.php:526
28
  msgid "%s does not exist. Please select a valid Parent Theme."
29
  msgstr ""
30
 
31
+ #: includes/class-ctc-admin.php:529
32
  msgid "Please select a valid Parent Theme."
33
  msgstr ""
34
 
35
+ #: includes/class-ctc-admin.php:534
36
  msgid "Please select a valid Child Theme."
37
  msgstr ""
38
 
39
+ #: includes/class-ctc-admin.php:538
40
  msgid "Please enter a valid Child Theme directory name."
41
  msgstr ""
42
 
43
+ #: includes/class-ctc-admin.php:543
44
  msgid ""
45
  "<strong>%s</strong> exists. Please enter a different Child Theme template "
46
  "name."
47
  msgstr ""
48
 
49
+ #: includes/class-ctc-admin.php:562
50
  msgid "Your theme directories are not writable."
51
  msgstr ""
52
 
53
+ #: includes/class-ctc-admin.php:635
54
  msgid "Could not upgrade child theme"
55
  msgstr ""
56
 
57
+ #: includes/class-ctc-admin.php:725
58
  msgid "Your stylesheet is not writable."
59
  msgstr ""
60
 
61
+ #: includes/class-ctc-admin.php:1293
62
  msgid "Could not set write permissions."
63
  msgstr ""
64
 
65
+ #: includes/class-ctc-admin.php:1394
66
  msgid "There were errors while resetting permissions."
67
  msgstr ""
68
 
69
+ #: includes/class-ctc-admin.php:1436
70
  msgid "Could not upload file."
71
  msgstr ""
72
 
73
+ #: includes/class-ctc-ui.php:34
74
  msgid "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
75
  msgstr ""
76
 
77
+ #: includes/class-ctc-ui.php:165
78
  msgid "Child Theme files modified successfully."
79
  msgstr ""
80
 
81
+ #: includes/class-ctc-ui.php:167
82
  msgid ""
83
  "Child Theme <strong>%s</strong> has been reset. Please configure it using "
84
  "the settings below."
85
  msgstr ""
86
 
87
+ #: includes/class-ctc-ui.php:169
88
  msgid "Child Theme <strong>%s</strong> has been generated successfully."
89
  msgstr ""
90
 
91
+ #: includes/class-ctc-ui.php:171
92
  msgid "IMPORTANT:"
93
  msgstr ""
94
 
95
+ #: includes/class-ctc-ui.php:173 includes/forms/themepreview.php:20
96
  msgid "Go to Themes"
97
  msgstr ""
98
 
99
+ #: includes/class-ctc-ui.php:173
100
  msgid "Network enable"
101
  msgstr ""
102
 
103
+ #: includes/class-ctc-ui.php:173
104
  msgid "your child theme."
105
  msgstr ""
106
 
107
+ #: includes/class-ctc-ui.php:175 includes/forms/themepreview.php:18
108
  msgid "Live Preview"
109
  msgstr ""
110
 
111
+ #: includes/class-ctc-ui.php:175
112
  msgid "Preview your child theme"
113
  msgstr ""
114
 
115
+ #: includes/class-ctc-ui.php:175
116
  msgid "before activating."
117
  msgstr ""
118
 
119
+ #: includes/class-ctc-ui.php:285
120
  msgid "URL/None"
121
  msgstr ""
122
 
123
+ #: includes/class-ctc-ui.php:286
124
  msgid "Origin"
125
  msgstr ""
126
 
127
+ #: includes/class-ctc-ui.php:287
128
  msgid "Color 1"
129
  msgstr ""
130
 
131
+ #: includes/class-ctc-ui.php:288
132
  msgid "Color 2"
133
  msgstr ""
134
 
135
+ #: includes/class-ctc-ui.php:289
136
  msgid "Width/None"
137
  msgstr ""
138
 
139
+ #: includes/class-ctc-ui.php:290
140
  msgid "Style"
141
  msgstr ""
142
 
143
+ #: includes/class-ctc-ui.php:291
144
  msgid "Color"
145
  msgstr ""
146
 
147
+ #: includes/class-ctc-ui.php:293
148
  msgid ""
149
  "Are you sure you wish to RESET? This will destroy any work you have done in "
150
  "the Configurator."
151
  msgstr ""
152
 
153
+ #: includes/class-ctc-ui.php:294
154
  msgid "<span style=\"font-size:10px\">!</span>"
155
  msgstr ""
156
 
157
+ #: includes/class-ctc-ui.php:295 includes/forms/rule-value.php:32
158
  msgid "Selectors"
159
  msgstr ""
160
 
161
+ #: includes/class-ctc-ui.php:296
162
  msgid "Close"
163
  msgstr ""
164
 
165
+ #: includes/class-ctc-ui.php:297
166
  msgid "Edit Selector"
167
  msgstr ""
168
 
169
+ #: includes/class-ctc-ui.php:298
170
  msgid "Cancel"
171
  msgstr ""
172
 
173
+ #: includes/class-ctc-ui.php:299
174
  msgid "Rename"
175
  msgstr ""
176
 
177
+ #: includes/class-ctc-ui.php:300
178
  msgid "The stylesheet cannot be displayed."
179
  msgstr ""
180
 
181
+ #: includes/class-ctc-ui.php:301
182
  msgid "(Child Only)"
183
  msgstr ""
184
 
185
+ #: includes/class-ctc-ui.php:302
186
  msgid "Please enter a valid Child Theme."
187
  msgstr ""
188
 
189
+ #: includes/class-ctc-ui.php:303
190
  msgid "Please enter a valid Child Theme name."
191
  msgstr ""
192
 
193
+ #: includes/class-ctc-ui.php:304
194
  msgid "<strong>%s</strong> exists. Please enter a different Child Theme"
195
  msgstr ""
196
 
197
+ #: includes/class-ctc-ui.php:305
198
  msgid "The page could not be loaded correctly."
199
  msgstr ""
200
 
201
+ #: includes/class-ctc-ui.php:306
202
  msgid ""
203
  "Conflicting or out-of-date jQuery libraries were loaded by another plugin:"
204
  msgstr ""
205
 
206
+ #: includes/class-ctc-ui.php:307
207
  msgid "Deactivating or replacing plugins may resolve this issue."
208
  msgstr ""
209
 
210
+ #: includes/class-ctc-ui.php:308
211
  msgid "%sWhy am I seeing this?%s"
212
  msgstr ""
213
 
 
 
 
 
214
  #: includes/class-ctc-ui.php:311
215
+ msgid "No Styles Available. Check Parent/Child settings."
216
  msgstr ""
217
 
218
  #: includes/class-ctc-ui.php:312
219
+ msgid "Updating"
220
  msgstr ""
221
 
222
  #: includes/class-ctc-ui.php:313
223
+ msgid "Checking"
224
  msgstr ""
225
 
226
  #: includes/class-ctc-ui.php:314
227
+ msgid "The theme \"%s\" generated unexpected PHP debug output."
228
  msgstr ""
229
 
230
  #: includes/class-ctc-ui.php:315
231
+ msgid "The theme \"%s\" could not be analyzed."
232
  msgstr ""
233
 
234
  #: includes/class-ctc-ui.php:316
235
+ msgid ""
236
+ "<p>Please try temporarily disabling plugins that <strong>minify CSS</strong> "
237
+ "or that <strong>force redirects between HTTP and HTTPS</strong>.</p>"
238
  msgstr ""
239
 
240
  #: includes/class-ctc-ui.php:317
241
+ msgid "Show Debug Output"
242
+ msgstr ""
243
+
244
+ #: includes/class-ctc-ui.php:318
245
  msgid ""
246
  "<p>You may not be able to use this Theme as a Child Theme while these "
247
  "conditions exist.</p><p>It is possible that this theme has specific "
251
  "report the error list above.</p>"
252
  msgstr ""
253
 
254
+ #: includes/class-ctc-ui.php:319
255
  msgid "Do Not Activate \"%s\"! A PHP FATAL ERROR has been detected."
256
  msgstr ""
257
 
258
+ #: includes/class-ctc-ui.php:320
259
  msgid "This theme loads stylesheets after the wp_styles queue."
260
  msgstr ""
261
 
262
+ #: includes/class-ctc-ui.php:321
263
  msgid ""
264
  "<p>This makes it difficult for plugins to override these styles. You can try "
265
  "to resolve this using the \"Repair header template\" option (Step 6, "
266
  "\"Additional handling options\", below).</p>"
267
  msgstr ""
268
 
269
+ #: includes/class-ctc-ui.php:322
270
  msgid ""
271
  "This theme loads the parent theme's <code>style.css</code> file outside the "
272
  "wp_styles queue."
273
  msgstr ""
274
 
275
+ #: includes/class-ctc-ui.php:323
276
  msgid ""
277
  "<p>This is common with older themes but requires the use of <code>@import</"
278
  "code>, which is no longer recommended. You can try to resolve this using the "
280
  "\", below).</p>"
281
  msgstr ""
282
 
283
+ #: includes/class-ctc-ui.php:324
284
  msgid "This child theme does not load a Configurator stylesheet."
285
  msgstr ""
286
 
287
+ #: includes/class-ctc-ui.php:325
288
  msgid ""
289
  "<p>If you want to customize styles using this plugin, please click "
290
  "\"Configure Child Theme\" again to add this to the settings.</p>"
291
  msgstr ""
292
 
293
+ #: includes/class-ctc-ui.php:326
294
  msgid ""
295
  "This child theme uses the parent stylesheet but does not load the parent "
296
  "theme's <code>style.css</code> file."
297
  msgstr ""
298
 
299
+ #: includes/class-ctc-ui.php:327
300
  msgid ""
301
  "<p>Please select a stylesheet handling method or check \"Ignore parent theme "
302
  "stylesheets\" (see step 6, below).</p>"
303
  msgstr ""
304
 
305
+ #: includes/class-ctc-ui.php:328
306
  msgid "This child theme appears to be functioning correctly."
307
  msgstr ""
308
 
309
+ #: includes/class-ctc-ui.php:329
310
  msgid "This theme appears OK to use as a Child theme."
311
  msgstr ""
312
 
313
+ #: includes/class-ctc-ui.php:330
314
  msgid "This Child Theme has not been configured for this plugin."
315
  msgstr ""
316
 
317
+ #: includes/class-ctc-ui.php:331
318
  msgid ""
319
  "<p>The Configurator makes significant modifications to the child theme, "
320
  "including stylesheet changes and additional php functions. Please consider "
322
  "original as a backup.</p>"
323
  msgstr ""
324
 
325
+ #: includes/class-ctc-ui.php:332
326
  msgid ""
327
  "This child theme uses <code>@import</code> to load the parent theme's "
328
  "<code>style.css</code> file."
329
  msgstr ""
330
 
331
+ #: includes/class-ctc-ui.php:333
332
  msgid ""
333
  "<p>Please consider selecting \"Use the WordPress style queue\" for the "
334
  "parent stylesheet handling option (see step 6, below).</p>"
335
  msgstr ""
336
 
337
+ #: includes/class-ctc-ui.php:334
338
  msgid ""
339
  "This theme loads additional stylesheets after the <code>style.css</code> "
340
  "file:"
341
  msgstr ""
342
 
343
+ #: includes/class-ctc-ui.php:335
344
  msgid ""
345
  "<p>Consider saving new custom styles to a \"Separate stylesheet\" (see step "
346
  "5, below) so that you can customize these styles.</p>"
347
  msgstr ""
348
 
349
+ #: includes/class-ctc-ui.php:336
350
  msgid ""
351
  "The parent theme's <code>style.css</code> file is being loaded automatically."
352
  msgstr ""
353
 
354
+ #: includes/class-ctc-ui.php:337
355
  msgid ""
356
+ "<p>The Configurator selected \"Do not add any parent stylesheet handling\" "
357
+ "for the \"Parent stylesheet handling\" option (see step 6, below).</p>"
 
358
  msgstr ""
359
 
360
+ #: includes/class-ctc-ui.php:338
361
  msgid ""
362
  "This theme does not require the parent theme's <code>style.css</code> file "
363
  "for its appearance."
364
  msgstr ""
365
 
366
+ #: includes/class-ctc-ui.php:339
367
  msgid "This Child Theme was configured with an earlier version."
368
  msgstr ""
369
 
370
+ #: includes/class-ctc-ui.php:340
371
  msgid ""
372
  "<p>The selected stylesheet handling method is no longer used. Please update "
373
  "the configuration using the \"Repair header template\" option (see step 6, "
374
  "\"Additional handling options\", below).</p>"
375
  msgstr ""
376
 
377
+ #: includes/class-ctc-ui.php:341
378
  msgid "Show Analysis Object"
379
  msgstr ""
380
 
381
+ #: includes/class-ctc-ui.php:342
382
  msgid ""
383
  "This child theme was configured using the CTC Pro \"Genesis stylesheet "
384
  "handling\" method."
385
  msgstr ""
386
 
387
+ #: includes/class-ctc-ui.php:343
388
  msgid ""
389
  "<p>This method has been replaced by the \"Separate stylesheet\" and \"Ignore "
390
  "Parent Theme\" options ( selected below ) for broader framework "
391
  "compatability.</p>"
392
  msgstr ""
393
 
394
+ #: includes/class-ctc-ui.php:363
395
  msgid ""
396
  "The child theme is in read-only mode and Child Theme Configurator cannot "
397
  "apply changes. Click to see options"
398
  msgstr ""
399
 
400
+ #: includes/class-ctc-ui.php:366
401
  msgid ""
402
  "<li>Temporarily set write permissions by clicking the button below. When you "
403
  "are finished editing, revert to read-only by clicking \"Make read-only\" "
404
  "under the \"Files\" tab.</li>"
405
  msgstr ""
406
 
407
+ #: includes/class-ctc-ui.php:369
408
  msgid "Make files writable"
409
  msgstr ""
410
 
411
+ #: includes/class-ctc-ui.php:370
412
  msgid ""
413
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/Editing_wp-"
414
  "config.php#WordPress_Upgrade_Constants\" title=\"Editin wp-config.php\">Add "
415
  "your FTP/SSH credentials to the WordPress config file</a>.</li>"
416
  msgstr ""
417
 
418
+ #: includes/class-ctc-ui.php:372
419
  msgid ""
420
  "<li><a target=\"_blank\" href=\"http://technet.microsoft.com/en-us/library/"
421
  "cc771170\" title=\"Setting Application Pool Identity\">Assign WordPress to "
423
  "li>"
424
  msgstr ""
425
 
426
+ #: includes/class-ctc-ui.php:373
427
  msgid ""
428
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/"
429
  "Changing_File_Permissions\" title=\"Changing File Permissions\">Set write "
430
  "permissions on the server manually</a> (not recommended).</li>"
431
  msgstr ""
432
 
433
+ #: includes/class-ctc-ui.php:375
434
  msgid "<li>Run PHP under Apache with suEXEC (contact your web host).</li>"
435
  msgstr ""
436
 
437
+ #: includes/class-ctc-ui.php:384
438
  msgid ""
439
  "This Child Theme is not owned by your website account. It may have been "
440
  "created by a prior version of this plugin or by another program. Moving "
443
  "below."
444
  msgstr ""
445
 
446
+ #: includes/class-ctc-ui.php:392
447
  msgid ""
448
  "Child Theme Configurator needs to update its internal data. Please set your "
449
  "preferences below and click \"Generate Child Theme Files\" to update your "
450
  "configuration."
451
  msgstr ""
452
 
453
+ #: includes/class-ctc-ui.php:398
454
  msgid ""
455
  "<strong>However, some styles could not be parsed due to memory limits.</"
456
  "strong> Try deselecting \"Additional Stylesheets\" below and click "
457
  "\"Generate/Rebuild Child Theme Files\". %sWhy am I seeing this?%s"
458
  msgstr ""
459
 
460
+ #: includes/class-ctc-ui.php:406
461
  msgid ""
462
  "Child Theme Configurator did not detect any configuration data because a "
463
  "previously configured Child Theme has been removed. Please follow the steps "
464
  "for \"CONFIGURE an existing Child Theme\" under the \"Parent/Child\" Tab."
465
  msgstr ""
466
 
467
+ #: includes/class-ctc-ui.php:412
468
  msgid ""
469
  "Your stylesheet has changed since the last time you used the Configurator. "
470
  "Please follow the steps for \"CONFIGURE an existing Child Theme\" under the "
471
  "\"Parent/Child\" Tab or you will lose these changes."
472
  msgstr ""
473
 
474
+ #: includes/class-ctc-ui.php:424
475
  msgid "This version of Child Theme Configurator includes significant updates."
476
  msgstr ""
477
 
478
+ #: includes/class-ctc-ui.php:425
479
  msgid ""
480
  "A lot of time and testing has gone into this release but there are always "
481
  "edge cases. If you have any questions, please"
482
  msgstr ""
483
 
484
+ #: includes/class-ctc-ui.php:425
485
  msgid "Contact Us."
486
  msgstr ""
487
 
488
+ #: includes/class-ctc-ui.php:426
489
  msgid "For more information, please open the Help tab at the top right or "
490
  msgstr ""
491
 
492
+ #: includes/class-ctc-ui.php:426
493
  msgid "click here to view the latest videos."
494
  msgstr ""
495
 
496
+ #: includes/class-ctc-ui.php:428
497
  msgid ""
498
  "It is a good idea to save a Zip Archive of your Child Theme before using "
499
  "this version for the first time (click the button to the right to download). "
500
  "Remember you can always export your child themes from the \"Files\" Tab."
501
  msgstr ""
502
 
503
+ #: includes/class-ctc-ui.php:430
504
  msgid "Backup Child Theme"
505
  msgstr ""
506
 
507
+ #. #-#-#-#-# child-theme-configurator.pot (Child Theme Configurator 2.0.2) #-#-#-#-#
508
  #. Plugin Name of the plugin/theme
509
  #: includes/class-ctc.php:50 includes/class-ctc.php:60
510
  #: includes/forms/main.php:34
815
  msgid "Currently Loaded"
816
  msgstr ""
817
 
818
+ #: includes/forms/parent-child.php:21
819
  msgid "Select an action:"
820
  msgstr ""
821
 
822
+ #: includes/forms/parent-child.php:28
823
  msgid "CREATE a new Child Theme"
824
  msgstr ""
825
 
826
+ #: includes/forms/parent-child.php:31
827
  msgid ""
828
  "Install a new customizable child theme using an installed theme as a parent."
829
  msgstr ""
830
 
831
+ #: includes/forms/parent-child.php:42
832
  msgid "CONFIGURE an existing Child Theme"
833
  msgstr ""
834
 
835
+ #: includes/forms/parent-child.php:45
836
  msgid ""
837
  "Set up a previously installed child theme for use with the Configurator or "
838
  "to modify current settings."
839
  msgstr ""
840
 
841
+ #: includes/forms/parent-child.php:54
842
  msgid "DUPLICATE an existing Child Theme"
843
  msgstr ""
844
 
845
+ #: includes/forms/parent-child.php:57
846
  msgid ""
847
  "Make a complete copy of an existing Child Theme in a new directory, "
848
  "including any menus, widgets and other Customizer settings. The option to "
849
  "copy the Parent Theme settings (step 8, below) is disabled with this action."
850
  msgstr ""
851
 
852
+ #: includes/forms/parent-child.php:66
853
  msgid ""
854
  "RESET an existing Child Theme (this will destroy any work you have done in "
855
  "the Configurator)"
856
  msgstr ""
857
 
858
+ #: includes/forms/parent-child.php:69
859
  msgid ""
860
  "Revert the Child theme stylesheet and functions files to their state before "
861
  "the initial configuration or last reset. Additional child theme files will "
862
  "not be removed, but you can delete them under the Files tab."
863
  msgstr ""
864
 
865
+ #: includes/forms/parent-child.php:78
866
  msgid "Select a Parent Theme:"
867
  msgstr ""
868
 
869
+ #: includes/forms/parent-child.php:82 includes/forms/parent-child.php:95
870
  msgid "Analyze"
871
  msgstr ""
872
 
873
+ #: includes/forms/parent-child.php:84
874
  msgid "Analyze Parent Theme"
875
  msgstr ""
876
 
877
+ #: includes/forms/parent-child.php:84 includes/forms/parent-child.php:97
878
  msgid ""
879
  "Click \"Analyze\" to determine stylesheet dependencies and other potential "
880
  "issues."
881
  msgstr ""
882
 
883
+ #: includes/forms/parent-child.php:91
884
  msgid "Select a Child Theme:"
885
  msgstr ""
886
 
887
+ #: includes/forms/parent-child.php:97
888
  msgid "Analyze Child Theme"
889
  msgstr ""
890
 
891
+ #: includes/forms/parent-child.php:105
892
  msgid "Name the new theme directory:"
893
  msgstr ""
894
 
895
+ #: includes/forms/parent-child.php:108
896
  msgid "Directory Name"
897
  msgstr ""
898
 
899
+ #: includes/forms/parent-child.php:112 includes/forms/parent-child.php:307
900
  msgid "NOTE:"
901
  msgstr ""
902
 
903
+ #: includes/forms/parent-child.php:114
904
  msgid ""
905
  "This is NOT the name of the Child Theme. You can customize the name, "
906
  "description, etc. in step 7, below."
907
  msgstr ""
908
 
909
+ #: includes/forms/parent-child.php:118
910
  msgid "Verify Child Theme directory:"
911
  msgstr ""
912
 
913
+ #: includes/forms/parent-child.php:124
914
  msgid ""
915
  "For verification only (you cannot modify the directory of an existing Child "
916
  "Theme)."
917
  msgstr ""
918
 
 
 
 
 
919
  #: includes/forms/parent-child.php:136
920
  msgid "Select where to save new styles:"
921
  msgstr ""
943
  "allows you to customize stylesheets that load after the primary stylesheet."
944
  msgstr ""
945
 
946
+ #: includes/forms/parent-child.php:165
947
+ msgid "Click to expand"
948
+ msgstr ""
949
+
950
  #: includes/forms/parent-child.php:166
951
  msgid "Select Parent Theme stylesheet handling:"
952
  msgstr ""
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, child themes, custom styles, customize styles, customize theme, CSS, responsive, css editor, child theme generator, child theme creator, style, stylesheet, customizer, childtheme, childthemes
5
  Requires at least: 3.9
6
  Tested up to: 4.5
7
- Stable tag: 2.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -288,6 +288,12 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
288
 
289
  == Changelog ==
290
 
 
 
 
 
 
 
291
  = 2.0.1 =
292
  * Updated language template and de_DE files
293
  * Fix: case where child stylesheet link was not being added resulting in "This child theme does not load a Configurator stylesheet" notice
4
  Tags: child theme, child themes, custom styles, customize styles, customize theme, CSS, responsive, css editor, child theme generator, child theme creator, style, stylesheet, customizer, childtheme, childthemes
5
  Requires at least: 3.9
6
  Tested up to: 4.5
7
+ Stable tag: 2.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
288
 
289
  == Changelog ==
290
 
291
+ = 2.0.2 =
292
+ * Automatically set priority of enqueue hook based on value from parent theme
293
+ * Made file scan routine more efficient
294
+ * Support for background-image as base64 data
295
+ * Tweaked analyzer signals
296
+
297
  = 2.0.1 =
298
  * Updated language template and de_DE files
299
  * Fix: case where child stylesheet link was not being added resulting in "This child theme does not load a Configurator stylesheet" notice