Version Description
- updated parser to match selectors containing parentheses and empty media rulesets
Download this release
Release Info
Developer | lilaeamedia |
Plugin | Child Theme Configurator |
Version | 1.4.3 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.4.3
- child-theme-configurator.php +2 -2
- includes/class-ctc-css.php +5 -5
- includes/class-ctc-ui.php +1 -1
- includes/class-ctc.php +2 -2
- js/chld-thm-cfg.js +1 -1
- js/chld-thm-cfg.min.js +1 -1
- readme.txt +8 -7
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.4.
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
@@ -16,7 +16,7 @@ if ( !defined('ABSPATH')) exit;
|
|
16 |
*/
|
17 |
|
18 |
defined('LF') or define('LF', "\n");
|
19 |
-
define('CHLD_THM_CFG_VERSION', '1.4.
|
20 |
define('CHLD_THM_CFG_MAX_SELECTORS', '5000');
|
21 |
define('CHLD_THM_CFG_MAX_RECURSE_LOOPS', '100');
|
22 |
|
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.4.3
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
16 |
*/
|
17 |
|
18 |
defined('LF') or define('LF', "\n");
|
19 |
+
define('CHLD_THM_CFG_VERSION', '1.4.3');
|
20 |
define('CHLD_THM_CFG_MAX_SELECTORS', '5000');
|
21 |
define('CHLD_THM_CFG_MAX_RECURSE_LOOPS', '100');
|
22 |
|
includes/class-ctc-css.php
CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
|
|
6 |
Class: Child_Theme_Configurator_CSS
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
Description: Handles all CSS output, parsing, normalization
|
9 |
-
Version: 1.4.
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
@@ -44,7 +44,7 @@ class Child_Theme_Configurator_CSS {
|
|
44 |
|
45 |
function __construct() {
|
46 |
// scalars
|
47 |
-
$this->version = '1.4.
|
48 |
$this->querykey = 0;
|
49 |
$this->selkey = 0;
|
50 |
$this->qskey = 0;
|
@@ -452,17 +452,17 @@ class Child_Theme_Configurator_CSS {
|
|
452 |
);
|
453 |
endif;
|
454 |
// break into @ segments
|
455 |
-
$regex = '#(\@media
|
456 |
preg_match_all($regex, $styles, $matches);
|
457 |
foreach ($matches[1] as $segment):
|
458 |
$ruleset[trim($segment)] = array_shift($matches[2]);
|
459 |
endforeach;
|
460 |
-
//
|
461 |
$ruleset[$basequery] = preg_replace($regex, '', $styles);
|
462 |
foreach ($ruleset as $query => $segment):
|
463 |
// make sure there is semicolon before closing brace
|
464 |
$segment = preg_replace('#(\})#', ";$1", $segment);
|
465 |
-
$regex = '#\s([\.\#\:\w][\w\-\s\[\]\'\*\.\#\+:,"=>]+?)\s*\{(.*?)\}#s';
|
466 |
preg_match_all($regex, $segment, $matches);
|
467 |
foreach($matches[1] as $sel):
|
468 |
$stuff = array_shift($matches[2]);
|
6 |
Class: Child_Theme_Configurator_CSS
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
Description: Handles all CSS output, parsing, normalization
|
9 |
+
Version: 1.4.3
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
44 |
|
45 |
function __construct() {
|
46 |
// scalars
|
47 |
+
$this->version = '1.4.3';
|
48 |
$this->querykey = 0;
|
49 |
$this->selkey = 0;
|
50 |
$this->qskey = 0;
|
452 |
);
|
453 |
endif;
|
454 |
// break into @ segments
|
455 |
+
$regex = '#(\@media[^\{]+?)\{([^\@]*)\}#s'; // *?\})\s
|
456 |
preg_match_all($regex, $styles, $matches);
|
457 |
foreach ($matches[1] as $segment):
|
458 |
$ruleset[trim($segment)] = array_shift($matches[2]);
|
459 |
endforeach;
|
460 |
+
// stripping rulesets leaves base styles
|
461 |
$ruleset[$basequery] = preg_replace($regex, '', $styles);
|
462 |
foreach ($ruleset as $query => $segment):
|
463 |
// make sure there is semicolon before closing brace
|
464 |
$segment = preg_replace('#(\})#', ";$1", $segment);
|
465 |
+
$regex = '#\s([\.\#\:\w][\w\-\s\(\)\[\]\'\*\.\#\+:,"=>]+?)\s*\{(.*?)\}#s'; //
|
466 |
preg_match_all($regex, $segment, $matches);
|
467 |
foreach($matches[1] as $sel):
|
468 |
$stuff = array_shift($matches[2]);
|
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.4.
|
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.4.3
|
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.3
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
@@ -69,7 +69,7 @@ class Child_Theme_Configurator {
|
|
69 |
wp_enqueue_script('iris');
|
70 |
// wp_enqueue_script('thickbox');
|
71 |
wp_enqueue_script('ctc-thm-cfg-ctcgrad', $this->pluginURL . 'js/ctcgrad.min.js', array('iris'), '1.0');
|
72 |
-
wp_enqueue_script('chld-thm-cfg-admin', $this->pluginURL . 'js/chld-thm-cfg.js',
|
73 |
array('jquery-ui-autocomplete'), '1.0', true);
|
74 |
wp_localize_script( 'chld-thm-cfg-admin', 'ctcAjax',
|
75 |
apply_filters('chld_thm_cfg_localize_script', array(
|
6 |
Class: Child_Theme_Configurator
|
7 |
Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
|
8 |
Description: Main Controller Class
|
9 |
+
Version: 1.4.3
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
69 |
wp_enqueue_script('iris');
|
70 |
// wp_enqueue_script('thickbox');
|
71 |
wp_enqueue_script('ctc-thm-cfg-ctcgrad', $this->pluginURL . 'js/ctcgrad.min.js', array('iris'), '1.0');
|
72 |
+
wp_enqueue_script('chld-thm-cfg-admin', $this->pluginURL . 'js/chld-thm-cfg.min.js',
|
73 |
array('jquery-ui-autocomplete'), '1.0', true);
|
74 |
wp_localize_script( 'chld-thm-cfg-admin', 'ctcAjax',
|
75 |
apply_filters('chld_thm_cfg_localize_script', array(
|
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.4.
|
6 |
* Author: Lilaea Media
|
7 |
* Author URI: http://www.lilaeamedia.com/
|
8 |
* License: GPLv2
|
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.4.3
|
6 |
* Author: Lilaea Media
|
7 |
* Author URI: http://www.lilaeamedia.com/
|
8 |
* License: GPLv2
|
js/chld-thm-cfg.min.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.4.
|
6 |
* Author: Lilaea Media
|
7 |
* Author URI: http://www.lilaeamedia.com/
|
8 |
* License: GPLv2
|
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.4.3
|
6 |
* Author: Lilaea Media
|
7 |
* Author URI: http://www.lilaeamedia.com/
|
8 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: lilaeamedia
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8QE5YJ8WE96AJ
|
4 |
Tags: child theme, custom theme, CSS, responsive design, CSS editor, theme generator
|
5 |
Requires at least: 3.7
|
6 |
-
Tested up to: 3.9
|
7 |
-
Stable tag: 1.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -158,7 +158,10 @@ You can also create a secondary stylesheet that contains @font-face rules and im
|
|
158 |
|
159 |
== Changelog ==
|
160 |
|
161 |
-
= 1.4.
|
|
|
|
|
|
|
162 |
* Tweaked the Files tab options and added check for DISALLOW_FILE_EDIT
|
163 |
* Removed automatic @import rules for additional stylesheets that are loaded.
|
164 |
* Fixed bug caused by new jQuery .css function handling of empty css values (preview swatch).
|
@@ -255,10 +258,8 @@ You can also create a secondary stylesheet that contains @font-face rules and im
|
|
255 |
|
256 |
== Upgrade Notice ==
|
257 |
|
258 |
-
= 1.4.
|
259 |
-
*
|
260 |
-
* Now you can copy parent theme template files into your child themes and edit them using the Theme Editor.
|
261 |
-
* We've also added an image uploader to add custom theme images for your stylesheets along with a screenshot uploader.
|
262 |
|
263 |
== Create Your Child Theme ==
|
264 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8QE5YJ8WE96AJ
|
4 |
Tags: child theme, custom theme, CSS, responsive design, CSS editor, theme generator
|
5 |
Requires at least: 3.7
|
6 |
+
Tested up to: 3.9.1
|
7 |
+
Stable tag: 1.4.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
158 |
|
159 |
== Changelog ==
|
160 |
|
161 |
+
= 1.4.3 =
|
162 |
+
* updated parser to match selectors containing parentheses and empty media rulesets
|
163 |
+
|
164 |
+
= 1.4.2 =
|
165 |
* Tweaked the Files tab options and added check for DISALLOW_FILE_EDIT
|
166 |
* Removed automatic @import rules for additional stylesheets that are loaded.
|
167 |
* Fixed bug caused by new jQuery .css function handling of empty css values (preview swatch).
|
258 |
|
259 |
== Upgrade Notice ==
|
260 |
|
261 |
+
= 1.4.3 =
|
262 |
+
* This release fixes a bug in the parser that was ignoring selectors containing parentheses.
|
|
|
|
|
263 |
|
264 |
== Create Your Child Theme ==
|
265 |
|