WP Clone by WP Academy - Version 2.3.4

Version Description

  • Fully tested with WordPress 6.0.2
  • NEW: Added feature that allows to try plugins before installation
Download this release

Release Info

Developer iclyde
Plugin Icon 128x128 WP Clone by WP Academy
Version 2.3.4
Comparing to
See all releases

Code changes from version 2.3.3 to 2.3.4

Files changed (5) hide show
  1. README.md +92 -0
  2. lib/view.php +75 -2
  3. modules/tryOutPlugins/tryOutPlugins.php +289 -0
  4. readme.txt +9 -4
  5. wpclone.php +42 -1
README.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WP Clone By WP Academy
2
+
3
+ Free WP Clone By WP Academy plugin in WP Directory.
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin https://gitlab.inchev.com/wp-clone/wp-clone-by-wp-academy.git
19
+ git branch -M main
20
+ git push -uf origin main
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ - [ ] [Set up project integrations](https://gitlab.inchev.com/wp-clone/wp-clone-by-wp-academy/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ - [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
53
+
54
+ ## Name
55
+ Choose a self-explaining name for your project.
56
+
57
+ ## Description
58
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
59
+
60
+ ## Badges
61
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
62
+
63
+ ## Visuals
64
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
65
+
66
+ ## Installation
67
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
68
+
69
+ ## Usage
70
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
71
+
72
+ ## Support
73
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
74
+
75
+ ## Roadmap
76
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
77
+
78
+ ## Contributing
79
+ State if you are open to contributions and what your requirements are for accepting them.
80
+
81
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
82
+
83
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
84
+
85
+ ## Authors and acknowledgment
86
+ Show your appreciation to those who have contributed to the project.
87
+
88
+ ## License
89
+ For open source projects, say how it is licensed.
90
+
91
+ ## Project status
92
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
lib/view.php CHANGED
@@ -240,17 +240,90 @@ $backups = get_option( 'wpclone_backups' );
240
  echo "<p><a href='#' id='uninstall' class='button' style='margin-top:10px'>Delete backups and remove database entries</a>"
241
  . "</br>WP Clone does not remove backups when you deactivate the plugin. Use the above button if you want to remove all the backups.</p>";
242
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  echo '<p><a href="#TB_inline?height=200&width=600&inlineId=search-n-replace&modal=true" class="thickbox">Search and Replace</a></p>';
244
 
245
 
 
246
  ?>
247
  </div>
248
  <div id="sidebar">
249
 
250
  <ul>
251
  <h2>Use WP Academy’s Transfer Service</h2>
252
- <p>Save time and avoid headaches with WP Academy’s <a target="_blank" href="https://sellcodes.com/fJxO4jci">Premium Transfer Service.</a></p>
253
-
254
  </ul>
255
 
256
  <ul>
240
  echo "<p><a href='#' id='uninstall' class='button' style='margin-top:10px'>Delete backups and remove database entries</a>"
241
  . "</br>WP Clone does not remove backups when you deactivate the plugin. Use the above button if you want to remove all the backups.</p>";
242
 
243
+ $tifm_disabled = 'false';
244
+ if (get_option('_tifm_feature_enabled') === 'disabled') {
245
+ $tifm_disabled = 'true';
246
+ }
247
+
248
+ $tifm_scrollTo = false;
249
+ if (isset($_GET['scrollToSection']) && $_GET['scrollToSection'] === 'testPlugins') {
250
+ $tifm_scrollTo = true;
251
+ }
252
+
253
+ ?>
254
+
255
+ <div id="tryOutPluginsBeforeInstall" style="margin-bottom: 20px;">
256
+ <h2 style="margin-bottom: 2px;">
257
+ <b><?php _e('Test new plugins before installing:', 'wp-clone-by-wp-academy'); ?></b>
258
+ </h2>
259
+ <div style="margin-left: 10px;">
260
+ <div style="margin-bottom: 5px;">
261
+ <?php _e('If this feature is activated, you’ll see “Try it out”-buttons on the screen where you can', 'wp-clone-by-wp-academy'); ?> <a href="<?php echo admin_url('plugin-install.php') ?>"><?php _e('add new plugins', 'wp-clone-by-wp-academy'); ?></a>.<br />
262
+ <?php
263
+ $tifm_translated = __('Clicking on it will spin up a new WordPress instance with the respective plugin installed. Powered by %s.', 'wp-clone-by-wp-academy');
264
+ echo str_replace('%s', '<a href="https://tastewp.com" target="_blank">TasteWP</a>', $tifm_translated);
265
+ ?>
266
+ </div>
267
+ <label for="allow_to_show_yes" style="line-height: 30px;">
268
+ <input id="allow_to_show_yes" type="radio" name="allow_to_show" value="true"<?php echo ($tifm_disabled === 'false') ? 'checked' : '' ?>><?php _e('Yes', 'wp-clone-by-wp-academy'); ?>
269
+ </label>
270
+ <div style="display: inline-block; width: 30px;"></div>
271
+ <label for="allow_to_show_no" style="line-height: 30px;">
272
+ <input id="allow_to_show_no" type="radio" name="allow_to_show" value="false"<?php echo ($tifm_disabled === 'true') ? 'checked' : '' ?>><?php _e('No', 'wp-clone-by-wp-academy'); ?>
273
+ </label>
274
+ <div style="display: inline-block; width: 30px;"></div>
275
+ <button id="save_tifm_decision" type="button" class="button button-primary" name="button"><?php _e('Save', 'wp-clone-by-wp-academy'); ?></button>
276
+
277
+ <div id="tifm_success_save" style="display: none;color: green;">
278
+ <?php _e('Settings saved.', 'wp-clone-by-wp-academy'); ?>
279
+ </div>
280
+ <div id="tifm_error_save" style="display: none;color: red;">
281
+ <?php _e('Error during settings save.', 'wp-clone-by-wp-academy'); ?>
282
+ </div>
283
+ </div>
284
+ </div>
285
+
286
+ <script type="text/javascript">
287
+ jQuery('#save_tifm_decision').on('click', () => {
288
+ jQuery.post(ajaxurl, { action: 'tifm_save_decision', decision: jQuery('input[name="allow_to_show"]:checked').val() }).done(() => {
289
+ jQuery('#tifm_success_save').show(300);
290
+ setTimeout(function () {
291
+ jQuery('#tifm_success_save').hide(300);
292
+ }, 1500);
293
+ }).fail(() => {
294
+ jQuery('#tifm_error_save').show(300);
295
+ setTimeout(function () {
296
+ jQuery('#tifm_error_save').hide(300);
297
+ }, 1500);
298
+ });
299
+ });
300
+ <?php if ($tifm_scrollTo === true) { ?>
301
+ setTimeout(function () {
302
+ document.querySelector('#tryOutPluginsBeforeInstall').scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"});
303
+ setTimeout(function () {
304
+ jQuery('#tryOutPluginsBeforeInstall h2 b').animate({'font-size': '28px'}, 300, function () {
305
+ jQuery('#tryOutPluginsBeforeInstall h2 b').animate({'font-size': '16.89px'}, 300);
306
+ });
307
+ }, 100);
308
+ }, 300);
309
+ <?php } ?>
310
+ </script>
311
+
312
+ <hr>
313
+
314
+ <?php
315
+
316
  echo '<p><a href="#TB_inline?height=200&width=600&inlineId=search-n-replace&modal=true" class="thickbox">Search and Replace</a></p>';
317
 
318
 
319
+
320
  ?>
321
  </div>
322
  <div id="sidebar">
323
 
324
  <ul>
325
  <h2>Use WP Academy’s Transfer Service</h2>
326
+ <p>Save time and avoid headaches with WP Academy’s <a target="_blank" href="https://sellcodes.com/fJxO4jci">Premium Transfer Service.</a></p>
 
327
  </ul>
328
 
329
  <ul>
modules/tryOutPlugins/tryOutPlugins.php ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * File for our cool review ask in the header
5
+ *
6
+ * @category Child Plugin
7
+ * @version v0.1.0
8
+ * @since v0.1.0
9
+ * @author iClyde <kontakt@iclyde.pl>
10
+ */
11
+
12
+ // Namespace
13
+ namespace Inisev\Subs;
14
+
15
+ // Disallow direct access
16
+ if (defined('ABSPATH')) {
17
+
18
+ /**
19
+ * Main class for handling the Review
20
+ */
21
+ if (!class_exists('Inisev\Subs\Inisev_Try_Out_Plugins')) {
22
+ class Inisev_Try_Out_Plugins {
23
+
24
+ function __construct($plugin_file, $plugin_dir, $plugin_name, $plugin_menu_page) {
25
+
26
+ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
27
+ add_action('wp_ajax_tifm_notice_actions', [&$this, 'noticeAjax']);
28
+ }
29
+
30
+ global $pagenow;
31
+ if (!($pagenow == 'plugin-install.php' || $pagenow == 'admin-ajax.php')) return;
32
+ if (!is_admin() || !current_user_can('install_plugins')) return;
33
+ if (get_option('_tifm_disable_feature_forever', false) != false) return;
34
+
35
+ $this->pluginDir = $plugin_dir;
36
+ $this->pluginFile = $plugin_file;
37
+ $this->pluginName = $plugin_name;
38
+ $this->pluginPageURL = admin_url($plugin_menu_page) . '&scrollToSection=testPlugins';
39
+
40
+ $this->showInformativeNotice();
41
+ $this->insertActionButton();
42
+
43
+ }
44
+
45
+ public function showInformativeNotice() {
46
+
47
+ add_action('in_admin_footer', [&$this, 'tryItOutScript']);
48
+
49
+ if (get_option('_tifm_hide_notice_forever', false) != false) return;
50
+
51
+ add_action('admin_notices', [&$this, 'informativeAdminNoticeHandler']);
52
+ add_action('admin_head', [&$this, 'noticeStyles']);
53
+ add_action('in_admin_footer', [&$this, 'noticeScripts']);
54
+
55
+ }
56
+
57
+ public function noticeStyles() {
58
+ ?>
59
+
60
+ <style media="screen">
61
+ #tifm_paragraph_notice {
62
+ display: flex;
63
+ flex-direction: row;
64
+ justify-content: space-between;
65
+ }
66
+
67
+ #tifm_paragraph_notice span {
68
+ line-height: 30px;
69
+ }
70
+
71
+ #tifm_paragraph_notice .tifm_darker_a {
72
+ color: #555;
73
+ }
74
+
75
+ #tifm_paragraph_notice .tifm_darker_a_muted {
76
+ color: #999;
77
+ }
78
+
79
+ #tifm_paragraph_notice .tifm_brought_url {
80
+ color: #00a32a;
81
+ text-decoration: none;
82
+ }
83
+
84
+ #tifm_paragraph_notice .tifm-grow-1 {
85
+ flex-grow: 1;
86
+ }
87
+
88
+ #tifm_paragraph_notice .tifm-grow-5 {
89
+ flex-grow: 5;
90
+ }
91
+
92
+ @media screen and (max-width: 1400px) {
93
+ #tifm_paragraph_notice {
94
+ flex-direction: column;
95
+ }
96
+ }
97
+ </style>
98
+
99
+ <?php
100
+ }
101
+
102
+ public function noticeScripts() {
103
+ ?>
104
+ <script type="text/javascript">
105
+ jQuery(document).ready(function($) {
106
+
107
+ $('#tifm_new_feature_notice').on('click', '.notice-dismiss', hideAndDismissNotice);
108
+
109
+ $('#tifm_new_feature_notice').on('click', '.tifm_darker_a', hideAndDismissNotice);
110
+
111
+ $('#tifm_new_feature_notice').on('click', '.tifm_darker_a_muted', disableFeatureAndDismiss);
112
+
113
+ let nonce = "<?php echo wp_create_nonce('tifm_notice_nonce') ?>";
114
+
115
+ function hideAndDismissNotice(e) {
116
+
117
+ let dismiss = false;
118
+ if (typeof e != 'string') {
119
+ e.preventDefault();
120
+ } else if (e = 'dismiss') {
121
+ dismiss = true;
122
+ }
123
+
124
+ $('#tifm_new_feature_notice').hide(300);
125
+ setTimeout(function () {
126
+ $('#tifm_new_feature_notice').remove();
127
+ }, 350);
128
+
129
+ let method = 'dismiss_notice';
130
+ if (dismiss == true) {
131
+ method = 'dismiss_notice_and_disable';
132
+ }
133
+
134
+ $.post(ajaxurl, { action: 'tifm_notice_actions', nonce: nonce, method: method }).done(function () {
135
+ if (method == 'dismiss_notice_and_disable') {
136
+ window.location.reload();
137
+ }
138
+ }).fail(function (e) {
139
+ alert('Error occurred, please refresh and try again.' + JSON.stringify(e));
140
+ });
141
+
142
+ }
143
+
144
+ function disableFeatureAndDismiss(e) {
145
+
146
+ e.preventDefault();
147
+ hideAndDismissNotice('dismiss');
148
+
149
+ }
150
+
151
+ });
152
+ </script>
153
+ <?php
154
+ }
155
+
156
+ public function tryItOutScript() {
157
+ ?>
158
+ <script type="text/javascript">
159
+ jQuery(document).ready(function($) {
160
+ function makeButton(slug) {
161
+
162
+ let a = document.createElement('A');
163
+ a.classList.add('button');
164
+ a.classList.add('button-primary');
165
+ a.classList.add('tifm-btn-iframe');
166
+ a.classList.add('right');
167
+ a.style.color = '#fff';
168
+ a.style.background = '#2d9418';
169
+ a.style.borderColor = '#2d9418';
170
+ a.style.boxShadow = 'none';
171
+ a.style.marginRight = '15px';
172
+ a.setAttribute('href', 'https://tastewp.com/plugins/' + slug);
173
+ a.setAttribute('target', '_blank');
174
+ a.innerText = 'Try it first';
175
+
176
+ return a;
177
+
178
+ }
179
+
180
+ const observer = new MutationObserver(function (mutations_list) {
181
+ mutations_list.forEach(function (mutation) {
182
+ mutation.addedNodes.forEach(function (added_node) {
183
+ if (added_node.id == 'TB_window') {
184
+ $('#TB_window #TB_iframeContent')[0].onload = function () {
185
+ let iframe = $('#TB_iframeContent').contents();
186
+ let footer = iframe.find('#plugin-information-footer');
187
+ let slug = footer.find('#plugin_install_from_iframe').data('slug');
188
+ let btn = makeButton(slug);
189
+ footer.append(btn);
190
+ }
191
+ }
192
+ });
193
+ });
194
+ });
195
+
196
+ observer.observe(document.querySelector('body'), { subtree: false, childList: true });
197
+ });
198
+ </script>
199
+ <?php
200
+ }
201
+
202
+ public function informativeAdminNoticeHandler() {
203
+
204
+ ?>
205
+
206
+ <div class="notice notice-success is-dismissible" id="tifm_new_feature_notice">
207
+ <p id="tifm_paragraph_notice">
208
+ <span class="tifm-grow-1">
209
+ <b>New: </b> Click on the&nbsp;
210
+ <a class="button" style="color:#2d9418;border-color:#2d9418;text-align:center;width:88px" href="#!">Try it first</a>
211
+ &nbsp;button to first test a plugin on a new WP instance.
212
+ </span>
213
+
214
+ <span class="tifm-grow-5">
215
+ <a class="tifm_darker_a" href="#">Got it, close this notice</a>
216
+ </span>
217
+
218
+ <span class="tifm-grow-1">
219
+ <a class="tifm_darker_a_muted" href="#">Disable this feature</a>
220
+ </span>
221
+
222
+ <span>
223
+ Brought to you by <a class="tifm_brought_url" href="<?php echo esc_html($this->pluginPageURL); ?>"><?php echo esc_html($this->pluginName); ?></a>
224
+ </span>
225
+ </p>
226
+ </div>
227
+
228
+ <?php
229
+
230
+ }
231
+
232
+ public function insertActionButton() {
233
+
234
+ add_filter('plugin_install_action_links', [&$this, 'actionButtonHandler'], 10, 2);
235
+
236
+ }
237
+
238
+ public static function noticeAjax() {
239
+
240
+ // Nonce verification
241
+ if (!isset($_POST['nonce']) || !wp_verify_nonce(sanitize_text_field($_POST['nonce']), 'tifm_notice_nonce')) {
242
+ wp_send_json_error();
243
+ return;
244
+ }
245
+
246
+ $method = '';
247
+ if (isset($_POST['method'])) {
248
+
249
+ $method = sanitize_text_field($_POST['method']);
250
+
251
+ }
252
+
253
+ if ($method == 'dismiss_notice') {
254
+
255
+ update_option('_tifm_hide_notice_forever', true);
256
+ wp_send_json_success();
257
+ exit;
258
+
259
+ } else if ($method == 'dismiss_notice_and_disable') {
260
+
261
+ update_option('_tifm_hide_notice_forever', true);
262
+ update_option('_tifm_disable_feature_forever', true);
263
+ update_option('_tifm_feature_enabled', 'disabled');
264
+ wp_send_json_success();
265
+ exit;
266
+
267
+ } else {
268
+
269
+ wp_send_json_error();
270
+ exit;
271
+
272
+ }
273
+
274
+ }
275
+
276
+ public function actionButtonHandler($links, $plugin) {
277
+
278
+ $url = 'https://tastewp.com/plugins/' . $plugin['slug'] . '/?anchor=wpsite';
279
+ $button = ['<a class="button" style="color:#2d9418;border-color:#2d9418;text-align:center;width:88px" target="_blank" href="' . $url . '">Try it first</a>'];
280
+ array_splice($links, 1, 0, $button);
281
+
282
+ return $links;
283
+
284
+ }
285
+
286
+ }
287
+ }
288
+
289
+ }
readme.txt CHANGED
@@ -4,8 +4,8 @@ Tags: migrate, clone, backup, migration, backups, copy, restore, recover, restor
4
  Author URI: https://backupbliss.com
