Skip to content

Commit

Permalink
upd: possibility to import parent theme presets into a child theme
Browse files Browse the repository at this point in the history
  • Loading branch information
shin committed Apr 11, 2017
1 parent df676fb commit e887a8e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion includes/class-init-style-switcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ function preset_applying() {

$preset_id = $_POST[ 'preset' ];
$theme = get_stylesheet();
$parent = get_template();

if ( 'default_preset' !== $preset_id ) {
$file_name = tm_style_switcher()->preset_list[ $preset_id ]['json_path'];
Expand Down Expand Up @@ -324,7 +325,7 @@ function preset_applying() {
);
}

if ( $data['theme'] !== $theme ) {
if ( $data['theme'] !== $theme && $data['theme'] !== $parent ) {
wp_send_json(
array(
'type' => 'error',
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: TemplateMonster 2002
Tags: export, import, restore mods, wordpress live customizer, style switcher, mods switcher, theme settings switcher, cherry framework
Requires at least: 4.5
Tested up to: 4.7.3
Stable tag: 1.0.3
Stable tag: 1.0.4
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -53,3 +53,7 @@ Using style presets, you can implement your own skin switcher and apply custom p

* upd: dialog ui-button styles
* add: pot file

= 1.0.4 =

* upd: possibility to import parent theme presets into a child theme
6 changes: 3 additions & 3 deletions tm-style-switcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: TM Style Switcher
* Plugin URI: http://www.cherryframework.com/
* Description: Plugin for WordPress.
* Version: 1.0.3
* Version: 1.0.4
* Author: CherryTeam
* Text Domain: tm-style-switcher
* License: GPL-3.0+
Expand All @@ -12,7 +12,7 @@
*
* @package Tm Style Switcher
* @author TemplateMonster
* @version 1.0.2
* @version 1.0.4
* @license GPL-3.0+
*/

Expand Down Expand Up @@ -113,7 +113,7 @@ public function constants() {
*
* @since 1.0.0
*/
define( 'TM_STYLE_SWITCHER_VERSION', '1.0.3' );
define( 'TM_STYLE_SWITCHER_VERSION', '1.0.4' );

/**
* Set the name of the plugin.
Expand Down

0 comments on commit e887a8e

Please sign in to comment.