diff --git a/includes/class-init-style-switcher.php b/includes/class-init-style-switcher.php index 2e450e0..28a3cfb 100644 --- a/includes/class-init-style-switcher.php +++ b/includes/class-init-style-switcher.php @@ -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']; @@ -324,7 +325,7 @@ function preset_applying() { ); } - if ( $data['theme'] !== $theme ) { + if ( $data['theme'] !== $theme && $data['theme'] !== $parent ) { wp_send_json( array( 'type' => 'error', diff --git a/readme.txt b/readme.txt index 385efd3..fa47d08 100644 --- a/readme.txt +++ b/readme.txt @@ -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 @@ -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 diff --git a/tm-style-switcher.php b/tm-style-switcher.php index 40e20d0..e0fc5ea 100644 --- a/tm-style-switcher.php +++ b/tm-style-switcher.php @@ -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+ @@ -12,7 +12,7 @@ * * @package Tm Style Switcher * @author TemplateMonster - * @version 1.0.2 + * @version 1.0.4 * @license GPL-3.0+ */ @@ -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.