5
  Requires PHP: 5.5
6
  Requires at least: 3.3
7
- Tested up to: 5.8.1
8
- Stable tag: 2.3.3
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
11
 
@@ -73,6 +73,10 @@ Backup and migration FAQ are under construction
73
 
74
  == Changelog ==
75
 
 
 
 
 
76
  = 2.3.3 =
77
  * Added support for WordPress 5.8.1
78
  * Added new modals
@@ -166,5 +170,6 @@ Backup and migration FAQ are under construction
166
 
167
  == Upgrade Notice ==
168
 
169
- = 2.3.3 =
170
- * Please upgrade!
 
4
  Author URI: https://backupbliss.com
5
  Requires PHP: 5.5
6
  Requires at least: 3.3
7
+ Tested up to: 6.0.2
8
+ Stable tag: 2.3.4
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
11
 
73
 
74
  == Changelog ==
75
 
76
+ = 2.3.4 =
77
+ * Fully tested with WordPress 6.0.2
78
+ * NEW: Added feature that allows to try plugins before installation
79
+
80
  = 2.3.3 =
81
  * Added support for WordPress 5.8.1
82
  * Added new modals
170
 
171
  == Upgrade Notice ==
172
 
173
+ = 2.3.4 =
174
+ * Fully tested with WordPress 6.0.2
175
+ * NEW: Added feature that allows to try plugins before installation
wpclone.php CHANGED
@@ -7,7 +7,7 @@
7
  * Plugin URI: https://backupbliss.com
