Version Description
- Fix: incorrect path generation and validation on Windows servers
- Added error handling and notification to prevent jQuery conflicts and out of memory conditions
- Fix: removed max-height on rule/value overlay
- Added debug option
Download this release
Release Info
Developer | lilaeamedia |
Plugin | Child Theme Configurator |
Version | 1.6.5 |
Comparing to | |
See all releases |
Code changes from version 1.6.4 to 1.6.5
- child-theme-configurator.php +18 -16
- css/chld-thm-cfg.css +22 -9
- css/iw-banner.jpg +0 -0
- css/iwrm-banner.jpg +0 -0
- includes/class-ctc-css.php +50 -24
- includes/class-ctc-ui.php +27 -7
- includes/class-ctc.php +140 -62
- includes/forms/addl_panels.php +20 -14
- includes/forms/at-import.php +1 -1
- includes/forms/fileform.php +2 -1
- includes/forms/files.php +25 -1
- includes/forms/images.php +2 -1
- includes/forms/main.php +3 -2
- includes/forms/tabs.php +1 -2
- js/chld-thm-cfg.js +290 -188
- js/chld-thm-cfg.min.js +1 -1
- lang/chld_thm_cfg.pot +158 -109
- readme.txt +14 -7
child-theme-configurator.php
CHANGED
@@ -5,8 +5,8 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
5 |
/*
|
6 |
Plugin Name: Child Theme Configurator
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
-
Description: Create a Child Theme and customize the stylesheet
|
9 |
-
Version: 1.6.
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
@@ -15,17 +15,18 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
15 |
Copyright (C) 2014-2015 Lilaea Media
|
16 |
*/
|
17 |
|
18 |
-
defined( 'LF' ) or define( 'LF',
|
19 |
-
define( 'CHLD_THM_CFG_OPTIONS',
|
20 |
-
define( 'CHLD_THM_CFG_VERSION',
|
21 |
-
define( 'CHLD_THM_CFG_MIN_WP_VERSION',
|
22 |
-
define( '
|
23 |
-
define( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS',
|
24 |
-
define( 'CHLD_THM_CFG_MENU',
|
25 |
-
define( 'CHLD_THM_CFG_DIR',
|
26 |
-
define( 'CHLD_THM_CFG_URL',
|
27 |
|
28 |
class ChildThemeConfigurator {
|
|
|
29 |
static function init() {
|
30 |
// initialize languages
|
31 |
load_plugin_textdomain( 'chld_thm_cfg', FALSE, basename( CHLD_THM_CFG_DIR ) . '/lang' );
|
@@ -46,12 +47,13 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
46 |
}
|
47 |
static function ctc() {
|
48 |
// create admin object
|
49 |
-
global $chld_thm_cfg;
|
50 |
-
if ( !isset(
|
51 |
-
include_once(
|
52 |
-
|
53 |
endif;
|
54 |
-
|
|
|
55 |
}
|
56 |
static function save() {
|
57 |
// ajax write
|
5 |
/*
|
6 |
Plugin Name: Child Theme Configurator
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
+
Description: Create a Child Theme and customize the stylesheet and templates. Fast CSS editor lets you search, preview and modify by selector, rule or value.
|
9 |
+
Version: 1.6.5
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
15 |
Copyright (C) 2014-2015 Lilaea Media
|
16 |
*/
|
17 |
|
18 |
+
defined( 'LF' ) or define( 'LF', "\n" );
|
19 |
+
define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
|
20 |
+
define( 'CHLD_THM_CFG_VERSION', '1.6.5' );
|
21 |
+
define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
|
22 |
+
define( 'CHLD_THM_CFG_BPSEL', '2500' );
|
23 |
+
define( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS', '1000' );
|
24 |
+
define( 'CHLD_THM_CFG_MENU', 'chld_thm_cfg_menu' );
|
25 |
+
define( 'CHLD_THM_CFG_DIR', dirname( __FILE__ ) );
|
26 |
+
define( 'CHLD_THM_CFG_URL', plugin_dir_url( __FILE__ ) );
|
27 |
|
28 |
class ChildThemeConfigurator {
|
29 |
+
static $instance;
|
30 |
static function init() {
|
31 |
// initialize languages
|
32 |
load_plugin_textdomain( 'chld_thm_cfg', FALSE, basename( CHLD_THM_CFG_DIR ) . '/lang' );
|
47 |
}
|
48 |
static function ctc() {
|
49 |
// create admin object
|
50 |
+
global $chld_thm_cfg; /// backward compat
|
51 |
+
if ( !isset( self::$instance ) ):
|
52 |
+
include_once( CHLD_THM_CFG_DIR . '/includes/class-ctc.php' );
|
53 |
+
self::$instance = new ChildThemeConfiguratorAdmin( __FILE__ );
|
54 |
endif;
|
55 |
+
$chld_thm_cfg = self::$instance; /// backward compat
|
56 |
+
return self::$instance;
|
57 |
}
|
58 |
static function save() {
|
59 |
// ajax write
|
css/chld-thm-cfg.css
CHANGED
@@ -1,11 +1,19 @@
|
|
1 |
-
|
2 |
a.nav-tab, a.nav-tab:focus, a.nav-tab:active {
|
3 |
outline: none;
|
4 |
-moz-box-shadow: none;
|
5 |
-webkit-box-shadow: none;
|
6 |
box-shadow: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
}
|
8 |
-
|
9 |
.ctc-option-panel-container {
|
10 |
position: relative;
|
11 |
min-height: 1100px;
|
@@ -55,10 +63,10 @@ a.nav-tab, a.nav-tab:focus, a.nav-tab:active {
|
|
55 |
top: 0;
|
56 |
left: 0;
|
57 |
padding: 10px 2%;
|
58 |
-
transition: width 1s ease;
|
59 |
-moz-transition: width 1s ease;
|
60 |
-webkit-transition: width 1s ease;
|
61 |
-
-o-transition: width 1s ease;
|
62 |
}
|
63 |
.ctc-recent-container {
|
64 |
top:0;
|
@@ -90,9 +98,9 @@ a.ctc-recent-tab {
|
|
90 |
outline:none;
|
91 |
}
|
92 |
h2 .ctc-recent-tab {
|
93 |
-
padding: 6px
|
94 |
font-weight: 700;
|
95 |
-
font-size:
|
96 |
line-height: 24px;
|
97 |
}
|
98 |
.ctc-recent-tab h3 {
|
@@ -136,6 +144,7 @@ h2 .ctc-recent-tab {
|
|
136 |
display: block;
|
137 |
float: left;
|
138 |
width: 30%;
|
|
|
139 |
margin-right: 2%;
|
140 |
word-wrap: break-word;
|
141 |
}
|
@@ -202,8 +211,8 @@ h2 .ctc-recent-tab {
|
|
202 |
|
203 |
.ctc-selector-inner-container {
|
204 |
position: relative;
|
205 |
-
max-height: 500px
|
206 |
-
|
207 |
}
|
208 |
|
209 |
.ctc-status-icon {
|
@@ -518,7 +527,7 @@ h3.theme-name {
|
|
518 |
}
|
519 |
|
520 |
#get_pro_panel p {
|
521 |
-
font-size:
|
522 |
margin: .5em 0;
|
523 |
}
|
524 |
#get_pro_panel ul {
|
@@ -538,4 +547,8 @@ h3.theme-name {
|
|
538 |
#get_pro_panel h3 a:hover {
|
539 |
background-color: #FF902E;
|
540 |
color: #fff;
|
|
|
|
|
|
|
|
|
541 |
}
|
|
|
1 |
a.nav-tab, a.nav-tab:focus, a.nav-tab:active {
|
2 |
outline: none;
|
3 |
-moz-box-shadow: none;
|
4 |
-webkit-box-shadow: none;
|
5 |
box-shadow: none;
|
6 |
+
/*max-width: 9%;
|
7 |
+
margin:0 .25%;
|
8 |
+
display:block;
|
9 |
+
float:left;
|
10 |
+
line-height:1;
|
11 |
+
height:2em;*/
|
12 |
+
}
|
13 |
+
h2 .nav-tab {
|
14 |
+
font-size: 13px;
|
15 |
+
padding: 6px 8px;
|
16 |
}
|
|
|
17 |
.ctc-option-panel-container {
|
18 |
position: relative;
|
19 |
min-height: 1100px;
|
63 |
top: 0;
|
64 |
left: 0;
|
65 |
padding: 10px 2%;
|
66 |
+
/* transition: width 1s ease;
|
67 |
-moz-transition: width 1s ease;
|
68 |
-webkit-transition: width 1s ease;
|
69 |
+
-o-transition: width 1s ease; */
|
70 |
}
|
71 |
.ctc-recent-container {
|
72 |
top:0;
|
98 |
outline:none;
|
99 |
}
|
100 |
h2 .ctc-recent-tab {
|
101 |
+
padding: 6px 8px;
|
102 |
font-weight: 700;
|
103 |
+
font-size: 13px;
|
104 |
line-height: 24px;
|
105 |
}
|
106 |
.ctc-recent-tab h3 {
|
144 |
display: block;
|
145 |
float: left;
|
146 |
width: 30%;
|
147 |
+
max-width: 350px;
|
148 |
margin-right: 2%;
|
149 |
word-wrap: break-word;
|
150 |
}
|
211 |
|
212 |
.ctc-selector-inner-container {
|
213 |
position: relative;
|
214 |
+
/*max-height: 500px;*/
|
215 |
+
overflow: auto;
|
216 |
}
|
217 |
|
218 |
.ctc-status-icon {
|
527 |
}
|
528 |
|
529 |
#get_pro_panel p {
|
530 |
+
font-size:1em;
|
531 |
margin: .5em 0;
|
532 |
}
|
533 |
#get_pro_panel ul {
|
547 |
#get_pro_panel h3 a:hover {
|
548 |
background-color: #FF902E;
|
549 |
color: #fff;
|
550 |
+
}
|
551 |
+
#get_pro_panel img {
|
552 |
+
max-width: 100%;
|
553 |
+
height: auto;
|
554 |
}
|
css/iw-banner.jpg
ADDED
Binary file
|
css/iwrm-banner.jpg
ADDED
Binary file
|
includes/class-ctc-css.php
CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
6 |
Class: ChildThemeConfiguratorCSS
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
Description: Handles all CSS output, parsing, normalization
|
9 |
-
Version: 1.6.
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
@@ -43,6 +43,7 @@ class ChildThemeConfiguratorCSS {
|
|
43 |
var $child_name; // child theme name
|
44 |
var $child_author; // stylesheet author
|
45 |
var $child_version; // stylesheet version
|
|
|
46 |
var $vendorrule = array(
|
47 |
'box-sizing',
|
48 |
'font-smoothing',
|
@@ -59,6 +60,7 @@ class ChildThemeConfiguratorCSS {
|
|
59 |
// removing the @import for the parent stylesheet will cause
|
60 |
// the parent core styles to be missing.
|
61 |
'enqueue',
|
|
|
62 |
'imports',
|
63 |
'child_version',
|
64 |
'child_author',
|
@@ -83,6 +85,7 @@ class ChildThemeConfiguratorCSS {
|
|
83 |
'sel_ndx',
|
84 |
'val_ndx',
|
85 |
);
|
|
|
86 |
function __construct() {
|
87 |
// scalars
|
88 |
$this->querykey = 0;
|
@@ -96,6 +99,7 @@ class ChildThemeConfiguratorCSS {
|
|
96 |
$this->child_name = '';
|
97 |
$this->child_author = 'Child Theme Configurator';
|
98 |
$this->child_version = '1.0';
|
|
|
99 |
|
100 |
// multi-dim arrays
|
101 |
$this->dict_qs = array();
|
@@ -112,8 +116,7 @@ class ChildThemeConfiguratorCSS {
|
|
112 |
}
|
113 |
// helper function to globalize ctc object
|
114 |
function ctc() {
|
115 |
-
|
116 |
-
return $chld_thm_cfg;
|
117 |
}
|
118 |
// loads current ctc config data into local memory
|
119 |
function load_config() {
|
@@ -259,7 +262,7 @@ class ChildThemeConfiguratorCSS {
|
|
259 |
* Update cache is returned to UI via AJAX to refresh page.
|
260 |
*/
|
261 |
function update_arrays( $template, $query, $sel, $rule = NULL, $value = NULL, $important = 0, $seq = NULL ) {
|
262 |
-
|
263 |
// normalize selector styling
|
264 |
$sel = implode( ', ', preg_split( '#\s*,\s*#s', trim( $sel ) ) );
|
265 |
//echo "$template $query $sel $rule $value $important" . LF;
|
@@ -267,6 +270,12 @@ class ChildThemeConfiguratorCSS {
|
|
267 |
if ( !isset( $this->dict_query[ $query ] ) ) $this->dict_query[ $query ] = ++$this->querykey;
|
268 |
if ( !isset( $this->dict_sel[ $sel ] ) ) $this->dict_sel[ $sel ] = ++$this->selkey;
|
269 |
if ( !isset( $this->sel_ndx[ $this->dict_query[ $query ] ][ $this->dict_sel[ $sel ] ] ) ):
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
// increment key number
|
271 |
$this->sel_ndx[ $this->dict_query[ $query ] ][ $this->dict_sel[ $sel ] ] = ++$this->qskey;
|
272 |
|
@@ -329,6 +338,7 @@ class ChildThemeConfiguratorCSS {
|
|
329 |
);
|
330 |
endif;
|
331 |
endif;
|
|
|
332 |
endif;
|
333 |
}
|
334 |
|
@@ -517,7 +527,6 @@ class ChildThemeConfiguratorCSS {
|
|
517 |
endif;
|
518 |
endforeach;
|
519 |
endforeach;
|
520 |
-
$this->prune_if_empty( $qsid );
|
521 |
endif;
|
522 |
}
|
523 |
|
@@ -541,11 +550,18 @@ class ChildThemeConfiguratorCSS {
|
|
541 |
function repl_octal( $styles ) {
|
542 |
return str_replace( "##bs##", "\\", $styles );
|
543 |
}
|
|
|
544 |
/*
|
545 |
* parse_css_file
|
546 |
* reads stylesheet to get WordPress meta data and passes rest to parse_css
|
547 |
*/
|
548 |
function parse_css_file( $template, $file = 'style.css' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
549 |
// turn off caching when parsing files to reduce memory usage
|
550 |
$this->ctc()->cache_updates = FALSE;
|
551 |
$this->styles = ''; // reset styles
|
@@ -572,11 +588,15 @@ class ChildThemeConfiguratorCSS {
|
|
572 |
$stylesheet = apply_filters( 'chld_thm_cfg_' . $template, trailingslashit( $themedir )
|
573 |
. $file , ( $this->ctc()->is_legacy() ? $this : $file ) ); // support for plugins extension < 2.0
|
574 |
|
575 |
-
//echo 'reading stylesheet: ' . $stylesheet . LF;
|
576 |
-
|
577 |
// read stylesheet
|
578 |
|
579 |
if ( $stylesheet_verified = $this->is_file_ok( $stylesheet, 'read' ) ):
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
$this->styles .= @file_get_contents( $stylesheet_verified ) . "\n";
|
581 |
//echo 'count after get contents: ' . strlen( $this->styles ) . LF;
|
582 |
else:
|
@@ -595,8 +615,8 @@ class ChildThemeConfiguratorCSS {
|
|
595 |
$ruleset = array();
|
596 |
// ignore commented code
|
597 |
$this->styles = preg_replace( '#\/\*.*?\*\/#s', '', $this->styles );
|
598 |
-
// space
|
599 |
-
$this->styles = preg_replace( '#(\{\s
|
600 |
// get all imports
|
601 |
if ( $parse_imports ):
|
602 |
|
@@ -613,7 +633,7 @@ class ChildThemeConfiguratorCSS {
|
|
613 |
endif;
|
614 |
// break into @ segments
|
615 |
foreach ( array(
|
616 |
-
'#(\@media[^\{]+?)\{(\s*?)\}#', // get
|
617 |
'#(\@media[^\{]+?)\{(.*?\})?\s*?\}#s', // get all other media queries
|
618 |
) as $regex ): // (((?!\@media).) backreference too memory intensive - rolled back in v 1.4.8.1
|
619 |
preg_match_all( $regex, $this->styles, $matches );
|
@@ -625,10 +645,12 @@ class ChildThemeConfiguratorCSS {
|
|
625 |
endforeach;
|
626 |
$ruleset[ $basequery ] = $this->styles;
|
627 |
foreach ( $ruleset as $query => $segment ):
|
|
|
|
|
628 |
// make sure there is semicolon before closing brace
|
629 |
$segment = preg_replace( '#(\})#', ";$1", $segment );
|
630 |
// parses selectors and corresponding rules
|
631 |
-
$regex = '#\s([\[\.\#\:\w][\w\-\s\(\)\[\]\'\^\*\.\#\+:,"=>]+?)\s*\{(.*?)\}#s'; //
|
632 |
preg_match_all( $regex, $segment, $matches );
|
633 |
foreach( $matches[ 1 ] as $sel ):
|
634 |
$stuff = array_shift( $matches[ 2 ] );
|
@@ -926,7 +948,6 @@ class ChildThemeConfiguratorCSS {
|
|
926 |
* normalize_margin_padding
|
927 |
* parses margin or padding shorthand value and returns
|
928 |
* normalized rule/value pairs for each property
|
929 |
-
* TODO: reassemble into shorthand when writing CSS file
|
930 |
*/
|
931 |
function normalize_margin_padding( $rule, $value, &$rules, &$values ) {
|
932 |
$parts = preg_split( "/ +/", trim( $value ) );
|
@@ -1247,26 +1268,31 @@ class ChildThemeConfiguratorCSS {
|
|
1247 |
* verify file exists and is in valid location
|
1248 |
*/
|
1249 |
function is_file_ok( $stylesheet, $permission = 'read' ) {
|
1250 |
-
//echo 'verifying stylesheet (' . $permission . ') : ' . $stylesheet . LF;
|
1251 |
-
//echo 'current styles string: ' . strlen( $this->styles ) . LF;
|
1252 |
-
//echo 'current qs key: ' . $this->qskey . LF;
|
1253 |
-
//$this->ctc()->backtrace_summary();
|
1254 |
// remove any ../ manipulations
|
1255 |
-
$stylesheet = preg_replace( "%\.\./%", '/', $stylesheet );
|
|
|
1256 |
if ( 'read' == $permission && !is_file( $stylesheet ) ):
|
1257 |
-
|
1258 |
return FALSE;
|
1259 |
elseif ( 'search' == $permission && !is_dir( $stylesheet ) ):
|
1260 |
-
|
1261 |
return FALSE;
|
1262 |
endif;
|
1263 |
-
// sanity check for php files
|
1264 |
-
//if ( !preg_match( '%' . preg_quote( $ext ) . '$%', $stylesheet ) ) return FALSE;
|
1265 |
// check if in themes dir;
|
1266 |
-
|
|
|
|
|
|
|
|
|
|
|
1267 |
// check if in plugins dir
|
1268 |
-
|
1269 |
-
|
|
|
|
|
|
|
|
|
|
|
1270 |
return FALSE;
|
1271 |
}
|
1272 |
/* normalize_color
|
6 |
Class: ChildThemeConfiguratorCSS
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
Description: Handles all CSS output, parsing, normalization
|
9 |
+
Version: 1.6.5
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
43 |
var $child_name; // child theme name
|
44 |
var $child_author; // stylesheet author
|
45 |
var $child_version; // stylesheet version
|
46 |
+
var $max_sel;
|
47 |
var $vendorrule = array(
|
48 |
'box-sizing',
|
49 |
'font-smoothing',
|
60 |
// removing the @import for the parent stylesheet will cause
|
61 |
// the parent core styles to be missing.
|
62 |
'enqueue',
|
63 |
+
'max_sel',
|
64 |
'imports',
|
65 |
'child_version',
|
66 |
'child_author',
|
85 |
'sel_ndx',
|
86 |
'val_ndx',
|
87 |
);
|
88 |
+
|
89 |
function __construct() {
|
90 |
// scalars
|
91 |
$this->querykey = 0;
|
99 |
$this->child_name = '';
|
100 |
$this->child_author = 'Child Theme Configurator';
|
101 |
$this->child_version = '1.0';
|
102 |
+
$this->max_sel = 0;
|
103 |
|
104 |
// multi-dim arrays
|
105 |
$this->dict_qs = array();
|
116 |
}
|
117 |
// helper function to globalize ctc object
|
118 |
function ctc() {
|
119 |
+
return ChildThemeConfigurator::ctc();
|
|
|
120 |
}
|
121 |
// loads current ctc config data into local memory
|
122 |
function load_config() {
|
262 |
* Update cache is returned to UI via AJAX to refresh page.
|
263 |
*/
|
264 |
function update_arrays( $template, $query, $sel, $rule = NULL, $value = NULL, $important = 0, $seq = NULL ) {
|
265 |
+
if ( $this->max_sel ) return;
|
266 |
// normalize selector styling
|
267 |
$sel = implode( ', ', preg_split( '#\s*,\s*#s', trim( $sel ) ) );
|
268 |
//echo "$template $query $sel $rule $value $important" . LF;
|
270 |
if ( !isset( $this->dict_query[ $query ] ) ) $this->dict_query[ $query ] = ++$this->querykey;
|
271 |
if ( !isset( $this->dict_sel[ $sel ] ) ) $this->dict_sel[ $sel ] = ++$this->selkey;
|
272 |
if ( !isset( $this->sel_ndx[ $this->dict_query[ $query ] ][ $this->dict_sel[ $sel ] ] ) ):
|
273 |
+
// stop parsing if limit is reached to prevent out of memory on serialize
|
274 |
+
if ( $this->qskey >= $this->ctc()->sel_limit ):
|
275 |
+
$this->max_sel = 1;
|
276 |
+
$this->ctc()->debug( 'Maximum num selectors reached ( limit: ' . $this->ctc()->sel_limit . ' )', __FUNCTION__ );
|
277 |
+
return;
|
278 |
+
endif;
|
279 |
// increment key number
|
280 |
$this->sel_ndx[ $this->dict_query[ $query ] ][ $this->dict_sel[ $sel ] ] = ++$this->qskey;
|
281 |
|
338 |
);
|
339 |
endif;
|
340 |
endif;
|
341 |
+
$this->prune_if_empty( $qsid );
|
342 |
endif;
|
343 |
}
|
344 |
|
527 |
endif;
|
528 |
endforeach;
|
529 |
endforeach;
|
|
|
530 |
endif;
|
531 |
}
|
532 |
|
550 |
function repl_octal( $styles ) {
|
551 |
return str_replace( "##bs##", "\\", $styles );
|
552 |
}
|
553 |
+
|
554 |
/*
|
555 |
* parse_css_file
|
556 |
* reads stylesheet to get WordPress meta data and passes rest to parse_css
|
557 |
*/
|
558 |
function parse_css_file( $template, $file = 'style.css' ) {
|
559 |
+
if ( '' == $file ) $file = 'style.css';
|
560 |
+
// have we run out of memory?
|
561 |
+
if ( $this->max_sel ):
|
562 |
+
$this->ctc()->debug( 'Insufficient memory to parse file.', __FUNCTION__ );
|
563 |
+
return FALSE;
|
564 |
+
endif;
|
565 |
// turn off caching when parsing files to reduce memory usage
|
566 |
$this->ctc()->cache_updates = FALSE;
|
567 |
$this->styles = ''; // reset styles
|
588 |
$stylesheet = apply_filters( 'chld_thm_cfg_' . $template, trailingslashit( $themedir )
|
589 |
. $file , ( $this->ctc()->is_legacy() ? $this : $file ) ); // support for plugins extension < 2.0
|
590 |
|
|
|
|
|
591 |
// read stylesheet
|
592 |
|
593 |
if ( $stylesheet_verified = $this->is_file_ok( $stylesheet, 'read' ) ):
|
594 |
+
// make sure we have space to parse
|
595 |
+
if ( filesize( $stylesheet_verified ) * 3 > $this->ctc()->get_free_memory() ):
|
596 |
+
$this->max_sel = 1;
|
597 |
+
$this->ctc()->debug( 'Insufficient memory to read file', __FUNCTION__ );
|
598 |
+
return;
|
599 |
+
endif;
|
600 |
$this->styles .= @file_get_contents( $stylesheet_verified ) . "\n";
|
601 |
//echo 'count after get contents: ' . strlen( $this->styles ) . LF;
|
602 |
else:
|
615 |
$ruleset = array();
|
616 |
// ignore commented code
|
617 |
$this->styles = preg_replace( '#\/\*.*?\*\/#s', '', $this->styles );
|
618 |
+
// space braces to ensure correct matching
|
619 |
+
$this->styles = preg_replace( '#([\{\}])\s*#', "$1\n", $this->styles );
|
620 |
// get all imports
|
621 |
if ( $parse_imports ):
|
622 |
|
633 |
endif;
|
634 |
// break into @ segments
|
635 |
foreach ( array(
|
636 |
+
'#(\@media[^\{]+?)\{(\s*?)\}#', // get any placehoder (empty) media queries
|
637 |
'#(\@media[^\{]+?)\{(.*?\})?\s*?\}#s', // get all other media queries
|
638 |
) as $regex ): // (((?!\@media).) backreference too memory intensive - rolled back in v 1.4.8.1
|
639 |
preg_match_all( $regex, $this->styles, $matches );
|
645 |
endforeach;
|
646 |
$ruleset[ $basequery ] = $this->styles;
|
647 |
foreach ( $ruleset as $query => $segment ):
|
648 |
+
// make sure there is a newline before the first selector
|
649 |
+
$segment = LF . $segment;
|
650 |
// make sure there is semicolon before closing brace
|
651 |
$segment = preg_replace( '#(\})#', ";$1", $segment );
|
652 |
// parses selectors and corresponding rules
|
653 |
+
$regex = '#\n\s*([\[\.\#\:\w][\w\-\s\(\)\[\]\'\^\*\.\#\+:,"=>]+?)\s*\{(.*?)\}#s'; //
|
654 |
preg_match_all( $regex, $segment, $matches );
|
655 |
foreach( $matches[ 1 ] as $sel ):
|
656 |
$stuff = array_shift( $matches[ 2 ] );
|
948 |
* normalize_margin_padding
|
949 |
* parses margin or padding shorthand value and returns
|
950 |
* normalized rule/value pairs for each property
|
|
|
951 |
*/
|
952 |
function normalize_margin_padding( $rule, $value, &$rules, &$values ) {
|
953 |
$parts = preg_split( "/ +/", trim( $value ) );
|
1268 |
* verify file exists and is in valid location
|
1269 |
*/
|
1270 |
function is_file_ok( $stylesheet, $permission = 'read' ) {
|
|
|
|
|
|
|
|
|
1271 |
// remove any ../ manipulations
|
1272 |
+
$stylesheet = $this->ctc()->normalize_path( preg_replace( "%\.\./%", '/', $stylesheet ) );
|
1273 |
+
$this->ctc()->debug( 'checking file: ' . $stylesheet, __FUNCTION__ );
|
1274 |
if ( 'read' == $permission && !is_file( $stylesheet ) ):
|
1275 |
+
$this->ctc()->debug( 'read: no file!', __FUNCTION__ );
|
1276 |
return FALSE;
|
1277 |
elseif ( 'search' == $permission && !is_dir( $stylesheet ) ):
|
1278 |
+
$this->ctc()->debug( 'read: no dir!', __FUNCTION__ );
|
1279 |
return FALSE;
|
1280 |
endif;
|
|
|
|
|
1281 |
// check if in themes dir;
|
1282 |
+
$regex = '%^' . preg_quote( $this->ctc()->normalize_path( get_theme_root() ) ) . '%';
|
1283 |
+
$this->ctc()->debug( 'theme regex: ' . $regex, __FUNCTION__ );
|
1284 |
+
if ( preg_match( $regex, $stylesheet ) ):
|
1285 |
+
$this->ctc()->debug( $stylesheet . ' ok!', __FUNCTION__ );
|
1286 |
+
return $stylesheet;
|
1287 |
+
endif;
|
1288 |
// check if in plugins dir
|
1289 |
+
$regex = '%^' . preg_quote( $this->ctc()->normalize_path( WP_PLUGIN_DIR ) ) . '%';
|
1290 |
+
$this->ctc()->debug( 'plugin regex: ' . $regex, __FUNCTION__ );
|
1291 |
+
if ( preg_match( $regex, $stylesheet ) ):
|
1292 |
+
$this->ctc()->debug( $stylesheet . ' ok!', __FUNCTION__ );
|
1293 |
+
return $stylesheet;
|
1294 |
+
endif;
|
1295 |
+
$this->ctc()->debug( $stylesheet . ' is not in wp folders!', __FUNCTION__ );
|
1296 |
return FALSE;
|
1297 |
}
|
1298 |
/* normalize_color
|
includes/class-ctc-ui.php
CHANGED
@@ -5,7 +5,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
5 |
Class: Child_Theme_Configurator_UI
|
6 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
7 |
Description: Handles the plugin User Interface
|
8 |
-
Version: 1.6.
|
9 |
Author: Lilaea Media
|
10 |
Author URI: http://www.lilaeamedia.com/
|
11 |
Text Domain: chld_thm_cfg
|
@@ -17,8 +17,7 @@ class ChildThemeConfiguratorUI {
|
|
17 |
// helper function to globalize ctc object
|
18 |
|
19 |
function ctc() {
|
20 |
-
|
21 |
-
return $chld_thm_cfg;
|
22 |
}
|
23 |
|
24 |
function render() {
|
@@ -32,7 +31,14 @@ class ChildThemeConfiguratorUI {
|
|
32 |
$id = 0;
|
33 |
$this->ctc()->fs_method = get_filesystem_method();
|
34 |
add_thickbox();
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
include ( CHLD_THM_CFG_DIR . '/includes/forms/main.php' );
|
37 |
}
|
38 |
|
@@ -49,9 +55,10 @@ class ChildThemeConfiguratorUI {
|
|
49 |
function render_theme_menu( $template = 'child', $selected = NULL ) {
|
50 |
?>
|
51 |
<select class="ctc-select" id="ctc_theme_<?php echo $template; ?>" name="ctc_theme_<?php echo $template; ?>" style="visibility:hidden" <?php echo $this->ctc()->is_theme() ? '' : ' disabled '; ?> ><?php
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
55 |
</select>
|
56 |
<div style="display:none">
|
57 |
<?php
|
@@ -191,9 +198,22 @@ class ChildThemeConfiguratorUI {
|
|
191 |
}
|
192 |
}
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
function lilaea_plug() {
|
195 |
include ( CHLD_THM_CFG_DIR . '/includes/forms/related.php' );
|
196 |
}
|
197 |
|
|
|
|
|
|
|
|
|
|
|
198 |
}
|
199 |
?>
|
5 |
Class: Child_Theme_Configurator_UI
|
6 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
7 |
Description: Handles the plugin User Interface
|
8 |
+
Version: 1.6.5
|
9 |
Author: Lilaea Media
|
10 |
Author URI: http://www.lilaeamedia.com/
|
11 |
Text Domain: chld_thm_cfg
|
17 |
// helper function to globalize ctc object
|
18 |
|
19 |
function ctc() {
|
20 |
+
return ChildThemeConfigurator::ctc();
|
|
|
21 |
}
|
22 |
|
23 |
function render() {
|
31 |
$id = 0;
|
32 |
$this->ctc()->fs_method = get_filesystem_method();
|
33 |
add_thickbox();
|
34 |
+
add_filter( 'chld_thm_cfg_files_tab_filter', array( $this, 'render_files_tab_options' ) );
|
35 |
+
add_action( 'chld_thm_cfg_tabs', array( $this, 'render_addl_tabs' ), 10, 4 );
|
36 |
+
add_action( 'chld_thm_cfg_panels', array( $this, 'render_addl_panels' ), 10, 4 );
|
37 |
+
add_action( 'chld_thm_cfg_related_links', array( $this, 'lilaea_plug' ) );
|
38 |
+
if ( $this->ctc()->is_debug ):
|
39 |
+
$this->ctc()->debug( 'adding new debug action...', __FUNCTION__ );
|
40 |
+
add_action( 'chld_thm_cfg_print_debug', array( $this->ctc(), 'print_debug' ) );
|
41 |
+
endif;
|
42 |
include ( CHLD_THM_CFG_DIR . '/includes/forms/main.php' );
|
43 |
}
|
44 |
|
55 |
function render_theme_menu( $template = 'child', $selected = NULL ) {
|
56 |
?>
|
57 |
<select class="ctc-select" id="ctc_theme_<?php echo $template; ?>" name="ctc_theme_<?php echo $template; ?>" style="visibility:hidden" <?php echo $this->ctc()->is_theme() ? '' : ' disabled '; ?> ><?php
|
58 |
+
foreach ( $this->ctc()->themes[ $template ] as $slug => $theme )
|
59 |
+
echo '<option value="' . $slug . '"' . ( $slug == $selected ? ' selected' : '' ) . '>'
|
60 |
+
. esc_attr( $theme[ 'Name' ] ) . '</option>' . LF;
|
61 |
+
?>
|
62 |
</select>
|
63 |
<div style="display:none">
|
64 |
<?php
|
198 |
}
|
199 |
}
|
200 |
|
201 |
+
function render_addl_tabs( $ctc, $active_tab = NULL, $hidechild = '' ) {
|
202 |
+
include ( CHLD_THM_CFG_DIR . '/includes/forms/addl_tabs.php' );
|
203 |
+
}
|
204 |
+
|
205 |
+
function render_addl_panels( $ctc, $active_tab = NULL, $hidechild = '' ) {
|
206 |
+
include ( CHLD_THM_CFG_DIR . '/includes/forms/addl_panels.php' );
|
207 |
+
}
|
208 |
+
|
209 |
function lilaea_plug() {
|
210 |
include ( CHLD_THM_CFG_DIR . '/includes/forms/related.php' );
|
211 |
}
|
212 |
|
213 |
+
function render_files_tab_options( $output ) {
|
214 |
+
$regex = '%<div class="ctc\-input\-cell clear">.*?(</form>).*%s';
|
215 |
+
$output = preg_replace( $regex, "$1", $output );
|
216 |
+
return $output;
|
217 |
+
}
|
218 |
}
|
219 |
?>
|
includes/class-ctc.php
CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
6 |
Class: Child_Theme_Configurator
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
Description: Main Controller Class
|
9 |
-
Version: 1.6.
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
@@ -29,12 +29,16 @@ class ChildThemeConfiguratorAdmin {
|
|
29 |
var $menuName; // backward compatibility with plugin extension
|
30 |
var $cache_updates = TRUE;
|
31 |
var $debug = '';
|
|
|
32 |
var $swatch_text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
|
|
|
|
|
33 |
// state arrays
|
34 |
var $themes = array();
|
35 |
var $errors = array();
|
36 |
var $files = array();
|
37 |
var $updates = array();
|
|
|
38 |
// objects
|
39 |
var $css;
|
40 |
var $ui;
|
@@ -86,17 +90,21 @@ class ChildThemeConfiguratorAdmin {
|
|
86 |
);
|
87 |
|
88 |
function __construct() {
|
89 |
-
$this->menuName
|
90 |
-
|
91 |
-
|
92 |
-
$this->
|
93 |
-
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
function render() {
|
96 |
$this->ui->render();
|
97 |
}
|
98 |
function enqueue_scripts() {
|
99 |
-
wp_enqueue_style( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'css/chld-thm-cfg.css', array(), '1.6.
|
100 |
|
101 |
// we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
|
102 |
// this will be updated in a later release to use WP Core scripts when it is widely adopted
|
@@ -126,6 +134,7 @@ class ChildThemeConfiguratorAdmin {
|
|
126 |
'child' => $this->css->get_prop( 'child' ),
|
127 |
'addl_css' => $this->css->get_prop( 'addl_css' ),
|
128 |
'imports' => $this->css->get_prop( 'imports' ),
|
|
|
129 |
// caches will be loaded dynamically
|
130 |
'rule' => array(),
|
131 |
'sel_ndx' => array(),
|
@@ -156,12 +165,20 @@ class ChildThemeConfiguratorAdmin {
|
|
156 |
'inval_theme_txt' => __( 'Please enter a valid Child Theme.', 'chld_thm_cfg' ),
|
157 |
'inval_name_txt' => __( 'Please enter a valid Child Theme name.', 'chld_thm_cfg' ),
|
158 |
'theme_exists_txt' => __( '<strong>%s</strong> exists. Please enter a different Child Theme', 'chld_thm_cfg' ),
|
159 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
) );
|
161 |
wp_localize_script(
|
162 |
'chld-thm-cfg-admin',
|
163 |
'ctcAjax',
|
164 |
-
$localize_array
|
165 |
);
|
166 |
}
|
167 |
|
@@ -198,14 +215,14 @@ class ChildThemeConfiguratorAdmin {
|
|
198 |
$group = $theme->parent() ? 'child' : 'parnt';
|
199 |
// get the theme slug
|
200 |
$slug = $theme->get_stylesheet();
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
endforeach;
|
210 |
}
|
211 |
|
@@ -243,8 +260,13 @@ class ChildThemeConfiguratorAdmin {
|
|
243 |
elseif ( !isset( $this->css->enqueue ) ):
|
244 |
add_action( 'admin_notices', array( $this, 'config_notice' ) );
|
245 |
endif;
|
|
|
|
|
|
|
|
|
|
|
246 |
// check if file ownership is messed up from old version or other plugin
|
247 |
-
|
248 |
if ( fileowner( $this->css->get_child_target( '' ) ) != fileowner( get_theme_root() ) ):
|
249 |
add_action( 'admin_notices', array( $this, 'owner_notice' ) );
|
250 |
endif;
|
@@ -260,30 +282,30 @@ class ChildThemeConfiguratorAdmin {
|
|
260 |
if ( $this->validate_post( $action ) ):
|
261 |
if ( 'ctc_plugin' == $action ) do_action( 'chld_thm_cfg_pluginmode' );
|
262 |
$this->verify_creds(); // initialize filesystem access
|
263 |
-
|
264 |
-
// set configtype since this request came via ajax
|
265 |
-
if ( 'ctc_plugin' == $_POST[ 'action' ] ) do_action( 'chld_thm_cfg_pluginmode' );
|
266 |
-
// this action swaps out the above two actions if in plugins mode
|
267 |
-
|
268 |
$this->load_config(); // get configuration data from options API
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
//
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
'
|
280 |
-
|
281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
endif;
|
283 |
$result = $this->css->obj_to_utf8( $this->updates );
|
284 |
-
|
285 |
-
// update config data in options API
|
286 |
-
$this->css->save_config();
|
287 |
// send all updates back to browser to update cache
|
288 |
die( json_encode( $result ) );
|
289 |
else:
|
@@ -464,6 +486,25 @@ class ChildThemeConfiguratorAdmin {
|
|
464 |
return FALSE;
|
465 |
}
|
466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
/***
|
468 |
* Handle the creation or update of a child theme
|
469 |
*/
|
@@ -549,7 +590,7 @@ class ChildThemeConfiguratorAdmin {
|
|
549 |
$this->css->set_prop( 'enqueue', sanitize_text_field( $_POST[ 'ctc_parent_enqueue' ] ) );
|
550 |
elseif ( !$this->is_theme( $configtype ) )
|
551 |
$this->css->set_prop( 'enqueue', 'enqueue' );
|
552 |
-
|
553 |
// hook for add'l plugin files and subdirectories
|
554 |
do_action( 'chld_thm_cfg_addl_files', $this );
|
555 |
|
@@ -571,7 +612,7 @@ class ChildThemeConfiguratorAdmin {
|
|
571 |
|
572 |
// try to write new stylsheet. If it fails send alert.
|
573 |
if ( FALSE === $this->css->write_css( isset( $_POST[ 'ctc_backup' ] ) ) ):
|
574 |
-
$this->debug
|
575 |
$this->errors[] = __( 'Your stylesheet is not writable.', 'chld_thm_cfg' );
|
576 |
add_action( 'admin_notices', array( $this, 'writable_notice' ) );
|
577 |
return FALSE;
|
@@ -654,8 +695,8 @@ class ChildThemeConfiguratorAdmin {
|
|
654 |
$ctcpage = apply_filters( 'chld_thm_cfg_admin_page', CHLD_THM_CFG_MENU );
|
655 |
wp_safe_redirect(
|
656 |
( is_multisite() ?
|
657 |
-
network_admin_url( 'themes.php
|
658 |
-
admin_url( 'tools.php?page=' . $ctcpage . '&updated=' . $msg
|
659 |
);
|
660 |
die();
|
661 |
endif;
|
@@ -762,22 +803,22 @@ add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
|
|
762 |
|
763 |
function write_child_file( $file, $contents ) {
|
764 |
if ( !$this->fs ):
|
765 |
-
$this->debug( '
|
766 |
return FALSE; // return if no filesystem access
|
767 |
endif;
|
768 |
global $wp_filesystem;
|
769 |
$file = $this->fspath( $this->css->is_file_ok( $this->css->get_child_target( $file ), 'write' ) );
|
770 |
-
|
771 |
if ( $file && !$wp_filesystem->exists( $file ) ):
|
772 |
if ( FALSE === $wp_filesystem->put_contents( $file, $contents ) ):
|
773 |
-
|
774 |
return FALSE;
|
775 |
endif;
|
776 |
else:
|
777 |
-
|
778 |
return FALSE;
|
779 |
endif;
|
780 |
-
|
781 |
}
|
782 |
|
783 |
function copy_screenshot( $obj ) {
|
@@ -856,22 +897,24 @@ add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
|
|
856 |
}
|
857 |
|
858 |
function theme_basename( $theme, $file ) {
|
|
|
859 |
// if no theme passed, returns theme + file
|
860 |
-
$themedir = trailingslashit( get_theme_root() ) . ( '' == $theme ? '' : trailingslashit( $theme ) );
|
|
|
861 |
return preg_replace( '%^' . preg_quote( $themedir ) . '%', '', $file );
|
862 |
}
|
863 |
|
864 |
function uploads_basename( $file ) {
|
865 |
$file = $this->normalize_path( $file );
|
866 |
$uplarr = wp_upload_dir();
|
867 |
-
$upldir = trailingslashit( $uplarr[ 'basedir' ] );
|
868 |
return preg_replace( '%^' . preg_quote( $upldir ) . '%', '', $file );
|
869 |
}
|
870 |
|
871 |
function uploads_fullpath( $file ) {
|
872 |
$file = $this->normalize_path( $file );
|
873 |
$uplarr = wp_upload_dir();
|
874 |
-
$upldir = trailingslashit( $uplarr[ 'basedir' ] );
|
875 |
return $upldir . $file;
|
876 |
}
|
877 |
|
@@ -1126,6 +1169,13 @@ add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
|
|
1126 |
<?php
|
1127 |
}
|
1128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1129 |
function config_notice() {
|
1130 |
?>
|
1131 |
<div class="update-nag">
|
@@ -1134,14 +1184,6 @@ add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
|
|
1134 |
<?php
|
1135 |
}
|
1136 |
|
1137 |
-
function render_addl_tabs( $ctc, $active_tab = NULL, $hidechild = '' ) {
|
1138 |
-
include ( CHLD_THM_CFG_DIR . '/includes/forms/addl_tabs.php' );
|
1139 |
-
}
|
1140 |
-
|
1141 |
-
function render_addl_panels( $ctc, $active_tab = NULL, $hidechild = '' ) {
|
1142 |
-
include ( CHLD_THM_CFG_DIR . '/includes/forms/addl_panels.php' );
|
1143 |
-
}
|
1144 |
-
|
1145 |
// back compatibility function for legacy plugins extension
|
1146 |
function write_addl_files( $obj ) {
|
1147 |
global $chld_thm_cfg_plugins;
|
@@ -1222,9 +1264,45 @@ add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
|
|
1222 |
if ( isset( $step[ 'class' ] ) && isset( $step[ 'function' ] ) && isset( $step[ 'line' ] ) )
|
1223 |
echo $ndx . ': ' . $step[ 'class' ] . ' ' . $step[ 'function' ] . ' ' . $step[ 'line' ] . LF;
|
1224 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1225 |
|
1226 |
-
function
|
1227 |
-
$
|
|
|
|
|
1228 |
}
|
1229 |
-
|
|
|
|
|
|
|
|
|
1230 |
}
|
6 |
Class: Child_Theme_Configurator
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
Description: Main Controller Class
|
9 |
+
Version: 1.6.5
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
29 |
var $menuName; // backward compatibility with plugin extension
|
30 |
var $cache_updates = TRUE;
|
31 |
var $debug = '';
|
32 |
+
var $is_debug = 0;
|
33 |
var $swatch_text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
|
34 |
+
var $max_sel;
|
35 |
+
var $sel_limit;
|
36 |
// state arrays
|
37 |
var $themes = array();
|
38 |
var $errors = array();
|
39 |
var $files = array();
|
40 |
var $updates = array();
|
41 |
+
var $memory = array();
|
42 |
// objects
|
43 |
var $css;
|
44 |
var $ui;
|
90 |
);
|
91 |
|
92 |
function __construct() {
|
93 |
+
$this->menuName = CHLD_THM_CFG_MENU; // backward compatability for plugins extension
|
94 |
+
$this->is_post = ( 'POST' == $_SERVER[ 'REQUEST_METHOD' ] );
|
95 |
+
$this->is_get = ( 'GET' == $_SERVER[ 'REQUEST_METHOD' ] );
|
96 |
+
$this->is_debug = get_option( CHLD_THM_CFG_OPTIONS . '_debug' );
|
97 |
+
// sel_limit is now calculated based on free memory to prevent out of memory on serialization
|
98 |
+
$bytes_free = $this->get_free_memory();
|
99 |
+
$this->sel_limit = ( int ) ( $bytes_free / CHLD_THM_CFG_BPSEL );
|
100 |
+
$this->debug( 'Free memory: ' . $bytes_free . ' max selectors: ' . $this->sel_limit, __FUNCTION__ );
|
101 |
+
$this->set_benchmark( 'before', 'execute', 'program' );
|
102 |
}
|
103 |
function render() {
|
104 |
$this->ui->render();
|
105 |
}
|
106 |
function enqueue_scripts() {
|
107 |
+
wp_enqueue_style( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'css/chld-thm-cfg.css', array(), '1.6.5' );
|
108 |
|
109 |
// we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
|
110 |
// this will be updated in a later release to use WP Core scripts when it is widely adopted
|
134 |
'child' => $this->css->get_prop( 'child' ),
|
135 |
'addl_css' => $this->css->get_prop( 'addl_css' ),
|
136 |
'imports' => $this->css->get_prop( 'imports' ),
|
137 |
+
'is_debug' => $this->is_debug,
|
138 |
// caches will be loaded dynamically
|
139 |
'rule' => array(),
|
140 |
'sel_ndx' => array(),
|
165 |
'inval_theme_txt' => __( 'Please enter a valid Child Theme.', 'chld_thm_cfg' ),
|
166 |
'inval_name_txt' => __( 'Please enter a valid Child Theme name.', 'chld_thm_cfg' ),
|
167 |
'theme_exists_txt' => __( '<strong>%s</strong> exists. Please enter a different Child Theme', 'chld_thm_cfg' ),
|
168 |
+
'js_txt' => __( 'The page could not be loaded correctly so some controls have been disabled.',
|
169 |
+
'chld_thm_cfg' ),
|
170 |
+
'jquery_txt' => __( 'Conflicting jQuery libraries were loaded by another plugin:',
|
171 |
+
'chld_thm_cfg' ),
|
172 |
+
'plugin_txt' => __( 'Deactivating other plugins may resolve this issue.', 'chld_thm_cfg' ),
|
173 |
+
'contact_txt' => sprintf( __( '%sWhy am I seeing this?%s',
|
174 |
+
'chld_thm_cfg' ),
|
175 |
+
'<a target="_blank" href="' . LILAEAMEDIA_URL . '/child-theme-configurator#script_dep">',
|
176 |
+
'</a>' ),
|
177 |
) );
|
178 |
wp_localize_script(
|
179 |
'chld-thm-cfg-admin',
|
180 |
'ctcAjax',
|
181 |
+
apply_filters( 'chld_thm_cfg_localize_array', $localize_array )
|
182 |
);
|
183 |
}
|
184 |
|
215 |
$group = $theme->parent() ? 'child' : 'parnt';
|
216 |
// get the theme slug
|
217 |
$slug = $theme->get_stylesheet();
|
218 |
+
// add theme to themes array
|
219 |
+
$this->themes[ $group ][ $slug ] = array(
|
220 |
+
'Name' => $theme->get( 'Name' ),
|
221 |
+
'Author' => $theme->get( 'Author' ),
|
222 |
+
'Version' => $theme->get( 'Version' ),
|
223 |
+
'screenshot' => $theme->get_screenshot(),
|
224 |
+
'allowed' => $theme->is_allowed(),
|
225 |
+
);
|
226 |
endforeach;
|
227 |
}
|
228 |
|
260 |
elseif ( !isset( $this->css->enqueue ) ):
|
261 |
add_action( 'admin_notices', array( $this, 'config_notice' ) );
|
262 |
endif;
|
263 |
+
// check if max selectors reached
|
264 |
+
if ( isset( $this->css->max_sel ) && $this->css->max_sel ):
|
265 |
+
$this->debug( 'Max selectors exceeded.', __FUNCTION__ );
|
266 |
+
//$this->errors[] = __( 'Maximum number of styles exceeded.', 'chld_thm_cfg' );
|
267 |
+
add_filter( 'chld_thm_cfg_update_msg', array( $this, 'max_styles_notice' ), 20 );
|
268 |
// check if file ownership is messed up from old version or other plugin
|
269 |
+
endif;
|
270 |
if ( fileowner( $this->css->get_child_target( '' ) ) != fileowner( get_theme_root() ) ):
|
271 |
add_action( 'admin_notices', array( $this, 'owner_notice' ) );
|
272 |
endif;
|
282 |
if ( $this->validate_post( $action ) ):
|
283 |
if ( 'ctc_plugin' == $action ) do_action( 'chld_thm_cfg_pluginmode' );
|
284 |
$this->verify_creds(); // initialize filesystem access
|
285 |
+
|
|
|
|
|
|
|
|
|
286 |
$this->load_config(); // get configuration data from options API
|
287 |
+
if ( isset( $_POST[ 'ctc_is_debug' ] ) ):
|
288 |
+
$this->toggle_debug();
|
289 |
+
else:
|
290 |
+
$this->css->parse_post_data(); // parse any passed values
|
291 |
+
// toggle debug
|
292 |
+
// if child theme config has been set up, save new data
|
293 |
+
// return recent edits and selected stylesheets as cache updates
|
294 |
+
if ( $this->css->get_prop( 'child' ) ):
|
295 |
+
$this->css->write_css();
|
296 |
+
// add any additional updates to pass back to browser
|
297 |
+
do_action( 'chld_thm_cfg_cache_updates' );
|
298 |
+
$this->updates[] = array(
|
299 |
+
'obj' => 'addl_css',
|
300 |
+
'key' => '',
|
301 |
+
'data' => $this->css->get_prop( 'addl_css' ),
|
302 |
+
);
|
303 |
+
endif;
|
304 |
+
|
305 |
+
// update config data in options API
|
306 |
+
$this->css->save_config();
|
307 |
endif;
|
308 |
$result = $this->css->obj_to_utf8( $this->updates );
|
|
|
|
|
|
|
309 |
// send all updates back to browser to update cache
|
310 |
die( json_encode( $result ) );
|
311 |
else:
|
486 |
return FALSE;
|
487 |
}
|
488 |
|
489 |
+
function toggle_debug() {
|
490 |
+
$debug = '';
|
491 |
+
if ( $_POST[ 'ctc_is_debug' ] ):
|
492 |
+
$this->is_debug = 1;
|
493 |
+
ob_start();
|
494 |
+
$this->print_debug();
|
495 |
+
$debug = ob_get_contents();
|
496 |
+
ob_end_clean();
|
497 |
+
else:
|
498 |
+
$this->is_debug = 0;
|
499 |
+
endif;
|
500 |
+
update_option( CHLD_THM_CFG_OPTIONS . '_debug', $this->is_debug );
|
501 |
+
$this->updates[] = array(
|
502 |
+
'obj' => 'debug',
|
503 |
+
'key' => '',
|
504 |
+
'data' => $debug,
|
505 |
+
);
|
506 |
+
}
|
507 |
+
|
508 |
/***
|
509 |
* Handle the creation or update of a child theme
|
510 |
*/
|
590 |
$this->css->set_prop( 'enqueue', sanitize_text_field( $_POST[ 'ctc_parent_enqueue' ] ) );
|
591 |
elseif ( !$this->is_theme( $configtype ) )
|
592 |
$this->css->set_prop( 'enqueue', 'enqueue' );
|
593 |
+
|
594 |
// hook for add'l plugin files and subdirectories
|
595 |
do_action( 'chld_thm_cfg_addl_files', $this );
|
596 |
|
612 |
|
613 |
// try to write new stylsheet. If it fails send alert.
|
614 |
if ( FALSE === $this->css->write_css( isset( $_POST[ 'ctc_backup' ] ) ) ):
|
615 |
+
$this->debug( 'failed to write', __FUNCTION__ );
|
616 |
$this->errors[] = __( 'Your stylesheet is not writable.', 'chld_thm_cfg' );
|
617 |
add_action( 'admin_notices', array( $this, 'writable_notice' ) );
|
618 |
return FALSE;
|
695 |
$ctcpage = apply_filters( 'chld_thm_cfg_admin_page', CHLD_THM_CFG_MENU );
|
696 |
wp_safe_redirect(
|
697 |
( is_multisite() ?
|
698 |
+
network_admin_url( 'themes.php' ) :
|
699 |
+
admin_url( 'tools.php' ) ) . '?page=' . $ctcpage . ( $msg ? '&updated=' . $msg : '' )
|
700 |
);
|
701 |
die();
|
702 |
endif;
|
803 |
|
804 |
function write_child_file( $file, $contents ) {
|
805 |
if ( !$this->fs ):
|
806 |
+
$this->debug( 'No filesystem access.', __FUNCTION__ );
|
807 |
return FALSE; // return if no filesystem access
|
808 |
endif;
|
809 |
global $wp_filesystem;
|
810 |
$file = $this->fspath( $this->css->is_file_ok( $this->css->get_child_target( $file ), 'write' ) );
|
811 |
+
$this->debug( 'Writing to filesystem: ' . $file, __FUNCTION__ );
|
812 |
if ( $file && !$wp_filesystem->exists( $file ) ):
|
813 |
if ( FALSE === $wp_filesystem->put_contents( $file, $contents ) ):
|
814 |
+
$this->debug( 'Filesystem write failed.', __FUNCTION__ );
|
815 |
return FALSE;
|
816 |
endif;
|
817 |
else:
|
818 |
+
$this->debug( 'File exists.', __FUNCTION__ );
|
819 |
return FALSE;
|
820 |
endif;
|
821 |
+
$this->debug( 'Filesystem write successful.', __FUNCTION__ );
|
822 |
}
|
823 |
|
824 |
function copy_screenshot( $obj ) {
|
897 |
}
|
898 |
|
899 |
function theme_basename( $theme, $file ) {
|
900 |
+
$file = $this->normalize_path( $file );
|
901 |
// if no theme passed, returns theme + file
|
902 |
+
$themedir = trailingslashit( $this->normalize_path( get_theme_root() ) ) . ( '' == $theme ? '' : trailingslashit( $theme ) );
|
903 |
+
$this->debug( 'Themedir: ' . $themedir . ' File: ' . $file , __FUNCTION__ );
|
904 |
return preg_replace( '%^' . preg_quote( $themedir ) . '%', '', $file );
|
905 |
}
|
906 |
|
907 |
function uploads_basename( $file ) {
|
908 |
$file = $this->normalize_path( $file );
|
909 |
$uplarr = wp_upload_dir();
|
910 |
+
$upldir = trailingslashit( $this->normalize_path( $uplarr[ 'basedir' ] ) );
|
911 |
return preg_replace( '%^' . preg_quote( $upldir ) . '%', '', $file );
|
912 |
}
|
913 |
|
914 |
function uploads_fullpath( $file ) {
|
915 |
$file = $this->normalize_path( $file );
|
916 |
$uplarr = wp_upload_dir();
|
917 |
+
$upldir = trailingslashit( $this->normalize_path( $uplarr[ 'basedir' ] ) );
|
918 |
return $upldir . $file;
|
919 |
}
|
920 |
|
1169 |
<?php
|
1170 |
}
|
1171 |
|
1172 |
+
function max_styles_notice( $msg ) {
|
1173 |
+
return $msg . ' ' . sprintf( __( '<strong>However, some styles could not be parsed due to memory limits.</strong> Try deselecting "Additional Stylesheets" below and click "Generate/Rebuild Child Theme Files". %sWhy am I seeing this?%s', 'chld_thm_cfg' ),
|
1174 |
+
'<a target="_blank" href="' . LILAEAMEDIA_URL . '/child-theme-configurator#php_memory">',
|
1175 |
+
'</a>' );
|
1176 |
+
return $msg;
|
1177 |
+
}
|
1178 |
+
|
1179 |
function config_notice() {
|
1180 |
?>
|
1181 |
<div class="update-nag">
|
1184 |
<?php
|
1185 |
}
|
1186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1187 |
// back compatibility function for legacy plugins extension
|
1188 |
function write_addl_files( $obj ) {
|
1189 |
global $chld_thm_cfg_plugins;
|
1264 |
if ( isset( $step[ 'class' ] ) && isset( $step[ 'function' ] ) && isset( $step[ 'line' ] ) )
|
1265 |
echo $ndx . ': ' . $step[ 'class' ] . ' ' . $step[ 'function' ] . ' ' . $step[ 'line' ] . LF;
|
1266 |
}
|
1267 |
+
|
1268 |
+
function debug( $msg = NULL, $fn = NULL) {
|
1269 |
+
$this->debug .= ( isset( $fn ) ? $fn . ': ' : '' ) . ( isset( $msg ) ? $msg . LF : '' );
|
1270 |
+
}
|
1271 |
+
function set_benchmark( $step, $key, $label ) {
|
1272 |
+
$this->memory[ $key ][ $label ][ $step ][ 'memory' ] = memory_get_usage();
|
1273 |
+
$this->memory[ $key ][ $label ][ $step ][ 'peak' ] = memory_get_peak_usage();
|
1274 |
+
|
1275 |
+
$this->memory[ $key ][ $label ][ $step ][ 'selectors' ] = isset( $this->css ) ? $this->css->qskey : 0;
|
1276 |
+
}
|
1277 |
+
function calc_memory_usage() {
|
1278 |
+
//$this->debug( print_r( $this->memory, TRUE ), __FUNCTION__ );
|
1279 |
+
|
1280 |
+
$results = array();
|
1281 |
+
foreach ( $this->memory as $key => $labels ):
|
1282 |
+
if ( !is_array( $labels ) ) continue;
|
1283 |
+
foreach ( $labels as $label => $steps ):
|
1284 |
+
//if ( isset( $steps[ 'before' ] ) && isset( $steps[ 'after ' ] ) ):
|
1285 |
+
$results[] = $key . '|' . $label . '|'
|
1286 |
+
. ( $steps[ 'after' ][ 'memory' ] - $steps[ 'before' ][ 'memory' ] ) . '|'
|
1287 |
+
. ( $steps[ 'after' ][ 'peak' ] - $steps[ 'before' ][ 'peak' ] ) . '|'
|
1288 |
+
. ( $steps[ 'after' ][ 'peak' ] - $steps[ 'before' ][ 'memory' ] ) . '|'
|
1289 |
+
. $steps[ 'after' ][ 'selectors' ] . '|'
|
1290 |
+
. ( $steps[ 'after' ][ 'selectors' ] - $steps[ 'before' ][ 'selectors' ] );
|
1291 |
+
//endif;
|
1292 |
+
endforeach;
|
1293 |
+
endforeach;
|
1294 |
+
$this->debug( "\n" . implode( "\n", $results ), __FUNCTION__ );
|
1295 |
+
|
1296 |
+
}
|
1297 |
|
1298 |
+
function get_free_memory() {
|
1299 |
+
$limit = (int) ini_get('memory_limit') * 1024 * 1024;
|
1300 |
+
$used = memory_get_usage();
|
1301 |
+
return $limit - $used;
|
1302 |
}
|
1303 |
+
|
1304 |
+
function print_debug() {
|
1305 |
+
echo '<textarea style="width:100%;height:200px">' . LF . $this->debug . LF . '</textarea>' . LF;
|
1306 |
+
}
|
1307 |
+
|
1308 |
}
|
includes/forms/addl_panels.php
CHANGED
@@ -2,28 +2,34 @@
|
|
2 |
// Exit if accessed directly
|
3 |
if ( !defined( 'ABSPATH' ) ) exit;
|
4 |
if ( !defined( 'CHLD_THM_CFG_PLUGINS_VERSION' ) ):
|
5 |
-
$page = apply_filters( 'chld_thm_cfg_admin_page', CHLD_THM_CFG_MENU );
|
6 |
-
$linktext = __( 'Reload', 'chld_thm_cfg_plugins' );
|
7 |
-
$link = '<a href="' . ( is_multisite() ?
|
8 |
-
network_admin_url( 'themes.php' ) :
|
9 |
-
admin_url( 'tools.php' ) ) . '?page=' . $page . '&tab=addl_tab" title="' . $linktext . '">' . $linktext . '</a>';
|
10 |
?><div id="get_pro_panel" class="ctc-option-panel<?php echo 'get_pro' == $active_tab ? ' ctc-option-panel-active' : ''; ?>" <?php echo $hidechild; ?> >
|
11 |
-
<
|
12 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
<p><?php _e( 'Thousands of users have already seen the benefits of using Child Theme Configurator. If you spend any amount of time customizing WordPress, CTC Pro will help maximize your productivity.', 'chld_thm_cfg' ); ?></p>
|
14 |
<h1><?php _e( 'Designed by Developers Who Use It Every Day.', 'chld_thm_cfg' ); ?></h1>
|
15 |
-
<p><?php _e( 'We\'ve packed in more features to make design work quicker and easier with <strong>Child Theme Configurator Pro
|
16 |
<ul>
|
17 |
-
<li><h3><?php _e( '
|
18 |
-
<p><?php _e( '
|
19 |
<li><h3><?php _e( 'Links to all styles in a single view', 'chld_thm_cfg' ); ?></h3><p><?php _e( 'Use the "All Styles" panel to find the selector you wish to edit from a single combined list.', 'chld_thm_cfg' ); ?></p></li>
|
20 |
-
<li><h3><?php _e( 'Most recent edits', 'chld_thm_cfg' ); ?></h3><p><?php _e( 'Return to recently edited selectors from a toggleable sidebar.', 'chld_thm_cfg' ); ?></li>
|
21 |
<li><h3><?php _e( 'Free Upgrades', 'chld_thm_cfg' ); ?></h3>
|
22 |
-
<p><?php _e( 'Your Update Key gives you access to new Pro features as soon as they are released.', 'chld_thm_cfg' ); ?></li>
|
23 |
<li><h3><?php _e( 'Top-rated Online Support', 'chld_thm_cfg' ); ?></h3></li>
|
24 |
<li><h3><?php _e( 'Online Documentation', 'chld_thm_cfg' ); ?></h3></li>
|
25 |
<li><h3><?php _e( 'Tutorial Videos', 'chld_thm_cfg' ); ?></h3></li>
|
26 |
</ul>
|
27 |
-
<p><?php _e( 'For a limited time
|
28 |
-
<h3><a href="
|
|
|
29 |
endif;
|
2 |
// Exit if accessed directly
|
3 |
if ( !defined( 'ABSPATH' ) ) exit;
|
4 |
if ( !defined( 'CHLD_THM_CFG_PLUGINS_VERSION' ) ):
|
|
|
|
|
|
|
|
|
|
|
5 |
?><div id="get_pro_panel" class="ctc-option-panel<?php echo 'get_pro' == $active_tab ? ' ctc-option-panel-active' : ''; ?>" <?php echo $hidechild; ?> >
|
6 |
+
<div class="ctc-input-row clearfix">
|
7 |
+
<div class="ctc-input-cell"><div style="padding:0 40px">
|
8 |
+
<a href="<?php echo LILAEAMEDIA_URL; ?>/plugins/intelliwidget/" title="<?php _e( 'Learn more about IntelliWidget', 'chld_thm_cfg' ); ?>"><img src="<?php echo CHLD_THM_CFG_URL . 'css/iw-banner.jpg'; ?>" width="430" height="430" /></a>
|
9 |
+
<p><?php _e( 'IntelliWidget is a versatile widget manager that does the work of multiple plugins by combining custom page menus, featured posts, sliders and other dynamic content features into a single plugin that can display on a per-page or site-wide basis.', 'chld_thm_cfg' ); ?> <a href="<?php echo LILAEAMEDIA_URL; ?>/plugins/intelliwidget/" title="<?php _e( 'Learn more about IntelliWidget', 'chld_thm_cfg' ); ?>">
|
10 |
+
<?php _e( 'Learn more', 'chld_thm_cfg'); ?></a></p><hr style="margin:20px 0" />
|
11 |
+
<a href="<?php echo LILAEAMEDIA_URL; ?>/plugins/intelliwidget-responsive-menu/" title="<?php _e( 'Learn more about IW Responsive Menu', 'chld_thm_cfg' ); ?>"><img src="<?php echo CHLD_THM_CFG_URL . 'css/iwrm-banner.jpg'; ?>" width="430" height="430" /></a>
|
12 |
+
<p><?php _e( 'IntelliWidget Responsive Menu lets you break free from your theme’s built-in responsive menu options and gives you complete control over the user experience.', 'chld_thm_cfg' ); ?> <a href="<?php echo LILAEAMEDIA_URL; ?>/intelliwidget-responsive-menu/" title="<?php _e( 'Learn more about IW Responsive Menu', 'chld_thm_cfg' ); ?>">
|
13 |
+
<?php _e( 'Learn more', 'chld_thm_cfg'); ?></a></p>
|
14 |
+
</div></div>
|
15 |
+
<div class="ctc-input-cell-wide">
|
16 |
+
<a href="<?php echo LILAEAMEDIA_URL; ?>/child-theme-configurator-pro/" title="<?php _e( 'Learn more about CTC Pro', 'chld_thm_cfg' ); ?>"><img src="<?php echo CHLD_THM_CFG_URL . 'css/pro-banner.jpg'; ?>" width="610" height="197" /></a>
|
17 |
+
<h1><?php _e( 'Customizing WordPress just got even easier.', 'chld_thm_cfg' ); ?></h1>
|
18 |
<p><?php _e( 'Thousands of users have already seen the benefits of using Child Theme Configurator. If you spend any amount of time customizing WordPress, CTC Pro will help maximize your productivity.', 'chld_thm_cfg' ); ?></p>
|
19 |
<h1><?php _e( 'Designed by Developers Who Use It Every Day.', 'chld_thm_cfg' ); ?></h1>
|
20 |
+
<p><?php _e( 'We\'ve packed in more features to make design work quicker and easier with <strong>Child Theme Configurator Pro.</strong>', 'chld_thm_cfg' ); ?></p>
|
21 |
<ul>
|
22 |
+
<li><h3><?php _e( 'Customize Plugin Stylesheets', 'chld_thm_cfg' ); ?></h3>
|
23 |
+
<p><?php _e( 'Apply the power of CTC\'s top-rated interface to your site\'s plugin styles. All new design makes it much easier to get the results you want.', 'chld_thm_cfg' ); ?></p></li>
|
24 |
<li><h3><?php _e( 'Links to all styles in a single view', 'chld_thm_cfg' ); ?></h3><p><?php _e( 'Use the "All Styles" panel to find the selector you wish to edit from a single combined list.', 'chld_thm_cfg' ); ?></p></li>
|
25 |
+
<li><h3><?php _e( 'Most recent edits', 'chld_thm_cfg' ); ?></h3><p><?php _e( 'Return to recently edited selectors from a toggleable sidebar.', 'chld_thm_cfg' ); ?></p></li>
|
26 |
<li><h3><?php _e( 'Free Upgrades', 'chld_thm_cfg' ); ?></h3>
|
27 |
+
<p><?php _e( 'Your Update Key gives you access to new Pro features as soon as they are released.', 'chld_thm_cfg' ); ?></p></li>
|
28 |
<li><h3><?php _e( 'Top-rated Online Support', 'chld_thm_cfg' ); ?></h3></li>
|
29 |
<li><h3><?php _e( 'Online Documentation', 'chld_thm_cfg' ); ?></h3></li>
|
30 |
<li><h3><?php _e( 'Tutorial Videos', 'chld_thm_cfg' ); ?></h3></li>
|
31 |
</ul>
|
32 |
+
<p><?php _e( 'For a limited time save over 15% off Child Theme Configurator Pro.', 'chld_thm_cfg' ); ?></p>
|
33 |
+
<h3><a href="<?php echo LILAEAMEDIA_URL; ?>/cart/?add-to-cart=1710" title="<?php _e( 'Upgrade Now', 'chld_thm_cfg' ); ?>"><?php _e( 'Buy Now - Only $12.95 USD*', 'chld_thm_cfg' ); ?></a></h3><small><?php _e( '*Prices subject to change.', 'chld_thm_cfg' ); ?></small></div>
|
34 |
+
</div></div><?php
|
35 |
endif;
|
includes/forms/at-import.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
// @imports Panel
|
4 |
-
|
5 |
?>
|
6 |
|
7 |
<div id="import_options_panel"
|
1 |
<?php
|
2 |
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
// @imports Panel
|
4 |
+
$ctcpage = apply_filters( 'chld_thm_cfg_admin_page', CHLD_THM_CFG_MENU );
|
5 |
?>
|
6 |
|
7 |
<div id="import_options_panel"
|
includes/forms/fileform.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
// Files Section
|
4 |
// This include is used for both parent template section and the child files section
|
|
|
5 |
|
6 |
if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT ):
|
7 |
$linktext = __( 'The Theme editor has been disabled. Template files must be edited offline.', 'chld_thm_cfg' );
|
@@ -16,7 +17,7 @@ else:
|
|
16 |
endif;
|
17 |
?>
|
18 |
<div class="ctc-input-row clearfix" id="input_row_<?php echo $template; ?>_templates">
|
19 |
-
<form id="ctc_<?php echo $template; ?>_templates_form" method="post" action="?page=<?php echo
|
20 |
<?php wp_nonce_field( apply_filters( 'chld_thm_cfg_action', 'ctc_update' ) ); ?>
|
21 |
<div class="ctc-input-cell"> <strong>
|
22 |
<?php echo 'parnt' == $template ? __( 'Parent Templates', 'chld_thm_cfg' ) : __( 'Child Theme Files', 'chld_thm_cfg' ); ?>
|
2 |
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
// Files Section
|
4 |
// This include is used for both parent template section and the child files section
|
5 |
+
$ctcpage = apply_filters( 'chld_thm_cfg_admin_page', CHLD_THM_CFG_MENU );
|
6 |
|
7 |
if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT ):
|
8 |
$linktext = __( 'The Theme editor has been disabled. Template files must be edited offline.', 'chld_thm_cfg' );
|
17 |
endif;
|
18 |
?>
|
19 |
<div class="ctc-input-row clearfix" id="input_row_<?php echo $template; ?>_templates">
|
20 |
+
<form id="ctc_<?php echo $template; ?>_templates_form" method="post" action="?page=<?php echo $ctcpage; ?>&tab=file_options">
|
21 |
<?php wp_nonce_field( apply_filters( 'chld_thm_cfg_action', 'ctc_update' ) ); ?>
|
22 |
<div class="ctc-input-cell"> <strong>
|
23 |
<?php echo 'parnt' == $template ? __( 'Parent Templates', 'chld_thm_cfg' ) : __( 'Child Theme Files', 'chld_thm_cfg' ); ?>
|
includes/forms/files.php
CHANGED
@@ -83,5 +83,29 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
83 |
</div>
|
84 |
</form>
|
85 |
</div>
|
86 |
-
<?php endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
</div>
|
83 |
</div>
|
84 |
</form>
|
85 |
</div>
|
86 |
+
<?php endif; ?>
|
87 |
+
<div class="ctc-input-row clearfix" id="input_update_key">
|
88 |
+
<?php // uses output buffer to modify and extend files tab actions
|
89 |
+
ob_start();
|
90 |
+
do_action( 'chld_thm_cfg_files_tab' );
|
91 |
+
$files_tab_options = apply_filters( 'chld_thm_cfg_files_tab_filter', ob_get_contents() );
|
92 |
+
ob_end_clean();
|
93 |
+
echo $files_tab_options;
|
94 |
+
?>
|
95 |
+
</div>
|
96 |
+
<div class="ctc-input-row clearfix" id="input_row_debug">
|
97 |
+
<div class="ctc-input-cell clear">
|
98 |
+
<strong>
|
99 |
+
<?php _e( 'Debug', 'chld_thm_cfg_plugins' ); ?>
|
100 |
+
</strong>
|
101 |
+
<p class="howto">
|
102 |
+
<?php _e( 'Check the box to enable debugging output.', 'chld_thm_cfg_plugins' ); ?>
|
103 |
+
</p>
|
104 |
+
</div>
|
105 |
+
<div class="ctc-input-cell">
|
106 |
+
<input class="ctc_checkbox" id="ctc_is_debug" name="ctc_is_debug" type="checkbox"
|
107 |
+
value="1" <?php echo checked( $this->ctc()->is_debug, 1 ); ?> autocomplete="off" />
|
108 |
+
</div>
|
109 |
+
<div id="ctc_debug_container"><?php do_action( 'chld_thm_cfg_print_debug' ); ?></div>
|
110 |
+
</div>
|
111 |
</div>
|
includes/forms/images.php
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
<?php
|
2 |
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
// Images Section
|
|
|
4 |
?>
|
5 |
<div class="ctc-input-row clearfix" id="input_row_images">
|
6 |
-
<form id="ctc_image_form" method="post" action="?page=<?php echo
|
7 |
<?php wp_nonce_field( apply_filters( 'chld_thm_cfg_action', 'ctc_update' ) ); ?>
|
8 |
<div class="ctc-input-cell"> <strong>
|
9 |
<?php _e( 'Child Theme Images', 'chld_thm_cfg' ); ?>
|
1 |
<?php
|
2 |
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
// Images Section
|
4 |
+
$ctcpage = apply_filters( 'chld_thm_cfg_admin_page', CHLD_THM_CFG_MENU );
|
5 |
?>
|
6 |
<div class="ctc-input-row clearfix" id="input_row_images">
|
7 |
+
<form id="ctc_image_form" method="post" action="?page=<?php echo $ctcpage; ?>&tab=file_options">
|
8 |
<?php wp_nonce_field( apply_filters( 'chld_thm_cfg_action', 'ctc_update' ) ); ?>
|
9 |
<div class="ctc-input-cell"> <strong>
|
10 |
<?php _e( 'Child Theme Images', 'chld_thm_cfg' ); ?>
|
includes/forms/main.php
CHANGED
@@ -32,7 +32,7 @@ else: ?>
|
|
32 |
// if flag has been set because an action is required, do not render interface
|
33 |
if ( !$this->ctc()->skip_form ):
|
34 |
include ( CHLD_THM_CFG_DIR . '/includes/forms/tabs.php' );
|
35 |
-
?><div style="position:relative">
|
36 |
<div class="ctc-option-panel-container">
|
37 |
<?php
|
38 |
$parent_child_panel = apply_filters( 'chld_thm_cfg_pc_panel',
|
@@ -51,7 +51,8 @@ else: ?>
|
|
51 |
include ( CHLD_THM_CFG_DIR . '/includes/forms/files.php' );
|
52 |
endif;
|
53 |
do_action( 'chld_thm_cfg_panels', $this->ctc(), $active_tab, $hidechild );
|
54 |
-
endif;
|
|
|
55 |
</div>
|
56 |
<?php do_action( 'chld_thm_cfg_sidebar' ); ?></div><?php
|
57 |
endif;
|
32 |
// if flag has been set because an action is required, do not render interface
|
33 |
if ( !$this->ctc()->skip_form ):
|
34 |
include ( CHLD_THM_CFG_DIR . '/includes/forms/tabs.php' );
|
35 |
+
?><div id="ctc_option_panel_wrapper" style="position:relative">
|
36 |
<div class="ctc-option-panel-container">
|
37 |
<?php
|
38 |
$parent_child_panel = apply_filters( 'chld_thm_cfg_pc_panel',
|
51 |
include ( CHLD_THM_CFG_DIR . '/includes/forms/files.php' );
|
52 |
endif;
|
53 |
do_action( 'chld_thm_cfg_panels', $this->ctc(), $active_tab, $hidechild );
|
54 |
+
endif;
|
55 |
+
?>
|
56 |
</div>
|
57 |
<?php do_action( 'chld_thm_cfg_sidebar' ); ?></div><?php
|
58 |
endif;
|
includes/forms/tabs.php
CHANGED
@@ -30,8 +30,7 @@ $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'parent_child_options';
|
|
30 |
<?php
|
31 |
if ( '' == $hidechild ):
|
32 |
?>
|
33 |
-
<a id="file_options" href=""
|
34 |
-
class="nav-tab<?php echo 'file_options' == $active_tab ? ' nav-tab-active' : ''; ?>" <?php echo $hidechild; ?>>
|
35 |
<?php _e( 'Files', 'chld_thm_cfg' ); ?>
|
36 |
</a>
|
37 |
<?php
|
30 |
<?php
|
31 |
if ( '' == $hidechild ):
|
32 |
?>
|
33 |
+
<a id="file_options" href="" class="nav-tab<?php echo 'file_options' == $active_tab ? ' nav-tab-active' : ''; ?>" <?php echo $hidechild; ?>>
|
|
|
34 |
<?php _e( 'Files', 'chld_thm_cfg' ); ?>
|
35 |
</a>
|
36 |
<?php
|
js/chld-thm-cfg.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* Script: chld-thm-cfg.js
|
3 |
* Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
4 |
* Description: Handles jQuery, AJAX and other UI
|
5 |
-
* Version: 1.6.
|
6 |
* Author: Lilaea Media
|
7 |
* Author URI: http://www.lilaeamedia.com/
|
8 |
* License: GPLv2
|
@@ -41,11 +41,11 @@ jQuery( document ).ready( function( $ ) {
|
|
41 |
}
|
42 |
|
43 |
function validate() {
|
44 |
-
var regex
|
45 |
-
newslug = $( '#ctc_child_template' ).val().toString().replace( regex ).toLowerCase(),
|
46 |
-
slug
|
47 |
-
type
|
48 |
-
errors
|
49 |
if ( 'new' == type ) slug = newslug;
|
50 |
if ( theme_exists( slug, type ) ) {
|
51 |
errors.push( ctcAjax.theme_exists_txt.toString().replace( /%s/, slug ) );
|
@@ -57,7 +57,7 @@ jQuery( document ).ready( function( $ ) {
|
|
57 |
errors.push( ctcAjax.inval_name_txt );
|
58 |
}
|
59 |
if ( errors.length ) {
|
60 |
-
set_notice( {'error': errors} );
|
61 |
return false;
|
62 |
}
|
63 |
return true;
|
@@ -549,9 +549,13 @@ jQuery( document ).ready( function( $ ) {
|
|
549 |
setup_iris( this );
|
550 |
} );
|
551 |
coalesce_inputs( '#ctc_child_all_0_swatch' );
|
552 |
-
|
553 |
-
|
554 |
-
|
|
|
|
|
|
|
|
|
555 |
}
|
556 |
} else {
|
557 |
//selector = $( '#ctc_sel_ovrd_selector_selected' ).text();
|
@@ -573,7 +577,7 @@ jQuery( document ).ready( function( $ ) {
|
|
573 |
if ( !( theme = theme.match( /(child|parnt)/ )[1] ) ) {
|
574 |
theme = 'child';
|
575 |
}
|
576 |
-
set_notice( '' )
|
577 |
query_css( 'preview', theme, render_css_preview );
|
578 |
return false;
|
579 |
}
|
@@ -622,8 +626,10 @@ jQuery( document ).ready( function( $ ) {
|
|
622 |
|
623 |
function render_recent() {
|
624 |
var html = '';
|
625 |
-
if ( is_empty( ctcAjax.recent ) ) {
|
626 |
html += ctcAjax.recent_txt;
|
|
|
|
|
627 |
} else {
|
628 |
//console.log(ctcAjax.recent);
|
629 |
html += '<ul>' + "\n";
|
@@ -673,6 +679,7 @@ jQuery( document ).ready( function( $ ) {
|
|
673 |
$( selector ).find( '.ctc-swatch' ).each( function() {
|
674 |
coalesce_inputs( this );
|
675 |
} );
|
|
|
676 |
|
677 |
}
|
678 |
/**
|
@@ -680,53 +687,66 @@ jQuery( document ).ready( function( $ ) {
|
|
680 |
*/
|
681 |
function setup_iris( obj ) {
|
682 |
//console.log( 'setting up iris ' + ( 'undefined' != typeof $( obj ).attr( 'id' ) ? $( obj ).attr( 'id' ) : '' ) );
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
|
|
|
|
|
|
|
|
692 |
}
|
693 |
|
694 |
function setup_query_menu() {
|
695 |
//console.log( 'setup query menu' );
|
696 |
//console.log( semaphore );
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
e
|
708 |
-
|
709 |
-
|
|
|
|
|
|
|
|
|
710 |
}
|
711 |
|
712 |
function setup_selector_menu() {
|
713 |
//console.log( 'setup selector menu' );
|
714 |
//console.log( semaphore );
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
|
|
|
|
|
|
|
|
725 |
}
|
726 |
|
727 |
function setup_rule_menu() {
|
728 |
//console.log( 'setup rule menu' );
|
729 |
//console.log( semaphore );
|
|
|
730 |
$( '#ctc_rule_menu' ).autocomplete( {
|
731 |
source: cache_rules,
|
732 |
//minLength: 0,
|
@@ -738,9 +758,13 @@ jQuery( document ).ready( function( $ ) {
|
|
738 |
},
|
739 |
focus: function( e ) { e.preventDefault(); }
|
740 |
} );
|
|
|
|
|
|
|
741 |
}
|
742 |
|
743 |
function setup_new_rule_menu() {
|
|
|
744 |
$( '#ctc_new_rule_menu' ).autocomplete( {
|
745 |
source: load_filtered_rules,
|
746 |
//minLength: 0,
|
@@ -760,16 +784,20 @@ jQuery( document ).ready( function( $ ) {
|
|
760 |
setup_iris( el );
|
761 |
$( el ).focus();
|
762 |
} );
|
|
|
763 |
return false;
|
764 |
},
|
765 |
focus: function( e ) { e.preventDefault(); }
|
766 |
} );
|
|
|
|
|
|
|
767 |
}
|
768 |
/**
|
769 |
* The "set" functions apply values to inputs
|
770 |
*/
|
771 |
function set_existing() {
|
772 |
-
if ( $( '#ctc_theme_child' ).length && $( '#ctc_child_type_existing' ).is(':checked') ) {
|
773 |
var child = $( '#ctc_theme_child' ).val();
|
774 |
if ( false === is_empty( child ) ) {
|
775 |
$( '#ctc_child_name' ).val( ctcAjax.themes['child'][child].Name );
|
@@ -791,6 +819,7 @@ jQuery( document ).ready( function( $ ) {
|
|
791 |
} );
|
792 |
}
|
793 |
$( '#ctc_error_notice' ).html( errorHtml );
|
|
|
794 |
}
|
795 |
|
796 |
function set_parent_menu( obj ) {
|
@@ -880,7 +909,7 @@ jQuery( document ).ready( function( $ ) {
|
|
880 |
if ( $( this ).val() == el ) $( this ).prop( 'checked', true );
|
881 |
//console.log($( this ).val() + ' <> ' + el);
|
882 |
} );
|
883 |
-
});
|
884 |
}
|
885 |
}
|
886 |
|
@@ -976,7 +1005,7 @@ jQuery( document ).ready( function( $ ) {
|
|
976 |
$( '.save-icon' ).remove();
|
977 |
// show spinner
|
978 |
$( obj ).parent( '.ctc-textarea-button-cell, .ctc-button-cell' ).append( '<span class="ctc-status-icon spinner save-icon"></span>' );
|
979 |
-
if ( id.match(/ctc_configtype/) ) {
|
980 |
$( obj ).parents( '.ctc-input-row' ).first().append( '<span class="ctc-status-icon spinner save-icon"></span>' );
|
981 |
postdata[ 'ctc_configtype' ] = $( obj ).val();
|
982 |
} else if ( ( $selector = $( '#ctc_new_selectors' ) ) && 'ctc_save_new_selectors' == $( obj ).attr( 'id' ) ) {
|
@@ -986,6 +1015,8 @@ jQuery( document ).ready( function( $ ) {
|
|
986 |
}
|
987 |
} else if ( ( $imports = $( '#ctc_child_imports' ) ) && 'ctc_save_imports' == $( obj ).attr( 'id' ) ) {
|
988 |
postdata['ctc_child_imports'] = $imports.val();
|
|
|
|
|
989 |
} else {
|
990 |
// coalesce inputs
|
991 |
postdata = coalesce_inputs( obj );
|
@@ -1009,7 +1040,7 @@ jQuery( document ).ready( function( $ ) {
|
|
1009 |
&& 'plugin' == $( '#ctc_action' ).val() ) ?
|
1010 |
'ctc_plugin' : 'ctc_update';
|
1011 |
postdata['_wpnonce'] = $( '#_wpnonce' ).val();
|
1012 |
-
//console.log( postdata );
|
1013 |
// ajax post input data
|
1014 |
$.post(
|
1015 |
// get ajax url from localized object
|
@@ -1018,7 +1049,7 @@ jQuery( document ).ready( function( $ ) {
|
|
1018 |
postdata,
|
1019 |
//on success function
|
1020 |
function( response ) {
|
1021 |
-
//console.log( response );
|
1022 |
// release button
|
1023 |
$( obj ).prop( 'disabled', false );
|
1024 |
// hide spinner
|
@@ -1117,19 +1148,21 @@ jQuery( document ).ready( function( $ ) {
|
|
1117 |
break;
|
1118 |
|
1119 |
case 'stylesheets':
|
1120 |
-
$( '#ctc_stylesheet_files').html( this.data );
|
1121 |
break;
|
1122 |
|
1123 |
case 'backups':
|
1124 |
-
$( '#ctc_backup_files').html( this.data );
|
1125 |
break;
|
1126 |
|
1127 |
case 'addl_css':
|
1128 |
ctcAjax.addl_css = this.data;
|
1129 |
-
//console.log('addl_css');
|
1130 |
-
//console.log(this.data);
|
|
|
|
|
|
|
1131 |
break;
|
1132 |
-
|
1133 |
case 'preview':
|
1134 |
case 'all_styles':
|
1135 |
// refresh preview
|
@@ -1140,7 +1173,7 @@ jQuery( document ).ready( function( $ ) {
|
|
1140 |
}
|
1141 |
|
1142 |
function reset_caches() {
|
1143 |
-
//console.log('resetting caches...');
|
1144 |
current_query = 'base';
|
1145 |
current_qsid = null;
|
1146 |
cache_selectors = [];
|
@@ -1158,9 +1191,36 @@ jQuery( document ).ready( function( $ ) {
|
|
1158 |
ctcAjax.val_qry = {};
|
1159 |
ctcAjax.rule_val = {};
|
1160 |
ctcAjax.sel_val = {};
|
1161 |
-
//console.log('caches reset. loading menus...');
|
1162 |
load_menus();
|
1163 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1164 |
// initialize vars
|
1165 |
var lf = "\n",
|
1166 |
quot_regex = new RegExp( '"', 'g' ),
|
@@ -1188,9 +1248,10 @@ jQuery( document ).ready( function( $ ) {
|
|
1188 |
'refresh': 0 // reset caches on load
|
1189 |
},
|
1190 |
// these caches are used as the source for autocomplete menus
|
1191 |
-
cache_selectors
|
1192 |
-
cache_queries
|
1193 |
-
cache_rules
|
|
|
1194 |
// -- end var definitions
|
1195 |
|
1196 |
// auto populate parent/child tab values
|
@@ -1198,142 +1259,183 @@ jQuery( document ).ready( function( $ ) {
|
|
1198 |
set_existing();
|
1199 |
// initialize theme menus
|
1200 |
if ( !$( '#ctc_theme_parnt' ).is( 'input' ) ) {
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
}
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1220 |
}
|
1221 |
-
} );
|
1222 |
-
}
|
1223 |
-
}
|
1224 |
-
// bind event handlers
|
1225 |
-
// these elements get replaced so use delegated events
|
1226 |
-
$( '#ctc_main' ).on( 'focus', '.color-picker', function() { //'.ctc-option-panel-container'
|
1227 |
-
set_notice( '' )
|
1228 |
-
$( '.color-picker' ).not( this ).iris( 'hide' );
|
1229 |
-
$( this ).iris( 'toggle' );
|
1230 |
-
$( '.iris-picker' ).css( {'position':'absolute', 'z-index':10} );
|
1231 |
-
} );
|
1232 |
-
|
1233 |
-
$( '#ctc_main' ).on( 'change', '.ctc-child-value, input[type=checkbox]', function() { //'.ctc-option-panel-container',
|
1234 |
-
coalesce_inputs( this );
|
1235 |
-
} );
|
1236 |
-
|
1237 |
-
$( '#ctc_main' ).on( 'click', '.ctc-selector-handle', function( e ) { //'.ctc-option-panel-container'
|
1238 |
-
e.preventDefault();
|
1239 |
-
set_notice( '' )
|
1240 |
-
var id = $( this ).attr( 'id' ).toString().replace( '_close', '' ),
|
1241 |
-
valid = id.toString().match( /_(\d+)$/ )[1];
|
1242 |
-
if ( $( '#' + id + '_container' ).is( ':hidden' ) ) {
|
1243 |
-
if ( 1 != semaphore.val_qry ) semaphore.val_qry = 0;
|
1244 |
-
render_selector_value_inputs( valid );
|
1245 |
}
|
1246 |
-
|
1247 |
-
|
1248 |
-
} );
|
1249 |
-
$( '#ctc_main' ).on( 'click', '.nav-tab', function( e ) {
|
1250 |
e.preventDefault();
|
1251 |
// clear the notice box
|
1252 |
-
set_notice( '' );
|
1253 |
$( '.ctc-status-icon' ).remove();
|
1254 |
var id = '#' + $( this ).attr( 'id' );
|
1255 |
focus_panel( id );
|
1256 |
} );
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
$( '
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
$( '
|
1285 |
-
$( '.ctc-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
$( '#
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
$( '#
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1339 |
} );
|
2 |
* Script: chld-thm-cfg.js
|
3 |
* Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
4 |
* Description: Handles jQuery, AJAX and other UI
|
5 |
+
* Version: 1.6.5
|
6 |
* Author: Lilaea Media
|
7 |
* Author URI: http://www.lilaeamedia.com/
|
8 |
* License: GPLv2
|
41 |
}
|
42 |
|
43 |
function validate() {
|
44 |
+
var regex = /[^\w\-]/,
|
45 |
+
newslug = $( '#ctc_child_template' ).length ? $( '#ctc_child_template' ).val().toString().replace( regex ).toLowerCase() : '',
|
46 |
+
slug = $( '#ctc_theme_child' ).length ? $( '#ctc_theme_child' ).val().toString().replace( regex ).toLowerCase() : newslug,
|
47 |
+
type = $( 'input[name=ctc_child_type]:checked' ).val(),
|
48 |
+
errors = [];
|
49 |
if ( 'new' == type ) slug = newslug;
|
50 |
if ( theme_exists( slug, type ) ) {
|
51 |
errors.push( ctcAjax.theme_exists_txt.toString().replace( /%s/, slug ) );
|
57 |
errors.push( ctcAjax.inval_name_txt );
|
58 |
}
|
59 |
if ( errors.length ) {
|
60 |
+
set_notice( { 'error': errors } );
|
61 |
return false;
|
62 |
}
|
63 |
return true;
|
549 |
setup_iris( this );
|
550 |
} );
|
551 |
coalesce_inputs( '#ctc_child_all_0_swatch' );
|
552 |
+
if ( jquery_err.length ) {
|
553 |
+
jquery_notice();
|
554 |
+
} else {
|
555 |
+
$( '#ctc_sel_ovrd_selector_selected' ).text( ctcAjax.sel_val[qsid].selector );
|
556 |
+
$( '.ctc-rewrite-toggle' ).text( ctcAjax.rename_txt );
|
557 |
+
$( '#ctc_sel_ovrd_new_rule, #ctc_sel_ovrd_rule_header, #ctc_sel_ovrd_rule_inputs_container, #ctc_sel_ovrd_rule_inputs, .ctc-rewrite-toggle' ).slideDown();
|
558 |
+
}
|
559 |
}
|
560 |
} else {
|
561 |
//selector = $( '#ctc_sel_ovrd_selector_selected' ).text();
|
577 |
if ( !( theme = theme.match( /(child|parnt)/ )[1] ) ) {
|
578 |
theme = 'child';
|
579 |
}
|
580 |
+
//set_notice( '' )
|
581 |
query_css( 'preview', theme, render_css_preview );
|
582 |
return false;
|
583 |
}
|
626 |
|
627 |
function render_recent() {
|
628 |
var html = '';
|
629 |
+
if ( is_empty( ctcAjax.recent ) && false === is_empty( ctcAjax.recent_txt ) ) {
|
630 |
html += ctcAjax.recent_txt;
|
631 |
+
} else if ( is_empty( ctcAjax.recent ) ) {
|
632 |
+
return;
|
633 |
} else {
|
634 |
//console.log(ctcAjax.recent);
|
635 |
html += '<ul>' + "\n";
|
679 |
$( selector ).find( '.ctc-swatch' ).each( function() {
|
680 |
coalesce_inputs( this );
|
681 |
} );
|
682 |
+
if ( jquery_err.length ) jquery_notice();
|
683 |
|
684 |
}
|
685 |
/**
|
687 |
*/
|
688 |
function setup_iris( obj ) {
|
689 |
//console.log( 'setting up iris ' + ( 'undefined' != typeof $( obj ).attr( 'id' ) ? $( obj ).attr( 'id' ) : '' ) );
|
690 |
+
try {
|
691 |
+
$( obj ).iris( {
|
692 |
+
change: function( e, ui ) {
|
693 |
+
//console.log( 'change event '
|
694 |
+
//+ ( 'undefined' != typeof $( this ).attr( 'id' ) ? $( this ).attr( 'id' ) : '' )
|
695 |
+
//+ ' ' + ui.color.toString() );
|
696 |
+
$( obj ).data( 'color', ui.color.toString() );
|
697 |
+
coalesce_inputs( obj );
|
698 |
+
}
|
699 |
+
} );
|
700 |
+
} catch ( exn ) {
|
701 |
+
jquery_exception( exn, 'Iris Color Picker' );
|
702 |
+
}
|
703 |
}
|
704 |
|
705 |
function setup_query_menu() {
|
706 |
//console.log( 'setup query menu' );
|
707 |
//console.log( semaphore );
|
708 |
+
try {
|
709 |
+
$( '#ctc_sel_ovrd_query' ).autocomplete( {
|
710 |
+
source: cache_queries,
|
711 |
+
minLength: 0,
|
712 |
+
selectFirst: true,
|
713 |
+
autoFocus: true,
|
714 |
+
select: function( e, ui ) {
|
715 |
+
set_query( ui.item.value );
|
716 |
+
return false;
|
717 |
+
},
|
718 |
+
focus: function( e ) {
|
719 |
+
e.preventDefault();
|
720 |
+
}
|
721 |
+
} );
|
722 |
+
} catch ( exn ) {
|
723 |
+
jquery_exception( exn, 'Query Menu' );
|
724 |
+
}
|
725 |
}
|
726 |
|
727 |
function setup_selector_menu() {
|
728 |
//console.log( 'setup selector menu' );
|
729 |
//console.log( semaphore );
|
730 |
+
try {
|
731 |
+
$( '#ctc_sel_ovrd_selector' ).autocomplete( {
|
732 |
+
source: cache_selectors,
|
733 |
+
selectFirst: true,
|
734 |
+
autoFocus: true,
|
735 |
+
select: function( e, ui ) {
|
736 |
+
set_selector( ui.item.value, ui.item.label );
|
737 |
+
return false;
|
738 |
+
},
|
739 |
+
focus: function( e ) { e.preventDefault(); }
|
740 |
+
} );
|
741 |
+
} catch ( exn ) {
|
742 |
+
jquery_exception( exn, 'Selector Menu' );
|
743 |
+
}
|
744 |
}
|
745 |
|
746 |
function setup_rule_menu() {
|
747 |
//console.log( 'setup rule menu' );
|
748 |
//console.log( semaphore );
|
749 |
+
try {
|
750 |
$( '#ctc_rule_menu' ).autocomplete( {
|
751 |
source: cache_rules,
|
752 |
//minLength: 0,
|
758 |
},
|
759 |
focus: function( e ) { e.preventDefault(); }
|
760 |
} );
|
761 |
+
} catch ( exn ) {
|
762 |
+
jquery_exception( exn, 'Rule Menu' );
|
763 |
+
}
|
764 |
}
|
765 |
|
766 |
function setup_new_rule_menu() {
|
767 |
+
try {
|
768 |
$( '#ctc_new_rule_menu' ).autocomplete( {
|
769 |
source: load_filtered_rules,
|
770 |
//minLength: 0,
|
784 |
setup_iris( el );
|
785 |
$( el ).focus();
|
786 |
} );
|
787 |
+
if ( jquery_err.length ) jquery_notice();
|
788 |
return false;
|
789 |
},
|
790 |
focus: function( e ) { e.preventDefault(); }
|
791 |
} );
|
792 |
+
} catch ( exn ) {
|
793 |
+
jquery_exception( exn, 'New Rule Menu' );
|
794 |
+
}
|
795 |
}
|
796 |
/**
|
797 |
* The "set" functions apply values to inputs
|
798 |
*/
|
799 |
function set_existing() {
|
800 |
+
if ( $( '#ctc_theme_child' ).length && $( '#ctc_child_type_existing' ).is( ':checked' ) ) {
|
801 |
var child = $( '#ctc_theme_child' ).val();
|
802 |
if ( false === is_empty( child ) ) {
|
803 |
$( '#ctc_child_name' ).val( ctcAjax.themes['child'][child].Name );
|
819 |
} );
|
820 |
}
|
821 |
$( '#ctc_error_notice' ).html( errorHtml );
|
822 |
+
$('html, body').animate({ scrollTop: 0 }, 'slow');
|
823 |
}
|
824 |
|
825 |
function set_parent_menu( obj ) {
|
909 |
if ( $( this ).val() == el ) $( this ).prop( 'checked', true );
|
910 |
//console.log($( this ).val() + ' <> ' + el);
|
911 |
} );
|
912 |
+
} );
|
913 |
}
|
914 |
}
|
915 |
|
1005 |
$( '.save-icon' ).remove();
|
1006 |
// show spinner
|
1007 |
$( obj ).parent( '.ctc-textarea-button-cell, .ctc-button-cell' ).append( '<span class="ctc-status-icon spinner save-icon"></span>' );
|
1008 |
+
if ( id.match( /ctc_configtype/ ) ) {
|
1009 |
$( obj ).parents( '.ctc-input-row' ).first().append( '<span class="ctc-status-icon spinner save-icon"></span>' );
|
1010 |
postdata[ 'ctc_configtype' ] = $( obj ).val();
|
1011 |
} else if ( ( $selector = $( '#ctc_new_selectors' ) ) && 'ctc_save_new_selectors' == $( obj ).attr( 'id' ) ) {
|
1015 |
}
|
1016 |
} else if ( ( $imports = $( '#ctc_child_imports' ) ) && 'ctc_save_imports' == $( obj ).attr( 'id' ) ) {
|
1017 |
postdata['ctc_child_imports'] = $imports.val();
|
1018 |
+
} else if ( 'ctc_is_debug' == $( obj ).attr( 'id' ) ) {
|
1019 |
+
postdata['ctc_is_debug'] = $( '#ctc_is_debug' ).is( ':checked' ) ? 1 : 0;
|
1020 |
} else {
|
1021 |
// coalesce inputs
|
1022 |
postdata = coalesce_inputs( obj );
|
1040 |
&& 'plugin' == $( '#ctc_action' ).val() ) ?
|
1041 |
'ctc_plugin' : 'ctc_update';
|
1042 |
postdata['_wpnonce'] = $( '#_wpnonce' ).val();
|
1043 |
+
// console.log( postdata );
|
1044 |
// ajax post input data
|
1045 |
$.post(
|
1046 |
// get ajax url from localized object
|
1049 |
postdata,
|
1050 |
//on success function
|
1051 |
function( response ) {
|
1052 |
+
// console.log( response );
|
1053 |
// release button
|
1054 |
$( obj ).prop( 'disabled', false );
|
1055 |
// hide spinner
|
1148 |
break;
|
1149 |
|
1150 |
case 'stylesheets':
|
1151 |
+
$( '#ctc_stylesheet_files' ).html( this.data );
|
1152 |
break;
|
1153 |
|
1154 |
case 'backups':
|
1155 |
+
$( '#ctc_backup_files' ).html( this.data );
|
1156 |
break;
|
1157 |
|
1158 |
case 'addl_css':
|
1159 |
ctcAjax.addl_css = this.data;
|
1160 |
+
//console.log( 'addl_css' );
|
1161 |
+
//console.log( this.data );
|
1162 |
+
break;
|
1163 |
+
case 'debug':
|
1164 |
+
$( '#ctc_debug_container' ).html( this.data );
|
1165 |
break;
|
|
|
1166 |
case 'preview':
|
1167 |
case 'all_styles':
|
1168 |
// refresh preview
|
1173 |
}
|
1174 |
|
1175 |
function reset_caches() {
|
1176 |
+
//console.log( 'resetting caches...');
|
1177 |
current_query = 'base';
|
1178 |
current_qsid = null;
|
1179 |
cache_selectors = [];
|
1191 |
ctcAjax.val_qry = {};
|
1192 |
ctcAjax.rule_val = {};
|
1193 |
ctcAjax.sel_val = {};
|
1194 |
+
//console.log( 'caches reset. loading menus...');
|
1195 |
load_menus();
|
1196 |
}
|
1197 |
+
function jquery_exception( exn, type ) {
|
1198 |
+
var ln = is_empty( exn.lineNumber ) ? '' : ' line: ' + exn.lineNumber,
|
1199 |
+
fn = is_empty( exn.fileName ) ? '' : ' ' + exn.fileName.split( /\?/ )[0];
|
1200 |
+
jquery_err.push( '<code><small>' + type + ': ' + exn.message + fn + ln + '</small></code>' );
|
1201 |
+
}
|
1202 |
+
function jquery_notice() {
|
1203 |
+
|
1204 |
+
var culprits = [],
|
1205 |
+
errors = [];
|
1206 |
+
// disable form submits
|
1207 |
+
$( 'input[type=submit], input[type=button]' ).prop( 'disabled', true );
|
1208 |
+
$( 'script' ).each( function( ndx,el ){
|
1209 |
+
var url = $( this ).prop( 'src' );
|
1210 |
+
if ( false === is_empty( url ) && url.match( /jquery(\.min|\.js|\-?ui)/i ) && ! url.match( /load\-scripts.php/ ) ) {
|
1211 |
+
culprits.push( '<code><small>' + url.split( /\?/ )[0] + '</small></code>' );
|
1212 |
+
}
|
1213 |
+
} );
|
1214 |
+
errors.push( '<strong>' + ctcAjax.js_txt + '</strong>' );
|
1215 |
+
if ( 1 == ctcAjax.is_debug ) {
|
1216 |
+
errors.push( jquery_err.join( '<br/>' ) );
|
1217 |
+
}
|
1218 |
+
if ( culprits.length ) {
|
1219 |
+
errors.push( ctcAjax.jquery_txt + '<br/>' + culprits.join( '<br/>' ) );
|
1220 |
+
}
|
1221 |
+
errors.push( ctcAjax.plugin_txt + ' ' + ctcAjax.contact_txt );
|
1222 |
+
set_notice( { 'error': errors } );
|
1223 |
+
}
|
1224 |
// initialize vars
|
1225 |
var lf = "\n",
|
1226 |
quot_regex = new RegExp( '"', 'g' ),
|
1248 |
'refresh': 0 // reset caches on load
|
1249 |
},
|
1250 |
// these caches are used as the source for autocomplete menus
|
1251 |
+
cache_selectors = [],
|
1252 |
+
cache_queries = [],
|
1253 |
+
cache_rules = [],
|
1254 |
+
jquery_err = [];
|
1255 |
// -- end var definitions
|
1256 |
|
1257 |
// auto populate parent/child tab values
|
1259 |
set_existing();
|
1260 |
// initialize theme menus
|
1261 |
if ( !$( '#ctc_theme_parnt' ).is( 'input' ) ) {
|
1262 |
+
try {
|
1263 |
+
$.widget( 'ctc.themeMenu', $.ui.selectmenu, {
|
1264 |
+
_renderItem: function( ul, item ) {
|
1265 |
+
var li = $( "<li>" );
|
1266 |
+
$( '#ctc_theme_option_' + item.value ).detach().appendTo( li );
|
1267 |
+
return li.appendTo( ul );
|
1268 |
+
}
|
1269 |
+
} );
|
1270 |
+
} catch( exn ) {
|
1271 |
+
jquery_exception( exn, 'Theme Menu' );
|
1272 |
}
|
1273 |
+
try {
|
1274 |
+
$( '#ctc_theme_parnt' ).themeMenu( {
|
1275 |
+
select: function( event, ui ) {
|
1276 |
+
set_parent_menu( ui.item );
|
1277 |
+
}
|
1278 |
+
} );
|
1279 |
+
} catch( exn ) {
|
1280 |
+
if ( 'function' == typeof themeMenu )
|
1281 |
+
$( '#ctc_theme_parnt' ).themeMenu( 'destroy' );
|
1282 |
+
else $( '#ctc_theme_parnt-button' ).remove();
|
1283 |
+
jquery_exception( exn, 'Parent Theme Menu' );
|
1284 |
+
}
|
1285 |
+
if ( is_empty( ctcAjax.themes.child ) ) {
|
1286 |
+
if ( $( '#ctc_child_name' ).length ) {
|
1287 |
+
$( '#ctc_child_name' ).val( testname );
|
1288 |
+
$( '#ctc_child_template' ).val( testslug );
|
1289 |
+
}
|
1290 |
+
} else {
|
1291 |
+
try {
|
1292 |
+
$( '#ctc_theme_child' ).themeMenu( {
|
1293 |
+
select: function( event, ui ) {
|
1294 |
+
set_child_menu( ui.item );
|
1295 |
+
}
|
1296 |
+
} );
|
1297 |
+
} catch( exn ) {
|
1298 |
+
if ( 'function' == typeof themeMenu )
|
1299 |
+
$( '#ctc_theme_child' ).themeMenu( 'destroy' );
|
1300 |
+
else $( '#ctc_theme_child-button' ).remove();
|
1301 |
+
jquery_exception( exn, 'Child Theme Menu' );
|
1302 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1303 |
}
|
1304 |
+
}
|
1305 |
+
$( '.nav-tab' ).on( 'click', function( e ) {
|
|
|
|
|
1306 |
e.preventDefault();
|
1307 |
// clear the notice box
|
1308 |
+
//set_notice( '' );
|
1309 |
$( '.ctc-status-icon' ).remove();
|
1310 |
var id = '#' + $( this ).attr( 'id' );
|
1311 |
focus_panel( id );
|
1312 |
} );
|
1313 |
+
if ( is_empty( jquery_err ) ){
|
1314 |
+
// bind event handlers
|
1315 |
+
// these elements get replaced so use delegated events
|
1316 |
+
$( '#ctc_main' ).on( 'focus', '.color-picker', function() { //'.ctc-option-panel-container'
|
1317 |
+
//set_notice( '' )
|
1318 |
+
try {
|
1319 |
+
$( '.color-picker' ).not( this ).iris( 'hide' );
|
1320 |
+
$( this ).iris( 'toggle' );
|
1321 |
+
$( '.iris-picker' ).css( {'position':'absolute', 'z-index':10} );
|
1322 |
+
} catch ( exn ) {
|
1323 |
+
jquery_exception( exn, 'Iris Color Picker' );
|
1324 |
+
}
|
1325 |
+
} );
|
1326 |
+
|
1327 |
+
$( '#ctc_main' ).on( 'change', '.ctc-child-value, input[type=checkbox]', function() { //'.ctc-option-panel-container',
|
1328 |
+
coalesce_inputs( this );
|
1329 |
+
} );
|
1330 |
+
|
1331 |
+
$( '#ctc_main' ).on( 'click', '.ctc-selector-handle', function( e ) { //'.ctc-option-panel-container'
|
1332 |
+
e.preventDefault();
|
1333 |
+
//set_notice( '' );
|
1334 |
+
var id = $( this ).attr( 'id' ).toString().replace( '_close', '' ),
|
1335 |
+
valid = id.toString().match( /_(\d+)$/ )[1];
|
1336 |
+
if ( $( '#' + id + '_container' ).is( ':hidden' ) ) {
|
1337 |
+
if ( 1 != semaphore.val_qry ) semaphore.val_qry = 0;
|
1338 |
+
render_selector_value_inputs( valid );
|
1339 |
+
}
|
1340 |
+
$( '#' + id + '_container' ).fadeToggle( 'fast' );
|
1341 |
+
$( '.ctc-selector-container' ).not( '#' + id + '_container' ).fadeOut( 'fast' );
|
1342 |
+
} );
|
1343 |
+
$( '#ctc_main' ).on( 'click', '.ctc-save-input', function( e ) {
|
1344 |
+
save( this , load_menus ); // refresh menus after updating data
|
1345 |
+
} );
|
1346 |
+
$( '#ctc_main' ).on( 'click', '.ctc-selector-edit', function( e ) {
|
1347 |
+
set_qsid( this );
|
1348 |
+
} );
|
1349 |
+
$( '#ctc_main' ).on( 'click', '.ctc-rewrite-toggle', function( e ) {
|
1350 |
+
e.preventDefault();
|
1351 |
+
selector_input_toggle( this );
|
1352 |
+
} );
|
1353 |
+
$( '#ctc_main' ).on( 'click', '.ctc-section-toggle', function( e ) {
|
1354 |
+
$( this ).toggleClass( 'open' );
|
1355 |
+
var id = $( this ).attr( 'id' ) + '_content';
|
1356 |
+
$( '#' + id ).slideToggle( 'fast' );
|
1357 |
+
} );
|
1358 |
+
$( '#ctc_main' ).on( 'click', '#ctc_copy_selector', function( e ) {
|
1359 |
+
var txt = $( '#ctc_sel_ovrd_selector_selected' ).text().trim();
|
1360 |
+
if ( false === is_empty( txt ) )
|
1361 |
+
$( '#ctc_new_selectors' ).val( $( '#ctc_new_selectors' ).val() + "\n" + txt + " {\n\n}" );
|
1362 |
+
} );
|
1363 |
+
$( '#ctc_configtype' ).on( 'change', function( e ) {
|
1364 |
+
var val = $( this ).val();
|
1365 |
+
if ( is_empty( val ) || 'theme' == val ) {
|
1366 |
+
$( '.ctc-theme-only, .ctc-themeonly-container' ).removeClass( 'ctc-disabled' );
|
1367 |
+
$( '.ctc-theme-only, .ctc-themeonly-container input' ).prop( 'disabled', false );
|
1368 |
+
try {
|
1369 |
+
$( '#ctc_theme_parnt, #ctc_theme_child' ).themeMenu( 'enable' );
|
1370 |
+
} catch ( exn ) {
|
1371 |
+
jquery_exception( exn, 'Theme Menu' );
|
1372 |
+
}
|
1373 |
+
} else {
|
1374 |
+
$( '.ctc-theme-only, .ctc-themeonly-container' ).addClass( 'ctc-disabled' );
|
1375 |
+
$( '.ctc-theme-only, .ctc-themeonly-container input' ).prop( 'disabled', true );
|
1376 |
+
try {
|
1377 |
+
$( '#ctc_theme_parnt, #ctc_theme_child' ).themeMenu( 'disable' );
|
1378 |
+
} catch ( exn ) {
|
1379 |
+
jquery_exception( exn, 'Theme Menu' );
|
1380 |
+
}
|
1381 |
+
}
|
1382 |
+
} );
|
1383 |
+
// these elements are not replaced so use direct selector events
|
1384 |
+
$( '#view_child_options, #view_parnt_options' ).on( 'click', function( e ){ render_css_preview( $( this ).attr( 'id' ) ); } );
|
1385 |
+
$( '#ctc_load_form' ).on( 'submit', function() {
|
1386 |
+
return ( validate() ); //&& confirm( ctcAjax.load_txt ) ) ;
|
1387 |
+
} );
|
1388 |
+
$( '#ctc_theme_child, #ctc_theme_child-button, #ctc_child_type_existing' ).on( 'focus click', function() {
|
1389 |
+
// change the inputs to use existing child theme
|
1390 |
+
$( '#ctc_child_type_existing' ).prop( 'checked', true );
|
1391 |
+
$( '#ctc_child_type_new' ).prop( 'checked', false );
|
1392 |
+
$( '#ctc_child_template' ).val( '' );
|
1393 |
+
set_existing();
|
1394 |
+
} );
|
1395 |
+
$( '#ctc_child_type_new, #ctc_child_template' ).on( 'focus click', function() {
|
1396 |
+
// change the inputs to use new child theme
|
1397 |
+
$( '#ctc_child_type_existing' ).prop( 'checked', false );
|
1398 |
+
$( '#ctc_child_type_new' ).prop( 'checked', true );
|
1399 |
+
$( '#ctc_child_name' ).val( testname );
|
1400 |
+
$( '#ctc_child_template' ).val( testslug );
|
1401 |
+
} );
|
1402 |
+
$( '#recent_edits' ).on( 'click', function( e ){
|
1403 |
+
e.preventDefault();
|
1404 |
+
if ( $( '.ctc-recent-container' ).is( ':visible' ) ) {
|
1405 |
+
$( '.ctc-recent-container' ).stop().slideUp();
|
1406 |
+
$( '.ctc-option-panel' ).css( { 'width': '95%' } );
|
1407 |
+
} else {
|
1408 |
+
// move recent edits to outer wrapper
|
1409 |
+
if ( !$('.ctc-recent-container').hasClass( 'moved' ) ) {
|
1410 |
+
$( '.ctc-recent-container' ).addClass( 'moved' ).detach().appendTo('#ctc_option_panel_wrapper');
|
1411 |
+
}
|
1412 |
+
$( '.ctc-recent-container' ).stop().slideDown();
|
1413 |
+
$( '.ctc-option-panel' ).css( { 'width': '80%' } );
|
1414 |
+
}
|
1415 |
+
return false;
|
1416 |
+
} );
|
1417 |
+
$( '#ctc_is_debug' ).on( 'change', function( e ) {
|
1418 |
+
save( this );
|
1419 |
+
} );
|
1420 |
+
$( '.ctc-live-preview' ).on( 'click', function( e ) {
|
1421 |
+
e.stopImmediatePropagation();
|
1422 |
+
e.preventDefault();
|
1423 |
+
document.location = $( this ).prop( 'href' );
|
1424 |
+
return false;
|
1425 |
+
} );
|
1426 |
+
// initialize autoselect menus
|
1427 |
+
load_menus();
|
1428 |
+
set_query( current_query );
|
1429 |
+
// mark additional linked stylesheets for parsing
|
1430 |
+
set_addl_css();
|
1431 |
+
// show last 25 selectors edited
|
1432 |
+
render_recent();
|
1433 |
+
// turn on submit buttons (disabled until everything is loaded to prevent errors)
|
1434 |
+
$( 'input[type=submit], input[type=button]' ).prop( 'disabled', false );
|
1435 |
+
// disappear any notices after 15 seconds
|
1436 |
+
setTimeout( fade_update_notice, 15000 );
|
1437 |
+
} else {
|
1438 |
+
//$( '.ctc-select' ).css( { 'visibility': 'visible' } ).show();
|
1439 |
+
jquery_notice();
|
1440 |
+
}
|
1441 |
} );
|
js/chld-thm-cfg.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(e){function t(e){return v(e)?e:e.toString().replace(K,""")}function c(e){var t=parseInt(e),c=String.fromCharCode(t);return c}function a(e){var t=e.charCodeAt(0);return t}function l(t,c){var a=!1;return e.each(ctcAjax.themes,function(l,n){return e.each(n,function(e){return e!=t||"parnt"!=l&&"new"!=c?void 0:(a=!0,!1)}),a?!1:void 0}),a}function n(){var t=/[^\w\-]/,c=e("#ctc_child_template").val().toString().replace(t).toLowerCase(),a=e("#ctc_theme_child").val().toString().replace(t).toLowerCase(),n=e("input[name=ctc_child_type]:checked").val(),r=[];return"new"==n&&(a=c),l(a,n)&&r.push(ctcAjax.theme_exists_txt.toString().replace(/%s/,a)),""===a&&r.push(ctcAjax.inval_theme_txt),""===e("#ctc_child_name").val()&&r.push(ctcAjax.inval_name_txt),r.length?($({error:r}),!1):!0}function r(){if(e("#ctc_theme_parnt").length){for(var t=e("#ctc_theme_parnt").val(),c=slugbase=t+"-child",a=ctcAjax.themes.parnt[t].Name+" Child",n="",r="",i="00";l(c,"new");)n=""==n?2:n+1,r=i.substring(0,i.length-n.toString().length)+n.toString(),c=slugbase+r;W=c,X=a+(r.length?" "+r:"")}}function i(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")}function s(c){var a;e("#ctc_rewrite_selector").length?(a=e("#ctc_rewrite_selector_orig").val(),e("#ctc_sel_ovrd_selector_selected").text(a),e(c).text(ctcAjax.rename_txt)):(a=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="'+t(a)+'"/>'),e("#ctc_rewrite_selector").val(a),e(c).text(ctcAjax.cancel_txt))}function o(){e(".updated, .error").slideUp("slow",function(){e(".updated").remove()})}function _(t){var c=/^(ctc_(ovrd|\d+)_(parent|child)_([0-9a-z\-]+)_(\d+))(_\w+)?$/,a=e(t).parents(".ctc-selector-row, .ctc-parent-row").first(),l=a.find(".ctc-swatch").first(),n={parent:{},child:{}},r={parent:{origin:"",start:"",end:""},child:{origin:"",start:"",end:""}},i={child:!1,parent:!1},s={};return a.find(".ctc-parent-value, .ctc-child-value").each(function(){var a,l,o=e(this).attr("id"),_=o.toString().match(c),u=_[2],h=_[3],p="undefined"==typeof _[4]?"":_[4],f=_[5],x="undefined"==typeof _[6]?"":_[6],m="parent"==h?e(this).text().replace(/!$/,""):e(this).val(),g="ctc_"+u+"_child_"+p+"_i_"+f;if(!1===v(e(this).data("color"))&&(m=e(this).data("color"),e(this).data("color",null)),"child"==h&&(s[o]=m,s[g]=e("#"+g).is(":checked")?1:0),""!=m)if(!1===v(x))switch(x){case"_border_width":n[h][p+"-width"]="none"==m?0:m;break;case"_border_style":n[h][p+"-style"]=m;break;case"_border_color":n[h][p+"-color"]=m;break;case"_background_url":n[h]["background-image"]=d(h,m);break;case"_background_color":n[h]["background-color"]=t.value;break;case"_background_color1":r[h].start=m,i[h]=!0;break;case"_background_color2":r[h].end=m,i[h]=!0;break;case"_background_origin":r[h].origin=m,i[h]=!0}else(a=p.toString().match(/^border(\-(top|right|bottom|left))?$/)&&!m.match(/none/))?(l=m.toString().split(/ +/),n[h][p+"-width"]="undefined"==typeof l[0]?"":l[0],n[h][p+"-style"]="undefined"==typeof l[1]?"":l[1],n[h][p+"-color"]="undefined"==typeof l[2]?"":l[2]):"background-image"!=p||m.match(/none/)?"seq"!=p&&(n[h][p]=m):m.toString().match(/url\(/)?n[h]["background-image"]=d(h,m):(l=m.toString().split(/ +/),l.length>2?(r[h].origin="undefined"==typeof l[0]?"top":l[0],r[h].start="undefined"==typeof l[1]?"transparent":l[1],r[h].end="undefined"==typeof l[2]?"transparent":l[2],i[h]=!0):n[h]["background-image"]=m)}),"undefined"!=typeof l&&!1===v(l.attr("id"))&&(l.removeAttr("style"),i.parent&&l.ctcgrad(r.parent.origin,[r.parent.start,r.parent.end]),l.css(n.parent),l.attr("id").toString().match(/parent/)||(i.child&&l.ctcgrad(r.child.origin,[r.child.start,r.child.end]),l.css(n.child)),l.css({"z-index":-1})),s}function u(e,t){t="undefined"==typeof t?"":t;var c={orig:t};if(e.toString().match(/^border(\-(top|right|bottom|left))?$/)){var a=t.toString().split(/ +/);c.names=["_border_width","_border_style","_border_color"],c.values=["undefined"==typeof a[0]?"":a[0],"undefined"==typeof a[1]?"":a[1],"undefined"==typeof a[2]?"":a[2]]}else if(e.toString().match(/^background\-image/))if(c.names=["_background_url","_background_origin","_background_color1","_background_color2"],c.values=["","","",""],!1!==v(t)||t.toString().match(/(url|none)/))c.values[0]=t;else{var a=t.toString().split(/:/);c.values[1]="undefined"==typeof a[0]?"":a[0],c.values[2]="undefined"==typeof a[1]?"":a[1],c.values[3]="undefined"==typeof a[3]?"":a[3],c.orig=[c.values[1],c.values[2],c.values[3]].join(" ")}else c.names=[""],c.values=[t];return c}function d(e,t){var c,a=t.toString().match(/url\(['" ]*(.+?)['" ]*\)/),l=v(a)?null:a[1],n=ctcAjax.theme_uri+"/"+("parent"==e?ctcAjax.parnt:ctcAjax.child)+"/";return l?c=l.toString().match(/^(data:|https?:|\/)/)?t:"url("+n+l+")":!1}function v(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}function h(e){if("object"==typeof ctcAjax.sel_val[e]&&"object"==typeof ctcAjax.sel_val[e].value)for(var t in ctcAjax.sel_val[e].value)if(ctcAjax.sel_val[e].value.hasOwnProperty(t)&&(!1===v(ctcAjax.sel_val[e].value[t].child)||!1===v(ctcAjax.sel_val[e].value[t].parnt)))return e;return delete ctcAjax.sel_val[e],!1}function p(){Z.rld_rule=1,Z.rld_sel=1,f(),m()}function f(){if(1!==Z.sel_ndx){if(0===Z.sel_ndx||1==Z.rld_sel)return Z.sel_ndx=1,Z.rld_sel=0,void P("sel_ndx",null,f);tt=[],!1===v(ctcAjax.sel_ndx)&&e.each(ctcAjax.sel_ndx,function(e){var t={label:e,value:e};tt.push(t)}),C(),x()}}function x(){if(1!==Z.sel_ndx){if(0===Z.sel_ndx)return Z.sel_ndx=1,void P("sel_ndx",Y,x);et=[],!1===v(ctcAjax.sel_ndx)&&e.each(ctcAjax.sel_ndx[Y],function(e,t){var c={label:e,value:t};et.push(c)}),D(),Z.set_sel&&(Z.set_sel=0,E(H,null))}}function m(){if(1!==Z.rule){if(0===Z.rule||1==Z.rld_rule)return Z.rule=1,Z.rld_rule=0,void P("rule",null,m);ct=[],!1===v(ctcAjax.rule)&&e.each(ctcAjax.rule,function(e,t){var a={label:t.replace(/\d+/g,c),value:e};ct.push(a)}),ct=ct.sort(function(e,t){return e.label>t.label?1:e.label<t.label?-1:0}),R(),F()}}function g(e){return 1===Z.sel_val?!1:v(ctcAjax.sel_val[e])?(0==Z.sel_val&&(Z.sel_val=1,P("sel_val",e,g)),!1):(H=e,void(1==Z.set_qry?(Z.set_qry=0,z(ctcAjax.sel_val[e].query)):1==Z.new_sel&&(Z.new_sel=0,w(e))))}function y(t,a){var l=[],n=v(ctcAjax.sel_val[H])||v(ctcAjax.sel_val[H].value);v(ct)&&m(),e.each(ct,function(a,r){var i=!1,s=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");if(s.test(r.label)){if(!1===n&&(e.each(ctcAjax.sel_val[H].value,function(e){return r.label==e.replace(/\d+/g,c)?(i=!0,!1):void 0}),i))return;l.push(r)}}),a(l)}function j(a,l,n){var r="",i=v(ctcAjax.sel_val[a])||v(ctcAjax.sel_val[a].value)||v(ctcAjax.sel_val[a].value[l])?"":ctcAjax.sel_val[a].value[l],s=u(l,"undefined"==typeof i?"":i.parnt),o=!1===v(i.i_parnt)&&1==i.i_parnt?ctcAjax.important_label:"",_=u(l,"undefined"==typeof i?"":i.child),d=!1===v(i.i_child)&&1==i.i_child?1:0,h="ctc_"+n+"_child_"+l+"_i_"+a;return!1===v(ctcAjax.sel_val[a])&&(r+='<div class="ctc-'+("ovrd"==n?"input":"selector")+'-row clearfix">'+J,r+='<div class="ctc-input-cell">'+("ovrd"==n?l.replace(/\d+/g,c):ctcAjax.sel_val[a].selector+'<br/><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+a+'" >'+ctcAjax.edit_txt+"</a> "+(v(s.orig)?ctcAjax.child_only_txt:""))+"</div>"+J,"ovrd"==n&&(r+='<div class="ctc-parent-value ctc-input-cell" id="ctc_'+n+"_parent_"+l+"_"+a+'">'+(v(s.orig)?"[no value]":s.orig+o)+"</div>"+J),r+='<div class="ctc-input-cell">'+J,!1===v(s.names)&&(e.each(s.names,function(e,c){c=v(c)?"":c,r+='<div class="ctc-child-input-cell">'+J;var i,s="ctc_"+n+"_child_"+l+"_"+a+c;!1===(i=_.values.shift())&&(i=""),r+=(v(c)?"":ctcAjax.field_labels[c]+":<br/>")+'<input type="text" id="'+s+'" name="'+s+'" class="ctc-child-value'+((c+l).toString().match(/color/)?" color-picker":"")+(c.toString().match(/url/)?" ctc-input-wide":"")+'" value="'+t(i)+'" />'+J,r+="</div>"+J}),r+='<label for="'+h+'"><input type="checkbox" id="'+h+'" name="'+h+'" value="1" '+(1===d?"checked":"")+" />"+ctcAjax.important_label+"</label>"+J),r+="</div>"+J,r+="ovrd"==n?"":'<div class="ctc-swatch ctc-specific" id="ctc_child_'+l+"_"+a+'_swatch">'+ctcAjax.swatch_txt+"</div>"+J+'<div class="ctc-child-input-cell ctc-button-cell" id="ctc_save_'+l+"_"+a+'_cell">'+J+'<input type="button" class="button ctc-save-input" id="ctc_save_'+l+"_"+a+'" name="ctc_save_'+l+"_"+a+'" value="Save" /></div>'+J,r+="</div><!-- end input row -->"+J),r}function w(t){var c,a,l;(t=h(t))?(e("#ctc_sel_ovrd_qsid").val(t),H=t,v(ctcAjax.sel_val[t].seq)?e("#ctc_child_load_order_container").html(""):(c="ctc_ovrd_child_seq_"+t,l=parseInt(ctcAjax.sel_val[t].seq),a='<input type="text" id="'+c+'" name="'+c+'" class="ctc-child-value" value="'+l+'" />',e("#ctc_child_load_order_container").html(a)),v(ctcAjax.sel_val[t].value)?e("#ctc_sel_ovrd_rule_inputs").slideUp(function(){e("#ctc_sel_ovrd_rule_inputs").html("")}):(a="",e.each(ctcAjax.sel_val[t].value,function(e){a+=j(t,e,"ovrd")}),e("#ctc_sel_ovrd_rule_inputs").html(a).find(".color-picker").each(function(){S(this)}),_("#ctc_child_all_0_swatch"),e("#ctc_sel_ovrd_selector_selected").text(ctcAjax.sel_val[t].selector),e(".ctc-rewrite-toggle").text(ctcAjax.rename_txt),e("#ctc_sel_ovrd_new_rule, #ctc_sel_ovrd_rule_header, #ctc_sel_ovrd_rule_inputs_container, #ctc_sel_ovrd_rule_inputs, .ctc-rewrite-toggle").slideDown())):(e("#ctc_sel_ovrd_selector_selected").html(" "),e("#ctc_sel_ovrd_new_rule, #ctc_sel_ovrd_rule_header, #ctc_sel_ovrd_rule_inputs_container, #ctc_sel_ovrd_rule_inputs, .ctc-rewrite-toggle").slideUp(function(){e("#ctc_sel_ovrd_rule_inputs").html("")})),a=null}function A(t){if(1===Z.preview)return!1;if(0==Z.preview){Z.preview=1;var t;return(t=t.match(/(child|parnt)/)[1])||(t="child"),$(""),P("preview",t,A),!1}e("#view_"+t+"_options_panel").text(ctcAjax.previewResponse),ctcAjax.previewResponse=null,Z.preview=0}function b(t){if(1===Z.rule_val)return!1;if(0==Z.rule_val)return Z.rule_val=1,P("rule_val",t,b),!1;var c=ctcAjax.rule[t],a='<div class="ctc-input-row clearfix" id="ctc_rule_row_'+c+'">'+J;!1===v(ctcAjax.rule_val[t])&&(e.each(ctcAjax.rule_val[t],function(e,t){var l=u(c,t);a+='<div class="ctc-parent-row clearfix" id="ctc_rule_row_'+c+"_"+e+'">'+J,a+='<div class="ctc-input-cell ctc-parent-value" id="ctc_'+e+"_parent_"+c+"_"+e+'">'+l.orig+"</div>"+J,a+='<div class="ctc-input-cell">'+J,a+='<div class="ctc-swatch ctc-specific" id="ctc_'+e+"_parent_"+c+"_"+e+'_swatch">'+ctcAjax.swatch_txt+"</div></div>"+J,a+='<div class="ctc-input-cell"><a href="#" class="ctc-selector-handle" id="ctc_selector_'+c+"_"+e+'">'+ctcAjax.selector_txt+"</a></div>"+J,a+='<div id="ctc_selector_'+c+"_"+e+'_container" class="ctc-selector-container">'+J,a+='<a href="#" id="ctc_selector_'+c+"_"+e+'_close" class="ctc-selector-handle ctc-exit" title="'+ctcAjax.close_txt+'"></a>',a+='<div id="ctc_selector_'+c+"_"+e+'_inner_container" class="ctc-selector-inner-container clearfix">'+J,a+='<div id="ctc_status_val_qry_'+e+'"></div>'+J,a+='<div id="ctc_selector_'+c+"_"+e+'_rows"></div>'+J,a+="</div></div></div>"+J}),a+="</div>"+J),e("#ctc_rule_value_inputs").html(a).find(".ctc-swatch").each(function(){_(this)}),a=null}function k(){var t="";v(ctcAjax.recent)?t+=ctcAjax.recent_txt:(t+="<ul>\n",e.each(ctcAjax.recent,function(c,a){e.each(a,function(e,c){t+='<li><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+e+'" >'+c+"</a></li>\n"})}),t+="</ul>\n"),e("#ctc_recent_selectors").html(t),t=null}function q(t){if(1==Z.val_qry)return!1;var c,l,n=e("#ctc_rule_menu_selected").text().replace(/[^\w\-]/g,a),r="";return 0===Z.val_qry?(Z.val_qry=1,c={rule:n},P("val_qry",t,q,c),!1):(!1===v(ctcAjax.val_qry[t])&&e.each(ctcAjax.val_qry[t],function(c,a){page_rule=c,e.each(a,function(a,l){r+='<h4 class="ctc-query-heading">'+a+"</h4>"+J,!1===v(l)&&e.each(l,function(e,a){ctcAjax.sel_val[e]=a,r+=j(e,c,t)})})}),l="#ctc_selector_"+n+"_"+t+"_rows",e(l).html(r).find(".color-picker").each(function(){S(this)}),void e(l).find(".ctc-swatch").each(function(){_(this)}))}function S(t){e(t).iris({change:function(c,a){e(t).data("color",a.color.toString()),_(t)}})}function C(){e("#ctc_sel_ovrd_query").autocomplete({source:tt,minLength:0,selectFirst:!0,autoFocus:!0,select:function(e,t){return z(t.item.value),!1},focus:function(e){e.preventDefault()}})}function D(){e("#ctc_sel_ovrd_selector").autocomplete({source:et,selectFirst:!0,autoFocus:!0,select:function(e,t){return E(t.item.value,t.item.label),!1},focus:function(e){e.preventDefault()}})}function R(){e("#ctc_rule_menu").autocomplete({source:ct,selectFirst:!0,autoFocus:!0,select:function(e,t){return L(t.item.value,t.item.label),!1},focus:function(e){e.preventDefault()}})}function F(){e("#ctc_new_rule_menu").autocomplete({source:y,selectFirst:!0,autoFocus:!0,select:function(t,c){t.preventDefault();var l=e(j(H,c.item.label.replace(/[^\w\-]/g,a),"ovrd"));return e("#ctc_sel_ovrd_rule_inputs").append(l),e("#ctc_new_rule_menu").val(""),v(ctcAjax.sel_val[H].value)&&(ctcAjax.sel_val[H].value={}),ctcAjax.sel_val[H].value[c.item.label]={child:""},l.find('input[type="text"]').each(function(t,c){e(c).hasClass("color-picker")&&S(c),e(c).focus()}),!1},focus:function(e){e.preventDefault()}})}function T(){if(e("#ctc_theme_child").length&&e("#ctc_child_type_existing").is(":checked")){var t=e("#ctc_theme_child").val();!1===v(t)&&(e("#ctc_child_name").val(ctcAjax.themes.child[t].Name),e("#ctc_child_author").val(ctcAjax.themes.child[t].Author),e("#ctc_child_version").val(ctcAjax.themes.child[t].Version))}}function $(t){var c="";!1===v(t)&&e.each(t,function(t,a){c+='<div class="'+t+'"><ul>'+J,e(a).each(function(e,t){c+="<li>"+t.toString()+"</li>"+J}),c+="</ul></div>"}),e("#ctc_error_notice").html(c)}function M(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}function I(t){!1===v(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))}function z(t){Y=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(" "),e("#ctc_sel_ovrd_rule_inputs").html(""),x()}function E(t){e("#ctc_sel_ovrd_selector").val(""),1!=Z.sel_val&&(Z.sel_val=0),H=t,Z.new_sel=1,g(t)}function L(t,c){e("#ctc_rule_menu").val(""),e("#ctc_rule_menu_selected").text(c),1!=Z.rule_val&&(Z.rule_val=0),b(t),e(".ctc-rewrite-toggle").text(ctcAjax.rename_txt),e("#ctc_rule_value_inputs, #ctc_input_row_rule_header").show()}function N(t){var c=e(t).attr("id").match(/_(\d+)$/)[1];i("#query_selector_options"),Z.sel_val=0,Z.set_sel=Z.set_qry=1,H=c,g(c)}function O(){var t,c=e("#ctc_theme_parnt").val(),a=ctcAjax.theme_uri.replace(/^https?:\/\//,""),l=ctcAjax.homeurl.replace(/^https?/,ctcAjax.ssl?"https":"http"),n=l+"?preview=1&p=x&template="+c+"&stylesheet="+c,r=new RegExp("<link rel=[\"']stylesheet[\"'][^>]+?"+a+"/"+c+"/(.+?\\.css)[^>]+?>","g");v(c)||(c!=ctcAjax.parnt?e.get(n,function(c){for(;(t=r.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)})}))}function P(t,c,a,l){var n={ctc_query_obj:t,ctc_query_key:c},r="#ctc_status_"+t+("val_qry"==t?"_"+c:"");return"object"==typeof l&&e.each(l,function(e,t){n["ctc_query_"+e]=t}),e(".query-icon").remove(),e(r).append('<span class="ctc-status-icon spinner query-icon"></span>'),e(".spinner").show(),n.action=!1===v(e("#ctc_action").val())&&"plugin"==e("#ctc_action").val()?"ctc_plgqry":"ctc_query",n._wpnonce=e("#_wpnonce").val(),e.post(ctcAjax.ajaxurl,n,function(l){Z[t]=2,v(l)?(e(".query-icon").addClass("failure"),"preview"==t&&(ctcAjax.previewResponse=ctcAjax.css_fail_txt,a(c))):(e(".ctc-status-icon").addClass("success"),1==Z.refresh&&(Z.refresh=0,Q()),V(l),l=null,k(),"function"==typeof a&&a(c))},"json").fail(function(){e(".query-icon").removeClass("spinner"),e(".query-icon").addClass("failure"),"preview"==t?(ctcAjax.previewResponse=ctcAjax.css_fail_txt,Z[t]=2,a(c)):Z[t]=0}),!1}function U(t,c){var a,l,n,r,i={},s=e(t).attr("id");return e(t).prop("disabled",!0),e(".save-icon").remove(),e(t).parent(".ctc-textarea-button-cell, .ctc-button-cell").append('<span class="ctc-status-icon spinner save-icon"></span>'),s.match(/ctc_configtype/)?(e(t).parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner save-icon"></span>'),i.ctc_configtype=e(t).val()):(a=e("#ctc_new_selectors"))&&"ctc_save_new_selectors"==e(t).attr("id")?(i.ctc_new_selectors=a.val(),(l=e("#ctc_sel_ovrd_query_selected"))&&(i.ctc_sel_ovrd_query=l.text())):(n=e("#ctc_child_imports"))&&"ctc_save_imports"==e(t).attr("id")?i.ctc_child_imports=n.val():i=_(t),e(".save-icon").show(),e("#ctc_sel_ovrd_selector_selected").find("#ctc_rewrite_selector").each(function(){r=e("#ctc_rewrite_selector").val(),origsel=e("#ctc_rewrite_selector_orig").val(),v(r)||!r.toString().match(/\w/)?r=origsel:i.ctc_rewrite_selector=r,e(".ctc-rewrite-toggle").text(ctcAjax.rename_txt),e("#ctc_sel_ovrd_selector_selected").html(r)}),i.action=!1===v(e("#ctc_action").val())&&"plugin"==e("#ctc_action").val()?"ctc_plugin":"ctc_update",i._wpnonce=e("#_wpnonce").val(),e.post(ctcAjax.ajaxurl,i,function(a){return e(t).prop("disabled",!1),e(".save-icon").removeClass("spinner"),v(a)?e(".save-icon").addClass("failure"):(e("#ctc_new_selectors").val(""),1==Z.refresh&&(Z.refresh=0,Q()),V(a),a=null,v(B)?H&&(w(H),k()):(E(B,G),B=G=null),e(".save-icon").addClass("success"),"function"==typeof c&&c()),!1},"json").fail(function(){e(t).prop("disabled",!1),e(".save-icon").removeClass("spinner"),e(".save-icon").addClass("failure")}),!1}function V(t){e(t).each(function(){switch(this.obj){case"imports":ctcAjax.imports=this.data;break;case"rule_val":ctcAjax.rule_val[this.key]=this.data;break;case"val_qry":ctcAjax.val_qry[this.key]=this.data;break;case"rule":ctcAjax.rule=this.data;break;case"sel_ndx":v(this.key)?ctcAjax.sel_ndx=this.data:"qsid"==this.key?(v(ctcAjax.sel_ndx[this.data.query])&&(ctcAjax.sel_ndx[this.data.query]={}),ctcAjax.sel_ndx[this.data.query][this.data.selector]=this.data.qsid):(ctcAjax.sel_ndx[this.key]=this.data,Y=this.key);break;case"sel_val":ctcAjax.sel_val[this.key]=this.data,H=this.key;break;case"rewrite":H=this.key,B=this.key,G=this.data;break;case"recent":ctcAjax.recent=this.data;break;case"stylesheets":e("#ctc_stylesheet_files").html(this.data);break;case"backups":e("#ctc_backup_files").html(this.data);break;case"addl_css":ctcAjax.addl_css=this.data;break;case"preview":case"all_styles":ctcAjax.previewResponse=this.data}}),t=null}function Q(){Y="base",H=null,et=[],tt=[],ct=[],Z.rld_rule=1,Z.rld_sel=1,Z.set_qry=1,ctcAjax.imports=[],ctcAjax.recent={},ctcAjax.rule={},ctcAjax.sel_ndx={},ctcAjax.val_qry={},ctcAjax.rule_val={},ctcAjax.sel_val={},p()}var B,G,H,J="\n",K=new RegExp('"',"g"),W="",X="",Y="base",Z={rule:0,sel_ndx:0,val_qry:0,rule_val:0,sel_val:0,preview:0,recent:0,rld_rule:0,rld_sel:0,set_qry:0,set_sel:0,new_sel:0,refresh:0},et=[],tt=[],ct=[];r(),T(),e("#ctc_theme_parnt").is("input")||(e.widget("ctc.themeMenu",e.ui.selectmenu,{_renderItem:function(t,c){var a=e("<li>");return e("#ctc_theme_option_"+c.value).detach().appendTo(a),a.appendTo(t)}}),e("#ctc_theme_parnt").themeMenu({select:function(e,t){M(t.item)}}),v(ctcAjax.themes.child)?(e("#ctc_child_name").val(X),e("#ctc_child_template").val(W)):e("#ctc_theme_child").themeMenu({select:function(e,t){I(t.item)}})),e("#ctc_main").on("focus",".color-picker",function(){$(""),e(".color-picker").not(this).iris("hide"),e(this).iris("toggle"),e(".iris-picker").css({position:"absolute","z-index":10})}),e("#ctc_main").on("change",".ctc-child-value, input[type=checkbox]",function(){_(this)}),e("#ctc_main").on("click",".ctc-selector-handle",function(t){t.preventDefault(),$("");var c=e(this).attr("id").toString().replace("_close",""),a=c.toString().match(/_(\d+)$/)[1];e("#"+c+"_container").is(":hidden")&&(1!=Z.val_qry&&(Z.val_qry=0),q(a)),e("#"+c+"_container").fadeToggle("fast"),e(".ctc-selector-container").not("#"+c+"_container").fadeOut("fast")}),e("#ctc_main").on("click",".nav-tab",function(t){t.preventDefault(),$(""),e(".ctc-status-icon").remove();var c="#"+e(this).attr("id");i(c)}),e("#ctc_main").on("click",".ctc-save-input",function(){U(this,p)}),e("#ctc_main").on("click",".ctc-selector-edit",function(){N(this)}),e("#ctc_main").on("click",".ctc-rewrite-toggle",function(e){e.preventDefault(),s(this)}),e("#ctc_main").on("click",".ctc-section-toggle",function(){e(this).toggleClass("open");var t=e(this).attr("id")+"_content";e("#"+t).slideToggle("fast")}),e("#ctc_main").on("click","#ctc_copy_selector",function(){var t=e("#ctc_sel_ovrd_selector_selected").text().trim();!1===v(t)&&e("#ctc_new_selectors").val(e("#ctc_new_selectors").val()+"\n"+t+" {\n\n}")}),e("#ctc_configtype").on("change",function(){var t=e(this).val();v(t)||"theme"==t?(e(".ctc-theme-only, .ctc-themeonly-container").removeClass("ctc-disabled"),e(".ctc-theme-only, .ctc-themeonly-container input").prop("disabled",!1),e("#ctc_theme_parnt, #ctc_theme_child").themeMenu("enable")):(e(".ctc-theme-only, .ctc-themeonly-container").addClass("ctc-disabled"),e(".ctc-theme-only, .ctc-themeonly-container input").prop("disabled",!0),e("#ctc_theme_parnt, #ctc_theme_child").themeMenu("disable"))}),e("#view_child_options, #view_parnt_options").on("click",function(){A(e(this).attr("id"))}),e("#ctc_load_form").on("submit",function(){return n()&&confirm(ctcAjax.load_txt)}),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()}),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(X),e("#ctc_child_template").val(W)}),e("#recent_edits").on("click",function(t){return t.preventDefault(),e(".wrap").css({overflow:"hidden"}),e(".ctc-recent-container").is(":visible")?(e(this).removeClass("open"),e(".ctc-recent-container").stop().animate({right:-200},function(){e(this).hide()}),e(".ctc-option-panel").css({width:"95%"})):(e(this).addClass("open"),e(".ctc-recent-container").stop().css({right:-200}).show().animate({right:0}),e(".ctc-option-panel").css({width:"80%"})),e(".wrap").css({overflow:"inherit"}),!1}),e(".ctc-live-preview").on("click",function(t){return t.stopImmediatePropagation(),t.preventDefault(),document.location=e(this).prop("href"),!1}),p(),z(Y),O(),k(),e("input[type=submit], input[type=button]").prop("disabled",!1),setTimeout(o,15e3)});
|
1 |
+
jQuery(document).ready(function(e){function t(e){return h(e)?e:e.toString().replace(X,""")}function c(e){var t=parseInt(e),c=String.fromCharCode(t);return c}function a(e){var t=e.charCodeAt(0);return t}function n(t,c){var a=!1;return e.each(ctcAjax.themes,function(n,l){return e.each(l,function(e){return e!=t||"parnt"!=n&&"new"!=c?void 0:(a=!0,!1)}),a?!1:void 0}),a}function l(){var t=/[^\w\-]/,c=e("#ctc_child_template").length?e("#ctc_child_template").val().toString().replace(t).toLowerCase():"",a=e("#ctc_theme_child").length?e("#ctc_theme_child").val().toString().replace(t).toLowerCase():c,l=e("input[name=ctc_child_type]:checked").val(),r=[];return"new"==l&&(a=c),n(a,l)&&r.push(ctcAjax.theme_exists_txt.toString().replace(/%s/,a)),""===a&&r.push(ctcAjax.inval_theme_txt),""===e("#ctc_child_name").val()&&r.push(ctcAjax.inval_name_txt),r.length?(F({error:r}),!1):!0}function r(){if(e("#ctc_theme_parnt").length){for(var t=e("#ctc_theme_parnt").val(),c=slugbase=t+"-child",a=ctcAjax.themes.parnt[t].Name+" Child",l="",r="",i="00";n(c,"new");)l=""==l?2:l+1,r=i.substring(0,i.length-l.toString().length)+l.toString(),c=slugbase+r;Y=c,Z=a+(r.length?" "+r:"")}}function i(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")}function s(c){var a;e("#ctc_rewrite_selector").length?(a=e("#ctc_rewrite_selector_orig").val(),e("#ctc_sel_ovrd_selector_selected").text(a),e(c).text(ctcAjax.rename_txt)):(a=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="'+t(a)+'"/>'),e("#ctc_rewrite_selector").val(a),e(c).text(ctcAjax.cancel_txt))}function o(){e(".updated, .error").slideUp("slow",function(){e(".updated").remove()})}function _(t){var c=/^(ctc_(ovrd|\d+)_(parent|child)_([0-9a-z\-]+)_(\d+))(_\w+)?$/,a=e(t).parents(".ctc-selector-row, .ctc-parent-row").first(),n=a.find(".ctc-swatch").first(),l={parent:{},child:{}},r={parent:{origin:"",start:"",end:""},child:{origin:"",start:"",end:""}},i={child:!1,parent:!1},s={};return a.find(".ctc-parent-value, .ctc-child-value").each(function(){var a,n,o=e(this).attr("id"),_=o.toString().match(c),u=_[2],p=_[3],v="undefined"==typeof _[4]?"":_[4],f=_[5],m="undefined"==typeof _[6]?"":_[6],x="parent"==p?e(this).text().replace(/!$/,""):e(this).val(),g="ctc_"+u+"_child_"+v+"_i_"+f;if(!1===h(e(this).data("color"))&&(x=e(this).data("color"),e(this).data("color",null)),"child"==p&&(s[o]=x,s[g]=e("#"+g).is(":checked")?1:0),""!=x)if(!1===h(m))switch(m){case"_border_width":l[p][v+"-width"]="none"==x?0:x;break;case"_border_style":l[p][v+"-style"]=x;break;case"_border_color":l[p][v+"-color"]=x;break;case"_background_url":l[p]["background-image"]=d(p,x);break;case"_background_color":l[p]["background-color"]=t.value;break;case"_background_color1":r[p].start=x,i[p]=!0;break;case"_background_color2":r[p].end=x,i[p]=!0;break;case"_background_origin":r[p].origin=x,i[p]=!0}else(a=v.toString().match(/^border(\-(top|right|bottom|left))?$/)&&!x.match(/none/))?(n=x.toString().split(/ +/),l[p][v+"-width"]="undefined"==typeof n[0]?"":n[0],l[p][v+"-style"]="undefined"==typeof n[1]?"":n[1],l[p][v+"-color"]="undefined"==typeof n[2]?"":n[2]):"background-image"!=v||x.match(/none/)?"seq"!=v&&(l[p][v]=x):x.toString().match(/url\(/)?l[p]["background-image"]=d(p,x):(n=x.toString().split(/ +/),n.length>2?(r[p].origin="undefined"==typeof n[0]?"top":n[0],r[p].start="undefined"==typeof n[1]?"transparent":n[1],r[p].end="undefined"==typeof n[2]?"transparent":n[2],i[p]=!0):l[p]["background-image"]=x)}),"undefined"!=typeof n&&!1===h(n.attr("id"))&&(n.removeAttr("style"),i.parent&&n.ctcgrad(r.parent.origin,[r.parent.start,r.parent.end]),n.css(l.parent),n.attr("id").toString().match(/parent/)||(i.child&&n.ctcgrad(r.child.origin,[r.child.start,r.child.end]),n.css(l.child)),n.css({"z-index":-1})),s}function u(e,t){t="undefined"==typeof t?"":t;var c={orig:t};if(e.toString().match(/^border(\-(top|right|bottom|left))?$/)){var a=t.toString().split(/ +/);c.names=["_border_width","_border_style","_border_color"],c.values=["undefined"==typeof a[0]?"":a[0],"undefined"==typeof a[1]?"":a[1],"undefined"==typeof a[2]?"":a[2]]}else if(e.toString().match(/^background\-image/))if(c.names=["_background_url","_background_origin","_background_color1","_background_color2"],c.values=["","","",""],!1!==h(t)||t.toString().match(/(url|none)/))c.values[0]=t;else{var a=t.toString().split(/:/);c.values[1]="undefined"==typeof a[0]?"":a[0],c.values[2]="undefined"==typeof a[1]?"":a[1],c.values[3]="undefined"==typeof a[3]?"":a[3],c.orig=[c.values[1],c.values[2],c.values[3]].join(" ")}else c.names=[""],c.values=[t];return c}function d(e,t){var c,a=t.toString().match(/url\(['" ]*(.+?)['" ]*\)/),n=h(a)?null:a[1],l=ctcAjax.theme_uri+"/"+("parent"==e?ctcAjax.parnt:ctcAjax.child)+"/";return n?c=n.toString().match(/^(data:|https?:|\/)/)?t:"url("+l+n+")":!1}function h(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}function p(e){if("object"==typeof ctcAjax.sel_val[e]&&"object"==typeof ctcAjax.sel_val[e].value)for(var t in ctcAjax.sel_val[e].value)if(ctcAjax.sel_val[e].value.hasOwnProperty(t)&&(!1===h(ctcAjax.sel_val[e].value[t].child)||!1===h(ctcAjax.sel_val[e].value[t].parnt)))return e;return delete ctcAjax.sel_val[e],!1}function v(){tt.rld_rule=1,tt.rld_sel=1,f(),x()}function f(){if(1!==tt.sel_ndx){if(0===tt.sel_ndx||1==tt.rld_sel)return tt.sel_ndx=1,tt.rld_sel=0,void L("sel_ndx",null,f);at=[],!1===h(ctcAjax.sel_ndx)&&e.each(ctcAjax.sel_ndx,function(e){var t={label:e,value:e};at.push(t)}),C(),m()}}function m(){if(1!==tt.sel_ndx){if(0===tt.sel_ndx)return tt.sel_ndx=1,void L("sel_ndx",et,m);ct=[],!1===h(ctcAjax.sel_ndx)&&e.each(ctcAjax.sel_ndx[et],function(e,t){var c={label:e,value:t};ct.push(c)}),M(),tt.set_sel&&(tt.set_sel=0,$(K,null))}}function x(){if(1!==tt.rule){if(0===tt.rule||1==tt.rld_rule)return tt.rule=1,tt.rld_rule=0,void L("rule",null,x);nt=[],!1===h(ctcAjax.rule)&&e.each(ctcAjax.rule,function(e,t){var a={label:t.replace(/\d+/g,c),value:e};nt.push(a)}),nt=nt.sort(function(e,t){return e.label>t.label?1:e.label<t.label?-1:0}),T(),D()}}function g(e){return 1===tt.sel_val?!1:h(ctcAjax.sel_val[e])?(0==tt.sel_val&&(tt.sel_val=1,L("sel_val",e,g)),!1):(K=e,void(1==tt.set_qry?(tt.set_qry=0,P(ctcAjax.sel_val[e].query)):1==tt.new_sel&&(tt.new_sel=0,b(e))))}function y(t,a){var n=[],l=h(ctcAjax.sel_val[K])||h(ctcAjax.sel_val[K].value);h(nt)&&x(),e.each(nt,function(a,r){var i=!1,s=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");if(s.test(r.label)){if(!1===l&&(e.each(ctcAjax.sel_val[K].value,function(e){return r.label==e.replace(/\d+/g,c)?(i=!0,!1):void 0}),i))return;n.push(r)}}),a(n)}function j(a,n,l){var r="",i=h(ctcAjax.sel_val[a])||h(ctcAjax.sel_val[a].value)||h(ctcAjax.sel_val[a].value[n])?"":ctcAjax.sel_val[a].value[n],s=u(n,"undefined"==typeof i?"":i.parnt),o=!1===h(i.i_parnt)&&1==i.i_parnt?ctcAjax.important_label:"",_=u(n,"undefined"==typeof i?"":i.child),d=!1===h(i.i_child)&&1==i.i_child?1:0,p="ctc_"+l+"_child_"+n+"_i_"+a;return!1===h(ctcAjax.sel_val[a])&&(r+='<div class="ctc-'+("ovrd"==l?"input":"selector")+'-row clearfix">'+W,r+='<div class="ctc-input-cell">'+("ovrd"==l?n.replace(/\d+/g,c):ctcAjax.sel_val[a].selector+'<br/><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+a+'" >'+ctcAjax.edit_txt+"</a> "+(h(s.orig)?ctcAjax.child_only_txt:""))+"</div>"+W,"ovrd"==l&&(r+='<div class="ctc-parent-value ctc-input-cell" id="ctc_'+l+"_parent_"+n+"_"+a+'">'+(h(s.orig)?"[no value]":s.orig+o)+"</div>"+W),r+='<div class="ctc-input-cell">'+W,!1===h(s.names)&&(e.each(s.names,function(e,c){c=h(c)?"":c,r+='<div class="ctc-child-input-cell">'+W;var i,s="ctc_"+l+"_child_"+n+"_"+a+c;!1===(i=_.values.shift())&&(i=""),r+=(h(c)?"":ctcAjax.field_labels[c]+":<br/>")+'<input type="text" id="'+s+'" name="'+s+'" class="ctc-child-value'+((c+n).toString().match(/color/)?" color-picker":"")+(c.toString().match(/url/)?" ctc-input-wide":"")+'" value="'+t(i)+'" />'+W,r+="</div>"+W}),r+='<label for="'+p+'"><input type="checkbox" id="'+p+'" name="'+p+'" value="1" '+(1===d?"checked":"")+" />"+ctcAjax.important_label+"</label>"+W),r+="</div>"+W,r+="ovrd"==l?"":'<div class="ctc-swatch ctc-specific" id="ctc_child_'+n+"_"+a+'_swatch">'+ctcAjax.swatch_txt+"</div>"+W+'<div class="ctc-child-input-cell ctc-button-cell" id="ctc_save_'+n+"_"+a+'_cell">'+W+'<input type="button" class="button ctc-save-input" id="ctc_save_'+n+"_"+a+'" name="ctc_save_'+n+"_"+a+'" value="Save" /></div>'+W,r+="</div><!-- end input row -->"+W),r}function b(t){var c,a,n;(t=p(t))?(e("#ctc_sel_ovrd_qsid").val(t),K=t,h(ctcAjax.sel_val[t].seq)?e("#ctc_child_load_order_container").html(""):(c="ctc_ovrd_child_seq_"+t,n=parseInt(ctcAjax.sel_val[t].seq),a='<input type="text" id="'+c+'" name="'+c+'" class="ctc-child-value" value="'+n+'" />',e("#ctc_child_load_order_container").html(a)),h(ctcAjax.sel_val[t].value)?e("#ctc_sel_ovrd_rule_inputs").slideUp(function(){e("#ctc_sel_ovrd_rule_inputs").html("")}):(a="",e.each(ctcAjax.sel_val[t].value,function(e){a+=j(t,e,"ovrd")}),e("#ctc_sel_ovrd_rule_inputs").html(a).find(".color-picker").each(function(){S(this)}),_("#ctc_child_all_0_swatch"),lt.length?G():(e("#ctc_sel_ovrd_selector_selected").text(ctcAjax.sel_val[t].selector),e(".ctc-rewrite-toggle").text(ctcAjax.rename_txt),e("#ctc_sel_ovrd_new_rule, #ctc_sel_ovrd_rule_header, #ctc_sel_ovrd_rule_inputs_container, #ctc_sel_ovrd_rule_inputs, .ctc-rewrite-toggle").slideDown()))):(e("#ctc_sel_ovrd_selector_selected").html(" "),e("#ctc_sel_ovrd_new_rule, #ctc_sel_ovrd_rule_header, #ctc_sel_ovrd_rule_inputs_container, #ctc_sel_ovrd_rule_inputs, .ctc-rewrite-toggle").slideUp(function(){e("#ctc_sel_ovrd_rule_inputs").html("")})),a=null}function w(t){if(1===tt.preview)return!1;if(0==tt.preview){tt.preview=1;var t;return(t=t.match(/(child|parnt)/)[1])||(t="child"),L("preview",t,w),!1}e("#view_"+t+"_options_panel").text(ctcAjax.previewResponse),ctcAjax.previewResponse=null,tt.preview=0}function A(t){if(1===tt.rule_val)return!1;if(0==tt.rule_val)return tt.rule_val=1,L("rule_val",t,A),!1;var c=ctcAjax.rule[t],a='<div class="ctc-input-row clearfix" id="ctc_rule_row_'+c+'">'+W;!1===h(ctcAjax.rule_val[t])&&(e.each(ctcAjax.rule_val[t],function(e,t){var n=u(c,t);a+='<div class="ctc-parent-row clearfix" id="ctc_rule_row_'+c+"_"+e+'">'+W,a+='<div class="ctc-input-cell ctc-parent-value" id="ctc_'+e+"_parent_"+c+"_"+e+'">'+n.orig+"</div>"+W,a+='<div class="ctc-input-cell">'+W,a+='<div class="ctc-swatch ctc-specific" id="ctc_'+e+"_parent_"+c+"_"+e+'_swatch">'+ctcAjax.swatch_txt+"</div></div>"+W,a+='<div class="ctc-input-cell"><a href="#" class="ctc-selector-handle" id="ctc_selector_'+c+"_"+e+'">'+ctcAjax.selector_txt+"</a></div>"+W,a+='<div id="ctc_selector_'+c+"_"+e+'_container" class="ctc-selector-container">'+W,a+='<a href="#" id="ctc_selector_'+c+"_"+e+'_close" class="ctc-selector-handle ctc-exit" title="'+ctcAjax.close_txt+'"></a>',a+='<div id="ctc_selector_'+c+"_"+e+'_inner_container" class="ctc-selector-inner-container clearfix">'+W,a+='<div id="ctc_status_val_qry_'+e+'"></div>'+W,a+='<div id="ctc_selector_'+c+"_"+e+'_rows"></div>'+W,a+="</div></div></div>"+W}),a+="</div>"+W),e("#ctc_rule_value_inputs").html(a).find(".ctc-swatch").each(function(){_(this)}),a=null}function k(){var t="";if(h(ctcAjax.recent)&&!1===h(ctcAjax.recent_txt))t+=ctcAjax.recent_txt;else{if(h(ctcAjax.recent))return;t+="<ul>\n",e.each(ctcAjax.recent,function(c,a){e.each(a,function(e,c){t+='<li><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+e+'" >'+c+"</a></li>\n"})}),t+="</ul>\n"}e("#ctc_recent_selectors").html(t),t=null}function q(t){if(1==tt.val_qry)return!1;var c,n,l=e("#ctc_rule_menu_selected").text().replace(/[^\w\-]/g,a),r="";return 0===tt.val_qry?(tt.val_qry=1,c={rule:l},L("val_qry",t,q,c),!1):(!1===h(ctcAjax.val_qry[t])&&e.each(ctcAjax.val_qry[t],function(c,a){page_rule=c,e.each(a,function(a,n){r+='<h4 class="ctc-query-heading">'+a+"</h4>"+W,!1===h(n)&&e.each(n,function(e,a){ctcAjax.sel_val[e]=a,r+=j(e,c,t)})})}),n="#ctc_selector_"+l+"_"+t+"_rows",e(n).html(r).find(".color-picker").each(function(){S(this)}),e(n).find(".ctc-swatch").each(function(){_(this)}),void(lt.length&&G()))}function S(t){try{e(t).iris({change:function(c,a){e(t).data("color",a.color.toString()),_(t)}})}catch(c){B(c,"Iris Color Picker")}}function C(){try{e("#ctc_sel_ovrd_query").autocomplete({source:at,minLength:0,selectFirst:!0,autoFocus:!0,select:function(e,t){return P(t.item.value),!1},focus:function(e){e.preventDefault()}})}catch(t){B(t,"Query Menu")}}function M(){try{e("#ctc_sel_ovrd_selector").autocomplete({source:ct,selectFirst:!0,autoFocus:!0,select:function(e,t){return $(t.item.value,t.item.label),!1},focus:function(e){e.preventDefault()}})}catch(t){B(t,"Selector Menu")}}function T(){try{e("#ctc_rule_menu").autocomplete({source:nt,selectFirst:!0,autoFocus:!0,select:function(e,t){return U(t.item.value,t.item.label),!1},focus:function(e){e.preventDefault()}})}catch(t){B(t,"Rule Menu")}}function D(){try{e("#ctc_new_rule_menu").autocomplete({source:y,selectFirst:!0,autoFocus:!0,select:function(t,c){t.preventDefault();var n=e(j(K,c.item.label.replace(/[^\w\-]/g,a),"ovrd"));return e("#ctc_sel_ovrd_rule_inputs").append(n),e("#ctc_new_rule_menu").val(""),h(ctcAjax.sel_val[K].value)&&(ctcAjax.sel_val[K].value={}),ctcAjax.sel_val[K].value[c.item.label]={child:""},n.find('input[type="text"]').each(function(t,c){e(c).hasClass("color-picker")&&S(c),e(c).focus()}),lt.length&&G(),!1},focus:function(e){e.preventDefault()}})}catch(t){B(t,"New Rule Menu")}}function R(){if(e("#ctc_theme_child").length&&e("#ctc_child_type_existing").is(":checked")){var t=e("#ctc_theme_child").val();!1===h(t)&&(e("#ctc_child_name").val(ctcAjax.themes.child[t].Name),e("#ctc_child_author").val(ctcAjax.themes.child[t].Author),e("#ctc_child_version").val(ctcAjax.themes.child[t].Version))}}function F(t){var c="";!1===h(t)&&e.each(t,function(t,a){c+='<div class="'+t+'"><ul>'+W,e(a).each(function(e,t){c+="<li>"+t.toString()+"</li>"+W}),c+="</ul></div>"}),e("#ctc_error_notice").html(c),e("html, body").animate({scrollTop:0},"slow")}function N(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}function I(t){!1===h(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))}function P(t){et=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(" "),e("#ctc_sel_ovrd_rule_inputs").html(""),m()}function $(t){e("#ctc_sel_ovrd_selector").val(""),1!=tt.sel_val&&(tt.sel_val=0),K=t,tt.new_sel=1,g(t)}function U(t,c){e("#ctc_rule_menu").val(""),e("#ctc_rule_menu_selected").text(c),1!=tt.rule_val&&(tt.rule_val=0),A(t),e(".ctc-rewrite-toggle").text(ctcAjax.rename_txt),e("#ctc_rule_value_inputs, #ctc_input_row_rule_header").show()}function z(t){var c=e(t).attr("id").match(/_(\d+)$/)[1];i("#query_selector_options"),tt.sel_val=0,tt.set_sel=tt.set_qry=1,K=c,g(c)}function E(){var t,c=e("#ctc_theme_parnt").val(),a=ctcAjax.theme_uri.replace(/^https?:\/\//,""),n=ctcAjax.homeurl.replace(/^https?/,ctcAjax.ssl?"https":"http"),l=n+"?preview=1&p=x&template="+c+"&stylesheet="+c,r=new RegExp("<link rel=[\"']stylesheet[\"'][^>]+?"+a+"/"+c+"/(.+?\\.css)[^>]+?>","g");h(c)||(c!=ctcAjax.parnt?e.get(l,function(c){for(;(t=r.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)})}))}function L(t,c,a,n){var l={ctc_query_obj:t,ctc_query_key:c},r="#ctc_status_"+t+("val_qry"==t?"_"+c:"");return"object"==typeof n&&e.each(n,function(e,t){l["ctc_query_"+e]=t}),e(".query-icon").remove(),e(r).append('<span class="ctc-status-icon spinner query-icon"></span>'),e(".spinner").show(),l.action=!1===h(e("#ctc_action").val())&&"plugin"==e("#ctc_action").val()?"ctc_plgqry":"ctc_query",l._wpnonce=e("#_wpnonce").val(),e.post(ctcAjax.ajaxurl,l,function(n){tt[t]=2,h(n)?(e(".query-icon").addClass("failure"),"preview"==t&&(ctcAjax.previewResponse=ctcAjax.css_fail_txt,a(c))):(e(".ctc-status-icon").addClass("success"),1==tt.refresh&&(tt.refresh=0,V()),Q(n),n=null,k(),"function"==typeof a&&a(c))},"json").fail(function(){e(".query-icon").removeClass("spinner"),e(".query-icon").addClass("failure"),"preview"==t?(ctcAjax.previewResponse=ctcAjax.css_fail_txt,tt[t]=2,a(c)):tt[t]=0}),!1}function O(t,c){var a,n,l,r,i={},s=e(t).attr("id");return e(t).prop("disabled",!0),e(".save-icon").remove(),e(t).parent(".ctc-textarea-button-cell, .ctc-button-cell").append('<span class="ctc-status-icon spinner save-icon"></span>'),s.match(/ctc_configtype/)?(e(t).parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner save-icon"></span>'),i.ctc_configtype=e(t).val()):(a=e("#ctc_new_selectors"))&&"ctc_save_new_selectors"==e(t).attr("id")?(i.ctc_new_selectors=a.val(),(n=e("#ctc_sel_ovrd_query_selected"))&&(i.ctc_sel_ovrd_query=n.text())):(l=e("#ctc_child_imports"))&&"ctc_save_imports"==e(t).attr("id")?i.ctc_child_imports=l.val():"ctc_is_debug"==e(t).attr("id")?i.ctc_is_debug=e("#ctc_is_debug").is(":checked")?1:0:i=_(t),e(".save-icon").show(),e("#ctc_sel_ovrd_selector_selected").find("#ctc_rewrite_selector").each(function(){r=e("#ctc_rewrite_selector").val(),origsel=e("#ctc_rewrite_selector_orig").val(),h(r)||!r.toString().match(/\w/)?r=origsel:i.ctc_rewrite_selector=r,e(".ctc-rewrite-toggle").text(ctcAjax.rename_txt),e("#ctc_sel_ovrd_selector_selected").html(r)}),i.action=!1===h(e("#ctc_action").val())&&"plugin"==e("#ctc_action").val()?"ctc_plugin":"ctc_update",i._wpnonce=e("#_wpnonce").val(),e.post(ctcAjax.ajaxurl,i,function(a){return e(t).prop("disabled",!1),e(".save-icon").removeClass("spinner"),h(a)?e(".save-icon").addClass("failure"):(e("#ctc_new_selectors").val(""),1==tt.refresh&&(tt.refresh=0,V()),Q(a),a=null,h(H)?K&&(b(K),k()):($(H,J),H=J=null),e(".save-icon").addClass("success"),"function"==typeof c&&c()),!1},"json").fail(function(){e(t).prop("disabled",!1),e(".save-icon").removeClass("spinner"),e(".save-icon").addClass("failure")}),!1}function Q(t){e(t).each(function(){switch(this.obj){case"imports":ctcAjax.imports=this.data;break;case"rule_val":ctcAjax.rule_val[this.key]=this.data;break;case"val_qry":ctcAjax.val_qry[this.key]=this.data;break;case"rule":ctcAjax.rule=this.data;break;case"sel_ndx":h(this.key)?ctcAjax.sel_ndx=this.data:"qsid"==this.key?(h(ctcAjax.sel_ndx[this.data.query])&&(ctcAjax.sel_ndx[this.data.query]={}),ctcAjax.sel_ndx[this.data.query][this.data.selector]=this.data.qsid):(ctcAjax.sel_ndx[this.key]=this.data,et=this.key);break;case"sel_val":ctcAjax.sel_val[this.key]=this.data,K=this.key;break;case"rewrite":K=this.key,H=this.key,J=this.data;break;case"recent":ctcAjax.recent=this.data;break;case"stylesheets":e("#ctc_stylesheet_files").html(this.data);break;case"backups":e("#ctc_backup_files").html(this.data);break;case"addl_css":ctcAjax.addl_css=this.data;break;case"debug":e("#ctc_debug_container").html(this.data);break;case"preview":case"all_styles":ctcAjax.previewResponse=this.data}}),t=null}function V(){et="base",K=null,ct=[],at=[],nt=[],tt.rld_rule=1,tt.rld_sel=1,tt.set_qry=1,ctcAjax.imports=[],ctcAjax.recent={},ctcAjax.rule={},ctcAjax.sel_ndx={},ctcAjax.val_qry={},ctcAjax.rule_val={},ctcAjax.sel_val={},v()}function B(e,t){var c=h(e.lineNumber)?"":" line: "+e.lineNumber,a=h(e.fileName)?"":" "+e.fileName.split(/\?/)[0];lt.push("<code><small>"+t+": "+e.message+a+c+"</small></code>")}function G(){var t=[],c=[];e("input[type=submit], input[type=button]").prop("disabled",!0),e("script").each(function(){var c=e(this).prop("src");!1===h(c)&&c.match(/jquery(\.min|\.js|\-?ui)/i)&&!c.match(/load\-scripts.php/)&&t.push("<code><small>"+c.split(/\?/)[0]+"</small></code>")}),c.push("<strong>"+ctcAjax.js_txt+"</strong>"),1==ctcAjax.is_debug&&c.push(lt.join("<br/>")),t.length&&c.push(ctcAjax.jquery_txt+"<br/>"+t.join("<br/>")),c.push(ctcAjax.plugin_txt+" "+ctcAjax.contact_txt),F({error:c})}var H,J,K,W="\n",X=new RegExp('"',"g"),Y="",Z="",et="base",tt={rule:0,sel_ndx:0,val_qry:0,rule_val:0,sel_val:0,preview:0,recent:0,rld_rule:0,rld_sel:0,set_qry:0,set_sel:0,new_sel:0,refresh:0},ct=[],at=[],nt=[],lt=[];if(r(),R(),!e("#ctc_theme_parnt").is("input")){try{e.widget("ctc.themeMenu",e.ui.selectmenu,{_renderItem:function(t,c){var a=e("<li>");return e("#ctc_theme_option_"+c.value).detach().appendTo(a),a.appendTo(t)}})}catch(rt){B(rt,"Theme Menu")}try{e("#ctc_theme_parnt").themeMenu({select:function(e,t){N(t.item)}})}catch(rt){"function"==typeof themeMenu?e("#ctc_theme_parnt").themeMenu("destroy"):e("#ctc_theme_parnt-button").remove(),B(rt,"Parent Theme Menu")}if(h(ctcAjax.themes.child))e("#ctc_child_name").length&&(e("#ctc_child_name").val(Z),e("#ctc_child_template").val(Y));else try{e("#ctc_theme_child").themeMenu({select:function(e,t){I(t.item)}})}catch(rt){"function"==typeof themeMenu?e("#ctc_theme_child").themeMenu("destroy"):e("#ctc_theme_child-button").remove(),B(rt,"Child Theme Menu")}}e(".nav-tab").on("click",function(t){t.preventDefault(),e(".ctc-status-icon").remove();var c="#"+e(this).attr("id");i(c)}),h(lt)?(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(t){B(t,"Iris Color Picker")}}),e("#ctc_main").on("change",".ctc-child-value, input[type=checkbox]",function(){_(this)}),e("#ctc_main").on("click",".ctc-selector-handle",function(t){t.preventDefault();var c=e(this).attr("id").toString().replace("_close",""),a=c.toString().match(/_(\d+)$/)[1];e("#"+c+"_container").is(":hidden")&&(1!=tt.val_qry&&(tt.val_qry=0),q(a)),e("#"+c+"_container").fadeToggle("fast"),e(".ctc-selector-container").not("#"+c+"_container").fadeOut("fast")}),e("#ctc_main").on("click",".ctc-save-input",function(){O(this,v)}),e("#ctc_main").on("click",".ctc-selector-edit",function(){z(this)}),e("#ctc_main").on("click",".ctc-rewrite-toggle",function(e){e.preventDefault(),s(this)}),e("#ctc_main").on("click",".ctc-section-toggle",function(){e(this).toggleClass("open");var t=e(this).attr("id")+"_content";e("#"+t).slideToggle("fast")}),e("#ctc_main").on("click","#ctc_copy_selector",function(){var t=e("#ctc_sel_ovrd_selector_selected").text().trim();!1===h(t)&&e("#ctc_new_selectors").val(e("#ctc_new_selectors").val()+"\n"+t+" {\n\n}")}),e("#ctc_configtype").on("change",function(){var t=e(this).val();if(h(t)||"theme"==t){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(c){B(c,"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(c){B(c,"Theme Menu")}}}),e("#view_child_options, #view_parnt_options").on("click",function(){w(e(this).attr("id"))}),e("#ctc_load_form").on("submit",function(){return l()}),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(""),R()}),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(Z),e("#ctc_child_template").val(Y)}),e("#recent_edits").on("click",function(t){return t.preventDefault(),e(".ctc-recent-container").is(":visible")?(e(".ctc-recent-container").stop().slideUp(),e(".ctc-option-panel").css({width:"95%"})):(e(".ctc-recent-container").hasClass("moved")||e(".ctc-recent-container").addClass("moved").detach().appendTo("#ctc_option_panel_wrapper"),e(".ctc-recent-container").stop().slideDown(),e(".ctc-option-panel").css({width:"80%"})),!1}),e("#ctc_is_debug").on("change",function(){O(this)}),e(".ctc-live-preview").on("click",function(t){return t.stopImmediatePropagation(),t.preventDefault(),document.location=e(this).prop("href"),!1}),v(),P(et),E(),k(),e("input[type=submit], input[type=button]").prop("disabled",!1),setTimeout(o,15e3)):G()});
|
lang/chld_thm_cfg.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
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 1.6.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/child-theme-configurator\n"
|
7 |
-
"POT-Creation-Date: 2015-01-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,228 +12,241 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#. #-#-#-#-# chld_thm_cfg.pot (Child Theme Configurator 1.6.
|
16 |
#. Plugin Name of the plugin/theme
|
17 |
-
#: child-theme-configurator.php:
|
18 |
#: includes/forms/main.php:23
|
19 |
msgid "Child Theme Configurator"
|
20 |
msgstr ""
|
21 |
|
22 |
-
#: child-theme-configurator.php:
|
23 |
-
#: child-theme-configurator.php:
|
24 |
msgid "Child Themes"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: child-theme-configurator.php:
|
28 |
msgid "Child Theme Configurator requires WordPress version %s or later."
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: includes/class-ctc-ui.php:
|
32 |
msgid "Child Theme files modified successfully."
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: includes/class-ctc-ui.php:
|
36 |
msgid ""
|
37 |
"Child Theme <strong>%s</strong> has been generated successfully.\n"
|
38 |
" "
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/class-ctc-ui.php:
|
42 |
msgid "IMPORTANT:"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: includes/class-ctc-ui.php:
|
46 |
msgid "Go to Themes"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: includes/class-ctc-ui.php:
|
50 |
msgid "Network enable"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: includes/class-ctc-ui.php:
|
54 |
msgid "your child theme."
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: includes/class-ctc-ui.php:
|
58 |
msgid "Live Preview"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: includes/class-ctc-ui.php:
|
62 |
msgid "Test your child theme"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: includes/class-ctc-ui.php:
|
66 |
msgid "before activating."
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: includes/class-ctc.php:
|
70 |
msgid "URL/None"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: includes/class-ctc.php:
|
74 |
msgid "Origin"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: includes/class-ctc.php:
|
78 |
msgid "Color 1"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: includes/class-ctc.php:
|
82 |
msgid "Color 2"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: includes/class-ctc.php:
|
86 |
msgid "Width/None"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: includes/class-ctc.php:
|
90 |
msgid "Style"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: includes/class-ctc.php:
|
94 |
msgid "Color"
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: includes/class-ctc.php:
|
98 |
msgid "Are you sure? This will replace your current settings."
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: includes/class-ctc.php:
|
102 |
#: includes/forms/rule-value.php:29
|
103 |
msgid "Sample"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: includes/class-ctc.php:
|
107 |
msgid "<span style=\"font-size:10px\">!</span>"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: includes/class-ctc.php:
|
111 |
msgid "Selectors"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: includes/class-ctc.php:
|
115 |
msgid "Close"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: includes/class-ctc.php:
|
119 |
msgid "Edit"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: includes/class-ctc.php:
|
123 |
msgid "Cancel"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: includes/class-ctc.php:
|
127 |
msgid "Rename"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: includes/class-ctc.php:
|
131 |
msgid "The stylesheet cannot be displayed."
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: includes/class-ctc.php:
|
135 |
msgid "(Child Only)"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: includes/class-ctc.php:
|
139 |
msgid "Please enter a valid Child Theme."
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: includes/class-ctc.php:
|
143 |
msgid "Please enter a valid Child Theme name."
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: includes/class-ctc.php:
|
147 |
msgid "<strong>%s</strong> exists. Please enter a different Child Theme"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: includes/class-ctc.php:
|
151 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: includes/class-ctc.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
msgid "Zip file creation failed."
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: includes/class-ctc.php:
|
159 |
msgid "The Functions file is required and cannot be deleted."
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: includes/class-ctc.php:
|
163 |
msgid "You do not have permission to configure child themes."
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: includes/class-ctc.php:
|
167 |
msgid "%s does not exist. Please select a valid Parent Theme."
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: includes/class-ctc.php:
|
171 |
msgid "Please select a valid Parent Theme."
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: includes/class-ctc.php:
|
175 |
msgid "Please enter a valid Child Theme directory."
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: includes/class-ctc.php:
|
179 |
msgid "Your theme directories are not writable."
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: includes/class-ctc.php:
|
183 |
msgid "Please enter a valid Child Theme template name."
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: includes/class-ctc.php:
|
187 |
msgid ""
|
188 |
"<strong>%s</strong> exists. Please enter a different Child Theme template "
|
189 |
"name."
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: includes/class-ctc.php:
|
193 |
msgid "Your stylesheet is not writable."
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: includes/class-ctc.php:
|
197 |
msgid "Could not copy file."
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: includes/class-ctc.php:
|
201 |
msgid "Could not set write permissions."
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: includes/class-ctc.php:
|
205 |
msgid "There were errors while resetting permissions."
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: includes/class-ctc.php:
|
209 |
msgid "Could not upload file."
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: includes/class-ctc.php:
|
213 |
msgid ""
|
214 |
"Child Theme Configurator is unable to write to the stylesheet. This can be "
|
215 |
"resolved using one of the following options:<ol>"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: includes/class-ctc.php:
|
219 |
msgid ""
|
220 |
"<li>Temporarily make the stylesheet writable by clicking the button below. "
|
221 |
"You should change this back when you are finished editing for security by "
|
222 |
"clicking \"Make read-only\" under the \"Files\" tab.</li>"
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: includes/class-ctc.php:
|
226 |
msgid "Temporarily make stylesheet writable"
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: includes/class-ctc.php:
|
230 |
msgid ""
|
231 |
"<li><a target=\"_blank\" href=\"http://codex.wordpress.org/Editing_wp-"
|
232 |
"config.php#WordPress_Upgrade_Constants\" title=\"Editin wp-config.php\">Add "
|
233 |
"your FTP/SSH credentials to the WordPress config file</a>.</li>"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: includes/class-ctc.php:
|
237 |
msgid ""
|
238 |
"<li><a target=\"_blank\" href=\"http://technet.microsoft.com/en-us/library/"
|
239 |
"cc771170\" title=\"Setting Application Pool Identity\">Assign WordPress to "
|
@@ -241,7 +254,7 @@ msgid ""
|
|
241 |
"li>"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: includes/class-ctc.php:
|
245 |
msgid ""
|
246 |
"<li><a target=\"_blank\" href=\"http://codex.wordpress.org/"
|
247 |
"Changing_File_Permissions\" title=\"Changing File Permissions\">Set the "
|
@@ -249,11 +262,11 @@ msgid ""
|
|
249 |
"li>"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: includes/class-ctc.php:
|
253 |
msgid "<li>Run PHP under Apache with suEXEC (contact your web host).</li>"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: includes/class-ctc.php:
|
257 |
msgid ""
|
258 |
"This Child Theme is not owned by your website account. It may have been "
|
259 |
"created by a prior version of this plugin or by another program. Moving "
|
@@ -262,18 +275,25 @@ msgid ""
|
|
262 |
"below."
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: includes/class-ctc.php:
|
266 |
msgid "Correct Child Theme Permissions"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: includes/class-ctc.php:
|
270 |
msgid ""
|
271 |
"Child Theme Configurator needs to update its interal data. Please set your "
|
272 |
"preferences below and click \"Generate Child Theme Files\" to update your "
|
273 |
"configuration."
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: includes/class-ctc.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
msgid ""
|
278 |
"Child Theme Configurator did not detect any configuration data, either "
|
279 |
"because this is the first time it has been used, or because a previously "
|
@@ -293,99 +313,120 @@ msgid ""
|
|
293 |
"only the additional stylesheets you wish to customize."
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: includes/forms/addl_panels.php:
|
297 |
-
msgid "Reload"
|
298 |
-
msgstr ""
|
299 |
-
|
300 |
-
#: includes/forms/addl_panels.php:11 includes/help/help_en_US.php:211
|
301 |
msgid "Learn more about CTC Pro"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: includes/forms/addl_panels.php:
|
305 |
msgid "Customizing WordPress Themes just got even easier."
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: includes/forms/addl_panels.php:
|
309 |
msgid ""
|
310 |
"Thousands of users have already seen the benefits of using Child Theme "
|
311 |
"Configurator. If you spend any amount of time customizing WordPress, CTC Pro "
|
312 |
"will help maximize your productivity."
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: includes/forms/addl_panels.php:
|
316 |
msgid "Designed by Developers Who Use It Every Day."
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: includes/forms/addl_panels.php:
|
320 |
msgid ""
|
321 |
"We've packed in more features to make design work quicker and easier with "
|
322 |
-
"<strong>Child Theme Configurator Pro
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: includes/forms/addl_panels.php:
|
326 |
msgid "Custom Plugin Stylesheets"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: includes/forms/addl_panels.php:
|
330 |
msgid ""
|
331 |
-
"
|
332 |
-
"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: includes/forms/addl_panels.php:
|
336 |
msgid "Links to all styles in a single view"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: includes/forms/addl_panels.php:
|
340 |
msgid ""
|
341 |
"Use the \"All Styles\" panel to find the selector you wish to edit from a "
|
342 |
"single combined list."
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: includes/forms/addl_panels.php:
|
346 |
msgid "Most recent edits"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: includes/forms/addl_panels.php:
|
350 |
msgid "Return to recently edited selectors from a toggleable sidebar."
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: includes/forms/addl_panels.php:
|
354 |
msgid "Free Upgrades"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: includes/forms/addl_panels.php:
|
358 |
msgid ""
|
359 |
"Your Update Key gives you access to new Pro features as soon as they are "
|
360 |
"released."
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: includes/forms/addl_panels.php:
|
364 |
msgid "Top-rated Online Support"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: includes/forms/addl_panels.php:
|
368 |
msgid "Online Documentation"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: includes/forms/addl_panels.php:
|
372 |
msgid "Tutorial Videos"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: includes/forms/addl_panels.php:
|
376 |
-
msgid ""
|
377 |
-
"For a limited time we are offering Child Theme Configurator Pro for a "
|
378 |
-
"special introductory price."
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: includes/forms/addl_panels.php:
|
382 |
msgid "Buy CTC Pro"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: includes/forms/addl_panels.php:
|
386 |
msgid "Buy Now - Only $12.95 USD"
|
387 |
msgstr ""
|
388 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
#: includes/forms/addl_tabs.php:8
|
390 |
msgid "Get CTC Pro"
|
391 |
msgstr ""
|
@@ -406,56 +447,56 @@ msgstr ""
|
|
406 |
msgid "Restore backup from"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: includes/forms/fileform.php:
|
410 |
msgid ""
|
411 |
"The Theme editor has been disabled. Template files must be edited offline."
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: includes/forms/fileform.php:
|
415 |
msgid "Click here to edit template files using the Theme Editor"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: includes/forms/fileform.php:
|
419 |
msgid "Parent Templates"
|
420 |
msgstr ""
|
421 |
|
422 |
-
#: includes/forms/fileform.php:
|
423 |
msgid "Child Theme Files"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: includes/forms/fileform.php:
|
427 |
msgid "Copy PHP template files from the parent theme by selecting them here."
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: includes/forms/fileform.php:
|
431 |
msgid ""
|
432 |
"CAUTION: If your child theme is active, the child theme version of the file "
|
433 |
"will be used instead of the parent immediately after it is copied."
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: includes/forms/fileform.php:
|
437 |
msgid "The %s file is generated separately and cannot be copied here."
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: includes/forms/fileform.php:
|
441 |
msgid "Delete child theme templates by selecting them here."
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: includes/forms/fileform.php:
|
445 |
msgid ""
|
446 |
"Delete child theme templates or make them writable by selecting them here. "
|
447 |
"Writable files are displayed in <span style=\"color:red\">red</span>."
|
448 |
msgstr ""
|
449 |
|
450 |
-
#: includes/forms/fileform.php:
|
451 |
msgid "Make Selected Writable"
|
452 |
msgstr ""
|
453 |
|
454 |
-
#: includes/forms/fileform.php:
|
455 |
msgid "Copy Selected to Child Theme"
|
456 |
msgstr ""
|
457 |
|
458 |
-
#: includes/forms/fileform.php:
|
459 |
msgid "Delete Selected"
|
460 |
msgstr ""
|
461 |
|
@@ -510,11 +551,19 @@ msgstr ""
|
|
510 |
msgid "Make read-only"
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: includes/forms/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
msgid "Child Theme Images"
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: includes/forms/images.php:
|
518 |
msgid "Delete child theme images by selecting them here."
|
519 |
msgstr ""
|
520 |
|
@@ -716,7 +765,7 @@ msgstr ""
|
|
716 |
msgid "Parent CSS"
|
717 |
msgstr ""
|
718 |
|
719 |
-
#: includes/forms/tabs.php:
|
720 |
msgid "Files"
|
721 |
msgstr ""
|
722 |
|
@@ -746,8 +795,8 @@ msgstr ""
|
|
746 |
|
747 |
#. Description of the plugin/theme
|
748 |
msgid ""
|
749 |
-
"Create a Child Theme and customize the stylesheet
|
750 |
-
"preview and modify
|
751 |
msgstr ""
|
752 |
|
753 |
#. Author of the plugin/theme
|
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 1.6.5\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/child-theme-configurator\n"
|
7 |
+
"POT-Creation-Date: 2015-01-27 16:51:06+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 |
+
#. #-#-#-#-# chld_thm_cfg.pot (Child Theme Configurator 1.6.5) #-#-#-#-#
|
16 |
#. Plugin Name of the plugin/theme
|
17 |
+
#: child-theme-configurator.php:68 child-theme-configurator.php:78
|
18 |
#: includes/forms/main.php:23
|
19 |
msgid "Child Theme Configurator"
|
20 |
msgstr ""
|
21 |
|
22 |
+
#: child-theme-configurator.php:69 child-theme-configurator.php:79
|
23 |
+
#: child-theme-configurator.php:89
|
24 |
msgid "Child Themes"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: child-theme-configurator.php:103
|
28 |
msgid "Child Theme Configurator requires WordPress version %s or later."
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: includes/class-ctc-ui.php:143
|
32 |
msgid "Child Theme files modified successfully."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: includes/class-ctc-ui.php:146
|
36 |
msgid ""
|
37 |
"Child Theme <strong>%s</strong> has been generated successfully.\n"
|
38 |
" "
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: includes/class-ctc-ui.php:149
|
42 |
msgid "IMPORTANT:"
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: includes/class-ctc-ui.php:151 includes/forms/themepreview.php:20
|
46 |
msgid "Go to Themes"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: includes/class-ctc-ui.php:151
|
50 |
msgid "Network enable"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: includes/class-ctc-ui.php:151
|
54 |
msgid "your child theme."
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: includes/class-ctc-ui.php:153 includes/forms/themepreview.php:18
|
58 |
msgid "Live Preview"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: includes/class-ctc-ui.php:153
|
62 |
msgid "Test your child theme"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: includes/class-ctc-ui.php:153
|
66 |
msgid "before activating."
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: includes/class-ctc.php:146
|
70 |
msgid "URL/None"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: includes/class-ctc.php:147
|
74 |
msgid "Origin"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/class-ctc.php:148
|
78 |
msgid "Color 1"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: includes/class-ctc.php:149
|
82 |
msgid "Color 2"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: includes/class-ctc.php:150
|
86 |
msgid "Width/None"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: includes/class-ctc.php:151
|
90 |
msgid "Style"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: includes/class-ctc.php:152
|
94 |
msgid "Color"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: includes/class-ctc.php:155
|
98 |
msgid "Are you sure? This will replace your current settings."
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: includes/class-ctc.php:156 includes/forms/query-selector.php:37
|
102 |
#: includes/forms/rule-value.php:29
|
103 |
msgid "Sample"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: includes/class-ctc.php:157
|
107 |
msgid "<span style=\"font-size:10px\">!</span>"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: includes/class-ctc.php:158 includes/forms/rule-value.php:32
|
111 |
msgid "Selectors"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: includes/class-ctc.php:159
|
115 |
msgid "Close"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: includes/class-ctc.php:160
|
119 |
msgid "Edit"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: includes/class-ctc.php:161
|
123 |
msgid "Cancel"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: includes/class-ctc.php:162
|
127 |
msgid "Rename"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: includes/class-ctc.php:163
|
131 |
msgid "The stylesheet cannot be displayed."
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: includes/class-ctc.php:164
|
135 |
msgid "(Child Only)"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: includes/class-ctc.php:165
|
139 |
msgid "Please enter a valid Child Theme."
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: includes/class-ctc.php:166
|
143 |
msgid "Please enter a valid Child Theme name."
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: includes/class-ctc.php:167
|
147 |
msgid "<strong>%s</strong> exists. Please enter a different Child Theme"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: includes/class-ctc.php:168
|
151 |
+
msgid ""
|
152 |
+
"The page could not be loaded correctly so some controls have been disabled."
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: includes/class-ctc.php:170
|
156 |
+
msgid "Conflicting jQuery libraries were loaded by another plugin:"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: includes/class-ctc.php:172
|
160 |
+
msgid "Deactivating other plugins may resolve this issue."
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: includes/class-ctc.php:173
|
164 |
+
msgid "%sWhy am I seeing this?%s"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: includes/class-ctc.php:367
|
168 |
msgid "Zip file creation failed."
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: includes/class-ctc.php:403
|
172 |
msgid "The Functions file is required and cannot be deleted."
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: includes/class-ctc.php:484
|
176 |
msgid "You do not have permission to configure child themes."
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: includes/class-ctc.php:534
|
180 |
msgid "%s does not exist. Please select a valid Parent Theme."
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: includes/class-ctc.php:538
|
184 |
msgid "Please select a valid Parent Theme."
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: includes/class-ctc.php:541
|
188 |
msgid "Please enter a valid Child Theme directory."
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: includes/class-ctc.php:547
|
192 |
msgid "Your theme directories are not writable."
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: includes/class-ctc.php:554
|
196 |
msgid "Please enter a valid Child Theme template name."
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: includes/class-ctc.php:559
|
200 |
msgid ""
|
201 |
"<strong>%s</strong> exists. Please enter a different Child Theme template "
|
202 |
"name."
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: includes/class-ctc.php:616
|
206 |
msgid "Your stylesheet is not writable."
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: includes/class-ctc.php:855
|
210 |
msgid "Could not copy file."
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: includes/class-ctc.php:941
|
214 |
msgid "Could not set write permissions."
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: includes/class-ctc.php:1014
|
218 |
msgid "There were errors while resetting permissions."
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: includes/class-ctc.php:1053
|
222 |
msgid "Could not upload file."
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: includes/class-ctc.php:1136
|
226 |
msgid ""
|
227 |
"Child Theme Configurator is unable to write to the stylesheet. This can be "
|
228 |
"resolved using one of the following options:<ol>"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: includes/class-ctc.php:1139
|
232 |
msgid ""
|
233 |
"<li>Temporarily make the stylesheet writable by clicking the button below. "
|
234 |
"You should change this back when you are finished editing for security by "
|
235 |
"clicking \"Make read-only\" under the \"Files\" tab.</li>"
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: includes/class-ctc.php:1142
|
239 |
msgid "Temporarily make stylesheet writable"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: includes/class-ctc.php:1143
|
243 |
msgid ""
|
244 |
"<li><a target=\"_blank\" href=\"http://codex.wordpress.org/Editing_wp-"
|
245 |
"config.php#WordPress_Upgrade_Constants\" title=\"Editin wp-config.php\">Add "
|
246 |
"your FTP/SSH credentials to the WordPress config file</a>.</li>"
|
247 |
msgstr ""
|
248 |
|
249 |
+
#: includes/class-ctc.php:1145
|
250 |
msgid ""
|
251 |
"<li><a target=\"_blank\" href=\"http://technet.microsoft.com/en-us/library/"
|
252 |
"cc771170\" title=\"Setting Application Pool Identity\">Assign WordPress to "
|
254 |
"li>"
|
255 |
msgstr ""
|
256 |
|
257 |
+
#: includes/class-ctc.php:1146
|
258 |
msgid ""
|
259 |
"<li><a target=\"_blank\" href=\"http://codex.wordpress.org/"
|
260 |
"Changing_File_Permissions\" title=\"Changing File Permissions\">Set the "
|
262 |
"li>"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: includes/class-ctc.php:1148
|
266 |
msgid "<li>Run PHP under Apache with suEXEC (contact your web host).</li>"
|
267 |
msgstr ""
|
268 |
|
269 |
+
#: includes/class-ctc.php:1157
|
270 |
msgid ""
|
271 |
"This Child Theme is not owned by your website account. It may have been "
|
272 |
"created by a prior version of this plugin or by another program. Moving "
|
275 |
"below."
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: includes/class-ctc.php:1160
|
279 |
msgid "Correct Child Theme Permissions"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: includes/class-ctc.php:1167
|
283 |
msgid ""
|
284 |
"Child Theme Configurator needs to update its interal data. Please set your "
|
285 |
"preferences below and click \"Generate Child Theme Files\" to update your "
|
286 |
"configuration."
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: includes/class-ctc.php:1173
|
290 |
+
msgid ""
|
291 |
+
"<strong>However, some styles could not be parsed due to memory limits.</"
|
292 |
+
"strong> Try deselecting \"Additional Stylesheets\" below and click "
|
293 |
+
"\"Generate/Rebuild Child Theme Files\". %sWhy am I seeing this?%s"
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: includes/class-ctc.php:1182
|
297 |
msgid ""
|
298 |
"Child Theme Configurator did not detect any configuration data, either "
|
299 |
"because this is the first time it has been used, or because a previously "
|
313 |
"only the additional stylesheets you wish to customize."
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: includes/forms/addl_panels.php:8 includes/help/help_en_US.php:211
|
|
|
|
|
|
|
|
|
317 |
msgid "Learn more about CTC Pro"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: includes/forms/addl_panels.php:9
|
321 |
msgid "Customizing WordPress Themes just got even easier."
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: includes/forms/addl_panels.php:10
|
325 |
msgid ""
|
326 |
"Thousands of users have already seen the benefits of using Child Theme "
|
327 |
"Configurator. If you spend any amount of time customizing WordPress, CTC Pro "
|
328 |
"will help maximize your productivity."
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: includes/forms/addl_panels.php:11
|
332 |
msgid "Designed by Developers Who Use It Every Day."
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: includes/forms/addl_panels.php:12
|
336 |
msgid ""
|
337 |
"We've packed in more features to make design work quicker and easier with "
|
338 |
+
"<strong>Child Theme Configurator Pro.</strong>"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: includes/forms/addl_panels.php:14
|
342 |
msgid "Custom Plugin Stylesheets"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: includes/forms/addl_panels.php:15
|
346 |
msgid ""
|
347 |
+
"Apply the power of the top-rated CTC interface to your site's plugin styles. "
|
348 |
+
"All new design makes it much easier to get the results you want."
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: includes/forms/addl_panels.php:16
|
352 |
msgid "Links to all styles in a single view"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: includes/forms/addl_panels.php:16
|
356 |
msgid ""
|
357 |
"Use the \"All Styles\" panel to find the selector you wish to edit from a "
|
358 |
"single combined list."
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: includes/forms/addl_panels.php:17
|
362 |
msgid "Most recent edits"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: includes/forms/addl_panels.php:17
|
366 |
msgid "Return to recently edited selectors from a toggleable sidebar."
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: includes/forms/addl_panels.php:18
|
370 |
msgid "Free Upgrades"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: includes/forms/addl_panels.php:19
|
374 |
msgid ""
|
375 |
"Your Update Key gives you access to new Pro features as soon as they are "
|
376 |
"released."
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: includes/forms/addl_panels.php:20
|
380 |
msgid "Top-rated Online Support"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: includes/forms/addl_panels.php:21
|
384 |
msgid "Online Documentation"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: includes/forms/addl_panels.php:22
|
388 |
msgid "Tutorial Videos"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: includes/forms/addl_panels.php:24
|
392 |
+
msgid "For a limited time save over 15% off Child Theme Configurator Pro."
|
|
|
|
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: includes/forms/addl_panels.php:25
|
396 |
msgid "Buy CTC Pro"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: includes/forms/addl_panels.php:25
|
400 |
msgid "Buy Now - Only $12.95 USD"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: includes/forms/addl_panels.php:27 includes/forms/addl_panels.php:28
|
404 |
+
msgid "Learn more about IntelliWidget"
|
405 |
+
msgstr ""
|
406 |
+
|
407 |
+
#: includes/forms/addl_panels.php:28
|
408 |
+
msgid ""
|
409 |
+
"IntelliWidget is a versatile WordPress plugin that does the work of multiple "
|
410 |
+
"plugins by combining custom page menus, featured posts, sliders and other "
|
411 |
+
"content into a single widget that can display on a content driven or site-"
|
412 |
+
"wide basis."
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: includes/forms/addl_panels.php:29 includes/forms/addl_panels.php:32
|
416 |
+
msgid "Learn more"
|
417 |
+
msgstr ""
|
418 |
+
|
419 |
+
#: includes/forms/addl_panels.php:30 includes/forms/addl_panels.php:31
|
420 |
+
msgid "Learn more about IW Responsive Menu"
|
421 |
+
msgstr ""
|
422 |
+
|
423 |
+
#: includes/forms/addl_panels.php:31
|
424 |
+
msgid ""
|
425 |
+
"IntelliWidget Responsive Menu lets you break free from your theme’s built-in "
|
426 |
+
"responsive menu options and gives you complete control over the user "
|
427 |
+
"experience."
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
#: includes/forms/addl_tabs.php:8
|
431 |
msgid "Get CTC Pro"
|
432 |
msgstr ""
|
447 |
msgid "Restore backup from"
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: includes/forms/fileform.php:8
|
451 |
msgid ""
|
452 |
"The Theme editor has been disabled. Template files must be edited offline."
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: includes/forms/fileform.php:12
|
456 |
msgid "Click here to edit template files using the Theme Editor"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: includes/forms/fileform.php:23
|
460 |
msgid "Parent Templates"
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: includes/forms/fileform.php:23
|
464 |
msgid "Child Theme Files"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: includes/forms/fileform.php:28
|
468 |
msgid "Copy PHP template files from the parent theme by selecting them here."
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: includes/forms/fileform.php:31
|
472 |
msgid ""
|
473 |
"CAUTION: If your child theme is active, the child theme version of the file "
|
474 |
"will be used instead of the parent immediately after it is copied."
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: includes/forms/fileform.php:33
|
478 |
msgid "The %s file is generated separately and cannot be copied here."
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: includes/forms/fileform.php:43
|
482 |
msgid "Delete child theme templates by selecting them here."
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: includes/forms/fileform.php:44
|
486 |
msgid ""
|
487 |
"Delete child theme templates or make them writable by selecting them here. "
|
488 |
"Writable files are displayed in <span style=\"color:red\">red</span>."
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: includes/forms/fileform.php:57
|
492 |
msgid "Make Selected Writable"
|
493 |
msgstr ""
|
494 |
|
495 |
+
#: includes/forms/fileform.php:61
|
496 |
msgid "Copy Selected to Child Theme"
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: includes/forms/fileform.php:61 includes/forms/images.php:21
|
500 |
msgid "Delete Selected"
|
501 |
msgstr ""
|
502 |
|
551 |
msgid "Make read-only"
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: includes/forms/files.php:99
|
555 |
+
msgid "Debug"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: includes/forms/files.php:102
|
559 |
+
msgid "Check the box to enable debugging output."
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: includes/forms/images.php:10
|
563 |
msgid "Child Theme Images"
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: includes/forms/images.php:13
|
567 |
msgid "Delete child theme images by selecting them here."
|
568 |
msgstr ""
|
569 |
|
765 |
msgid "Parent CSS"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: includes/forms/tabs.php:34
|
769 |
msgid "Files"
|
770 |
msgstr ""
|
771 |
|
795 |
|
796 |
#. Description of the plugin/theme
|
797 |
msgid ""
|
798 |
+
"Create a Child Theme and customize the stylesheet and templates. Fast CSS "
|
799 |
+
"editor lets you search, preview and modify by selector, rule or value."
|
800 |
msgstr ""
|
801 |
|
802 |
#. Author of the plugin/theme
|
readme.txt
CHANGED
@@ -4,11 +4,11 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: child theme, customize, CSS, responsive, css editor, theme generator, stylesheet, customizer
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 1.6.
|
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 stylesheet
|
12 |
|
13 |
== Description ==
|
14 |
|
@@ -50,13 +50,13 @@ https://www.youtube.com/watch?v=Yj8lxF1knTo
|
|
50 |
|
51 |
Learn more at http://www.lilaeamedia.com/child-theme-configurator-pro
|
52 |
|
53 |
-
=
|
54 |
|
55 |
-
|
56 |
|
57 |
-
https://www.youtube.com/watch?v=
|
58 |
|
59 |
-
Learn more at http://www.lilaeamedia.com/
|
60 |
|
61 |
= IntelliWidget Responsive Menu =
|
62 |
|
@@ -256,6 +256,12 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
|
|
256 |
7. Files tab
|
257 |
|
258 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
= 1.6.4 =
|
260 |
* New Feature: Copy selector button for Raw CSS textarea on Query/Selector tab.
|
261 |
* Fix: Menus rendering incorrectly for RTL locales
|
@@ -450,6 +456,7 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
|
|
450 |
* Initial release.
|
451 |
|
452 |
== Upgrade Notice ==
|
|
|
453 |
|
454 |
== Override Parent Styles ==
|
455 |
|
@@ -538,6 +545,6 @@ Some themes (particularly commercial themes) do not correctly load parent templa
|
|
538 |
|
539 |
== Documentation ==
|
540 |
|
541 |
-
Go to http://www.lilaeamedia.com/
|
542 |
|
543 |
Copyright: (C) 2014-2015 Lilaea Media
|
4 |
Tags: child theme, customize, CSS, responsive, css editor, theme generator, stylesheet, customizer
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 1.6.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Create a Child Theme and customize the stylesheet and templates. Fast CSS editor lets you search, preview and modify by selector, rule or value.
|
12 |
|
13 |
== Description ==
|
14 |
|
50 |
|
51 |
Learn more at http://www.lilaeamedia.com/child-theme-configurator-pro
|
52 |
|
53 |
+
= Unlimited Widget Content With a Single Plugin =
|
54 |
|
55 |
+
IntelliWidget is a versatile widget manager that does the work of multiple plugins by combining custom page menus, featured posts, sliders and other dynamic content features that can display on a per-page or site-wide basis.
|
56 |
|
57 |
+
https://www.youtube.com/watch?v=Ttw1xIZ2b-g
|
58 |
|
59 |
+
Learn more at http://www.lilaeamedia.com/plugins/intelliwidget
|
60 |
|
61 |
= IntelliWidget Responsive Menu =
|
62 |
|
256 |
7. Files tab
|
257 |
|
258 |
== Changelog ==
|
259 |
+
= 1.6.5 =
|
260 |
+
* Fix: incorrect path generation and validation on Windows servers
|
261 |
+
* Added error handling and notification to prevent jQuery conflicts and out of memory conditions
|
262 |
+
* Fix: removed max-height on rule/value overlay
|
263 |
+
* Added debug option
|
264 |
+
|
265 |
= 1.6.4 =
|
266 |
* New Feature: Copy selector button for Raw CSS textarea on Query/Selector tab.
|
267 |
* Fix: Menus rendering incorrectly for RTL locales
|
456 |
* Initial release.
|
457 |
|
458 |
== Upgrade Notice ==
|
459 |
+
1.6.5 improves error handling and reporting of potential issues.
|
460 |
|
461 |
== Override Parent Styles ==
|
462 |
|
545 |
|
546 |
== Documentation ==
|
547 |
|
548 |
+
Go to http://www.lilaeamedia.com/child-theme-configurator
|
549 |
|
550 |
Copyright: (C) 2014-2015 Lilaea Media
|