ThemeGrill Demo Importer - Version 1.7.1

Version Description

  • 18-01-2021 =
  • Remove - Admin notice for Plugin Review.
Download this release

Release Info

Developer themegrilldev
Plugin Icon 128x128 ThemeGrill Demo Importer
Version 1.7.1
Comparing to
See all releases

Code changes from version 1.7.0 to 1.7.1

includes/admin/class-plugin-review-notice.php DELETED
@@ -1,117 +0,0 @@
1
- <?php
2
- /**
3
- * Class to display the plugin review notice.
4
- *
5
- * @package ThemeGrill_Demo_Importer
6
- * @since 1.6.4
7
- */
8
-
9
- defined( 'ABSPATH' ) || exit;
10
-
11
- /**
12
- * Class to display the plugin review notice.
13
- *
14
- * Class TG_Demo_Importer_Review_Notice
15
- */
16
- class TG_Demo_Importer_Review_Notice {
17
-
18
- /**
19
- * Constructor function to include the required functionality for the class.
20
- *
21
- * TG_Demo_Importer_Review_Notice constructor.
22
- */
23
- public function __construct() {
24
- add_action( 'admin_notices', array( $this, 'review_notice_markup' ), 0 );
25
- add_action( 'admin_init', array( $this, 'ignore_plugin_review_notice' ), 0 );
26
- add_action( 'admin_init', array( $this, 'ignore_plugin_review_notice_partially' ), 0 );
27
- }
28
-
29
- /**
30
- * Show HTML markup if conditions meet.
31
- */
32
- public function review_notice_markup() {
33
- $user_id = get_current_user_id();
34
- $current_user = wp_get_current_user();
35
- $ignored_notice = get_user_meta( $user_id, 'tg_demo_importer_plugin_review_notice', true );
36
- $ignored_notice_partially = get_user_meta( $user_id, 'nag_tg_demo_importer_plugin_review_notice_partially', true );
37
-
38
- // Check for if demo is already imported.
39
- $demo_imported = get_option( 'themegrill_demo_importer_activated_id' );
40
-
41
- /**
42
- * Return from notice display if:
43
- *
44
- * 1. The demo is not imported.
45
- * 2. If the user has ignored the message partially for 15 days.
46
- * 3. Dismiss always if clicked on 'I Already Did' and `Dismiss` button.
47
- */
48
- if ( ! $demo_imported || ( $ignored_notice_partially > strtotime( '-15 day' ) ) || $ignored_notice ) {
49
- return;
50
- }
51
- ?>
52
- <div class="notice notice-success tg-demo-importer-notice plugin-review-notice" style="position:relative;">
53
- <p>
54
- <?php
55
- printf(
56
- /* Translators: %1$s current user display name. */
57
- esc_html__(
58
- 'Howdy, %1$s! It seems that you have imported the theme demo in your site. We hope that you are happy with it and if you can spare a minute, please help us by leaving a 5-star review on WordPress.org.',
59
- 'themegrill-demo-importer'
60
- ),
61
- '<strong>' . esc_html( $current_user->display_name ) . '</strong>'
62
- );
63
- ?>
64
- </p>
65
-
66
- <div class="links">
67
- <a href="https://wordpress.org/support/plugin/themegrill-demo-importer/reviews/?filter=5#new-post"
68
- class="btn button-primary" target="_blank">
69
- <span class="dashicons dashicons-thumbs-up"></span>
70
- <span><?php esc_html_e( 'Sure', 'themegrill-demo-importer' ); ?></span>
71
- </a>
72
-
73
- <a href="?nag_tg_demo_importer_plugin_review_notice_partially=0" class="btn button-secondary">
74
- <span class="dashicons dashicons-calendar"></span>
75
- <span><?php esc_html_e( 'Maybe later', 'themegrill-demo-importer' ); ?></span>
76
- </a>
77
-
78
- <a href="?nag_tg_demo_importer_plugin_review_notice=0" class="btn button-secondary">
79
- <span class="dashicons dashicons-smiley"></span>
80
- <span><?php esc_html_e( 'I already did', 'themegrill-demo-importer' ); ?></span>
81
- </a>
82
-
83
- <a href="<?php echo esc_url( 'https://wordpress.org/support/plugin/themegrill-demo-importer/' ); ?>"
84
- class="btn button-secondary" target="_blank">
85
- <span class="dashicons dashicons-edit"></span>
86
- <span><?php esc_html_e( 'Got plugin support question?', 'themegrill-demo-importer' ); ?></span>
87
- </a>
88
- </div> <!-- /.links -->
89
-
90
- <a class="notice-dismiss" href="?nag_tg_demo_importer_plugin_review_notice=0"></a>
91
- </div> <!-- /.plugin-review-notice -->
92
- <?php
93
- }
94
-
95
- /**
96
- * `I already did` button or `dismiss` button: remove the review notice permanently.
97
- */
98
- public function ignore_plugin_review_notice() {
99
- /* If user clicks to ignore the notice, add that to their user meta */
100
- if ( isset( $_GET['nag_tg_demo_importer_plugin_review_notice'] ) && '0' == $_GET['nag_tg_demo_importer_plugin_review_notice'] ) {
101
- add_user_meta( get_current_user_id(), 'tg_demo_importer_plugin_review_notice', 'true', true );
102
- }
103
- }
104
-
105
- /**
106
- * `Maybe later` button: remove the review notice partially.
107
- */
108
- public function ignore_plugin_review_notice_partially() {
109
- /* If user clicks to ignore the notice, add that to their user meta */
110
- if ( isset( $_GET['nag_tg_demo_importer_plugin_review_notice_partially'] ) && '0' == $_GET['nag_tg_demo_importer_plugin_review_notice_partially'] ) {
111
- update_user_meta( get_current_user_id(), 'nag_tg_demo_importer_plugin_review_notice_partially', time() );
112
- }
113
- }
114
-
115
- }
116
-
117
- new TG_Demo_Importer_Review_Notice();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-demo-importer-deactivator.php CHANGED
@@ -19,39 +19,11 @@ class TG_Demo_Importer_Deactivator {
19
  */
20
  public static function deactivate() {
21
 
22
- // Delete the `Plugin Review` data sets.
23
- self::plugin_review_notice();
24
-
25
  // Delete the `Plugin Deactivate` data sets.
26
  self::plugin_deactivate_notice();
27
 
28
  }
29
 
30
- /**
31
- * Delete the options set for `Plugin Review` admin notice.
32
- */
33
- public static function plugin_review_notice() {
34
-
35
- $get_all_users = get_users();
36
-
37
- // Delete user meta data for theme review notice.
38
- foreach ( $get_all_users as $user ) {
39
- $ignored_notice = get_user_meta( $user->ID, 'tg_demo_importer_plugin_review_notice', true );
40
- $ignored_notice_partially = get_user_meta( $user->ID, 'nag_tg_demo_importer_plugin_review_notice_partially', true );
41
-
42
- // Delete permanent notice remove data.
43
- if ( $ignored_notice ) {
44
- delete_user_meta( $user->ID, 'tg_demo_importer_plugin_review_notice' );
45
- }
46
-
47
- // Delete partial notice remove data.
48
- if ( $ignored_notice_partially ) {
49
- delete_user_meta( $user->ID, 'nag_tg_demo_importer_plugin_review_notice_partially' );
50
- }
51
- }
52
-
53
- }
54
-
55
  /**
56
  * Delete the options set for `Plugin Deactivate` admin notice.
57
  */
19
  */
20
  public static function deactivate() {
21
 
 
 
 
22
  // Delete the `Plugin Deactivate` data sets.
23
  self::plugin_deactivate_notice();
24
 
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  /**
28
  * Delete the options set for `Plugin Deactivate` admin notice.
29
  */
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.0';
24
 
25
  /**
26
  * Theme single instance of this class.
@@ -139,7 +139,6 @@ final class ThemeGrill_Demo_Importer {
139
  private function includes() {
140
  include_once TGDM_ABSPATH . 'includes/class-demo-importer.php';
141
  include_once TGDM_ABSPATH . 'includes/functions-demo-importer.php';
142
- include_once TGDM_ABSPATH . 'includes/admin/class-plugin-review-notice.php';
143
  include_once TGDM_ABSPATH . 'includes/admin/class-plugin-deactivate-notice.php';
144
 
145
  // Backward compatibility for demo packages config.
20
  *
21
  * @var string
22
  */
23
+ public $version = '1.7.1';
24
 
25
  /**
26
  * Theme single instance of this class.
139
  private function includes() {
140
  include_once TGDM_ABSPATH . 'includes/class-demo-importer.php';
141
  include_once TGDM_ABSPATH . 'includes/functions-demo-importer.php';
 
142
  include_once TGDM_ABSPATH . 'includes/admin/class-plugin-deactivate-notice.php';
143
 
144
  // Backward compatibility for demo packages config.
languages/themegrill-demo-importer.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the GPLv3 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: ThemeGrill Demo Importer 1.7.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/themegrill-demo-importer\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2021-01-11T07:41:56+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: themegrill-demo-importer\n"
@@ -17,7 +17,7 @@ msgstr ""
17
  #. Plugin Name of the plugin
18
  #. translators: %s: official ThemeGrill themes URL
19
  #: includes/class-demo-importer.php:249
20
- #: includes/class-themegrill-demo-importer.php:269
21
  msgid "ThemeGrill Demo Importer"
22
  msgstr ""
23
 
@@ -108,27 +108,6 @@ msgstr ""
108
  msgid "Action failed. Please refresh the page and retry."
109
  msgstr ""
110
 
111
- #. Translators: %1$s current user display name.
112
- #: includes/admin/class-plugin-review-notice.php:57
113
- msgid "Howdy, %1$s! It seems that you have imported the theme demo in your site. We hope that you are happy with it and if you can spare a minute, please help us by leaving a 5-star review on WordPress.org."
114
- msgstr ""
115
-
116
- #: includes/admin/class-plugin-review-notice.php:70
117
- msgid "Sure"
118
- msgstr ""
119
-
120
- #: includes/admin/class-plugin-review-notice.php:75
121
- msgid "Maybe later"
122
- msgstr ""
123
-
124
- #: includes/admin/class-plugin-review-notice.php:80
125
- msgid "I already did"
126
- msgstr ""
127
-
128
- #: includes/admin/class-plugin-review-notice.php:86
129
- msgid "Got plugin support question?"
130
- msgstr ""
131
-
132
  #: includes/admin/views/html-admin-page-demo-import-faqs.php:11
133
  #: includes/admin/views/html-admin-page-status.php:14
134
  msgid "FAQ's"
@@ -148,7 +127,7 @@ msgstr ""
148
 
149
  #: includes/admin/views/html-admin-page-importer.php:12
150
  #: includes/class-demo-importer.php:120
151
- #: includes/class-themegrill-demo-importer.php:236
152
  msgid "Demo Importer"
153
  msgstr ""
154
 
@@ -756,33 +735,33 @@ msgstr ""
756
  msgid "Cheatin&#8217; huh?"
757
  msgstr ""
758
 
759
- #: includes/class-themegrill-demo-importer.php:236
760
  msgid "View Demo Importer"
761
  msgstr ""
762
 
763
- #: includes/class-themegrill-demo-importer.php:252
764
  msgid "View Demo Importer Documentation"
765
  msgstr ""
766
 
767
- #: includes/class-themegrill-demo-importer.php:252
768
  msgid "Docs"
769
  msgstr ""
770
 
771
- #: includes/class-themegrill-demo-importer.php:253
772
  msgid "Visit Free Customer Support Forum"
773
  msgstr ""
774
 
775
- #: includes/class-themegrill-demo-importer.php:253
776
  msgid "Free Support"
777
  msgstr ""
778
 
779
  #. translators: %s: official ThemeGrill themes URL
780
- #: includes/class-themegrill-demo-importer.php:269
781
  msgid "This plugin requires %s to be activated to work."
782
  msgstr ""
783
 
784
  #. translators: %s: official ThemeGrill themes URL
785
- #: includes/class-themegrill-demo-importer.php:269
786
  msgid "Official ThemeGrill Theme"
787
  msgstr ""
788
 
2
  # This file is distributed under the GPLv3 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: ThemeGrill Demo Importer 1.7.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/themegrill-demo-importer\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-01-18T07:05:06+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: themegrill-demo-importer\n"
17
  #. Plugin Name of the plugin
18
  #. translators: %s: official ThemeGrill themes URL
19
  #: includes/class-demo-importer.php:249
20
+ #: includes/class-themegrill-demo-importer.php:268
21
  msgid "ThemeGrill Demo Importer"
22
  msgstr ""
23
 
108
  msgid "Action failed. Please refresh the page and retry."
109
  msgstr ""
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  #: includes/admin/views/html-admin-page-demo-import-faqs.php:11
112
  #: includes/admin/views/html-admin-page-status.php:14
113
  msgid "FAQ's"
127
 
128
  #: includes/admin/views/html-admin-page-importer.php:12
129
  #: includes/class-demo-importer.php:120
130
+ #: includes/class-themegrill-demo-importer.php:235
131
  msgid "Demo Importer"
132
  msgstr ""
133
 
735
  msgid "Cheatin&#8217; huh?"
736
  msgstr ""
737
 
738
+ #: includes/class-themegrill-demo-importer.php:235
739
  msgid "View Demo Importer"
740
  msgstr ""
741
 
742
+ #: includes/class-themegrill-demo-importer.php:251
743
  msgid "View Demo Importer Documentation"
744
  msgstr ""
745
 
746
+ #: includes/class-themegrill-demo-importer.php:251
747
  msgid "Docs"
748
  msgstr ""
749
 
750
+ #: includes/class-themegrill-demo-importer.php:252
751
  msgid "Visit Free Customer Support Forum"
752
  msgstr ""
753
 
754
+ #: includes/class-themegrill-demo-importer.php:252
755
  msgid "Free Support"
756
  msgstr ""
757
 
758
  #. translators: %s: official ThemeGrill themes URL
759
+ #: includes/class-themegrill-demo-importer.php:268
760
  msgid "This plugin requires %s to be activated to work."
761
  msgstr ""
762
 
763
  #. translators: %s: official ThemeGrill themes URL
764
+ #: includes/class-themegrill-demo-importer.php:268
765
  msgid "Official ThemeGrill Theme"
766
  msgstr ""
767
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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
6
- Stable tag: 1.7.0
7
  License: GPLv3 or later
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -72,46 +72,10 @@ 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.0 - 11-01-2021 =
76
  * Tweak - Set FontAwesome 4 Shim feature to be enabled automatically on successful theme demo import.
77
 
78
- = 1.6.9 - 7-01-2021 =
79
- * Tweak - Require `Companion Addons for Elementor` plugin to import certain demos according to the demo config set
80
-
81
- = 1.6.8 - 23-11-2020 =
82
- * Fix - WooCommerce default pages not set properly after the theme demo import
83
- * Fix - Elementor default kit introduced from version 3.0.0 not applied after the theme demo import
84
-
85
- = 1.6.7 - 15-09-2020 =
86
- * Tweak - Utilize `wp.i18n` for translation of strings for `wp.updates.l10n` deprecated since WordPress 5.5
87
-
88
- = 1.6.6 - 06-08-2020 =
89
- * Introduce - Demo Importer Status page
90
- * Tweak - Added compatibility with WordPress v5.5
91
- * Remove - `Reset wizard` feature to reset the site to fresh WordPress install.
92
-
93
- = 1.6.5 - 23-07-2020 =
94
- * Fix - Demo not importing completely in certain conditions.
95
-
96
- = 1.6.4 - 04-06-2020 =
97
- * Fix - `WooCommerce Setup Wizard` disabled when the plugin is active.
98
- * Fix - `Live Preview` button link on successful demo import message in WordPress multisite install.
99
- * Tweak - Add admin notice for `Plugin Review`.
100
- * Tweak - Add admin notice for `Plugin Deactivate` if demo is already imported in their site.
101
- * Tweak - Add refresh demo lists feature.
102
- * Tweak - Add feature to restrict demo import process for specific demos to fix unwanted issues for unsupported demos.
103
- * Deprecate - `Upgrade to Pro` admin notice.
104
-
105
- = 1.6.3 - 18-02-2020 =
106
- * Enhancement - Secure reset button with nonce check.
107
-
108
- = 1.6.2 - 15-02-2020 =
109
- * Fix - Unauthenticated user vulnerability. Thanks webarxsecurity team
110
-
111
- = 1.6.1 - 12-11-2019 =
112
- * Tweak - Add admin notice for `Upgrade To Pro`.
113
-
114
- = 1.6.0 - 10-09-2019 =
115
- * Tweak - Support for Zakra Premium version demo import.
116
-
117
  [See changelog for all versions](https://raw.githubusercontent.com/themegrill/themegrill-demo-importer/master/CHANGELOG.txt).
3
  Tags: themegrill, theme demos, demo, importer, one click import
4
  Requires at least: 4.7
5
  Tested up to: 5.6
6
+ Stable tag: 1.7.1
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.1 - 18-01-2021 =
76
+ * Remove - Admin notice for `Plugin Review`.
77
+
78
  = 1.7.0 - 11-01-2021 =
79
  * Tweak - Set FontAwesome 4 Shim feature to be enabled automatically on successful theme demo import.
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  [See changelog for all versions](https://raw.githubusercontent.com/themegrill/themegrill-demo-importer/master/CHANGELOG.txt).
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.0
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.1
7
  * Author: ThemeGrill
8
  * Author URI: https://themegrill.com
9
  * License: GPLv3 or later