Version Description
- 25-06-2021 = Fix - Value (Legacy) of Parallax Type option from SiteOrigin plugin changing after demo import.
Download this release
Release Info
Developer | themegrilldev |
Plugin | ThemeGrill Demo Importer |
Version | 1.7.2 |
Comparing to | |
See all releases |
Code changes from version 1.7.1 to 1.7.2
includes/class-demo-importer.php
CHANGED
@@ -842,7 +842,9 @@ class TG_Demo_Importer {
|
|
842 |
* @return bool
|
843 |
*/
|
844 |
public function import_elementor_schemes( $demo_id, $demo_data ) {
|
845 |
-
|
|
|
|
|
846 |
|
847 |
if ( ! empty( $demo_data['elementor_schemes'] ) ) {
|
848 |
foreach ( $demo_data['elementor_schemes'] as $scheme_key => $scheme_value ) {
|
842 |
* @return bool
|
843 |
*/
|
844 |
public function import_elementor_schemes( $demo_id, $demo_data ) {
|
845 |
+
$elementor_version = defined( 'ELEMENTOR_VERSION' ) ? ELEMENTOR_VERSION : false;
|
846 |
+
|
847 |
+
if ( version_compare( $elementor_version, '3.0.0', '<=' ) ) {
|
848 |
|
849 |
if ( ! empty( $demo_data['elementor_schemes'] ) ) {
|
850 |
foreach ( $demo_data['elementor_schemes'] as $scheme_key => $scheme_value ) {
|
includes/class-themegrill-demo-importer.php
CHANGED
@@ -20,7 +20,7 @@ final class ThemeGrill_Demo_Importer {
|
|
20 |
*
|
21 |
* @var string
|
22 |
*/
|
23 |
-
public $version = '1.7.
|
24 |
|
25 |
/**
|
26 |
* Theme single instance of this class.
|
@@ -123,7 +123,7 @@ final class ThemeGrill_Demo_Importer {
|
|
123 |
* @return array
|
124 |
*/
|
125 |
private function get_core_supported_themes() {
|
126 |
-
$core_themes = array( 'spacious', 'colormag', 'flash', 'estore', 'ample', 'accelerate', 'colornews', 'foodhunt', 'fitclub', 'radiate', 'freedom', 'himalayas', 'esteem', 'envince', 'suffice', 'explore', 'masonic', 'cenote', 'zakra' );
|
127 |
// Check for official core themes pro version.
|
128 |
$pro_themes = array_diff( $core_themes, array( 'explore', 'masonic' ) );
|
129 |
if ( ! empty( $pro_themes ) ) {
|
20 |
*
|
21 |
* @var string
|
22 |
*/
|
23 |
+
public $version = '1.7.2';
|
24 |
|
25 |
/**
|
26 |
* Theme single instance of this class.
|
123 |
* @return array
|
124 |
*/
|
125 |
private function get_core_supported_themes() {
|
126 |
+
$core_themes = array( 'spacious', 'colormag', 'flash', 'estore', 'ample', 'accelerate', 'colornews', 'foodhunt', 'fitclub', 'radiate', 'freedom', 'himalayas', 'esteem', 'envince', 'suffice', 'explore', 'masonic', 'cenote', 'zakra', 'webshop' );
|
127 |
// Check for official core themes pro version.
|
128 |
$pro_themes = array_diff( $core_themes, array( 'explore', 'masonic' ) );
|
129 |
if ( ! empty( $pro_themes ) ) {
|
includes/functions-demo-importer.php
CHANGED
@@ -255,7 +255,9 @@ add_action( 'themegrill_ajax_demo_imported', 'tg_set_elementor_active_kit' );
|
|
255 |
* Set Elementor kit properly.
|
256 |
*/
|
257 |
function tg_set_elementor_active_kit() {
|
258 |
-
|
|
|
|
|
259 |
|
260 |
global $wpdb;
|
261 |
$page_ids = $wpdb->get_results( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE (post_name = %s OR post_title = %s) AND post_type = 'elementor_library' AND post_status = 'publish'", 'default-kit', 'Default Kit' ) );
|
@@ -462,3 +464,26 @@ function tg_print_admin_notice_templates() {
|
|
462 |
</script>
|
463 |
<?php
|
464 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
* Set Elementor kit properly.
|
256 |
*/
|
257 |
function tg_set_elementor_active_kit() {
|
258 |
+
$elementor_version = defined( 'ELEMENTOR_VERSION' ) ? ELEMENTOR_VERSION : false;
|
259 |
+
|
260 |
+
if ( version_compare( $elementor_version, '3.0.0', '>=' ) ) {
|
261 |
|
262 |
global $wpdb;
|
263 |
$page_ids = $wpdb->get_results( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE (post_name = %s OR post_title = %s) AND post_type = 'elementor_library' AND post_status = 'publish'", 'default-kit', 'Default Kit' ) );
|
464 |
</script>
|
465 |
<?php
|
466 |
}
|
467 |
+
|
468 |
+
/**
|
469 |
+
* After demo imported AJAX action.
|
470 |
+
*
|
471 |
+
* @see tg_set_siteorigin_setting()
|
472 |
+
*/
|
473 |
+
add_action( 'themegrill_ajax_demo_imported', 'tg_set_siteorigin_setting' );
|
474 |
+
|
475 |
+
/**
|
476 |
+
* Set SiteOrigin PageBuilder Default Setting.
|
477 |
+
*/
|
478 |
+
function tg_set_siteorigin_setting() {
|
479 |
+
$siteorigin_version = defined( 'SITEORIGIN_PANELS_VERSION' ) ? SITEORIGIN_PANELS_VERSION : false;
|
480 |
+
|
481 |
+
if ( version_compare( $siteorigin_version, '2.12.0', '>=' ) ) {
|
482 |
+
|
483 |
+
$settings = get_option( 'siteorigin_panels_settings' );
|
484 |
+
|
485 |
+
$settings['parallax-type'] = 'legacy';
|
486 |
+
|
487 |
+
update_option( 'siteorigin_panels_settings', $settings );
|
488 |
+
}
|
489 |
+
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: ThemeGrill, shivapoudel
|
3 |
Tags: themegrill, theme demos, demo, importer, one click import
|
4 |
Requires at least: 4.7
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 1.7.
|
7 |
License: GPLv3 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -72,6 +72,9 @@ Yes you can! Join in on our [GitHub repository](https://github.com/themegrill/th
|
|
72 |
3. Finally, Import the Demo with just one click.
|
73 |
|
74 |
== Changelog ==
|
|
|
|
|
|
|
75 |
= 1.7.1 - 18-01-2021 =
|
76 |
* Remove - Admin notice for `Plugin Review`.
|
77 |
|
2 |
Contributors: ThemeGrill, shivapoudel
|
3 |
Tags: themegrill, theme demos, demo, importer, one click import
|
4 |
Requires at least: 4.7
|
5 |
+
Tested up to: 5.7.2
|
6 |
+
Stable tag: 1.7.2
|
7 |
License: GPLv3 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
72 |
3. Finally, Import the Demo with just one click.
|
73 |
|
74 |
== Changelog ==
|
75 |
+
= 1.7.2 - 25-06-2021 =
|
76 |
+
Fix - Value (Legacy) of Parallax Type option from SiteOrigin plugin changing after demo import.
|
77 |
+
|
78 |
= 1.7.1 - 18-01-2021 =
|
79 |
* Remove - Admin notice for `Plugin Review`.
|
80 |
|
themegrill-demo-importer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: ThemeGrill Demo Importer
|
4 |
* Plugin URI: https://themegrill.com/demo-importer/
|
5 |
* Description: Import ThemeGrill official themes demo content, widgets and theme settings with just one click.
|
6 |
-
* Version: 1.7.
|
7 |
* Author: ThemeGrill
|
8 |
* Author URI: https://themegrill.com
|
9 |
* License: GPLv3 or later
|
3 |
* Plugin Name: ThemeGrill Demo Importer
|
4 |
* Plugin URI: https://themegrill.com/demo-importer/
|
5 |
* Description: Import ThemeGrill official themes demo content, widgets and theme settings with just one click.
|
6 |
+
* Version: 1.7.2
|
7 |
* Author: ThemeGrill
|
8 |
* Author URI: https://themegrill.com
|
9 |
* License: GPLv3 or later
|