Child Theme Configurator - Version 1.7.2.1

Version Description

  • Fix: hide called before iris init
  • Fix: @import not being written on rebuild/configure
  • Fix: min height on rule/value panel
  • Only prune child theme selectors on rename
Download this release

Release Info

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

Code changes from version 1.7.2 to 1.7.2.1

child-theme-configurator.php CHANGED
@@ -4,11 +4,11 @@ if ( !defined( 'ABSPATH' ) ) exit;
4
 
5
  /*
6
  Plugin Name: Child Theme Configurator
7
- Plugin URI: http://www.childthemeconfigurator.com/
8
- Description: Create a child theme and customize the stylesheets and templates. Fast CSS editor lets you search, preview and modify any style.
9
- Version: 1.7.2
10
  Author: Lilaea Media
11
- Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
13
  Domain Path: /lang
14
  License: GPLv2
@@ -24,7 +24,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
24
  define( 'CHLD_THM_CFG_PRO_URL', "http://www.childthemeconfigurator.com/child-theme-configurator-pro/" );
25
  defined( 'CHLD_THM_CFG_OPTIONS' ) or
26
  define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
27
- define( 'CHLD_THM_CFG_VERSION', '1.7.2' );
28
  define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
29
  defined( 'CHLD_THM_CFG_BPSEL' ) or
30
  define( 'CHLD_THM_CFG_BPSEL', '2500' );
4
 
5
  /*
6
  Plugin Name: Child Theme Configurator
7
+ Plugin URI: http://www.childthemeconfigurator.com
8
+ Description: Create a child theme that follows WP best practice to enqueue stylesheets. Easy to use CSS editor lets you find, preview and customize any style.
9
+ Version: 1.7.2.1
10
  Author: Lilaea Media
11
+ Author URI: http://www.lilaeamedia.com
12
  Text Domain: chld_thm_cfg
13
  Domain Path: /lang
14
  License: GPLv2
24
  define( 'CHLD_THM_CFG_PRO_URL', "http://www.childthemeconfigurator.com/child-theme-configurator-pro/" );
25
  defined( 'CHLD_THM_CFG_OPTIONS' ) or
26
  define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
27
+ define( 'CHLD_THM_CFG_VERSION', '1.7.2.1' );
28
  define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
29
  defined( 'CHLD_THM_CFG_BPSEL' ) or
30
  define( 'CHLD_THM_CFG_BPSEL', '2500' );
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 output, parsing, normalization
9
- Version: 1.7.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Handles all CSS output, parsing, normalization
9
+ Version: 1.7.2.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
includes/class-ctc-ui.php CHANGED
@@ -5,7 +5,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
5
  Class: Child_Theme_Configurator_UI
6
  Plugin URI: http://www.childthemeconfigurator.com/
7
  Description: Handles the plugin User Interface
8
- Version: 1.7.2
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
5
  Class: Child_Theme_Configurator_UI
6
  Plugin URI: http://www.childthemeconfigurator.com/
7
  Description: Handles the plugin User Interface
8
+ Version: 1.7.2.1
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
includes/class-ctc.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Main Controller Class
9
- Version: 1.7.2
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -108,7 +108,7 @@ class ChildThemeConfiguratorAdmin {
108
  $this->ui->render();
109
  }
110
  function enqueue_scripts() {
111
- wp_enqueue_style( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'css/chld-thm-cfg.css', array(), '1.7.2' );
112
 
113
  // we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
114
  // this will be updated in a later release to use WP Core scripts when it is widely adopted
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Main Controller Class
9
+ Version: 1.7.2.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
108
  $this->ui->render();
109
  }
110
  function enqueue_scripts() {
111
+ wp_enqueue_style( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'css/chld-thm-cfg.css', array(), '1.7.2.1' );
112
 
113
  // we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
114
  // this will be updated in a later release to use WP Core scripts when it is widely adopted
includes/help/help_en_US.php CHANGED
@@ -136,8 +136,8 @@ if ( !defined( 'ABSPATH' ) ) exit;
136
  <li><strong>Options: </strong> Every theme handles options in its own way. Most often, they will create a set of options and store them in the WordPress database. Some options are specific to the active theme (or child theme), and some are specific to the parent theme only (meaning the child theme CANNOT override them). You will have to find out from the theme author which are which.</li>
137
  </ul>
138
  </p>
139
- <h5 id="existing_parent">How do I move changes I have already made to a Child Theme?</h5>
140
- <p>Follow <a href="<?php echo CHLD_THM_CFG_DOCS_URL; ?>/#child_from_modified_parent" class="scroll-to">these steps</a>. </p>
141
  <h5 id="web_fonts">How do I add Web Fonts?</h5>
142
  <p>The easiest method is to paste the @import code provided by <a href="http://www.google.com/fonts" title="Google Fonts">Google</a>, <a href="http://www.fontsquirrel.com/" title="Font Squirrel">Font Squirrel</a> or any other Web Font site into the @import tab. The fonts will then be available to use as a value of the <strong>font-family</strong> rule. Be sure you understand the license for any embedded fonts. </p>
143
  <p>You can also create a secondary stylesheet that contains @font-face rules and import it using the @import tab. </p>
136
  <li><strong>Options: </strong> Every theme handles options in its own way. Most often, they will create a set of options and store them in the WordPress database. Some options are specific to the active theme (or child theme), and some are specific to the parent theme only (meaning the child theme CANNOT override them). You will have to find out from the theme author which are which.</li>
137
  </ul>
138
  </p>
139
+ <h5 id="existing_parent">How do I move changes I have already made to my theme into a Child Theme?</h5>
140
+ <p><a href="<?php echo CHLD_THM_CFG_DOCS_URL; ?>/#child_from_modified_parent" class="scroll-to">Follow these steps</a>. </p>
141
  <h5 id="web_fonts">How do I add Web Fonts?</h5>
142
  <p>The easiest method is to paste the @import code provided by <a href="http://www.google.com/fonts" title="Google Fonts">Google</a>, <a href="http://www.fontsquirrel.com/" title="Font Squirrel">Font Squirrel</a> or any other Web Font site into the @import tab. The fonts will then be available to use as a value of the <strong>font-family</strong> rule. Be sure you understand the license for any embedded fonts. </p>
143
  <p>You can also create a secondary stylesheet that contains @font-face rules and import it using the @import tab. </p>
js/chld-thm-cfg.js CHANGED
@@ -2,7 +2,7 @@
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.childthemeconfigurator.com/
4
  * Description: Handles jQuery, AJAX and other UI
5
- * Version: 1.7.2
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
@@ -625,16 +625,20 @@
625
  }
626
  self.current_qsdata.value[ ui.item.label ] = { 'child': '' };
627
  var newrule = ui.item.label.replace( /[^\w\-]/g, self.to_ascii ),
628
- n = $( self.input_row( self.current_qsid, newrule, 'ovrd', self.current_qsdata ) );
 
629
  $( '#ctc_sel_ovrd_rule_inputs' ).append( n );
630
  $( '#ctc_new_rule_menu' ).val( '' );
631
 
632
  n.find( 'input[type="text"]' ).each( function( ndx, el ) {
 
633
  if ( $( el ).hasClass( 'color-picker' ) )
634
  self.setup_iris( el );
635
- $( el ).focus();
636
  } );
637
- if ( self.jquery_err.length ) self.jquery_notice();
 
 
 
638
  return false;
639
  },
640
  focus: function( e ) {
@@ -950,9 +954,9 @@
950
  }
951
  } );
952
  errors.push( '<strong>' + self.getxt( 'js' ) + '</strong>' );
953
- if ( 1 == ctcAjax.is_debug ) {
954
  errors.push( self.jquery_err.join( '<br/>' ) );
955
- }
956
  if ( culprits.length ) {
957
  errors.push( self.getxt( 'jquery' ) + '<br/>' + culprits.join( '<br/>' ) );
958
  }
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.childthemeconfigurator.com/
4
  * Description: Handles jQuery, AJAX and other UI
5
+ * Version: 1.7.2.1
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
625
  }
626
  self.current_qsdata.value[ ui.item.label ] = { 'child': '' };
627
  var newrule = ui.item.label.replace( /[^\w\-]/g, self.to_ascii ),
628
+ n = $( self.input_row( self.current_qsid, newrule, 'ovrd', self.current_qsdata ) ),
629
+ first;
630
  $( '#ctc_sel_ovrd_rule_inputs' ).append( n );
631
  $( '#ctc_new_rule_menu' ).val( '' );
632
 
633
  n.find( 'input[type="text"]' ).each( function( ndx, el ) {
634
+ if (! first) first = el;
635
  if ( $( el ).hasClass( 'color-picker' ) )
636
  self.setup_iris( el );
 
637
  } );
638
+ if ( first )
639
+ $( first ).focus();
640
+ if ( self.jquery_err.length )
641
+ self.jquery_notice();
642
  return false;
643
  },
644
  focus: function( e ) {
954
  }
955
  } );
956
  errors.push( '<strong>' + self.getxt( 'js' ) + '</strong>' );
957
+ //if ( 1 == ctcAjax.is_debug ) {
958
  errors.push( self.jquery_err.join( '<br/>' ) );
959
+ //}
960
  if ( culprits.length ) {
961
  errors.push( self.getxt( 'jquery' ) + '<br/>' + culprits.join( '<br/>' ) );
962
  }
js/chld-thm-cfg.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e.chldthmcfg={esc_quot:function(e){var t=this;return t.is_empty(e)?e:e.toString().replace(/"/g,"&quot;")},getxt:function(e){return(text=ctcAjax[e+"_txt"])?text:""},from_ascii:function(e){var t=parseInt(e),c=String.fromCharCode(t);return c},to_ascii:function(e){var t=e.charCodeAt(0);return t},is_empty:function(e){if("undefined"==typeof e||!1===e||null===e||""===e)return!0;if(!0===e||"string"==typeof e||"number"==typeof e)return!1;if("object"==typeof e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},theme_exists:function(t,c){var n=!1;return e.each(ctcAjax.themes,function(i,r){return e.each(r,function(e){return e!=t||"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).toLowerCase():"",i=e("#ctc_theme_child").length?e("#ctc_theme_child").val().toString().replace(c).toLowerCase():n,r=e("input[name=ctc_child_type]:checked").val(),a=[];return"new"==r&&(i=n),t.theme_exists(i,r)&&a.push(t.getxt("theme_exists").toString().replace(/%s/,i)),""===i&&a.push(t.getxt("inval_theme")),""===e("#ctc_child_name").val()&&a.push(t.getxt("inval_name")),a.length?(t.set_notice({error:a}),!1):!0},autogen_slugs:function(){if(e("#ctc_theme_parnt").length){for(var t=this,c=e("#ctc_theme_parnt").val(),n=slugbase=c+"-child",i=ctcAjax.themes.parnt[c].Name+" Child",r="",a="",s="00";t.theme_exists(n,"new");)r=""==r?2:r+1,a=s.substring(0,s.length-r.toString().length)+r.toString(),n=slugbase+a;t.testslug=n,t.testname=i+(a.length?" "+a:"")}},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(".ctc-selector-container").hide(),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.esc_quot(c)+'"/>'),e("#ctc_rewrite_selector").val(c),e(t).text(n.getxt("cancel")))},fade_update_notice:function(){e(".updated, .error").slideUp("slow",function(){e(".updated").remove()})},coalesce_inputs:function(t){var c=this,n=/^(ctc_(ovrd|\d+)_(parent|child)_([0-9a-z\-]+)_(\d+))(_\w+)?$/,i=e(t).parents(".ctc-selector-row, .ctc-parent-row").first(),r=i.find(".ctc-swatch").first(),a={parent:{},child:{}},s={parent:{origin:"",start:"",end:""},child:{origin:"",start:"",end:""}},l={child:!1,parent:!1},o={};return i.find(".ctc-parent-value, .ctc-child-value").each(function(){var i,r,_=e(this).attr("id"),u=_.toString().match(n),d=u[2],p=u[3],h="undefined"==typeof u[4]?"":u[4],m=u[5],v="undefined"==typeof u[6]?"":u[6],f="parent"==p?e(this).text().replace(/!$/,""):e(this).val(),g="ctc_"+d+"_child_"+h+"_i_"+m;if(c.is_empty(e(this).data("color"))||(f=e(this).data("color"),e(this).data("color",null)),"child"==p&&(o[_]=f,o[g]=e("#"+g).is(":checked")?1:0),""!=f)if(c.is_empty(v))(i=h.toString().match(/^border(\-(top|right|bottom|left))?$/)&&!f.match(/none/))?(r=f.toString().split(/ +/),a[p][h+"-width"]="undefined"==typeof r[0]?"":r[0],a[p][h+"-style"]="undefined"==typeof r[1]?"":r[1],a[p][h+"-color"]="undefined"==typeof r[2]?"":r[2]):"background-image"!=h||f.match(/none/)?"seq"!=h&&(a[p][h]=f):f.toString().match(/url\(/)?a[p]["background-image"]=c.image_url(p,f):(r=f.toString().split(/ +/),r.length>2?(s[p].origin="undefined"==typeof r[0]?"top":r[0],s[p].start="undefined"==typeof r[1]?"transparent":r[1],s[p].end="undefined"==typeof r[2]?"transparent":r[2],l[p]=!0):a[p]["background-image"]=f);else switch(v){case"_border_width":a[p][h+"-width"]="none"==f?0:f;break;case"_border_style":a[p][h+"-style"]=f;break;case"_border_color":a[p][h+"-color"]=f;break;case"_background_url":a[p]["background-image"]=c.image_url(p,f);break;case"_background_color":a[p]["background-color"]=t.value;break;case"_background_color1":s[p].start=f,l[p]=!0;break;case"_background_color2":s[p].end=f,l[p]=!0;break;case"_background_origin":s[p].origin=f,l[p]=!0}}),"undefined"==typeof r||c.is_empty(r.attr("id"))||(r.removeAttr("style"),l.parent&&r.ctcgrad(s.parent.origin,[s.parent.start,s.parent.end]),r.css(a.parent),r.attr("id").toString().match(/parent/)||(l.child&&r.ctcgrad(s.child.origin,[s.child.start,s.child.end]),r.css(a.child)),r.css({"z-index":-1})),o},decode_value:function(e,t){t="undefined"==typeof t?"":t;var c=this,n={orig:t};if(e.toString().match(/^border(\-(top|right|bottom|left))?$/)){var i=t.toString().split(/ +/);n.names=["_border_width","_border_style","_border_color"],n.values=["undefined"==typeof i[0]?"":i[0],"undefined"==typeof i[1]?"":i[1],"undefined"==typeof i[2]?"":i[2]]}else if(e.toString().match(/^background\-image/))if(n.names=["_background_url","_background_origin","_background_color1","_background_color2"],n.values=["","","",""],!1!==c.is_empty(t)||t.toString().match(/(url|none)/))n.values[0]=t;else{var i=t.toString().split(/:/);n.values[1]="undefined"==typeof i[0]?"":i[0],n.values[2]="undefined"==typeof i[1]?"":i[1],n.values[3]="undefined"==typeof i[3]?"":i[3],n.orig=[n.values[1],n.values[2],n.values[3]].join(" ")}else n.names=[""],n.values=[t];return n},image_url:function(e,t){var c,n=this,i=t.toString().match(/url\(['" ]*(.+?)['" ]*\)/),r=n.is_empty(i)?null:i[1],a=ctcAjax.theme_uri+"/"+("parent"==e?ctcAjax.parnt:ctcAjax.child)+"/";return r?c=r.toString().match(/^(data:|https?:|\/)/)?t:"url("+a+r+")":!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.current_query)},load_queries:function(){var e=this;e.query_css("queries",null)},load_selectors:function(){var e=this;e.query_css("selectors",e.current_query)},load_rules:function(){var e=this;e.query_css("rules",null)},load_selector_values:function(){var e=this;e.query_css("qsid",e.current_qsid)},get_queries:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");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.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.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"),r=e.chldthmcfg.current_qsdata,a=e.chldthmcfg.is_empty(r)||e.chldthmcfg.is_empty(r.value);e.each(e("#ctc_rule_menu").data("menu"),function(t,c){var s=!1;if(i.test(t)){if(!a&&(e.each(r.value,function(e){return t==e.replace(/\d+/g,self.from_ascii)?(s=!0,!1):void 0}),s))return;n.push({label:t,value:c})}}),c(n)},input_row:function(t,c,n,i){var r=this,a="",s=r.is_empty(i)||r.is_empty(i.value)||r.is_empty(i.value[c])?"":i.value[c],l=r.decode_value(c,r.is_empty(s)?"":s.parnt),o=r.is_empty(s)||r.is_empty(s.i_parnt)||1!=s.i_parnt?"":r.getxt("important"),_=r.decode_value(c,r.is_empty(s)?"":s.child),u=r.is_empty(s)||r.is_empty(s.i_child)||1!=s.i_child?0:1,d="ctc_"+n+"_child_"+c+"_i_"+t;return r.is_empty(i)||(a+='<div class="ctc-'+("ovrd"==n?"input":"selector")+'-row clearfix">\n<div class="ctc-input-cell">'+("ovrd"==n?c.replace(/\d+/g,r.from_ascii):i.selector+'<br/><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+t+'" >'+r.getxt("edit")+"</a> "+(r.is_empty(l.orig)?r.getxt("child_only"):""))+"</div>\n","ovrd"==n&&(a+='<div class="ctc-parent-value ctc-input-cell" id="ctc_'+n+"_parent_"+c+"_"+t+'">'+(r.is_empty(l.orig)?"[no value]":l.orig+o)+"</div>\n"),a+='<div class="ctc-input-cell">\n',r.is_empty(l.names)||(e.each(l.names,function(e,i){i=r.is_empty(i)?"":i,a+='<div class="ctc-child-input-cell">\n';var s,l="ctc_"+n+"_child_"+c+"_"+t+i;!1===(s=_.values.shift())&&(s=""),a+=(r.is_empty(i)?"":r.getxt(i)+":<br/>")+'<input type="text" id="'+l+'" name="'+l+'" class="ctc-child-value'+((i+c).toString().match(/color/)?" color-picker":"")+(i.toString().match(/url/)?" ctc-input-wide":"")+'" value="'+r.esc_quot(s)+'" />\n</div>\n'}),a+='<label for="'+d+'"><input type="checkbox" id="'+d+'" name="'+d+'" value="1" '+(1===u?"checked":"")+" />"+r.getxt("important")+"</label>\n"),a+="</div>\n"+("ovrd"==n?"":'<div class="ctc-swatch ctc-specific" id="ctc_child_'+c+"_"+t+'_swatch">'+r.getxt("swatch")+'</div>\n<div class="ctc-child-input-cell ctc-button-cell" id="ctc_save_'+c+"_"+t+'_cell">\n<input type="button" class="button ctc-save-input" id="ctc_save_'+c+"_"+t+'" name="ctc_save_'+c+"_"+t+'" value="Save" /></div>\n')+"</div><!-- end input row -->\n"),a},scrolltop:function(){e("html, body, .ctc-option-panel-container").animate({scrollTop:0})},css_preview:function(e){var e,t=this;(e=e.match(/(child|parnt)/)[1])||(e="child"),t.query_css("preview",e)},setup_iris:function(t){var c=this;try{e(t).iris({change:function(n,i){e(t).data("color",i.color.toString()),c.coalesce_inputs(t)}})}catch(n){c.jquery_exception(n,"Iris Color Picker")}},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,"Rule 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(),t.is_empty(t.current_qsdata.value)&&(t.current_qsdata.value={}),t.current_qsdata.value[n.item.label]={child:""};var i=n.item.label.replace(/[^\w\-]/g,t.to_ascii),r=e(t.input_row(t.current_qsid,i,"ovrd",t.current_qsdata));return e("#ctc_sel_ovrd_rule_inputs").append(r),e("#ctc_new_rule_menu").val(""),r.find('input[type="text"]').each(function(c,n){e(n).hasClass("color-picker")&&t.setup_iris(n),e(n).focus()}),t.jquery_err.length&&t.jquery_notice(),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"New Rule Menu")}},set_existing:function(){var t=this;if(e("#ctc_theme_child").length&&e("#ctc_child_type_existing").is(":checked")){var c=e("#ctc_theme_child").val();t.is_empty(c)||(e("#ctc_child_name").val(ctcAjax.themes.child[c].Name),e("#ctc_child_author").val(ctcAjax.themes.child[c].Author),e("#ctc_child_version").val(ctcAjax.themes.child[c].Version),e("#ctc_child_authoruri").val(ctcAjax.themes.child[c].AuthorURI),e("#ctc_child_themeuri").val(ctcAjax.themes.child[c].ThemeURI),e("#ctc_child_descr").val(ctcAjax.themes.child[c].Descr),e("#ctc_child_tags").val(ctcAjax.themes.child[c].Tags))}},set_notice:function(t){var c=this,n="";c.is_empty(t)||e.each(t,function(t,c){n+='<div class="'+t+'"><ul>\n',e(c).each(function(e,t){n+="<li>"+t.toString()+"</li>\n"}),n+="</ul></div>"}),e("#ctc_error_notice").html(n),e("html, body").animate({scrollTop:0},"slow")},set_parent_menu:function(t){e("#ctc_theme_parent").parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner"></span>'),e(".spinner").show(),document.location="?page="+ctcAjax.page+"&ctc_parent="+t.value},set_child_menu:function(t){var c=this;c.is_empty(ctcAjax.themes.child[t.value])||(e("#ctc_child_name").val(ctcAjax.themes.child[t.value].Name),e("#ctc_child_author").val(ctcAjax.themes.child[t.value].Author),e("#ctc_child_version").val(ctcAjax.themes.child[t.value].Version))},set_query:function(t){var c=this;c.current_query=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()},set_selector:function(t){var c=this;e("#ctc_sel_ovrd_selector").val(""),c.current_qsid=t,c.reload_menus=!1,c.load_selector_values()},set_rule:function(t,c){var n=this;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)},set_qsid:function(t){var c=this;c.current_qsid=e(t).attr("id").match(/_(\d+)$/)[1],c.focus_panel("#query_selector_options"),c.reload_menus=!0,c.load_selector_values()},set_addl_css:function(){var t,c=this,n=e("#ctc_theme_parnt").val(),i=ctcAjax.theme_uri.replace(/^https?:\/\//,""),r=ctcAjax.homeurl.replace(/^https?/,ctcAjax.ssl?"https":"http"),a=r+"?preview=1&p=x&template="+n+"&stylesheet="+n,s=new RegExp("<link rel=[\"']stylesheet[\"'][^>]+?"+i+"/"+n+"/(.+?\\.css)[^>]+?>","g");c.is_empty(n)||(n!=ctcAjax.parnt?e.get(a,function(c){for(;(t=s.exec(c))&&"style.css"!=t[1];)t[1].match(/bootstrap/)||e(".ctc_checkbox").each(function(){e(this).val()==t[1]&&e(this).prop("checked",!0)});c=null}):e(ctcAjax.addl_css).each(function(t,c){e("#ctc_stylesheet_files .ctc_checkbox").each(function(){e(this).val()==c&&e(this).prop("checked",!0)})}))},query_css:function(t,c,n){var i=this,r={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){r["ctc_query_"+e]=t}),e(".query-icon").remove(),e(a+" .ctc-status-icon").remove(),e(a).append('<span class="ctc-status-icon spinner query-icon"></span>'),e(".spinner").show(),r.action=i.is_empty(e("#ctc_action").val())||"plugin"!=e("#ctc_action").val()?"ctc_query":"ctc_plgqry",r._wpnonce=e("#_wpnonce").val(),i.ajax_post(t,r)},save:function(t){var c,n,i,r,a,s=this,l=(ctcAjax.ajaxurl,{}),o=e(t).attr("id");e(t).prop("disabled",!0),e(".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>'),l.ctc_configtype=e(t).val()):(c=e("#ctc_new_selectors"))&&"ctc_save_new_selectors"==e(t).attr("id")?(l.ctc_new_selectors=c.val(),(n=e("#ctc_sel_ovrd_query_selected"))&&(l.ctc_sel_ovrd_query=n.text()),s.reload_menus=!0):(i=e("#ctc_child_imports"))&&"ctc_save_imports"==e(t).attr("id")?l.ctc_child_imports=i.val():"ctc_is_debug"==e(t).attr("id")?l.ctc_is_debug=e("#ctc_is_debug").is(":checked")?1:0:l=s.coalesce_inputs(t),e(".save-icon").show(),e("#ctc_sel_ovrd_selector_selected").find("#ctc_rewrite_selector").each(function(){r=e("#ctc_rewrite_selector").val(),a=e("#ctc_rewrite_selector_orig").val(),s.is_empty(r)||!r.toString().match(/\w/)?r=a:(l.ctc_rewrite_selector=r,s.reload_menus=!0),e(".ctc-rewrite-toggle").text(s.getxt("rename")),e("#ctc_sel_ovrd_selector_selected").html(r)}),l.action=s.is_empty(e("#ctc_action").val())||"plugin"!=e("#ctc_action").val()?"ctc_update":"ctc_plugin",l._wpnonce=e("#_wpnonce").val(),s.ajax_post("qsid",l)},ajax_post:function(t,c,n){var i=this,r=ctcAjax.ajaxurl;e.ajax({url:r,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)})},handle_failure:function(t){var c=this;e(".query-icon, .save-icon").removeClass("spinner").addClass("failure"),e("input[type=submit], input[type=button]").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]").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.jquery_err.push("<code><small>"+t+": "+e.message+i+n+"</small></code>")},jquery_notice:function(){var t=this,c=[],n=[];e("input[type=submit], input[type=button]").prop("disabled",!0),e("script").each(function(){var n=e(this).prop("src");t.is_empty(n)||!n.match(/jquery(\.min|\.js|\-?ui)/i)||n.match(/load\-scripts.php/)||c.push("<code><small>"+n.split(/\?/)[0]+"</small></code>")}),n.push("<strong>"+t.getxt("js")+"</strong>"),1==ctcAjax.is_debug&&n.push(t.jquery_err.join("<br/>")),c.length&&n.push(t.getxt("jquery")+"<br/>"+c.join("<br/>")),n.push(t.getxt("plugin")+" "+t.getxt("contact")),t.set_notice({error:n})},update:{qsid:function(t){var c,n,i,r=this;r.current_qsid=t.key,r.current_qsdata=t.data,e("#ctc_sel_ovrd_qsid").val(r.current_qsid),r.is_empty(r.current_qsdata.seq)?e("#ctc_child_load_order_container").empty():(c="ctc_ovrd_child_seq_"+r.current_qsid,i=parseInt(r.current_qsdata.seq),n='<input type="text" id="'+c+'" name="'+c+'" class="ctc-child-value" value="'+i+'" />',e("#ctc_child_load_order_container").html(n)),r.is_empty(r.current_qsdata.value)?(e("#ctc_sel_ovrd_rule_inputs").empty(),e("#ctc_sel_ovrd_rule_header").hide()):(n="",e.each(r.current_qsdata.value,function(e){n+=r.input_row(r.current_qsid,e,"ovrd",r.current_qsdata)}),e("#ctc_sel_ovrd_rule_inputs").html(n).find(".color-picker").each(function(){r.setup_iris(this)}),r.coalesce_inputs("#ctc_child_all_0_swatch"),e("#ctc_sel_ovrd_rule_header").show()),r.jquery_err.length?r.jquery_notice():(r.reload_menus&&(r.set_query(r.current_qsdata.query),r.load_rules()),e("#ctc_sel_ovrd_selector_selected").text(r.current_qsdata.selector),e(".ctc-rewrite-toggle").text(r.getxt("rename")),e("#ctc_sel_ovrd_new_rule,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs,.ctc-rewrite-toggle").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 r=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+'">'+r.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=this,n="";c.is_empty(t.data)||e.each(t.data,function(i,r){page_rule=i,e.each(r,function(r,a){n+='<h4 class="ctc-query-heading">'+r+"</h4>\n",c.is_empty(a)||e.each(a,function(e,r){n+=c.input_row(e,i,t.key,r)})})}),selector="#ctc_selector_"+rule+"_"+t.key+"_rows",e(selector).html(n).find(".color-picker").each(function(){c.setup_iris(this)}),e(selector).find(".ctc-swatch").each(function(){c.coalesce_inputs(this)}),c.jquery_err.length&&c.jquery_notice()},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)}},init:function(){var t=this;if(t.autogen_slugs(),t.set_existing(),!e("#ctc_theme_parnt").is("input")){try{e.widget("ctc.themeMenu",e.ui.selectmenu,{_renderItem:function(t,c){var n=e("<li>");return e("#ctc_theme_option_"+c.value).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.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(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.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.is_empty(t.jquery_err)?(e("#ctc_main").on("focus",".color-picker",function(){try{e(".color-picker").not(this).iris("hide"),e(this).iris("toggle"),e(".iris-picker").css({position:"absolute","z-index":10})}catch(c){t.jquery_exception(c,"Iris Color Picker")}}),e("#ctc_main").on("change",".ctc-child-value, input[type=checkbox]",function(){t.coalesce_inputs(this)}),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=e(this).attr("id").toString().replace("_close",""),i=n.toString().match(/_([^_]+)_(\d+)$/);e("#"+n+"_container").is(":hidden")&&(t.is_empty(i[1])||t.is_empty(i[2])||(rule=i[1],valid=i[2],t.query_css("val_qry",valid,{rule:rule}))),e("#"+n+"_container").fadeToggle("fast"),e(".ctc-selector-container").not("#"+n+"_container").fadeOut("fast")}),e("#ctc_main").on("click",".ctc-save-input[type=button]",function(){return e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),void t.save(this))}),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-status-icon").remove();var n="#"+e(this).attr("id");t.focus_panel(n)}),e(".ctc-section-toggle").on("click",function(){e(this).toggleClass("open");var t=e(this).attr("id")+"_content";e("#"+t).slideToggle("fast")}),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){return c.preventDefault(),$this=e("#ctc_save_query_selector"),$this.hasClass("ajax-pending")?!1:($this.addClass("ajax-pending"),t.save($this),!1)}),e("#ctc_theme_child, #ctc_theme_child-button, #ctc_child_type_existing").on("focus click",function(){e("#ctc_child_type_existing").prop("checked",!0),e("#ctc_child_type_new").prop("checked",!1),e("#ctc_child_template").val(""),t.set_existing()}),e("#ctc_child_type_new, #ctc_child_template").on("focus click",function(){e("#ctc_child_type_existing").prop("checked",!1),e("#ctc_child_type_new").prop("checked",!0),e("#ctc_child_name").val(t.testname),e("#ctc_child_template").val(t.testslug)}),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(),t.set_addl_css(),e("input[type=submit], input[type=button]").prop("disabled",!1),t.scrolltop(),setTimeout(t.fade_update_notice,2e4)):t.jquery_notice()},testslug:"",testname:"",reload_menus:!1,current_query:"base",current_qsid:null,current_qsdata:{},jquery_err:[]}}(jQuery),jQuery(document).ready(function(e){e.chldthmcfg.init()});
1
+ !function(e){e.chldthmcfg={esc_quot:function(e){var t=this;return t.is_empty(e)?e:e.toString().replace(/"/g,"&quot;")},getxt:function(e){return(text=ctcAjax[e+"_txt"])?text:""},from_ascii:function(e){var t=parseInt(e),c=String.fromCharCode(t);return c},to_ascii:function(e){var t=e.charCodeAt(0);return t},is_empty:function(e){if("undefined"==typeof e||!1===e||null===e||""===e)return!0;if(!0===e||"string"==typeof e||"number"==typeof e)return!1;if("object"==typeof e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},theme_exists:function(t,c){var n=!1;return e.each(ctcAjax.themes,function(i,r){return e.each(r,function(e){return e!=t||"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).toLowerCase():"",i=e("#ctc_theme_child").length?e("#ctc_theme_child").val().toString().replace(c).toLowerCase():n,r=e("input[name=ctc_child_type]:checked").val(),a=[];return"new"==r&&(i=n),t.theme_exists(i,r)&&a.push(t.getxt("theme_exists").toString().replace(/%s/,i)),""===i&&a.push(t.getxt("inval_theme")),""===e("#ctc_child_name").val()&&a.push(t.getxt("inval_name")),a.length?(t.set_notice({error:a}),!1):!0},autogen_slugs:function(){if(e("#ctc_theme_parnt").length){for(var t=this,c=e("#ctc_theme_parnt").val(),n=slugbase=c+"-child",i=ctcAjax.themes.parnt[c].Name+" Child",r="",a="",s="00";t.theme_exists(n,"new");)r=""==r?2:r+1,a=s.substring(0,s.length-r.toString().length)+r.toString(),n=slugbase+a;t.testslug=n,t.testname=i+(a.length?" "+a:"")}},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(".ctc-selector-container").hide(),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.esc_quot(c)+'"/>'),e("#ctc_rewrite_selector").val(c),e(t).text(n.getxt("cancel")))},fade_update_notice:function(){e(".updated, .error").slideUp("slow",function(){e(".updated").remove()})},coalesce_inputs:function(t){var c=this,n=/^(ctc_(ovrd|\d+)_(parent|child)_([0-9a-z\-]+)_(\d+))(_\w+)?$/,i=e(t).parents(".ctc-selector-row, .ctc-parent-row").first(),r=i.find(".ctc-swatch").first(),a={parent:{},child:{}},s={parent:{origin:"",start:"",end:""},child:{origin:"",start:"",end:""}},l={child:!1,parent:!1},o={};return i.find(".ctc-parent-value, .ctc-child-value").each(function(){var i,r,_=e(this).attr("id"),u=_.toString().match(n),d=u[2],p=u[3],h="undefined"==typeof u[4]?"":u[4],m=u[5],v="undefined"==typeof u[6]?"":u[6],f="parent"==p?e(this).text().replace(/!$/,""):e(this).val(),g="ctc_"+d+"_child_"+h+"_i_"+m;if(c.is_empty(e(this).data("color"))||(f=e(this).data("color"),e(this).data("color",null)),"child"==p&&(o[_]=f,o[g]=e("#"+g).is(":checked")?1:0),""!=f)if(c.is_empty(v))(i=h.toString().match(/^border(\-(top|right|bottom|left))?$/)&&!f.match(/none/))?(r=f.toString().split(/ +/),a[p][h+"-width"]="undefined"==typeof r[0]?"":r[0],a[p][h+"-style"]="undefined"==typeof r[1]?"":r[1],a[p][h+"-color"]="undefined"==typeof r[2]?"":r[2]):"background-image"!=h||f.match(/none/)?"seq"!=h&&(a[p][h]=f):f.toString().match(/url\(/)?a[p]["background-image"]=c.image_url(p,f):(r=f.toString().split(/ +/),r.length>2?(s[p].origin="undefined"==typeof r[0]?"top":r[0],s[p].start="undefined"==typeof r[1]?"transparent":r[1],s[p].end="undefined"==typeof r[2]?"transparent":r[2],l[p]=!0):a[p]["background-image"]=f);else switch(v){case"_border_width":a[p][h+"-width"]="none"==f?0:f;break;case"_border_style":a[p][h+"-style"]=f;break;case"_border_color":a[p][h+"-color"]=f;break;case"_background_url":a[p]["background-image"]=c.image_url(p,f);break;case"_background_color":a[p]["background-color"]=t.value;break;case"_background_color1":s[p].start=f,l[p]=!0;break;case"_background_color2":s[p].end=f,l[p]=!0;break;case"_background_origin":s[p].origin=f,l[p]=!0}}),"undefined"==typeof r||c.is_empty(r.attr("id"))||(r.removeAttr("style"),l.parent&&r.ctcgrad(s.parent.origin,[s.parent.start,s.parent.end]),r.css(a.parent),r.attr("id").toString().match(/parent/)||(l.child&&r.ctcgrad(s.child.origin,[s.child.start,s.child.end]),r.css(a.child)),r.css({"z-index":-1})),o},decode_value:function(e,t){t="undefined"==typeof t?"":t;var c=this,n={orig:t};if(e.toString().match(/^border(\-(top|right|bottom|left))?$/)){var i=t.toString().split(/ +/);n.names=["_border_width","_border_style","_border_color"],n.values=["undefined"==typeof i[0]?"":i[0],"undefined"==typeof i[1]?"":i[1],"undefined"==typeof i[2]?"":i[2]]}else if(e.toString().match(/^background\-image/))if(n.names=["_background_url","_background_origin","_background_color1","_background_color2"],n.values=["","","",""],!1!==c.is_empty(t)||t.toString().match(/(url|none)/))n.values[0]=t;else{var i=t.toString().split(/:/);n.values[1]="undefined"==typeof i[0]?"":i[0],n.values[2]="undefined"==typeof i[1]?"":i[1],n.values[3]="undefined"==typeof i[3]?"":i[3],n.orig=[n.values[1],n.values[2],n.values[3]].join(" ")}else n.names=[""],n.values=[t];return n},image_url:function(e,t){var c,n=this,i=t.toString().match(/url\(['" ]*(.+?)['" ]*\)/),r=n.is_empty(i)?null:i[1],a=ctcAjax.theme_uri+"/"+("parent"==e?ctcAjax.parnt:ctcAjax.child)+"/";return r?c=r.toString().match(/^(data:|https?:|\/)/)?t:"url("+a+r+")":!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.current_query)},load_queries:function(){var e=this;e.query_css("queries",null)},load_selectors:function(){var e=this;e.query_css("selectors",e.current_query)},load_rules:function(){var e=this;e.query_css("rules",null)},load_selector_values:function(){var e=this;e.query_css("qsid",e.current_qsid)},get_queries:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");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.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.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"),r=e.chldthmcfg.current_qsdata,a=e.chldthmcfg.is_empty(r)||e.chldthmcfg.is_empty(r.value);e.each(e("#ctc_rule_menu").data("menu"),function(t,c){var s=!1;if(i.test(t)){if(!a&&(e.each(r.value,function(e){return t==e.replace(/\d+/g,self.from_ascii)?(s=!0,!1):void 0}),s))return;n.push({label:t,value:c})}}),c(n)},input_row:function(t,c,n,i){var r=this,a="",s=r.is_empty(i)||r.is_empty(i.value)||r.is_empty(i.value[c])?"":i.value[c],l=r.decode_value(c,r.is_empty(s)?"":s.parnt),o=r.is_empty(s)||r.is_empty(s.i_parnt)||1!=s.i_parnt?"":r.getxt("important"),_=r.decode_value(c,r.is_empty(s)?"":s.child),u=r.is_empty(s)||r.is_empty(s.i_child)||1!=s.i_child?0:1,d="ctc_"+n+"_child_"+c+"_i_"+t;return r.is_empty(i)||(a+='<div class="ctc-'+("ovrd"==n?"input":"selector")+'-row clearfix">\n<div class="ctc-input-cell">'+("ovrd"==n?c.replace(/\d+/g,r.from_ascii):i.selector+'<br/><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+t+'" >'+r.getxt("edit")+"</a> "+(r.is_empty(l.orig)?r.getxt("child_only"):""))+"</div>\n","ovrd"==n&&(a+='<div class="ctc-parent-value ctc-input-cell" id="ctc_'+n+"_parent_"+c+"_"+t+'">'+(r.is_empty(l.orig)?"[no value]":l.orig+o)+"</div>\n"),a+='<div class="ctc-input-cell">\n',r.is_empty(l.names)||(e.each(l.names,function(e,i){i=r.is_empty(i)?"":i,a+='<div class="ctc-child-input-cell">\n';var s,l="ctc_"+n+"_child_"+c+"_"+t+i;!1===(s=_.values.shift())&&(s=""),a+=(r.is_empty(i)?"":r.getxt(i)+":<br/>")+'<input type="text" id="'+l+'" name="'+l+'" class="ctc-child-value'+((i+c).toString().match(/color/)?" color-picker":"")+(i.toString().match(/url/)?" ctc-input-wide":"")+'" value="'+r.esc_quot(s)+'" />\n</div>\n'}),a+='<label for="'+d+'"><input type="checkbox" id="'+d+'" name="'+d+'" value="1" '+(1===u?"checked":"")+" />"+r.getxt("important")+"</label>\n"),a+="</div>\n"+("ovrd"==n?"":'<div class="ctc-swatch ctc-specific" id="ctc_child_'+c+"_"+t+'_swatch">'+r.getxt("swatch")+'</div>\n<div class="ctc-child-input-cell ctc-button-cell" id="ctc_save_'+c+"_"+t+'_cell">\n<input type="button" class="button ctc-save-input" id="ctc_save_'+c+"_"+t+'" name="ctc_save_'+c+"_"+t+'" value="Save" /></div>\n')+"</div><!-- end input row -->\n"),a},scrolltop:function(){e("html, body, .ctc-option-panel-container").animate({scrollTop:0})},css_preview:function(e){var e,t=this;(e=e.match(/(child|parnt)/)[1])||(e="child"),t.query_css("preview",e)},setup_iris:function(t){var c=this;try{e(t).iris({change:function(n,i){e(t).data("color",i.color.toString()),c.coalesce_inputs(t)}})}catch(n){c.jquery_exception(n,"Iris Color Picker")}},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,"Rule 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(),t.is_empty(t.current_qsdata.value)&&(t.current_qsdata.value={}),t.current_qsdata.value[n.item.label]={child:""};var i,r=n.item.label.replace(/[^\w\-]/g,t.to_ascii),a=e(t.input_row(t.current_qsid,r,"ovrd",t.current_qsdata));return e("#ctc_sel_ovrd_rule_inputs").append(a),e("#ctc_new_rule_menu").val(""),a.find('input[type="text"]').each(function(c,n){i||(i=n),e(n).hasClass("color-picker")&&t.setup_iris(n)}),i&&e(i).focus(),t.jquery_err.length&&t.jquery_notice(),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"New Rule Menu")}},set_existing:function(){var t=this;if(e("#ctc_theme_child").length&&e("#ctc_child_type_existing").is(":checked")){var c=e("#ctc_theme_child").val();t.is_empty(c)||(e("#ctc_child_name").val(ctcAjax.themes.child[c].Name),e("#ctc_child_author").val(ctcAjax.themes.child[c].Author),e("#ctc_child_version").val(ctcAjax.themes.child[c].Version),e("#ctc_child_authoruri").val(ctcAjax.themes.child[c].AuthorURI),e("#ctc_child_themeuri").val(ctcAjax.themes.child[c].ThemeURI),e("#ctc_child_descr").val(ctcAjax.themes.child[c].Descr),e("#ctc_child_tags").val(ctcAjax.themes.child[c].Tags))}},set_notice:function(t){var c=this,n="";c.is_empty(t)||e.each(t,function(t,c){n+='<div class="'+t+'"><ul>\n',e(c).each(function(e,t){n+="<li>"+t.toString()+"</li>\n"}),n+="</ul></div>"}),e("#ctc_error_notice").html(n),e("html, body").animate({scrollTop:0},"slow")},set_parent_menu:function(t){e("#ctc_theme_parent").parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner"></span>'),e(".spinner").show(),document.location="?page="+ctcAjax.page+"&ctc_parent="+t.value},set_child_menu:function(t){var c=this;c.is_empty(ctcAjax.themes.child[t.value])||(e("#ctc_child_name").val(ctcAjax.themes.child[t.value].Name),e("#ctc_child_author").val(ctcAjax.themes.child[t.value].Author),e("#ctc_child_version").val(ctcAjax.themes.child[t.value].Version))},set_query:function(t){var c=this;c.current_query=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()},set_selector:function(t){var c=this;e("#ctc_sel_ovrd_selector").val(""),c.current_qsid=t,c.reload_menus=!1,c.load_selector_values()},set_rule:function(t,c){var n=this;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)},set_qsid:function(t){var c=this;c.current_qsid=e(t).attr("id").match(/_(\d+)$/)[1],c.focus_panel("#query_selector_options"),c.reload_menus=!0,c.load_selector_values()},set_addl_css:function(){var t,c=this,n=e("#ctc_theme_parnt").val(),i=ctcAjax.theme_uri.replace(/^https?:\/\//,""),r=ctcAjax.homeurl.replace(/^https?/,ctcAjax.ssl?"https":"http"),a=r+"?preview=1&p=x&template="+n+"&stylesheet="+n,s=new RegExp("<link rel=[\"']stylesheet[\"'][^>]+?"+i+"/"+n+"/(.+?\\.css)[^>]+?>","g");c.is_empty(n)||(n!=ctcAjax.parnt?e.get(a,function(c){for(;(t=s.exec(c))&&"style.css"!=t[1];)t[1].match(/bootstrap/)||e(".ctc_checkbox").each(function(){e(this).val()==t[1]&&e(this).prop("checked",!0)});c=null}):e(ctcAjax.addl_css).each(function(t,c){e("#ctc_stylesheet_files .ctc_checkbox").each(function(){e(this).val()==c&&e(this).prop("checked",!0)})}))},query_css:function(t,c,n){var i=this,r={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){r["ctc_query_"+e]=t}),e(".query-icon").remove(),e(a+" .ctc-status-icon").remove(),e(a).append('<span class="ctc-status-icon spinner query-icon"></span>'),e(".spinner").show(),r.action=i.is_empty(e("#ctc_action").val())||"plugin"!=e("#ctc_action").val()?"ctc_query":"ctc_plgqry",r._wpnonce=e("#_wpnonce").val(),i.ajax_post(t,r)},save:function(t){var c,n,i,r,a,s=this,l=(ctcAjax.ajaxurl,{}),o=e(t).attr("id");e(t).prop("disabled",!0),e(".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>'),l.ctc_configtype=e(t).val()):(c=e("#ctc_new_selectors"))&&"ctc_save_new_selectors"==e(t).attr("id")?(l.ctc_new_selectors=c.val(),(n=e("#ctc_sel_ovrd_query_selected"))&&(l.ctc_sel_ovrd_query=n.text()),s.reload_menus=!0):(i=e("#ctc_child_imports"))&&"ctc_save_imports"==e(t).attr("id")?l.ctc_child_imports=i.val():"ctc_is_debug"==e(t).attr("id")?l.ctc_is_debug=e("#ctc_is_debug").is(":checked")?1:0:l=s.coalesce_inputs(t),e(".save-icon").show(),e("#ctc_sel_ovrd_selector_selected").find("#ctc_rewrite_selector").each(function(){r=e("#ctc_rewrite_selector").val(),a=e("#ctc_rewrite_selector_orig").val(),s.is_empty(r)||!r.toString().match(/\w/)?r=a:(l.ctc_rewrite_selector=r,s.reload_menus=!0),e(".ctc-rewrite-toggle").text(s.getxt("rename")),e("#ctc_sel_ovrd_selector_selected").html(r)}),l.action=s.is_empty(e("#ctc_action").val())||"plugin"!=e("#ctc_action").val()?"ctc_update":"ctc_plugin",l._wpnonce=e("#_wpnonce").val(),s.ajax_post("qsid",l)},ajax_post:function(t,c,n){var i=this,r=ctcAjax.ajaxurl;e.ajax({url:r,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)})},handle_failure:function(t){var c=this;e(".query-icon, .save-icon").removeClass("spinner").addClass("failure"),e("input[type=submit], input[type=button]").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]").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.jquery_err.push("<code><small>"+t+": "+e.message+i+n+"</small></code>")},jquery_notice:function(){var t=this,c=[],n=[];e("input[type=submit], input[type=button]").prop("disabled",!0),e("script").each(function(){var n=e(this).prop("src");t.is_empty(n)||!n.match(/jquery(\.min|\.js|\-?ui)/i)||n.match(/load\-scripts.php/)||c.push("<code><small>"+n.split(/\?/)[0]+"</small></code>")}),n.push("<strong>"+t.getxt("js")+"</strong>"),n.push(t.jquery_err.join("<br/>")),c.length&&n.push(t.getxt("jquery")+"<br/>"+c.join("<br/>")),n.push(t.getxt("plugin")+" "+t.getxt("contact")),t.set_notice({error:n})},update:{qsid:function(t){var c,n,i,r=this;r.current_qsid=t.key,r.current_qsdata=t.data,e("#ctc_sel_ovrd_qsid").val(r.current_qsid),r.is_empty(r.current_qsdata.seq)?e("#ctc_child_load_order_container").empty():(c="ctc_ovrd_child_seq_"+r.current_qsid,i=parseInt(r.current_qsdata.seq),n='<input type="text" id="'+c+'" name="'+c+'" class="ctc-child-value" value="'+i+'" />',e("#ctc_child_load_order_container").html(n)),r.is_empty(r.current_qsdata.value)?(e("#ctc_sel_ovrd_rule_inputs").empty(),e("#ctc_sel_ovrd_rule_header").hide()):(n="",e.each(r.current_qsdata.value,function(e){n+=r.input_row(r.current_qsid,e,"ovrd",r.current_qsdata)}),e("#ctc_sel_ovrd_rule_inputs").html(n).find(".color-picker").each(function(){r.setup_iris(this)}),r.coalesce_inputs("#ctc_child_all_0_swatch"),e("#ctc_sel_ovrd_rule_header").show()),r.jquery_err.length?r.jquery_notice():(r.reload_menus&&(r.set_query(r.current_qsdata.query),r.load_rules()),e("#ctc_sel_ovrd_selector_selected").text(r.current_qsdata.selector),e(".ctc-rewrite-toggle").text(r.getxt("rename")),e("#ctc_sel_ovrd_new_rule,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs,.ctc-rewrite-toggle").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 r=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+'">'+r.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=this,n="";c.is_empty(t.data)||e.each(t.data,function(i,r){page_rule=i,e.each(r,function(r,a){n+='<h4 class="ctc-query-heading">'+r+"</h4>\n",c.is_empty(a)||e.each(a,function(e,r){n+=c.input_row(e,i,t.key,r)})})}),selector="#ctc_selector_"+rule+"_"+t.key+"_rows",e(selector).html(n).find(".color-picker").each(function(){c.setup_iris(this)}),e(selector).find(".ctc-swatch").each(function(){c.coalesce_inputs(this)}),c.jquery_err.length&&c.jquery_notice()},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)}},init:function(){var t=this;if(t.autogen_slugs(),t.set_existing(),!e("#ctc_theme_parnt").is("input")){try{e.widget("ctc.themeMenu",e.ui.selectmenu,{_renderItem:function(t,c){var n=e("<li>");return e("#ctc_theme_option_"+c.value).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.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(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.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.is_empty(t.jquery_err)?(e("#ctc_main").on("focus",".color-picker",function(){try{e(".color-picker").not(this).iris("hide"),e(this).iris("toggle"),e(".iris-picker").css({position:"absolute","z-index":10})}catch(c){t.jquery_exception(c,"Iris Color Picker")}}),e("#ctc_main").on("change",".ctc-child-value, input[type=checkbox]",function(){t.coalesce_inputs(this)}),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=e(this).attr("id").toString().replace("_close",""),i=n.toString().match(/_([^_]+)_(\d+)$/);e("#"+n+"_container").is(":hidden")&&(t.is_empty(i[1])||t.is_empty(i[2])||(rule=i[1],valid=i[2],t.query_css("val_qry",valid,{rule:rule}))),e("#"+n+"_container").fadeToggle("fast"),e(".ctc-selector-container").not("#"+n+"_container").fadeOut("fast")}),e("#ctc_main").on("click",".ctc-save-input[type=button]",function(){return e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),void t.save(this))}),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-status-icon").remove();var n="#"+e(this).attr("id");t.focus_panel(n)}),e(".ctc-section-toggle").on("click",function(){e(this).toggleClass("open");var t=e(this).attr("id")+"_content";e("#"+t).slideToggle("fast")}),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){return c.preventDefault(),$this=e("#ctc_save_query_selector"),$this.hasClass("ajax-pending")?!1:($this.addClass("ajax-pending"),t.save($this),!1)}),e("#ctc_theme_child, #ctc_theme_child-button, #ctc_child_type_existing").on("focus click",function(){e("#ctc_child_type_existing").prop("checked",!0),e("#ctc_child_type_new").prop("checked",!1),e("#ctc_child_template").val(""),t.set_existing()}),e("#ctc_child_type_new, #ctc_child_template").on("focus click",function(){e("#ctc_child_type_existing").prop("checked",!1),e("#ctc_child_type_new").prop("checked",!0),e("#ctc_child_name").val(t.testname),e("#ctc_child_template").val(t.testslug)}),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(),t.set_addl_css(),e("input[type=submit], input[type=button]").prop("disabled",!1),t.scrolltop(),setTimeout(t.fade_update_notice,2e4)):t.jquery_notice()},testslug:"",testname:"",reload_menus:!1,current_query:"base",current_qsid:null,current_qsdata:{},jquery_err:[]}}(jQuery),jQuery(document).ready(function(e){e.chldthmcfg.init()});
readme.txt CHANGED
@@ -4,15 +4,15 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: child theme, child themes, customize theme, CSS, responsive, css editor, child theme generator, child theme creator, stylesheet, customizer
5
  Requires at least: 3.9
6
  Tested up to: 4.1
7
- Stable tag: 1.7.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Create a child theme and customize the stylesheets and templates. Fast CSS editor lets you search, preview and modify any style.
12
 
13
  == Description ==
14
 
15
- Child Theme Configurator is a fast and easy to use CSS editor that allows you to create child themes and customize them beyond the options of the Customizer. Designed for WordPress users who want to be able to customize stylesheets directly, the Child Theme Configurator lets you easily identify and override the exact CSS attributes you want to change. It gives you unlimited control over your WordPress look and feel while leaving your Parent Theme untouched.
16
 
17
  = Take Control of Your Child Themes =
18
 
@@ -31,7 +31,7 @@ When you are ready, just activate the Child Theme and your WordPress site takes
31
  * Save hours of development time
32
  * Multisite compatible
33
  * Make modifications unavailable to the Customizer
34
- * Enqueue (link) parent theme stylesheet instead of using @import
35
  * Export child themes as Zip Archive
36
  * Use web fonts in your child theme
37
  * Identify and override exact selectors from the parent theme
@@ -266,7 +266,8 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
266
  7. Files tab
267
 
268
  == Changelog ==
269
- = 1.7.2 =
 
270
  * Fix: @import not being written on rebuild/configure
271
  * Fix: min height on rule/value panel
272
  * Only prune child theme selectors on rename
@@ -489,7 +490,7 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
489
  * Initial release.
490
 
491
  == Upgrade Notice ==
492
- Version 1.7.2: @imports were not being written correctly on child theme rebuild. See changelog.
493
 
494
  == Override Parent Styles ==
495
 
4
  Tags: child theme, child themes, customize theme, CSS, responsive, css editor, child theme generator, child theme creator, stylesheet, customizer
5
  Requires at least: 3.9
6
  Tested up to: 4.1
7
+ Stable tag: 1.7.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Create a child theme that follows WP best practice to enqueue stylesheets. Easy to use CSS editor lets you find, preview and customize any style.
12
 
13
  == Description ==
14
 
15
+ Child Theme Configurator is a fast and easy to use CSS editor that allows you to create a child theme and customize it beyond the options of the Customizer. Designed for WordPress users who want to be able to customize stylesheets directly, the Child Theme Configurator lets you easily identify and override the exact CSS attributes you want to change. It gives you unlimited control over your WordPress look and feel while leaving your Parent Theme untouched. [Learn more about how to create a child theme](http://www.childthemeconfigurator.com).
16
 
17
  = Take Control of Your Child Themes =
18
 
31
  * Save hours of development time
32
  * Multisite compatible
33
  * Make modifications unavailable to the Customizer
34
+ * Uses WP best practice for enqueuing (linking) stylesheets
35
  * Export child themes as Zip Archive
36
  * Use web fonts in your child theme
37
  * Identify and override exact selectors from the parent theme
266
  7. Files tab
267
 
268
  == Changelog ==
269
+ = 1.7.2.1 =
270
+ * Fix: hide called before iris init
271
  * Fix: @import not being written on rebuild/configure
272
  * Fix: min height on rule/value panel
273
  * Only prune child theme selectors on rename
490
  * Initial release.
491
 
492
  == Upgrade Notice ==
493
+ Version 1.7.2.1: Fixed Iris bug in JS; 1.7.2: @imports were not being written correctly on child theme rebuild. See changelog.
494
 
495
  == Override Parent Styles ==
496