Version Description
- Fix: replaced wp_normalize_path with class method to support legacy WP versions
- Fix: support for multiple layered background images
- Fix: background:none being parsed into gradient origin parameter
- Fix: support for data URIs
- Fix: support for *
Download this release
Release Info
Developer | lilaeamedia |
Plugin | Child Theme Configurator |
Version | 1.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.6.1 to 1.6.2
- child-theme-configurator.php +17 -5
- css/chld-thm-cfg.css +3 -1
- includes/class-ctc-css.php +9 -4
- includes/class-ctc-ui.php +1 -1
- includes/class-ctc.php +15 -9
- includes/forms/at-import.php +4 -3
- includes/forms/query-selector.php +5 -3
- includes/help/help_en_US.php +1 -1
- js/chld-thm-cfg.js +6 -7
- js/chld-thm-cfg.min.js +1 -1
- readme.txt +13 -6
child-theme-configurator.php
CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
|
|
6 |
Plugin Name: Child Theme Configurator
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
Description: Create a Child Theme from any installed Theme. Each CSS selector, rule and value can then be searched, previewed and modified.
|
9 |
-
Version: 1.6.
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
@@ -17,16 +17,22 @@ if ( !defined('ABSPATH')) exit;
|
|
17 |
|
18 |
defined( 'LF' ) or define( 'LF', "\n");
|
19 |
defined( 'CHLD_THM_CFG_OPTIONS' ) or define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
|
20 |
-
defined( 'CHLD_THM_CFG_VERSION' ) or define( 'CHLD_THM_CFG_VERSION', '1.6.
|
|
|
21 |
defined( 'CHLD_THM_CFG_MAX_SELECTORS' ) or define( 'CHLD_THM_CFG_MAX_SELECTORS', '50000' );
|
22 |
defined( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS' ) or define( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS', '1000' );
|
23 |
defined( 'CHLD_THM_CFG_MENU' ) or define( 'CHLD_THM_CFG_MENU', 'chld_thm_cfg_menu' );
|
24 |
|
25 |
class ChildThemeConfigurator {
|
26 |
static function init() {
|
27 |
-
// setup admin hooks
|
28 |
$lang_dir = dirname(__FILE__) . '/lang';
|
29 |
load_plugin_textdomain('chld_thm_cfg', FALSE, $lang_dir, $lang_dir);
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
add_action( 'admin_menu', 'ChildThemeConfigurator::admin' );
|
31 |
add_action( 'wp_ajax_ctc_update', 'ChildThemeConfigurator::save' );
|
32 |
add_action( 'wp_ajax_ctc_query', 'ChildThemeConfigurator::query' );
|
@@ -67,13 +73,18 @@ if ( !defined('ABSPATH')) exit;
|
|
67 |
// display admin page
|
68 |
self::ctc()->render();
|
69 |
}
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
72 |
if ( is_admin() ) ChildThemeConfigurator::init();
|
73 |
|
74 |
-
register_uninstall_hook( __FILE__ , '
|
75 |
|
76 |
-
function
|
77 |
delete_option( CHLD_THM_CFG_OPTIONS );
|
78 |
delete_option( CHLD_THM_CFG_OPTIONS . '_configvars' );
|
79 |
delete_option( CHLD_THM_CFG_OPTIONS . '_dict_qs' );
|
@@ -85,3 +96,4 @@ if ( !defined('ABSPATH')) exit;
|
|
85 |
delete_option( CHLD_THM_CFG_OPTIONS . '_sel_ndx' );
|
86 |
delete_option( CHLD_THM_CFG_OPTIONS . '_val_ndx' );
|
87 |
}
|
|
6 |
Plugin Name: Child Theme Configurator
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
Description: Create a Child Theme from any installed Theme. Each CSS selector, rule and value can then be searched, previewed and modified.
|
9 |
+
Version: 1.6.2
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
17 |
|
18 |
defined( 'LF' ) or define( 'LF', "\n");
|
19 |
defined( 'CHLD_THM_CFG_OPTIONS' ) or define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
|
20 |
+
defined( 'CHLD_THM_CFG_VERSION' ) or define( 'CHLD_THM_CFG_VERSION', '1.6.2' );
|
21 |
+
defined( 'CHLD_THM_CFG_MIN_WP_VERSION' ) or define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
|
22 |
defined( 'CHLD_THM_CFG_MAX_SELECTORS' ) or define( 'CHLD_THM_CFG_MAX_SELECTORS', '50000' );
|
23 |
defined( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS' ) or define( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS', '1000' );
|
24 |
defined( 'CHLD_THM_CFG_MENU' ) or define( 'CHLD_THM_CFG_MENU', 'chld_thm_cfg_menu' );
|
25 |
|
26 |
class ChildThemeConfigurator {
|
27 |
static function init() {
|
|
|
28 |
$lang_dir = dirname(__FILE__) . '/lang';
|
29 |
load_plugin_textdomain('chld_thm_cfg', FALSE, $lang_dir, $lang_dir);
|
30 |
+
global $wp_version;
|
31 |
+
if (version_compare($wp_version, CHLD_THM_CFG_MIN_WP_VERSION) < 0):
|
32 |
+
add_action('admin_notices', 'ChildthemeConfigurator::version_notice');
|
33 |
+
return;
|
34 |
+
endif;
|
35 |
+
// setup admin hooks
|
36 |
add_action( 'admin_menu', 'ChildThemeConfigurator::admin' );
|
37 |
add_action( 'wp_ajax_ctc_update', 'ChildThemeConfigurator::save' );
|
38 |
add_action( 'wp_ajax_ctc_query', 'ChildThemeConfigurator::query' );
|
73 |
// display admin page
|
74 |
self::ctc()->render();
|
75 |
}
|
76 |
+
static function version_notice() {
|
77 |
+
deactivate_plugins( plugin_basename( __FILE__ ) );
|
78 |
+
unset($_GET['activate']);
|
79 |
+
echo '<div class="update-nag"><p>' . sprintf(__('Child Theme Configurator requires WordPress version %s or later.', 'chld_thm_cfg'), CHLD_THM_CFG_MIN_WP_VERSION) . '</p></div>' . LF;
|
80 |
+
}
|
81 |
}
|
82 |
|
83 |
if ( is_admin() ) ChildThemeConfigurator::init();
|
84 |
|
85 |
+
register_uninstall_hook( __FILE__ , 'chld_thm_cfg_delete_plugin' );
|
86 |
|
87 |
+
function chld_thm_cfg_delete_plugin() {
|
88 |
delete_option( CHLD_THM_CFG_OPTIONS );
|
89 |
delete_option( CHLD_THM_CFG_OPTIONS . '_configvars' );
|
90 |
delete_option( CHLD_THM_CFG_OPTIONS . '_dict_qs' );
|
96 |
delete_option( CHLD_THM_CFG_OPTIONS . '_sel_ndx' );
|
97 |
delete_option( CHLD_THM_CFG_OPTIONS . '_val_ndx' );
|
98 |
}
|
99 |
+
|
css/chld-thm-cfg.css
CHANGED
@@ -101,8 +101,10 @@ a.nav-tab, a.nav-tab:focus, a.nav-tab:active {
|
|
101 |
}
|
102 |
|
103 |
.ctc-textarea-button-cell {
|
104 |
-
margin:
|
105 |
width: 85px;
|
|
|
|
|
106 |
}
|
107 |
|
108 |
.ctc-selector-link {
|
101 |
}
|
102 |
|
103 |
.ctc-textarea-button-cell {
|
104 |
+
margin: 4px 0 15px;
|
105 |
width: 85px;
|
106 |
+
text-align: right;
|
107 |
+
float:right;
|
108 |
}
|
109 |
|
110 |
.ctc-selector-link {
|
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
|
@@ -559,18 +559,22 @@ class ChildThemeConfiguratorCSS {
|
|
559 |
foreach ($ruleset as $query => $segment):
|
560 |
// make sure there is semicolon before closing brace
|
561 |
$segment = preg_replace('#(\})#', ";$1", $segment);
|
562 |
-
$regex = '
|
|
|
563 |
preg_match_all($regex, $segment, $matches);
|
564 |
foreach($matches[1] as $sel):
|
565 |
$stuff = array_shift($matches[2]);
|
566 |
$this->update_arrays($template, $query, $sel);
|
|
|
|
|
567 |
foreach (explode(';', $stuff) as $ruleval):
|
568 |
if ($this->qskey > CHLD_THM_CFG_MAX_SELECTORS) break;
|
569 |
if (FALSE === strpos($ruleval, ':')) continue;
|
570 |
list($rule, $value) = explode(':', $ruleval, 2);
|
571 |
$rule = trim($rule);
|
572 |
$rule = preg_replace_callback("/[^\w\-]/", array($this, 'to_ascii'), $rule);
|
573 |
-
|
|
|
574 |
|
575 |
$rules = $values = array();
|
576 |
// save important flag
|
@@ -712,6 +716,7 @@ class ChildThemeConfiguratorCSS {
|
|
712 |
$rules .= ' ' . $rule . ': ' . $value . $importantstr . ';' . LF;
|
713 |
elseif ('background-image' == $rule):
|
714 |
// gradient?
|
|
|
715 |
if ($gradient = $this->decode_gradient($value)):
|
716 |
// standard gradient
|
717 |
foreach(array('moz', 'webkit', 'o', 'ms') as $prefix):
|
@@ -966,7 +971,7 @@ class ChildThemeConfiguratorCSS {
|
|
966 |
*/
|
967 |
function decode_gradient($value) {
|
968 |
$parts = explode(':', $value, 5);
|
969 |
-
if (5 == count($parts)):
|
970 |
return array(
|
971 |
'origin' => empty($parts[0]) ? '' : $parts[0],
|
972 |
'color1' => empty($parts[1]) ? '' : $parts[1],
|
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.2
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
559 |
foreach ($ruleset as $query => $segment):
|
560 |
// make sure there is semicolon before closing brace
|
561 |
$segment = preg_replace('#(\})#', ";$1", $segment);
|
562 |
+
$regex = '#([^\n\{]+?)\{(.*?)\}#s'; //
|
563 |
+
//$regex = '#\s([\.\#\:\w][\w\-\s\(\)\[\]\'\*\.\#\+:,"=>]+?)\s*\{(.*?)\}#s'; //
|
564 |
preg_match_all($regex, $segment, $matches);
|
565 |
foreach($matches[1] as $sel):
|
566 |
$stuff = array_shift($matches[2]);
|
567 |
$this->update_arrays($template, $query, $sel);
|
568 |
+
// handle base64 data
|
569 |
+
$stuff = preg_replace( '#data:([^;]+?);([^\)]+?)\)#s', "data:$1%%semi%%$2)", $stuff );
|
570 |
foreach (explode(';', $stuff) as $ruleval):
|
571 |
if ($this->qskey > CHLD_THM_CFG_MAX_SELECTORS) break;
|
572 |
if (FALSE === strpos($ruleval, ':')) continue;
|
573 |
list($rule, $value) = explode(':', $ruleval, 2);
|
574 |
$rule = trim($rule);
|
575 |
$rule = preg_replace_callback("/[^\w\-]/", array($this, 'to_ascii'), $rule);
|
576 |
+
// handle base64 data
|
577 |
+
$value = trim(str_replace('%%semi%%', ';', $value));
|
578 |
|
579 |
$rules = $values = array();
|
580 |
// save important flag
|
716 |
$rules .= ' ' . $rule . ': ' . $value . $importantstr . ';' . LF;
|
717 |
elseif ('background-image' == $rule):
|
718 |
// gradient?
|
719 |
+
|
720 |
if ($gradient = $this->decode_gradient($value)):
|
721 |
// standard gradient
|
722 |
foreach(array('moz', 'webkit', 'o', 'ms') as $prefix):
|
971 |
*/
|
972 |
function decode_gradient($value) {
|
973 |
$parts = explode(':', $value, 5);
|
974 |
+
if (!preg_match('#(url|none)#i', $value) && 5 == count($parts)):
|
975 |
return array(
|
976 |
'origin' => empty($parts[0]) ? '' : $parts[0],
|
977 |
'color1' => empty($parts[1]) ? '' : $parts[1],
|
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
|
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.2
|
9 |
Author: Lilaea Media
|
10 |
Author URI: http://www.lilaeamedia.com/
|
11 |
Text Domain: chld_thm_cfg
|
includes/class-ctc.php
CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
|
|
6 |
Class: Child_Theme_Configurator
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
Description: Main Controller Class
|
9 |
-
Version: 1.6.
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
@@ -88,7 +88,7 @@ class ChildThemeConfiguratorAdmin {
|
|
88 |
$this->ui->render();
|
89 |
}
|
90 |
function enqueue_scripts() {
|
91 |
-
wp_enqueue_style('chld-thm-cfg-admin', $this->pluginURL . 'css/chld-thm-cfg.css', array(), '1.6.
|
92 |
|
93 |
// we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
|
94 |
// this will be updated in a later release to use WP Core scripts when it is widely adopted
|
@@ -127,7 +127,7 @@ class ChildThemeConfiguratorAdmin {
|
|
127 |
'_background_origin' => __('Origin', 'chld_thm_cfg'),
|
128 |
'_background_color1' => __('Color 1', 'chld_thm_cfg'),
|
129 |
'_background_color2' => __('Color 2', 'chld_thm_cfg'),
|
130 |
-
'_border_width' => __('Width', 'chld_thm_cfg'),
|
131 |
'_border_style' => __('Style', 'chld_thm_cfg'),
|
132 |
'_border_color' => __('Color', 'chld_thm_cfg'),
|
133 |
),
|
@@ -586,7 +586,7 @@ class ChildThemeConfiguratorAdmin {
|
|
586 |
global $wp_filesystem;
|
587 |
$themedir = $wp_filesystem->find_folder(get_theme_root());
|
588 |
if (! $wp_filesystem->is_writable($themedir)) return FALSE;
|
589 |
-
$childparts = explode('/',
|
590 |
while (count($childparts)):
|
591 |
$subdir = array_shift($childparts);
|
592 |
if (empty($subdir)) continue;
|
@@ -762,14 +762,14 @@ add_action('wp_enqueue_scripts', 'chld_thm_cfg_parent_css');
|
|
762 |
}
|
763 |
|
764 |
function uploads_basename($file) {
|
765 |
-
$file =
|
766 |
$uplarr = wp_upload_dir();
|
767 |
$upldir = trailingslashit($uplarr['basedir']);
|
768 |
return preg_replace('%^' . preg_quote($upldir) . '%', '', $file);
|
769 |
}
|
770 |
|
771 |
function uploads_fullpath($file) {
|
772 |
-
$file =
|
773 |
$uplarr = wp_upload_dir();
|
774 |
$upldir = trailingslashit($uplarr['basedir']);
|
775 |
return $upldir . $file;
|
@@ -822,7 +822,7 @@ add_action('wp_enqueue_scripts', 'chld_thm_cfg_parent_css');
|
|
822 |
$files = $this->css->recurse_directory($dir, NULL, TRUE);
|
823 |
$errors = array();
|
824 |
foreach ($files as $file):
|
825 |
-
$childfile = $this->theme_basename($child,
|
826 |
$newfile = trailingslashit($newchild) . $childfile;
|
827 |
$childpath = $fsthemedir . trailingslashit($child) . $childfile;
|
828 |
$newpath = $fsthemedir . $newfile;
|
@@ -1025,7 +1025,7 @@ add_action('wp_enqueue_scripts', 'chld_thm_cfg_parent_css');
|
|
1025 |
foreach ($def['addl'] as $path => $type):
|
1026 |
|
1027 |
// sanitize the crap out of the target data -- it will be used to create paths
|
1028 |
-
$path =
|
1029 |
if (('dir' == $type && FALSE === $chld_thm_cfg->verify_child_dir($path))
|
1030 |
|| ('dir' != $type && FALSE === $chld_thm_cfg->write_child_file($path, ''))):
|
1031 |
$chld_thm_cfg->errors[] =
|
@@ -1035,7 +1035,7 @@ add_action('wp_enqueue_scripts', 'chld_thm_cfg_parent_css');
|
|
1035 |
endif;
|
1036 |
// write main def file
|
1037 |
if (isset($def['target'])):
|
1038 |
-
$path =
|
1039 |
if (FALSE === $chld_thm_cfg->write_child_file($path, '')):
|
1040 |
$chld_thm_cfg->errors[] =
|
1041 |
__('Your stylesheet is not writable.', 'chld_thm_cfg_plugins');
|
@@ -1043,4 +1043,10 @@ add_action('wp_enqueue_scripts', 'chld_thm_cfg_parent_css');
|
|
1043 |
endif;
|
1044 |
endif;
|
1045 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1046 |
}
|
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.2
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
88 |
$this->ui->render();
|
89 |
}
|
90 |
function enqueue_scripts() {
|
91 |
+
wp_enqueue_style('chld-thm-cfg-admin', $this->pluginURL . 'css/chld-thm-cfg.css', array(), '1.6.2');
|
92 |
|
93 |
// we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
|
94 |
// this will be updated in a later release to use WP Core scripts when it is widely adopted
|
127 |
'_background_origin' => __('Origin', 'chld_thm_cfg'),
|
128 |
'_background_color1' => __('Color 1', 'chld_thm_cfg'),
|
129 |
'_background_color2' => __('Color 2', 'chld_thm_cfg'),
|
130 |
+
'_border_width' => __('Width/None', 'chld_thm_cfg'),
|
131 |
'_border_style' => __('Style', 'chld_thm_cfg'),
|
132 |
'_border_color' => __('Color', 'chld_thm_cfg'),
|
133 |
),
|
586 |
global $wp_filesystem;
|
587 |
$themedir = $wp_filesystem->find_folder(get_theme_root());
|
588 |
if (! $wp_filesystem->is_writable($themedir)) return FALSE;
|
589 |
+
$childparts = explode('/', $this->normalize_path($path));
|
590 |
while (count($childparts)):
|
591 |
$subdir = array_shift($childparts);
|
592 |
if (empty($subdir)) continue;
|
762 |
}
|
763 |
|
764 |
function uploads_basename($file) {
|
765 |
+
$file = $this->normalize_path($file);
|
766 |
$uplarr = wp_upload_dir();
|
767 |
$upldir = trailingslashit($uplarr['basedir']);
|
768 |
return preg_replace('%^' . preg_quote($upldir) . '%', '', $file);
|
769 |
}
|
770 |
|
771 |
function uploads_fullpath($file) {
|
772 |
+
$file = $this->normalize_path($file);
|
773 |
$uplarr = wp_upload_dir();
|
774 |
$upldir = trailingslashit($uplarr['basedir']);
|
775 |
return $upldir . $file;
|
822 |
$files = $this->css->recurse_directory($dir, NULL, TRUE);
|
823 |
$errors = array();
|
824 |
foreach ($files as $file):
|
825 |
+
$childfile = $this->theme_basename($child, $this->normalize_path($file));
|
826 |
$newfile = trailingslashit($newchild) . $childfile;
|
827 |
$childpath = $fsthemedir . trailingslashit($child) . $childfile;
|
828 |
$newpath = $fsthemedir . $newfile;
|
1025 |
foreach ($def['addl'] as $path => $type):
|
1026 |
|
1027 |
// sanitize the crap out of the target data -- it will be used to create paths
|
1028 |
+
$path = $this->normalize_path(preg_replace("%[^\w\\//\-]%", '', sanitize_text_field($child . $path)));
|
1029 |
if (('dir' == $type && FALSE === $chld_thm_cfg->verify_child_dir($path))
|
1030 |
|| ('dir' != $type && FALSE === $chld_thm_cfg->write_child_file($path, ''))):
|
1031 |
$chld_thm_cfg->errors[] =
|
1035 |
endif;
|
1036 |
// write main def file
|
1037 |
if (isset($def['target'])):
|
1038 |
+
$path = $this->normalize_path(preg_replace("%[^\w\\//\-\.]%", '', sanitize_text_field($def['target']))); //$child .
|
1039 |
if (FALSE === $chld_thm_cfg->write_child_file($path, '')):
|
1040 |
$chld_thm_cfg->errors[] =
|
1041 |
__('Your stylesheet is not writable.', 'chld_thm_cfg_plugins');
|
1043 |
endif;
|
1044 |
endif;
|
1045 |
}
|
1046 |
+
// backwards compatability < 3.9
|
1047 |
+
function normalize_path( $path ) {
|
1048 |
+
$path = str_replace( '\\', '/', $path );
|
1049 |
+
$path = preg_replace( '|/+|','/', $path );
|
1050 |
+
return $path;
|
1051 |
+
}
|
1052 |
}
|
includes/forms/at-import.php
CHANGED
@@ -8,13 +8,14 @@ if (!defined('ABSPATH')) exit;
|
|
8 |
<form id="ctc_import_form" method="post" action="?page=<?php echo CHLD_THM_CFG_MENU; ?>">
|
9 |
<?php wp_nonce_field( 'ctc_update' ); ?>
|
10 |
<div class="ctc-input-row clearfix" id="ctc_child_imports_row">
|
11 |
-
<div class="ctc-input-cell">
|
12 |
-
<?php _e('@import Statements', 'chld_thm_cfg'); ?>
|
13 |
-
</strong>
|
14 |
<div class="ctc-textarea-button-cell" id="ctc_save_imports_cell">
|
15 |
<input type="button" class="button ctc-save-input" id="ctc_save_imports"
|
16 |
name="ctc_save_imports" value="<?php _e('Save', 'chld_thm_cfg'); ?>" disabled />
|
17 |
</div>
|
|
|
|
|
|
|
18 |
</div>
|
19 |
<div class="ctc-input-cell-wide">
|
20 |
<textarea id="ctc_child_imports" name="ctc_child_imports" wrap="off"><?php
|
8 |
<form id="ctc_import_form" method="post" action="?page=<?php echo CHLD_THM_CFG_MENU; ?>">
|
9 |
<?php wp_nonce_field( 'ctc_update' ); ?>
|
10 |
<div class="ctc-input-row clearfix" id="ctc_child_imports_row">
|
11 |
+
<div class="ctc-input-cell">
|
|
|
|
|
12 |
<div class="ctc-textarea-button-cell" id="ctc_save_imports_cell">
|
13 |
<input type="button" class="button ctc-save-input" id="ctc_save_imports"
|
14 |
name="ctc_save_imports" value="<?php _e('Save', 'chld_thm_cfg'); ?>" disabled />
|
15 |
</div>
|
16 |
+
<strong>
|
17 |
+
<?php _e('@import Statements', 'chld_thm_cfg'); ?>
|
18 |
+
</strong>
|
19 |
</div>
|
20 |
<div class="ctc-input-cell-wide">
|
21 |
<textarea id="ctc_child_imports" name="ctc_child_imports" wrap="off"><?php
|
includes/forms/query-selector.php
CHANGED
@@ -75,13 +75,15 @@ if (!defined('ABSPATH')) exit;
|
|
75 |
</div>
|
76 |
</div>
|
77 |
<div class="ctc-selector-row clearfix" id="ctc_new_selector_row">
|
78 |
-
<div class="ctc-input-cell">
|
79 |
-
<?php _e('Raw CSS', 'chld_thm_cfg'); ?>
|
80 |
-
</strong>
|
81 |
<div class="ctc-textarea-button-cell" id="ctc_save_query_selector_cell">
|
82 |
<input type="button" class="button ctc-save-input" id="ctc_save_new_selectors"
|
83 |
name="ctc_save_new_selectors" value="<?php _e('Save', 'chld_thm_cfg'); ?>" disabled />
|
84 |
</div>
|
|
|
|
|
|
|
|
|
85 |
</div>
|
86 |
<div class="ctc-input-cell-wide">
|
87 |
<textarea id="ctc_new_selectors" name="ctc_new_selectors" wrap="off"></textarea>
|
75 |
</div>
|
76 |
</div>
|
77 |
<div class="ctc-selector-row clearfix" id="ctc_new_selector_row">
|
78 |
+
<div class="ctc-input-cell">
|
|
|
|
|
79 |
<div class="ctc-textarea-button-cell" id="ctc_save_query_selector_cell">
|
80 |
<input type="button" class="button ctc-save-input" id="ctc_save_new_selectors"
|
81 |
name="ctc_save_new_selectors" value="<?php _e('Save', 'chld_thm_cfg'); ?>" disabled />
|
82 |
</div>
|
83 |
+
<strong>
|
84 |
+
<?php _e('Raw CSS', 'chld_thm_cfg'); ?>
|
85 |
+
</strong>
|
86 |
+
<p><?php _e('Use to enter shorthand CSS or new @media queries and selectors.', 'chld_thm_cfg');?></p><p><?php _e('Values entered here are merged into existing child styles or added to the child stylesheet if they do not exist in the parent.', 'chld_thm_cfg'); ?></p>
|
87 |
</div>
|
88 |
<div class="ctc-input-cell-wide">
|
89 |
<textarea id="ctc_new_selectors" name="ctc_new_selectors" wrap="off"></textarea>
|
includes/help/help_en_US.php
CHANGED
@@ -217,7 +217,7 @@ The plugin only loads the bulk of the code in the admin when you are using the t
|
|
217 |
<!-- END tab -->
|
218 |
<h3 id="ctc_help_sidebar">Links</h3>
|
219 |
<!-- BEGIN sidebar -->
|
220 |
-
<h4>
|
221 |
<span style="font-size:smaller">...but we LOVE referrals.</span><br/><a href="http://wordpress.org/support/view/plugin-reviews/child-theme-configurator?rate=5#postform">Give Us 5 Stars</a>
|
222 |
<h4>Not just for themes ... but plugins, too!</h4>
|
223 |
<p style="font-size:smaller">Easily modify styles for any WordPress Plugin installed on your website. The Child Theme Configurator Plugin Extension scans your plugins and allows you to create custom stylesheets in your Child Theme. <a href="http://www.lilaeamedia.com/plugins/child-theme-plugin-styles" title="Child Theme Configurator Extension">Learn more</a></p>
|
217 |
<!-- END tab -->
|
218 |
<h3 id="ctc_help_sidebar">Links</h3>
|
219 |
<!-- BEGIN sidebar -->
|
220 |
+
<h4>Our plugins will not nag you for donations...</h4>
|
221 |
<span style="font-size:smaller">...but we LOVE referrals.</span><br/><a href="http://wordpress.org/support/view/plugin-reviews/child-theme-configurator?rate=5#postform">Give Us 5 Stars</a>
|
222 |
<h4>Not just for themes ... but plugins, too!</h4>
|
223 |
<p style="font-size:smaller">Easily modify styles for any WordPress Plugin installed on your website. The Child Theme Configurator Plugin Extension scans your plugins and allows you to create custom stylesheets in your Child Theme. <a href="http://www.lilaeamedia.com/plugins/child-theme-plugin-styles" title="Child Theme Configurator Extension">Learn more</a></p>
|
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
|
@@ -82,6 +82,7 @@ jQuery(document).ready(function($){
|
|
82 |
if ('' != value) {
|
83 |
// handle specific inputs
|
84 |
if (false === ctc_is_empty(rulepart)) {
|
|
|
85 |
switch(rulepart) {
|
86 |
case '_border_width':
|
87 |
cssrules[inputtheme][inputrule + '-width'] = value;
|
@@ -119,8 +120,8 @@ jQuery(document).ready(function($){
|
|
119 |
cssrules[inputtheme][inputrule + '-style'] = 'undefined' == typeof subparts[1] ? '' : subparts[1];
|
120 |
cssrules[inputtheme][inputrule + '-color'] = 'undefined' == typeof subparts[2] ? '' : subparts[2];
|
121 |
// handle background images
|
122 |
-
} else if ( 'background-image' == inputrule ) {
|
123 |
-
if (value.toString().match(/url\(/)) {
|
124 |
cssrules[inputtheme]['background-image'] = ctc_image_url(inputtheme, value);
|
125 |
} else {
|
126 |
subparts = value.toString().split(/ +/);
|
@@ -143,11 +144,9 @@ jQuery(document).ready(function($){
|
|
143 |
if ('undefined' != typeof $swatch && false === ctc_is_empty($swatch.attr('id'))) {
|
144 |
$swatch.removeAttr('style');
|
145 |
if (has_gradient.parent) { $swatch.ctcgrad(gradient.parent.origin, [gradient.parent.start, gradient.parent.end]); }
|
146 |
-
//console.log(cssrules.parent);
|
147 |
$swatch.css(cssrules.parent);
|
148 |
if (!($swatch.attr('id').toString().match(/parent/))){
|
149 |
if (has_gradient.child) { $swatch.ctcgrad(gradient.child.origin, [gradient.child.start, gradient.child.end]); }
|
150 |
-
//console.log(cssrules.child);
|
151 |
$swatch.css(cssrules.child);
|
152 |
}
|
153 |
$swatch.css({'z-index':-1});
|
@@ -207,7 +206,7 @@ jQuery(document).ready(function($){
|
|
207 |
image_url;
|
208 |
if (!path) {
|
209 |
return false;
|
210 |
-
} else if (path.toString().match(/^(https?:|\/)/)) {
|
211 |
image_url = value;
|
212 |
} else {
|
213 |
image_url = 'url(' + url + path + ')';
|
@@ -642,7 +641,7 @@ jQuery(document).ready(function($){
|
|
642 |
'_background_color2'
|
643 |
];
|
644 |
obj['values'] = ['','','',''];
|
645 |
-
if (false === (ctc_is_empty(value)) && !(value.toString().match(/url/))) {
|
646 |
var params = value.toString().split(/:/);
|
647 |
obj['values'][1] = ('undefined' == typeof params[0] ? '' : params[0]);
|
648 |
obj['values'][2] = ('undefined' == typeof params[1] ? '' : params[1]);
|
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.2
|
6 |
* Author: Lilaea Media
|
7 |
* Author URI: http://www.lilaeamedia.com/
|
8 |
* License: GPLv2
|
82 |
if ('' != value) {
|
83 |
// handle specific inputs
|
84 |
if (false === ctc_is_empty(rulepart)) {
|
85 |
+
//console.log('rulepart: ' + rulepart + ' value: ' + value);
|
86 |
switch(rulepart) {
|
87 |
case '_border_width':
|
88 |
cssrules[inputtheme][inputrule + '-width'] = value;
|
120 |
cssrules[inputtheme][inputrule + '-style'] = 'undefined' == typeof subparts[1] ? '' : subparts[1];
|
121 |
cssrules[inputtheme][inputrule + '-color'] = 'undefined' == typeof subparts[2] ? '' : subparts[2];
|
122 |
// handle background images
|
123 |
+
} else if ( 'background-image' == inputrule && !value.match(/none/) ) {
|
124 |
+
if (value.toString().match(/url\(/) ) {
|
125 |
cssrules[inputtheme]['background-image'] = ctc_image_url(inputtheme, value);
|
126 |
} else {
|
127 |
subparts = value.toString().split(/ +/);
|
144 |
if ('undefined' != typeof $swatch && false === ctc_is_empty($swatch.attr('id'))) {
|
145 |
$swatch.removeAttr('style');
|
146 |
if (has_gradient.parent) { $swatch.ctcgrad(gradient.parent.origin, [gradient.parent.start, gradient.parent.end]); }
|
|
|
147 |
$swatch.css(cssrules.parent);
|
148 |
if (!($swatch.attr('id').toString().match(/parent/))){
|
149 |
if (has_gradient.child) { $swatch.ctcgrad(gradient.child.origin, [gradient.child.start, gradient.child.end]); }
|
|
|
150 |
$swatch.css(cssrules.child);
|
151 |
}
|
152 |
$swatch.css({'z-index':-1});
|
206 |
image_url;
|
207 |
if (!path) {
|
208 |
return false;
|
209 |
+
} else if (path.toString().match(/^(data:|https?:|\/)/)) {
|
210 |
image_url = value;
|
211 |
} else {
|
212 |
image_url = 'url(' + url + path + ')';
|
641 |
'_background_color2'
|
642 |
];
|
643 |
obj['values'] = ['','','',''];
|
644 |
+
if (false === (ctc_is_empty(value)) && !(value.toString().match(/(url|none)/))) {
|
645 |
var params = value.toString().split(/:/);
|
646 |
obj['values'][1] = ('undefined' == typeof params[0] ? '' : params[0]);
|
647 |
obj['values'][2] = ('undefined' == typeof params[1] ? '' : params[1]);
|
js/chld-thm-cfg.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
;jQuery(document).ready(function(I){function L(ab){return E(ab)?ab:ab.toString().replace(w,""")}function V(ab){I(ab).iris({change:function(ad,ac){I(ab).data("color",ac.color.toString());O(ab)}})}function F(ad){var ab=parseInt(ad),ac=String.fromCharCode(ab);return ac}function f(ac){var ab=ac.charCodeAt(0);return ab}function O(ah){var ad=/^(ctc_(ovrd|\d+)_(parent|child)_([0-9a-z\-]+)_(\d+))(_\w+)?$/,ai=I(ah).parents(".ctc-selector-row, .ctc-parent-row").first(),ag=ai.find(".ctc-swatch").first(),af={parent:{},child:{}},ae={parent:{origin:"",start:"",end:""},child:{origin:"",start:"",end:""}},ac={child:false,parent:false},ab={};ai.find(".ctc-parent-value, .ctc-child-value").each(function(){var aq=I(this).attr("id"),aj=aq.toString().match(ad),ar=aj[2],ak=aj[3],au=("undefined"==typeof aj[4]?"":aj[4]),ap=aj[5],ao=("undefined"==typeof aj[6]?"":aj[6]),at=("parent"==ak?I(this).text().replace(/!$/,""):I(this).val()),al="ctc_"+ar+"_child_"+au+"_i_"+ap,an,am;if(false===E(I(this).data("color"))){at=I(this).data("color");I(this).data("color",null)}if("child"==ak){ab[aq]=at;ab[al]=(I("#"+al).is(":checked"))?1:0}if(""!=at){if(false===E(ao)){switch(ao){case"_border_width":af[ak][au+"-width"]=at;break;case"_border_style":af[ak][au+"-style"]=at;break;case"_border_color":af[ak][au+"-color"]=at;break;case"_background_url":af[ak]["background-image"]=aa(ak,at);break;case"_background_color":af[ak]["background-color"]=ah.value;break;case"_background_color1":ae[ak].start=at;ac[ak]=true;break;case"_background_color2":ae[ak].end=at;ac[ak]=true;break;case"_background_origin":ae[ak].origin=at;ac[ak]=true;break}}else{if(an=au.toString().match(/^border(\-(top|right|bottom|left))?$/)&&!at.match(/none/)){am=at.toString().split(/ +/);af[ak][au+"-width"]="undefined"==typeof am[0]?"":am[0];af[ak][au+"-style"]="undefined"==typeof am[1]?"":am[1];af[ak][au+"-color"]="undefined"==typeof am[2]?"":am[2]}else{if("background-image"==au){if(at.toString().match(/url\(/)){af[ak]["background-image"]=aa(ak,at)}else{am=at.toString().split(/ +/);if(am.length>2){ae[ak].origin="undefined"==typeof am[0]?"top":am[0];ae[ak].start="undefined"==typeof am[1]?"transparent":am[1];ae[ak].end="undefined"==typeof am[2]?"transparent":am[2];ac[ak]=true}else{af[ak]["background-image"]=at}}}else{if("seq"!=au){af[ak][au]=at}}}}}});if("undefined"!=typeof ag&&false===E(ag.attr("id"))){ag.removeAttr("style");if(ac.parent){ag.ctcgrad(ae.parent.origin,[ae.parent.start,ae.parent.end])}ag.css(af.parent);if(!(ag.attr("id").toString().match(/parent/))){if(ac.child){ag.ctcgrad(ae.child.origin,[ae.child.start,ae.child.end])}ag.css(af.child)}ag.css({"z-index":-1})}return ab}function D(ac){var ab,ad,ae;I(ac).each(function(){switch(this.obj){case"imports":ctcAjax.imports=this.data;break;case"rule_val":ctcAjax.rule_val[this.key]=this.data;ae=this.key;break;case"val_qry":ctcAjax.val_qry[this.key]=this.data;break;case"rule":ctcAjax.rule=this.data;break;case"sel_ndx":if(E(this.key)){ctcAjax.sel_ndx=this.data}else{if("qsid"==this.key){if(E(ctcAjax.sel_ndx[this.data.query])){ctcAjax.sel_ndx[this.data.query]={}}ctcAjax.sel_ndx[this.data.query][this.data.selector]=this.data.qsid}else{ctcAjax.sel_ndx[this.key]=this.data;ab=this.key}}break;case"sel_val":ctcAjax.sel_val[this.key]=this.data;ad=this.key;break;case"rewrite":W=this.key;x=this.data;break}})}function aa(af,ac){var ae=ac.toString().match(/url\(['" ]*(.+?)['" ]*\)/),ad=E(ae)?null:ae[1],ab=ctcAjax.theme_uri+"/"+("parent"==af?ctcAjax.parnt:ctcAjax.child)+"/",ag;if(!ad){return false}else{if(ad.toString().match(/^(https?:|\/)/)){ag=ac}else{ag="url("+ab+ad+")"}}return ag}function E(ac){if("undefined"==typeof ac||false===ac||null===ac||""===ac){return true}if(true===ac||"string"===typeof ac||"number"===typeof ac){return false}if("object"===typeof ac){for(var ab in ac){if(ac.hasOwnProperty(ab)){return false}}return true}return false}function g(){var ab=[];if(1===X.sel_ndx){return ab}if(0===X.sel_ndx){X.sel_ndx=1;Y("sel_ndx",null,R);return ab}if(false===E(ctcAjax.sel_ndx)){I.each(ctcAjax.sel_ndx,function(ac,ad){var ae={label:ac,value:ac};ab.push(ae)})}return ab}function U(ac){var ab=[];if(1===X.sel_ndx){return ab}if(0===X.sel_ndx){X.sel_ndx=1;Y("sel_ndx",ac,Z);return ab}if(false===E(ctcAjax.sel_ndx[ac])){I.each(ctcAjax.sel_ndx[ac],function(ad,ae){var af={label:ad,value:ae};ab.push(af)})}return ab}function d(){var ab=[];if(1===X.rule){return ab}if(0===X.rule){X.rule=1;Y("rule",null,k);return ab}if(false===E(ctcAjax.rule)){I.each(ctcAjax.rule,function(ac,ad){var ae={label:ad.replace(/\d+/g,F),value:ac};ab.push(ae)})}return ab.sort(function(ad,ac){if(ad.label>ac.label){return 1}if(ad.label<ac.label){return -1}return 0})}function T(af,ah,ak){var ad="",ai=(E(ctcAjax.sel_val[af])||E(ctcAjax.sel_val[af].value)||E(ctcAjax.sel_val[af].value[ah])?"":ctcAjax.sel_val[af].value[ah]),ac=G(ah,("undefined"==typeof ai?"":ai.parnt)),ag=(false===E(ai.i_parnt)&&ai.i_parnt)?ctcAjax.important_label:"",ae=G(ah,("undefined"==typeof ai?"":ai.child)),ab=(false===E(ai.i_child)&&ai.i_child)?1:0,aj="ctc_"+ak+"_child_"+ah+"_i_"+af;if(false===E(ctcAjax.sel_val[af])){ad+='<div class="ctc-'+("ovrd"==ak?"input":"selector")+'-row clearfix">'+M;ad+='<div class="ctc-input-cell">'+("ovrd"==ak?ah.replace(/\d+/g,F):ctcAjax.sel_val[af].selector+'<br/><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+af+'" >'+ctcAjax.edit_txt+"</a> "+(E(ac.orig)?ctcAjax.child_only_txt:""))+"</div>"+M;if("ovrd"==ak){ad+='<div class="ctc-parent-value ctc-input-cell" id="ctc_'+ak+"_parent_"+ah+"_"+af+'">'+(E(ac.orig)?"[no value]":ac.orig+ag)+"</div>"+M}ad+='<div class="ctc-input-cell">'+M;if(false===E(ac.names)){I.each(ac.names,function(al,am){am=(E(am)?"":am);ad+='<div class="ctc-child-input-cell">'+M;var ao="ctc_"+ak+"_child_"+ah+"_"+af+am,an;if(false===(an=ae.values.shift())){an=""}ad+=(E(am)?"":ctcAjax.field_labels[am]+":<br/>")+'<input type="text" id="'+ao+'" name="'+ao+'" class="ctc-child-value'+((am+ah).toString().match(/color/)?" color-picker":"")+((am).toString().match(/url/)?" ctc-input-wide":"")+'" value="'+L(an)+'" />'+M;ad+="</div>"+M});ad+='<label for="'+aj+'"><input type="checkbox" id="'+aj+'" name="'+aj+'" value="1" '+(1===ab?"checked":"")+" />"+ctcAjax.important_label+"</label>"+M}ad+="</div>"+M;ad+=("ovrd"==ak?"":'<div class="ctc-swatch ctc-specific" id="ctc_child_'+ah+"_"+af+'_swatch">'+ctcAjax.swatch_txt+"</div>"+M+'<div class="ctc-child-input-cell ctc-button-cell" id="ctc_save_'+ah+"_"+af+'_cell">'+M+'<input type="button" class="button ctc-save-input" id="ctc_save_'+ah+"_"+af+'" name="ctc_save_'+ah+"_"+af+'" value="Save" /></div>'+M);ad+="</div><!-- end input row -->"+M}return ad}function S(ab){if(1===X.sel_val){return false}if(0==X.sel_val){X.sel_val=1;Y("sel_val",ab,S);return false}var ae,ac,ad;if(E(ctcAjax.sel_val[ab])){I("#ctc_sel_ovrd_rule_inputs").html("")}else{if(E(ctcAjax.sel_val[ab].seq)){I("#ctc_child_load_order_container").html("")}else{ae="ctc_ovrd_child_seq_"+ab;ad=parseInt(ctcAjax.sel_val[ab].seq);ac='<input type="text" id="'+ae+'" name="'+ae+'" class="ctc-child-value" value="'+ad+'" />';I("#ctc_child_load_order_container").html(ac)}if(E(ctcAjax.sel_val[ab].value)){I("#ctc_sel_ovrd_rule_inputs").html("")}else{ac="";I.each(ctcAjax.sel_val[ab].value,function(ag,af){ac+=T(ab,ag,"ovrd")});I("#ctc_sel_ovrd_rule_inputs").html(ac).find(".color-picker").each(function(){V(this)});O("#ctc_child_all_0_swatch")}}}function o(ab){if(1===X.preview){return false}if(0==X.preview){X.preview=1;var ab;if(!(ab=I(this).attr("id").toString().match(/(child|parnt)/)[1])){ab="child"}b("");Y("preview",ab,o);return false}if(2==X.preview){I("#view_"+ab+"_options_panel").text(ctcAjax.previewResponse);X.preview=0}}function A(ac){if(1===X.rule_val){return false}if(0==X.rule_val){X.rule_val=1;Y("rule_val",ac,A);return false}var ad=ctcAjax.rule[ac],ab='<div class="ctc-input-row clearfix" id="ctc_rule_row_'+ad+'">'+M;if(false===E(ctcAjax.rule_val[ac])){I.each(ctcAjax.rule_val[ac],function(af,ag){var ae=G(ad,ag);ab+='<div class="ctc-parent-row clearfix" id="ctc_rule_row_'+ad+"_"+af+'">'+M;ab+='<div class="ctc-input-cell ctc-parent-value" id="ctc_'+af+"_parent_"+ad+"_"+af+'">'+ae.orig+"</div>"+M;ab+='<div class="ctc-input-cell">'+M;ab+='<div class="ctc-swatch ctc-specific" id="ctc_'+af+"_parent_"+ad+"_"+af+'_swatch">'+ctcAjax.swatch_txt+"</div></div>"+M;ab+='<div class="ctc-input-cell"><a href="#" class="ctc-selector-handle" id="ctc_selector_'+ad+"_"+af+'">'+ctcAjax.selector_txt+"</a></div>"+M;ab+='<div id="ctc_selector_'+ad+"_"+af+'_container" class="ctc-selector-container">'+M;ab+='<a href="#" id="ctc_selector_'+ad+"_"+af+'_close" class="ctc-selector-handle ctc-exit" title="'+ctcAjax.close_txt+'"></a>';ab+='<div id="ctc_selector_'+ad+"_"+af+'_inner_container" class="ctc-selector-inner-container clearfix">'+M;ab+='<div id="ctc_status_val_qry_'+af+'"></div>'+M;ab+='<div id="ctc_selector_'+ad+"_"+af+'_rows"></div>'+M;ab+="</div></div></div>"+M});ab+="</div>"+M}I("#ctc_rule_value_inputs").html(ab).find(".ctc-swatch").each(function(){O(this)})}function y(ae){if(1==X.val_qry){return false}var ag,ac,af=I("#ctc_rule_menu_selected").text().replace(/[^\w\-]/g,f),ab,ad="";if(0===X.val_qry){X.val_qry=1;ag={rule:af};Y("val_qry",ae,y,ag);return false}if(false===E(ctcAjax.val_qry[ae])){I.each(ctcAjax.val_qry[ae],function(ai,ah){page_rule=ai;I.each(ah,function(ak,aj){ad+='<h4 class="ctc-query-heading">'+ak+"</h4>"+M;if(false===E(aj)){I.each(aj,function(al,am){ctcAjax.sel_val[al]=am;ad+=T(al,ai,ae)})}})})}ab="#ctc_selector_"+af+"_"+ae+"_rows";I(ab).html(ad).find(".color-picker").each(function(){V(this)});I(ab).find(".ctc-swatch").each(function(){O(this)})}function Y(ad,ac,ag,ae){var ab={ctc_query_obj:ad,ctc_query_key:ac},af="#ctc_status_"+ad+("val_qry"==ad?"_"+ac:"");if("object"===typeof ae){I.each(ae,function(ah,ai){ab["ctc_query_"+ah]=ai})}I(".ctc-status-icon").remove();I(af).append('<span class="ctc-status-icon spinner"></span>');I(".spinner").show();ab.action="ctc_query";ab._wpnonce=I("#_wpnonce").val();I.post(ctcAjax.ajaxurl,ab,function(ah){X[ad]=2;I(".ctc-status-icon").removeClass("spinner");if(E(ah)){I(".ctc-status-icon").addClass("failure");if("preview"==ad){ctcAjax.previewResponse=ctcAjax.css_fail_txt;ag(ac)}}else{I(".ctc-status-icon").addClass("success");if("preview"==ad){ctcAjax.previewResponse=ah.shift().data}else{D(ah)}if("function"===typeof ag){ag(ac)}return false}},"json").fail(function(){I(".ctc-status-icon").removeClass("spinner");I(".ctc-status-icon").addClass("failure");if("preview"==ad){ctcAjax.previewResponse=ctcAjax.css_fail_txt;X[ad]=2;ag(ac)}else{X[ad]=0}});return false}function B(ag){var ae={},ah,ad,ab,ac,ai=I(ag).attr("id"),af;if(E(K[ai])){K[ai]=0}K[ai]++;I(ag).prop("disabled",true);I(".ctc-status-icon").remove();I(ag).parent(".ctc-textarea-button-cell, .ctc-button-cell").append('<span class="ctc-status-icon spinner"></span>');I(".spinner").show();if((ah=I("#ctc_new_selectors"))&&"ctc_save_new_selectors"==I(ag).attr("id")){ae.ctc_new_selectors=ah.val();if(ad=I("#ctc_sel_ovrd_query_selected")){ae.ctc_sel_ovrd_query=ad.text()}}else{if((ab=I("#ctc_child_imports"))&&"ctc_save_imports"==I(ag).attr("id")){ae.ctc_child_imports=ab.val()}else{ae=O(ag)}}I("#ctc_sel_ovrd_selector_selected").find("#ctc_rewrite_selector").each(function(){af=I("#ctc_rewrite_selector").val(),origsel=I("#ctc_rewrite_selector_orig").val();if(E(af)||!af.toString().match(/\w/)){af=origsel}else{ae.ctc_rewrite_selector=af}I(".ctc-rewrite-toggle").text(ctcAjax.rename_txt);I("#ctc_sel_ovrd_selector_selected").html(af)});ae.action="ctc_update";ae._wpnonce=I("#_wpnonce").val();I.post(ctcAjax.ajaxurl,ae,function(aj){I(ag).prop("disabled",false);I(".ctc-status-icon").removeClass("spinner");if(E(aj)){I(".ctc-status-icon").addClass("failure")}else{I(".ctc-status-icon").addClass("success");I("#ctc_new_selectors").val("");D(aj);m();if(false===E(W)){J(W,x);W=x=null}}return false},"json").fail(function(){I(ag).prop("disabled",false);I(".ctc-status-icon").removeClass("spinner");I(".ctc-status-icon").addClass("failure")});return false}function G(ad,ab){ab=("undefined"==typeof ab?"":ab);var ac={orig:ab};if(ad.toString().match(/^border(\-(top|right|bottom|left))?$/)){var ae=ab.toString().split(/ +/);ac.names=["_border_width","_border_style","_border_color"];ac.values=[("undefined"==typeof ae[0]?"":ae[0]),("undefined"==typeof ae[1]?"":ae[1]),("undefined"==typeof ae[2]?"":ae[2])]}else{if(ad.toString().match(/^background\-image/)){ac.names=["_background_url","_background_origin","_background_color1","_background_color2"];ac.values=["","","",""];if(false===(E(ab))&&!(ab.toString().match(/url/))){var ae=ab.toString().split(/:/);ac.values[1]=("undefined"==typeof ae[0]?"":ae[0]);ac.values[2]=("undefined"==typeof ae[1]?"":ae[1]);ac.values[3]=("undefined"==typeof ae[3]?"":ae[3]);ac.orig=[ac.values[1],ac.values[2],ac.values[3]].join(" ")}else{ac.values[0]=ab}}else{ac.names=[""];ac.values=[ab]}}return ac}function a(ab){s=ab;I("#ctc_sel_ovrd_query").val("");I("#ctc_sel_ovrd_query_selected").text(ab);I("#ctc_sel_ovrd_selector").val("");I("#ctc_sel_ovrd_selector_selected").html(" ");I("#ctc_sel_ovrd_rule_inputs").html("");Z(ab);O("#ctc_child_all_0_swatch");I("#ctc_new_selector_row").show()}function J(ac,ab){I("#ctc_sel_ovrd_selector").val("");I("#ctc_sel_ovrd_selector_selected").text(ab);I("#ctc_sel_ovrd_qsid").val(ac);C=ac;if(1!=X.sel_val){X.sel_val=0}S(ac);I(".ctc-rewrite-toggle").text(ctcAjax.rename_txt);I("#ctc_sel_ovrd_new_rule, #ctc_sel_ovrd_rule_header,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs,.ctc-rewrite-toggle").show()}function c(ac,ab){I("#ctc_rule_menu").val("");I("#ctc_rule_menu_selected").text(ab);if(1!=X.rule_val){X.rule_val=0}A(ac);I(".ctc-rewrite-toggle").text(ctcAjax.rename_txt);I("#ctc_rule_value_inputs,#ctc_input_row_rule_header").show()}function R(){v=g();I("#ctc_sel_ovrd_query").autocomplete({source:v,minLength:0,selectFirst:true,autoFocus:true,select:function(ac,ab){a(ab.item.value);return false},focus:function(ab){ab.preventDefault()}})}function Z(ab){t=U(ab);I("#ctc_sel_ovrd_selector").autocomplete({source:t,selectFirst:true,autoFocus:true,select:function(ad,ac){J(ac.item.value,ac.item.label);return false},focus:function(ac){ac.preventDefault()}})}function k(){N=d();I("#ctc_rule_menu").autocomplete({source:N,selectFirst:true,autoFocus:true,select:function(ac,ab){c(ab.item.value,ab.item.label);return false},focus:function(ab){ab.preventDefault()}})}function Q(ae,ac){var ab=[],ad=(E(ctcAjax.sel_val[C]))||(E(ctcAjax.sel_val[C].value));if(E(N)){N=d()}I.each(N,function(af,ai){var ag=false,ah=new RegExp(I.ui.autocomplete.escapeRegex(ae.term),"i");if(ah.test(ai.label)){if(false===ad){I.each(ctcAjax.sel_val[C].value,function(ak,aj){if(ai.label==ak.replace(/\d+/g,F)){ag=true;return false}});if(ag){return}}ab.push(ai)}});ac(ab)}function P(){I("#ctc_new_rule_menu").autocomplete({source:Q,selectFirst:true,autoFocus:true,select:function(ac,ab){ac.preventDefault();var ad=I(T(C,ab.item.label.replace(/[^\w\-]/g,f),"ovrd"));I("#ctc_sel_ovrd_rule_inputs").append(ad);I("#ctc_new_rule_menu").val("");if(E(ctcAjax.sel_val[C].value)){ctcAjax.sel_val[C]["value"]={}}ctcAjax.sel_val[C].value[ab.item.label]={child:""};ad.find('input[type="text"]').each(function(ae,af){if(I(af).hasClass("color-picker")){V(af)}I(af).focus()});return false},focus:function(ab){ab.preventDefault()}})}function m(){R();Z(s);k();P()}function q(ab,ac){var ad=false;I.each(ctcAjax.themes,function(ae,af){I.each(af,function(ag,ah){if(ag==ab&&("parnt"==ae||"new"==ac)){ad=true;return false}});if(ad){return false}});return ad}function l(){var ae=I("#ctc_theme_parnt").val(),ab=slugbase=ae+"-child",ac=ctcAjax.themes.parnt[ae].Name+" Child",ag="",ad="",af="00";while(q(ab,"new")){ag=(""==ag?2:ag+1);ad=af.substring(0,af.length-ag.toString().length)+ag.toString();ab=slugbase+ad}r=ab;h=ac+(ad.length?" "+ad:"")}function b(ab){var ac="";if(false===E(ab)){I.each(ab,function(ad,ae){ac+='<div class="'+ad+'"><ul>'+M;I(ae).each(function(af,ag){ac+="<li>"+ag.toString()+"</li>"+M});ac+="</ul></div>"})}I("#ctc_error_notice").html(ac)}function u(){var ae=/[^\w\-]/,ac=I("#ctc_child_template").val().toString().replace(ae).toLowerCase(),ab=I("#ctc_theme_child").val().toString().replace(ae).toLowerCase(),ad=I("input[name=ctc_child_type]:checked").val(),af=[];if("new"==ad){ab=ac}if(q(ab,ad)){af.push(ctcAjax.theme_exists_txt.toString().replace(/%s/,ab))}if(""===ab){af.push(ctcAjax.inval_theme_txt)}if(""===I("#ctc_child_name").val()){af.push(ctcAjax.inval_name_txt)}if(af.length){b({error:af});return false}return true}function p(ab){I("#ctc_theme_parent").parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner"></span>');I(".spinner").show();document.location="?page="+ctcAjax.page+"&ctc_parent="+ab.value}function H(ab){if(false===E(ctcAjax.themes.child[ab.value])){I("#ctc_child_name").val(ctcAjax.themes.child[ab.value].Name);I("#ctc_child_author").val(ctcAjax.themes.child[ab.value].Author);I("#ctc_child_version").val(ctcAjax.themes.child[ab.value].Version)}}function z(){I(".updated, .error").slideUp("slow",function(){I(".updated").remove()})}function e(){var af=I("#ctc_theme_parnt").val(),ae=ctcAjax.theme_uri.replace(/^https?:\/\//,""),ac=ctcAjax.homeurl.replace(/^https?/,ctcAjax.ssl?"https":"http"),ad=ac+"?preview=1&p=x&template="+af+"&stylesheet="+af,ag=new RegExp("<link rel=[\"']stylesheet[\"'][^>]+?"+ae+"/"+af+"/(.+?\\.css)[^>]+?>","g"),ab;if(E(af)){return}I.get(ad,function(ah){while(ab=ag.exec(ah)){if("style.css"==ab[1]){break}if(ab[1].match(/bootstrap/)){continue}ctcAjax.addl_css.push(ab[1]);I(".ctc_checkbox").each(function(ai,aj){if(I(this).val()==ab[1]){I(this).prop("checked",true)}})}})}function n(ac){var ab=ac+"_panel";I(".nav-tab").removeClass("nav-tab-active");I(".ctc-option-panel").removeClass("ctc-option-panel-active");I(".ctc-selector-container").hide();I(ac).addClass("nav-tab-active");I(".ctc-option-panel-container").scrollTop(0);I(ab).addClass("ctc-option-panel-active")}function j(ae){var ab=I(ae).attr("id").match(/_(\d+)$/)[1],ad=ctcAjax.sel_val[ab].query,ac=ctcAjax.sel_val[ab].selector,af="#query_selector_options";a(ad);J(ab,ac);n(af)}function i(ac){var ab;if(I("#ctc_rewrite_selector").length){ab=I("#ctc_rewrite_selector_orig").val();I("#ctc_sel_ovrd_selector_selected").text(ab);I(ac).text(ctcAjax.rename_txt)}else{ab=I("#ctc_sel_ovrd_selector_selected").text();I("#ctc_sel_ovrd_selector_selected").html('<input id="ctc_rewrite_selector" name="ctc_rewrite_selector" type="text" value="'+L(ab)+'" autocomplete="off" /><input id="ctc_rewrite_selector_orig" name="ctc_rewrite_selector_orig" type="hidden" value="'+L(ab)+'"/>');I(ac).text(ctcAjax.cancel_txt)}}var M="\n",s="base",C,K={},W,x,w=new RegExp('"',"g"),r="",h="",X={rule:2,sel_ndx:2,val_qry:0,rule_val:0,sel_val:0,preview:0},t=[],v=[],N=[];l();I.widget("ctc.themeMenu",I.ui.selectmenu,{_renderItem:function(ac,ad){var ab=I("<li>");I("#ctc_theme_option_"+ad.value).detach().appendTo(ab);return ab.appendTo(ac)}});I("#ctc_theme_parnt").themeMenu({select:function(ab,ac){p(ac.item)}});if(E(ctcAjax.themes.child)){I("#ctc_child_name").val(h);I("#ctc_child_template").val(r)}else{I("#ctc_theme_child").themeMenu({select:function(ab,ac){H(ac.item)}})}I(".ctc-option-panel-container").on("focus",".color-picker",function(){b("");I(".color-picker").not(this).iris("hide");I(this).iris("toggle");I(".iris-picker").css({position:"absolute","z-index":10})});I(".ctc-option-panel-container").on("change",".ctc-child-value, input[type=checkbox]",function(){O(this)});I(".ctc-option-panel-container").on("click",".ctc-selector-handle",function(ac){ac.preventDefault();b("");var ad=I(this).attr("id").toString().replace("_close",""),ab=ad.toString().match(/_(\d+)$/)[1];if(I("#"+ad+"_container").is(":hidden")){if(1!=X.val_qry){X.val_qry=0}y(ab)}I("#"+ad+"_container").fadeToggle("fast");I(".ctc-selector-container").not("#"+ad+"_container").fadeOut("fast")});I(".nav-tab").on("click",function(ab){ab.preventDefault();b("");I(".ctc-status-icon").remove();var ac="#"+I(this).attr("id");n(ac)});I("#view_child_options,#view_parnt_options").on("click",o);I("#ctc_load_form").on("submit",function(){return(u()&&confirm(ctcAjax.load_txt))});I(document).on("click",".ctc-save-input",function(ab){B(this)});I(document).on("click",".ctc-selector-edit",function(ab){j(this)});I(document).on("click",".ctc-rewrite-toggle",function(ab){ab.preventDefault();i(this)});I(document).on("click",".ctc-section-toggle",function(ab){I(this).toggleClass("open");var ac=I(this).attr("id")+"_content";I("#"+ac).slideToggle("fast")});I(document).on("click",".ctc-live-preview",function(ab){ab.stopImmediatePropagation();ab.preventDefault();document.location=I(this).prop("href");return false});I(document).on("change","#ctc_configtype",function(ab){var ac=I(this).val();if(E(ac)||"theme"==ac){I(".ctc-theme-only").stop().slideDown("fast")}else{I(".ctc-theme-only").stop().slideUp("fast")}});I("#ctc_theme_child,#ctc_theme_child-button,#ctc_child_type_existing").on("focus click",function(){I("#ctc_child_type_existing").prop("checked",true);I("#ctc_child_type_new").prop("checked",false);I("#ctc_child_template").val("")});I("#ctc_child_type_new,#ctc_child_template").on("focus click",function(){I("#ctc_child_type_existing").prop("checked",false);I("#ctc_child_type_new").prop("checked",true);I("#ctc_child_name").val(h);I("#ctc_child_template").val(r)});m();a(s);e();I("input[type=submit],input[type=button]").prop("disabled",false);setTimeout(z,6000)});
|
1 |
+
jQuery(document).ready(function(t){function e(t){return o(t)?t:t.toString().replace(G,""")}function c(e){t(e).iris({change:function(c,a){t(e).data("color",a.color.toString()),l(e)}})}function a(t){var e=parseInt(t),c=String.fromCharCode(e);return c}function n(t){var e=t.charCodeAt(0);return e}function l(e){var c=/^(ctc_(ovrd|\d+)_(parent|child)_([0-9a-z\-]+)_(\d+))(_\w+)?$/,a=t(e).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:""}},s={child:!1,parent:!1},_={};return a.find(".ctc-parent-value, .ctc-child-value").each(function(){var a,n,u=t(this).attr("id"),d=u.toString().match(c),v=d[2],p=d[3],h="undefined"==typeof d[4]?"":d[4],f=d[5],x="undefined"==typeof d[6]?"":d[6],m="parent"==p?t(this).text().replace(/!$/,""):t(this).val(),g="ctc_"+v+"_child_"+h+"_i_"+f;if(!1===o(t(this).data("color"))&&(m=t(this).data("color"),t(this).data("color",null)),"child"==p&&(_[u]=m,_[g]=t("#"+g).is(":checked")?1:0),""!=m)if(!1===o(x))switch(x){case"_border_width":l[p][h+"-width"]=m;break;case"_border_style":l[p][h+"-style"]=m;break;case"_border_color":l[p][h+"-color"]=m;break;case"_background_url":l[p]["background-image"]=i(p,m);break;case"_background_color":l[p]["background-color"]=e.value;break;case"_background_color1":r[p].start=m,s[p]=!0;break;case"_background_color2":r[p].end=m,s[p]=!0;break;case"_background_origin":r[p].origin=m,s[p]=!0}else(a=h.toString().match(/^border(\-(top|right|bottom|left))?$/)&&!m.match(/none/))?(n=m.toString().split(/ +/),l[p][h+"-width"]="undefined"==typeof n[0]?"":n[0],l[p][h+"-style"]="undefined"==typeof n[1]?"":n[1],l[p][h+"-color"]="undefined"==typeof n[2]?"":n[2]):"background-image"!=h||m.match(/none/)?"seq"!=h&&(l[p][h]=m):m.toString().match(/url\(/)?l[p]["background-image"]=i(p,m):(n=m.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],s[p]=!0):l[p]["background-image"]=m)}),"undefined"!=typeof n&&!1===o(n.attr("id"))&&(n.removeAttr("style"),s.parent&&n.ctcgrad(r.parent.origin,[r.parent.start,r.parent.end]),n.css(l.parent),n.attr("id").toString().match(/parent/)||(s.child&&n.ctcgrad(r.child.origin,[r.child.start,r.child.end]),n.css(l.child)),n.css({"z-index":-1})),_}function r(e){var c,a,n;t(e).each(function(){switch(this.obj){case"imports":ctcAjax.imports=this.data;break;case"rule_val":ctcAjax.rule_val[this.key]=this.data,n=this.key;break;case"val_qry":ctcAjax.val_qry[this.key]=this.data;break;case"rule":ctcAjax.rule=this.data;break;case"sel_ndx":o(this.key)?ctcAjax.sel_ndx=this.data:"qsid"==this.key?(o(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,c=this.key);break;case"sel_val":ctcAjax.sel_val[this.key]=this.data,a=this.key;break;case"rewrite":P=this.key,U=this.data}})}function i(t,e){var c,a=e.toString().match(/url\(['" ]*(.+?)['" ]*\)/),n=o(a)?null:a[1],l=ctcAjax.theme_uri+"/"+("parent"==t?ctcAjax.parnt:ctcAjax.child)+"/";return n?c=n.toString().match(/^(data:|https?:|\/)/)?e:"url("+l+n+")":!1}function o(t){if("undefined"==typeof t||!1===t||null===t||""===t)return!0;if(!0===t||"string"==typeof t||"number"==typeof t)return!1;if("object"==typeof t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}return!1}function s(){var e=[];return 1===K.sel_ndx?e:0===K.sel_ndx?(K.sel_ndx=1,x("sel_ndx",null,b),e):(!1===o(ctcAjax.sel_ndx)&&t.each(ctcAjax.sel_ndx,function(t){var c={label:t,value:t};e.push(c)}),e)}function _(e){var c=[];return 1===K.sel_ndx?c:0===K.sel_ndx?(K.sel_ndx=1,x("sel_ndx",e,A),c):(!1===o(ctcAjax.sel_ndx[e])&&t.each(ctcAjax.sel_ndx[e],function(t,e){var a={label:t,value:e};c.push(a)}),c)}function u(){var e=[];return 1===K.rule?e:0===K.rule?(K.rule=1,x("rule",null,k),e):(!1===o(ctcAjax.rule)&&t.each(ctcAjax.rule,function(t,c){var n={label:c.replace(/\d+/g,a),value:t};e.push(n)}),e.sort(function(t,e){return t.label>e.label?1:t.label<e.label?-1:0}))}function d(c,n,l){var r="",i=o(ctcAjax.sel_val[c])||o(ctcAjax.sel_val[c].value)||o(ctcAjax.sel_val[c].value[n])?"":ctcAjax.sel_val[c].value[n],s=g(n,"undefined"==typeof i?"":i.parnt),_=!1===o(i.i_parnt)&&i.i_parnt?ctcAjax.important_label:"",u=g(n,"undefined"==typeof i?"":i.child),d=!1===o(i.i_child)&&i.i_child?1:0,v="ctc_"+l+"_child_"+n+"_i_"+c;return!1===o(ctcAjax.sel_val[c])&&(r+='<div class="ctc-'+("ovrd"==l?"input":"selector")+'-row clearfix">'+Q,r+='<div class="ctc-input-cell">'+("ovrd"==l?n.replace(/\d+/g,a):ctcAjax.sel_val[c].selector+'<br/><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+c+'" >'+ctcAjax.edit_txt+"</a> "+(o(s.orig)?ctcAjax.child_only_txt:""))+"</div>"+Q,"ovrd"==l&&(r+='<div class="ctc-parent-value ctc-input-cell" id="ctc_'+l+"_parent_"+n+"_"+c+'">'+(o(s.orig)?"[no value]":s.orig+_)+"</div>"+Q),r+='<div class="ctc-input-cell">'+Q,!1===o(s.names)&&(t.each(s.names,function(t,a){a=o(a)?"":a,r+='<div class="ctc-child-input-cell">'+Q;var i,s="ctc_"+l+"_child_"+n+"_"+c+a;!1===(i=u.values.shift())&&(i=""),r+=(o(a)?"":ctcAjax.field_labels[a]+":<br/>")+'<input type="text" id="'+s+'" name="'+s+'" class="ctc-child-value'+((a+n).toString().match(/color/)?" color-picker":"")+(a.toString().match(/url/)?" ctc-input-wide":"")+'" value="'+e(i)+'" />'+Q,r+="</div>"+Q}),r+='<label for="'+v+'"><input type="checkbox" id="'+v+'" name="'+v+'" value="1" '+(1===d?"checked":"")+" />"+ctcAjax.important_label+"</label>"+Q),r+="</div>"+Q,r+="ovrd"==l?"":'<div class="ctc-swatch ctc-specific" id="ctc_child_'+n+"_"+c+'_swatch">'+ctcAjax.swatch_txt+"</div>"+Q+'<div class="ctc-child-input-cell ctc-button-cell" id="ctc_save_'+n+"_"+c+'_cell">'+Q+'<input type="button" class="button ctc-save-input" id="ctc_save_'+n+"_"+c+'" name="ctc_save_'+n+"_"+c+'" value="Save" /></div>'+Q,r+="</div><!-- end input row -->"+Q),r}function v(e){if(1===K.sel_val)return!1;if(0==K.sel_val)return K.sel_val=1,x("sel_val",e,v),!1;var a,n,r;o(ctcAjax.sel_val[e])?t("#ctc_sel_ovrd_rule_inputs").html(""):(o(ctcAjax.sel_val[e].seq)?t("#ctc_child_load_order_container").html(""):(a="ctc_ovrd_child_seq_"+e,r=parseInt(ctcAjax.sel_val[e].seq),n='<input type="text" id="'+a+'" name="'+a+'" class="ctc-child-value" value="'+r+'" />',t("#ctc_child_load_order_container").html(n)),o(ctcAjax.sel_val[e].value)?t("#ctc_sel_ovrd_rule_inputs").html(""):(n="",t.each(ctcAjax.sel_val[e].value,function(t){n+=d(e,t,"ovrd")}),t("#ctc_sel_ovrd_rule_inputs").html(n).find(".color-picker").each(function(){c(this)}),l("#ctc_child_all_0_swatch")))}function p(e){if(1===K.preview)return!1;if(0==K.preview){K.preview=1;var e;return(e=t(this).attr("id").toString().match(/(child|parnt)/)[1])||(e="child"),R(""),x("preview",e,p),!1}2==K.preview&&(t("#view_"+e+"_options_panel").text(ctcAjax.previewResponse),K.preview=0)}function h(e){if(1===K.rule_val)return!1;if(0==K.rule_val)return K.rule_val=1,x("rule_val",e,h),!1;var c=ctcAjax.rule[e],a='<div class="ctc-input-row clearfix" id="ctc_rule_row_'+c+'">'+Q;!1===o(ctcAjax.rule_val[e])&&(t.each(ctcAjax.rule_val[e],function(t,e){var n=g(c,e);a+='<div class="ctc-parent-row clearfix" id="ctc_rule_row_'+c+"_"+t+'">'+Q,a+='<div class="ctc-input-cell ctc-parent-value" id="ctc_'+t+"_parent_"+c+"_"+t+'">'+n.orig+"</div>"+Q,a+='<div class="ctc-input-cell">'+Q,a+='<div class="ctc-swatch ctc-specific" id="ctc_'+t+"_parent_"+c+"_"+t+'_swatch">'+ctcAjax.swatch_txt+"</div></div>"+Q,a+='<div class="ctc-input-cell"><a href="#" class="ctc-selector-handle" id="ctc_selector_'+c+"_"+t+'">'+ctcAjax.selector_txt+"</a></div>"+Q,a+='<div id="ctc_selector_'+c+"_"+t+'_container" class="ctc-selector-container">'+Q,a+='<a href="#" id="ctc_selector_'+c+"_"+t+'_close" class="ctc-selector-handle ctc-exit" title="'+ctcAjax.close_txt+'"></a>',a+='<div id="ctc_selector_'+c+"_"+t+'_inner_container" class="ctc-selector-inner-container clearfix">'+Q,a+='<div id="ctc_status_val_qry_'+t+'"></div>'+Q,a+='<div id="ctc_selector_'+c+"_"+t+'_rows"></div>'+Q,a+="</div></div></div>"+Q}),a+="</div>"+Q),t("#ctc_rule_value_inputs").html(a).find(".ctc-swatch").each(function(){l(this)})}function f(e){if(1==K.val_qry)return!1;var a,r,i=t("#ctc_rule_menu_selected").text().replace(/[^\w\-]/g,n),s="";return 0===K.val_qry?(K.val_qry=1,a={rule:i},x("val_qry",e,f,a),!1):(!1===o(ctcAjax.val_qry[e])&&t.each(ctcAjax.val_qry[e],function(c,a){page_rule=c,t.each(a,function(a,n){s+='<h4 class="ctc-query-heading">'+a+"</h4>"+Q,!1===o(n)&&t.each(n,function(t,a){ctcAjax.sel_val[t]=a,s+=d(t,c,e)})})}),r="#ctc_selector_"+i+"_"+e+"_rows",t(r).html(s).find(".color-picker").each(function(){c(this)}),void t(r).find(".ctc-swatch").each(function(){l(this)}))}function x(e,c,a,n){var l={ctc_query_obj:e,ctc_query_key:c},i="#ctc_status_"+e+("val_qry"==e?"_"+c:"");return"object"==typeof n&&t.each(n,function(t,e){l["ctc_query_"+t]=e}),t(".ctc-status-icon").remove(),t(i).append('<span class="ctc-status-icon spinner"></span>'),t(".spinner").show(),l.action="ctc_query",l._wpnonce=t("#_wpnonce").val(),t.post(ctcAjax.ajaxurl,l,function(n){return K[e]=2,t(".ctc-status-icon").removeClass("spinner"),o(n)?(t(".ctc-status-icon").addClass("failure"),void("preview"==e&&(ctcAjax.previewResponse=ctcAjax.css_fail_txt,a(c)))):(t(".ctc-status-icon").addClass("success"),"preview"==e?ctcAjax.previewResponse=n.shift().data:r(n),"function"==typeof a&&a(c),!1)},"json").fail(function(){t(".ctc-status-icon").removeClass("spinner"),t(".ctc-status-icon").addClass("failure"),"preview"==e?(ctcAjax.previewResponse=ctcAjax.css_fail_txt,K[e]=2,a(c)):K[e]=0}),!1}function m(e){var c,a,n,i,s={},_=t(e).attr("id");return o(B[_])&&(B[_]=0),B[_]++,t(e).prop("disabled",!0),t(".ctc-status-icon").remove(),t(e).parent(".ctc-textarea-button-cell, .ctc-button-cell").append('<span class="ctc-status-icon spinner"></span>'),t(".spinner").show(),(c=t("#ctc_new_selectors"))&&"ctc_save_new_selectors"==t(e).attr("id")?(s.ctc_new_selectors=c.val(),(a=t("#ctc_sel_ovrd_query_selected"))&&(s.ctc_sel_ovrd_query=a.text())):(n=t("#ctc_child_imports"))&&"ctc_save_imports"==t(e).attr("id")?s.ctc_child_imports=n.val():s=l(e),t("#ctc_sel_ovrd_selector_selected").find("#ctc_rewrite_selector").each(function(){i=t("#ctc_rewrite_selector").val(),origsel=t("#ctc_rewrite_selector_orig").val(),o(i)||!i.toString().match(/\w/)?i=origsel:s.ctc_rewrite_selector=i,t(".ctc-rewrite-toggle").text(ctcAjax.rename_txt),t("#ctc_sel_ovrd_selector_selected").html(i)}),s.action="ctc_update",s._wpnonce=t("#_wpnonce").val(),t.post(ctcAjax.ajaxurl,s,function(c){return t(e).prop("disabled",!1),t(".ctc-status-icon").removeClass("spinner"),o(c)?t(".ctc-status-icon").addClass("failure"):(t(".ctc-status-icon").addClass("success"),t("#ctc_new_selectors").val(""),r(c),C(),!1===o(P)&&(y(P,U),P=U=null)),!1},"json").fail(function(){t(e).prop("disabled",!1),t(".ctc-status-icon").removeClass("spinner"),t(".ctc-status-icon").addClass("failure")}),!1}function g(t,e){e="undefined"==typeof e?"":e;var c={orig:e};if(t.toString().match(/^border(\-(top|right|bottom|left))?$/)){var a=e.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(t.toString().match(/^background\-image/))if(c.names=["_background_url","_background_origin","_background_color1","_background_color2"],c.values=["","","",""],!1!==o(e)||e.toString().match(/(url|none)/))c.values[0]=e;else{var a=e.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=[e];return c}function w(e){V=e,t("#ctc_sel_ovrd_query").val(""),t("#ctc_sel_ovrd_query_selected").text(e),t("#ctc_sel_ovrd_selector").val(""),t("#ctc_sel_ovrd_selector_selected").html(" "),t("#ctc_sel_ovrd_rule_inputs").html(""),A(e),l("#ctc_child_all_0_swatch"),t("#ctc_new_selector_row").show()}function y(e,c){t("#ctc_sel_ovrd_selector").val(""),t("#ctc_sel_ovrd_selector_selected").text(c),t("#ctc_sel_ovrd_qsid").val(e),O=e,1!=K.sel_val&&(K.sel_val=0),v(e),t(".ctc-rewrite-toggle").text(ctcAjax.rename_txt),t("#ctc_sel_ovrd_new_rule, #ctc_sel_ovrd_rule_header,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs,.ctc-rewrite-toggle").show()}function j(e,c){t("#ctc_rule_menu").val(""),t("#ctc_rule_menu_selected").text(c),1!=K.rule_val&&(K.rule_val=0),h(e),t(".ctc-rewrite-toggle").text(ctcAjax.rename_txt),t("#ctc_rule_value_inputs,#ctc_input_row_rule_header").show()}function b(){X=s(),t("#ctc_sel_ovrd_query").autocomplete({source:X,minLength:0,selectFirst:!0,autoFocus:!0,select:function(t,e){return w(e.item.value),!1},focus:function(t){t.preventDefault()}})}function A(e){W=_(e),t("#ctc_sel_ovrd_selector").autocomplete({source:W,selectFirst:!0,autoFocus:!0,select:function(t,e){return y(e.item.value,e.item.label),!1},focus:function(t){t.preventDefault()}})}function k(){Y=u(),t("#ctc_rule_menu").autocomplete({source:Y,selectFirst:!0,autoFocus:!0,select:function(t,e){return j(e.item.value,e.item.label),!1},focus:function(t){t.preventDefault()}})}function q(e,c){var n=[],l=o(ctcAjax.sel_val[O])||o(ctcAjax.sel_val[O].value);o(Y)&&(Y=u()),t.each(Y,function(c,r){var i=!1,o=new RegExp(t.ui.autocomplete.escapeRegex(e.term),"i");if(o.test(r.label)){if(!1===l&&(t.each(ctcAjax.sel_val[O].value,function(t){return r.label==t.replace(/\d+/g,a)?(i=!0,!1):void 0}),i))return;n.push(r)}}),c(n)}function S(){t("#ctc_new_rule_menu").autocomplete({source:q,selectFirst:!0,autoFocus:!0,select:function(e,a){e.preventDefault();var l=t(d(O,a.item.label.replace(/[^\w\-]/g,n),"ovrd"));return t("#ctc_sel_ovrd_rule_inputs").append(l),t("#ctc_new_rule_menu").val(""),o(ctcAjax.sel_val[O].value)&&(ctcAjax.sel_val[O].value={}),ctcAjax.sel_val[O].value[a.item.label]={child:""},l.find('input[type="text"]').each(function(e,a){t(a).hasClass("color-picker")&&c(a),t(a).focus()}),!1},focus:function(t){t.preventDefault()}})}function C(){b(),A(V),k(),S()}function D(e,c){var a=!1;return t.each(ctcAjax.themes,function(n,l){return t.each(l,function(t){return t!=e||"parnt"!=n&&"new"!=c?void 0:(a=!0,!1)}),a?!1:void 0}),a}function F(){for(var e=t("#ctc_theme_parnt").val(),c=slugbase=e+"-child",a=ctcAjax.themes.parnt[e].Name+" Child",n="",l="",r="00";D(c,"new");)n=""==n?2:n+1,l=r.substring(0,r.length-n.toString().length)+n.toString(),c=slugbase+l;H=c,J=a+(l.length?" "+l:"")}function R(e){var c="";!1===o(e)&&t.each(e,function(e,a){c+='<div class="'+e+'"><ul>'+Q,t(a).each(function(t,e){c+="<li>"+e.toString()+"</li>"+Q}),c+="</ul></div>"}),t("#ctc_error_notice").html(c)}function T(){var e=/[^\w\-]/,c=t("#ctc_child_template").val().toString().replace(e).toLowerCase(),a=t("#ctc_theme_child").val().toString().replace(e).toLowerCase(),n=t("input[name=ctc_child_type]:checked").val(),l=[];return"new"==n&&(a=c),D(a,n)&&l.push(ctcAjax.theme_exists_txt.toString().replace(/%s/,a)),""===a&&l.push(ctcAjax.inval_theme_txt),""===t("#ctc_child_name").val()&&l.push(ctcAjax.inval_name_txt),l.length?(R({error:l}),!1):!0}function $(e){t("#ctc_theme_parent").parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner"></span>'),t(".spinner").show(),document.location="?page="+ctcAjax.page+"&ctc_parent="+e.value}function I(e){!1===o(ctcAjax.themes.child[e.value])&&(t("#ctc_child_name").val(ctcAjax.themes.child[e.value].Name),t("#ctc_child_author").val(ctcAjax.themes.child[e.value].Author),t("#ctc_child_version").val(ctcAjax.themes.child[e.value].Version))}function z(){t(".updated, .error").slideUp("slow",function(){t(".updated").remove()})}function E(){var e,c=t("#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");o(c)||t.get(l,function(c){for(;(e=r.exec(c))&&"style.css"!=e[1];)e[1].match(/bootstrap/)||(ctcAjax.addl_css.push(e[1]),t(".ctc_checkbox").each(function(){t(this).val()==e[1]&&t(this).prop("checked",!0)}))})}function L(e){var c=e+"_panel";t(".nav-tab").removeClass("nav-tab-active"),t(".ctc-option-panel").removeClass("ctc-option-panel-active"),t(".ctc-selector-container").hide(),t(e).addClass("nav-tab-active"),t(".ctc-option-panel-container").scrollTop(0),t(c).addClass("ctc-option-panel-active")}function M(e){var c=t(e).attr("id").match(/_(\d+)$/)[1],a=ctcAjax.sel_val[c].query,n=ctcAjax.sel_val[c].selector,l="#query_selector_options";w(a),y(c,n),L(l)}function N(c){var a;t("#ctc_rewrite_selector").length?(a=t("#ctc_rewrite_selector_orig").val(),t("#ctc_sel_ovrd_selector_selected").text(a),t(c).text(ctcAjax.rename_txt)):(a=t("#ctc_sel_ovrd_selector_selected").text(),t("#ctc_sel_ovrd_selector_selected").html('<input id="ctc_rewrite_selector" name="ctc_rewrite_selector" type="text" value="'+e(a)+'" autocomplete="off" /><input id="ctc_rewrite_selector_orig" name="ctc_rewrite_selector_orig" type="hidden" value="'+e(a)+'"/>'),t(c).text(ctcAjax.cancel_txt))}var O,P,U,Q="\n",V="base",B={},G=new RegExp('"',"g"),H="",J="",K={rule:2,sel_ndx:2,val_qry:0,rule_val:0,sel_val:0,preview:0},W=[],X=[],Y=[];F(),t.widget("ctc.themeMenu",t.ui.selectmenu,{_renderItem:function(e,c){var a=t("<li>");return t("#ctc_theme_option_"+c.value).detach().appendTo(a),a.appendTo(e)}}),t("#ctc_theme_parnt").themeMenu({select:function(t,e){$(e.item)}}),o(ctcAjax.themes.child)?(t("#ctc_child_name").val(J),t("#ctc_child_template").val(H)):t("#ctc_theme_child").themeMenu({select:function(t,e){I(e.item)}}),t(".ctc-option-panel-container").on("focus",".color-picker",function(){R(""),t(".color-picker").not(this).iris("hide"),t(this).iris("toggle"),t(".iris-picker").css({position:"absolute","z-index":10})}),t(".ctc-option-panel-container").on("change",".ctc-child-value, input[type=checkbox]",function(){l(this)}),t(".ctc-option-panel-container").on("click",".ctc-selector-handle",function(e){e.preventDefault(),R("");var c=t(this).attr("id").toString().replace("_close",""),a=c.toString().match(/_(\d+)$/)[1];t("#"+c+"_container").is(":hidden")&&(1!=K.val_qry&&(K.val_qry=0),f(a)),t("#"+c+"_container").fadeToggle("fast"),t(".ctc-selector-container").not("#"+c+"_container").fadeOut("fast")}),t(".nav-tab").on("click",function(e){e.preventDefault(),R(""),t(".ctc-status-icon").remove();var c="#"+t(this).attr("id");L(c)}),t("#view_child_options,#view_parnt_options").on("click",p),t("#ctc_load_form").on("submit",function(){return T()&&confirm(ctcAjax.load_txt)}),t(document).on("click",".ctc-save-input",function(){m(this)}),t(document).on("click",".ctc-selector-edit",function(){M(this)}),t(document).on("click",".ctc-rewrite-toggle",function(t){t.preventDefault(),N(this)}),t(document).on("click",".ctc-section-toggle",function(){t(this).toggleClass("open");var e=t(this).attr("id")+"_content";t("#"+e).slideToggle("fast")}),t(document).on("click",".ctc-live-preview",function(e){return e.stopImmediatePropagation(),e.preventDefault(),document.location=t(this).prop("href"),!1}),t(document).on("change","#ctc_configtype",function(){var e=t(this).val();o(e)||"theme"==e?t(".ctc-theme-only").stop().slideDown("fast"):t(".ctc-theme-only").stop().slideUp("fast")}),t("#ctc_theme_child,#ctc_theme_child-button,#ctc_child_type_existing").on("focus click",function(){t("#ctc_child_type_existing").prop("checked",!0),t("#ctc_child_type_new").prop("checked",!1),t("#ctc_child_template").val("")}),t("#ctc_child_type_new,#ctc_child_template").on("focus click",function(){t("#ctc_child_type_existing").prop("checked",!1),t("#ctc_child_type_new").prop("checked",!0),t("#ctc_child_name").val(J),t("#ctc_child_template").val(H)}),C(),w(V),E(),t("input[type=submit],input[type=button]").prop("disabled",!1),setTimeout(z,6e3)});
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: child theme, customize, CSS, responsive, css editor, theme generator, stylesheet, customizer
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 1.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -105,7 +105,7 @@ Learn more at http://www.lilaeamedia.com/plugins/intelliwidget-responsive-menu
|
|
105 |
|
106 |
9. Click "Generate/Rebuild Child Theme Files."
|
107 |
|
108 |
-
10. IMPORTANT: Always test your child theme with Live Preview before activating!
|
109 |
|
110 |
== Frequently Asked Questions ==
|
111 |
|
@@ -117,7 +117,7 @@ The child theme is in your themes folder, usually
|
|
117 |
|
118 |
[wordpress]/wp-content/themes/[child-theme]
|
119 |
|
120 |
-
To prevent this in the future, always test your child theme with Live Preview before activating.
|
121 |
|
122 |
= Why are my menus displaying incorrectly when I activate the new child theme? =
|
123 |
...or...
|
@@ -131,7 +131,7 @@ These options are specific to each theme and are saved separately in the databas
|
|
131 |
|
132 |
Many of these options can be copied over to the child theme by checking "Copy Parent Theme Menus, Widgets and other Options" when you generate the child theme files on the Parent/Child tab.
|
133 |
|
134 |
-
If you want to set different options you can either apply them after you activate the child theme, or by using the "Live Preview" under Appearance > Themes.
|
135 |
|
136 |
* Menus: Go to Appearance > Menus and click the "Locations" tab. By default, the primary menu will generate the links automatically from the existing pages. Select your customized Menu from the dropdown and click "Use New Menu." This will replace the default menu and you will see the correct links.
|
137 |
* Header: Go to Appearance > Header. Some themes will show the "Title" and "Tagline" from your "General Settings" by default. Click "Choose Image" and find the header from the Media Library or upload a new image. This will replace default with your custom image.
|
@@ -262,6 +262,13 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
|
|
262 |
|
263 |
== Changelog ==
|
264 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
= 1.6.1 =
|
266 |
* Fix: add check if theme uses hard-wired stylesheet link and alert to use @import instead of link option
|
267 |
* Fix: conflicts with using jQuery UI from CDN - using local version of 1.11.2 Widget/Menu/Selectmenu instead
|
@@ -440,7 +447,7 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
|
|
440 |
|
441 |
== Upgrade Notice ==
|
442 |
|
443 |
-
v.1.6.
|
444 |
|
445 |
== Override Parent Styles ==
|
446 |
|
@@ -514,7 +521,7 @@ Some themes (particularly commercial themes) do not correctly load parent templa
|
|
514 |
**In the worst cases they will break your website when you activate the child theme.**
|
515 |
|
516 |
1. Navigate to Appearance > Themes in the WordPress Admin. You will now see the new Child Theme as one of the installed Themes.
|
517 |
-
2. Click "Live Preview" below the new Child Theme to see it in action.
|
518 |
3. When you are ready to take the Child Theme live, click "Activate."
|
519 |
|
520 |
== Caveats ==
|
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.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
105 |
|
106 |
9. Click "Generate/Rebuild Child Theme Files."
|
107 |
|
108 |
+
10. IMPORTANT: Always test your child theme with Live Preview (theme customizer) before activating!
|
109 |
|
110 |
== Frequently Asked Questions ==
|
111 |
|
117 |
|
118 |
[wordpress]/wp-content/themes/[child-theme]
|
119 |
|
120 |
+
To prevent this in the future, always test your child theme with Live Preview (theme customizer) before activating.
|
121 |
|
122 |
= Why are my menus displaying incorrectly when I activate the new child theme? =
|
123 |
...or...
|
131 |
|
132 |
Many of these options can be copied over to the child theme by checking "Copy Parent Theme Menus, Widgets and other Options" when you generate the child theme files on the Parent/Child tab.
|
133 |
|
134 |
+
If you want to set different options you can either apply them after you activate the child theme using the theme customizer, or by using the "Live Preview" under Appearance > Themes.
|
135 |
|
136 |
* Menus: Go to Appearance > Menus and click the "Locations" tab. By default, the primary menu will generate the links automatically from the existing pages. Select your customized Menu from the dropdown and click "Use New Menu." This will replace the default menu and you will see the correct links.
|
137 |
* Header: Go to Appearance > Header. Some themes will show the "Title" and "Tagline" from your "General Settings" by default. Click "Choose Image" and find the header from the Media Library or upload a new image. This will replace default with your custom image.
|
262 |
|
263 |
== Changelog ==
|
264 |
|
265 |
+
= 1.6.2 =
|
266 |
+
* Fix: replaced wp_normalize_path with class method to support legacy WP versions
|
267 |
+
* Fix: support for multiple layered background images
|
268 |
+
* Fix: background:none being parsed into gradient origin parameter
|
269 |
+
* Fix: support for data URIs
|
270 |
+
* Fix: support for *= and ^= notation in selectors
|
271 |
+
|
272 |
= 1.6.1 =
|
273 |
* Fix: add check if theme uses hard-wired stylesheet link and alert to use @import instead of link option
|
274 |
* Fix: conflicts with using jQuery UI from CDN - using local version of 1.11.2 Widget/Menu/Selectmenu instead
|
447 |
|
448 |
== Upgrade Notice ==
|
449 |
|
450 |
+
v.1.6.2 Fixes for various bugs in parser. See changelog for details.
|
451 |
|
452 |
== Override Parent Styles ==
|
453 |
|
521 |
**In the worst cases they will break your website when you activate the child theme.**
|
522 |
|
523 |
1. Navigate to Appearance > Themes in the WordPress Admin. You will now see the new Child Theme as one of the installed Themes.
|
524 |
+
2. Click "Live Preview" (theme customizer) below the new Child Theme to see it in action.
|
525 |
3. When you are ready to take the Child Theme live, click "Activate."
|
526 |
|
527 |
== Caveats ==
|