8
  * Text Domain: wp-clone
9
  * Domain Path: /languages
10
- * Version: 2.3.3
11
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12
 
13
  // Exit on direct access
@@ -306,6 +306,47 @@ function wpa_wpc_plugin_redirect() {
306
 
307
  }
308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  // Include banner module
310
  include_once __DIR__ . '/modules/banner/misc.php';
311
 
7
  * Plugin URI: https://backupbliss.com
8
  * Text Domain: wp-clone
9
  * Domain Path: /languages
10
+ * Version: 2.3.4
11
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12
 
13
  // Exit on direct access
306
 
307
  }
308
 
309
+ // Activation of tryOutPlugins module
310
+ add_action('plugins_loaded', function () {
311
+
312
+ if (!(class_exists('\Inisev\Subs\Inisev_Try_Out_Plugins') || class_exists('Inisev\Subs\Inisev_Try_Out_Plugins') || class_exists('Inisev_Try_Out_Plugins'))) {
313
+ require_once __DIR__ . '/modules/tryOutPlugins/tryOutPlugins.php';
314
+ $try_out_plugins = new \Inisev\Subs\Inisev_Try_Out_Plugins(__FILE__, __DIR__, 'WP Clone', 'admin.php?page=wp-clone');
315
+ }
316
+
317
+ });
318
+
319
+ if (!has_action('wp_ajax_tifm_save_decision')) {
320
+ add_action('wp_ajax_tifm_save_decision', function () {
321
+
322
+ if (isset($_POST['decision'])) {
323
+
324
+ if ($_POST['decision'] == 'true') {
325
+ update_option('_tifm_feature_enabled', 'enabled');
326
+ delete_option('_tifm_disable_feature_forever', true);
327
+ wp_send_json_success();
328
+ exit;
329
+ } else if ($_POST['decision'] == 'false') {
330
+ update_option('_tifm_feature_enabled', 'disabled');
331
+ update_option('_tifm_disable_feature_forever', true);
332
+ wp_send_json_success();
333
+ exit;
334
+ } else if ($_POST['decision'] == 'reset') {
335
+ delete_option('_tifm_feature_enabled');
336
+ delete_option('_tifm_hide_notice_forever');
337
+ delete_option('_tifm_disable_feature_forever');
338
+ wp_send_json_success();
339
+ exit;
340
+ }
341
+
342
+ wp_send_json_error();
343
+ exit;
344
+
345
+ }
346
+
347
+ });
348
+ }
349
+
350
  // Include banner module
351
  include_once __DIR__ . '/modules/banner/misc.php';
352