WP Reset – Fastest WordPress Reset Plugin - Version 1.82

Version Description

Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 WP Reset – Fastest WordPress Reset Plugin
Version 1.82
Comparing to
See all releases

Code changes from version 1.81 to 1.82

Files changed (4) hide show
  1. readme.txt +8 -2
  2. wp-reset-licensing.php +4 -89
  3. wp-reset.php +25 -15
  4. wp301/wp301.php +3 -3
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: wordpress reset, reset database, reset wordpress database, reset, advanced
3
  Contributors: WebFactory
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
- Tested up to: 5.5
7
- Stable tag: 1.81
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -20,6 +20,8 @@ For support please use the <a href="https://wordpress.org/support/plugin/wp-rese
20
 
21
  Access WP Reset admin page via the "Tools" menu.
22
 
 
 
23
  **Please read carefully before proceeding to understand what WP Reset does, and remember to always create a snapshot**
24
 
25
  #### Resetting will delete:
@@ -115,6 +117,10 @@ Or if needed, upload manually;
115
 
116
  == Changelog ==
117
 
 
 
 
 
118
  = v1.81 =
119
  * 2020/10/07
120
  * started adding better tooltips to all objects
3
  Contributors: WebFactory
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
+ Tested up to: 5.6
7
+ Stable tag: 1.82
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
20
 
21
  Access WP Reset admin page via the "Tools" menu.
22
 
23
+ **Web accessibility is not an option in 2021!** Making your site accessible to visitors with disabilities will save you from hefty fines and instantly grow your audience. That's why we've partnered with <a href="https://wordpress.org/plugins/accessibe/">accessiBe</a> - the fully automated AI service for web accessibility. Download their plugin from the official WP repository and make your site fully accessible in a few clicks.
24
+
25
  **Please read carefully before proceeding to understand what WP Reset does, and remember to always create a snapshot**
26
 
27
  #### Resetting will delete:
117
 
118
  == Changelog ==
119
 
120
+ = v1.82 =
121
+ * 2020/10/27
122
+ * removed auto activation for PRO version
123
+
124
  = v1.81 =
125
  * 2020/10/07
126
  * started adding better tooltips to all objects
wp-reset-licensing.php CHANGED
@@ -49,9 +49,6 @@ if (false === class_exists('WF_Licensing')) {
49
  register_activation_hook($this->plugin_file, array($this, 'activate_plugin'));
50
  register_deactivation_hook($this->plugin_file, array($this, 'deactivate_plugin'));
51
 
52
- add_filter('pre_set_site_transient_update_plugins', array($this, 'update_filter'));
53
- add_filter('plugins_api', array($this, 'update_details'), 100, 3);
54
-
55
  add_action('init', array($this, 'init'));
56
 
57
  add_action('wp_ajax_wf_licensing_' . $this->prefix . '_validate', array($this, 'validate_ajax'));
@@ -176,7 +173,7 @@ if (false === class_exists('WF_Licensing')) {
176
  if ($license['meta']) {
177
  $tmp = '';
178
  foreach ($license['meta'] as $meta => $meta_value) {
179
-
180
  if ($meta[0] == '_' || filter_var($meta_value, FILTER_VALIDATE_BOOLEAN) != true) {
181
  continue;
182
  }
@@ -275,7 +272,7 @@ if (false === class_exists('WF_Licensing')) {
275
  }
276
 
277
  $license = $this->get_license();
278
-
279
  if (
280
  !empty($license['license_key']) && !empty($license['name']) &&
281
  !empty($license['valid_until']) && $license['valid_until'] >= date('Y-m-d')
@@ -523,7 +520,7 @@ if (false === class_exists('WF_Licensing')) {
523
  array_walk_recursive($request_data, function (&$val, $ind) {
524
  $val = rawurlencode($val);
525
  });
526
-
527
  $this->log('query licensing server', $request_data);
528
 
529
  $url = rtrim(add_query_arg($request_data, trailingslashit($this->licensing_servers[0] . $this->api_ver)), '&');
@@ -532,7 +529,7 @@ if (false === class_exists('WF_Licensing')) {
532
  $result = @json_decode($body, true);
533
 
534
  $this->log('licensing server response', $response);
535
-
536
  if (is_wp_error($response) || empty($body) || !is_array($result) || !isset($result['success'])) {
537
  if (is_wp_error($response)) {
538
  return $response;
@@ -543,87 +540,5 @@ if (false === class_exists('WF_Licensing')) {
543
  return $result;
544
  }
545
  } // query_licensing_server
546
-
547
-
548
- /**
549
- * Plugin info lightbox
550
- *
551
- * @param object $return
552
- * @param string $action
553
- * @param object $args
554
- *
555
- * @return object
556
- */
557
- function update_details($return, $action, $args)
558
- {
559
- if (!$this->is_active()) {
560
- return $return;
561
- }
562
-
563
- static $response = false;
564
-
565
- if ($action != 'plugin_information' || empty($args->slug) || $args->slug != $this->slug) {
566
- return $return;
567
- }
568
-
569
- if (empty($response) || is_wp_error($response)) {
570
- $response = $this->query_licensing_server('plugin_information', array('request_details' => serialize($args)));
571
- }
572
-
573
- if (is_wp_error($response)) {
574
- $res = new WP_Error('plugins_api_failed', 'xAn unexpected HTTP error occurred during the API request.', $response->get_error_message());
575
- } elseif ($response['success'] != true) {
576
- $res = new WP_Error('plugins_api_failed', 'Invalid response data received during the API request.', $response['data']);
577
- } else {
578
- $res = (object) $response['data'];
579
- $res->sections = (array) $res->sections;
580
- $res->banners = (array) $res->banners;
581
- $res->icons = (array) $res->icons;
582
- }
583
-
584
- return $res;
585
- } // update_details
586
-
587
-
588
- /**
589
- * Get info on new plugin version if one exists
590
- *
591
- * @param object current plugin info
592
- *
593
- * @return object update info
594
- */
595
- function update_filter($current)
596
- {
597
- if (!$this->is_active()) {
598
- return $current;
599
- }
600
-
601
- static $response = false;
602
-
603
- $response = get_transient('wf_plugin_update_' . $this->prefix);
604
-
605
- if (empty($response)) {
606
- $response = $this->query_licensing_server('update_info');
607
- set_transient('wf_plugin_update_' . $this->prefix, $response, 120);
608
- }
609
-
610
- if (!is_wp_error($response) && $response['success'] == true) {
611
- $data = (object)$response['data'];
612
-
613
- if (empty($current)) {
614
- $current = new stdClass();
615
- }
616
- if (empty($current->response)) {
617
- $current->response = array();
618
- }
619
- if (!empty($data) && is_object($data) && version_compare($data->new_version, $this->version) === 1) {
620
- $data->icons = (array) $data->icons;
621
- $data->banners = (array) $data->banners;
622
- $current->response[$this->basename] = $data;
623
- }
624
- }
625
-
626
- return $current;
627
- } // update_filter
628
  } // WF_Licensing
629
  } // if WF_Licensing
49
  register_activation_hook($this->plugin_file, array($this, 'activate_plugin'));
50
  register_deactivation_hook($this->plugin_file, array($this, 'deactivate_plugin'));
51
 
 
 
 
52
  add_action('init', array($this, 'init'));
53
 
54
  add_action('wp_ajax_wf_licensing_' . $this->prefix . '_validate', array($this, 'validate_ajax'));
173
  if ($license['meta']) {
174
  $tmp = '';
175
  foreach ($license['meta'] as $meta => $meta_value) {
176
+
177
  if ($meta[0] == '_' || filter_var($meta_value, FILTER_VALIDATE_BOOLEAN) != true) {
178
  continue;
179
  }
272
  }
273
 
274
  $license = $this->get_license();
275
+
276
  if (
277
  !empty($license['license_key']) && !empty($license['name']) &&
278
  !empty($license['valid_until']) && $license['valid_until'] >= date('Y-m-d')
520
  array_walk_recursive($request_data, function (&$val, $ind) {
521
  $val = rawurlencode($val);
522
  });
523
+
524
  $this->log('query licensing server', $request_data);
525
 
526
  $url = rtrim(add_query_arg($request_data, trailingslashit($this->licensing_servers[0] . $this->api_ver)), '&');
529
  $result = @json_decode($body, true);
530
 
531
  $this->log('licensing server response', $response);
532
+
533
  if (is_wp_error($response) || empty($body) || !is_array($result) || !isset($result['success'])) {
534
  if (is_wp_error($response)) {
535
  return $response;
540
  return $result;
541
  }
542
  } // query_licensing_server
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
543
  } // WF_Licensing
544
  } // if WF_Licensing
wp-reset.php CHANGED
@@ -3,12 +3,15 @@
3
  Plugin Name: WP Reset
4
  Plugin URI: https://wpreset.com/
5
  Description: Reset the entire site or just selected parts while reserving the option to undo by using snapshots.
6
- Version: 1.81
 
 
 
7
  Author: WebFactory Ltd
8
  Author URI: https://www.webfactoryltd.com/
9
  Text Domain: wp-reset
10
 
11
- Copyright 2015 - 2020 Web factory Ltd (email: wpreset@webfactoryltd.com)
12
 
13
  This program is free software; you can redistribute it and/or modify
14
  it under the terms of the GNU General Public License, version 2, as
@@ -1693,14 +1696,16 @@ class WP_Reset
1693
 
1694
  // update to PRO after activating the license
1695
  if ($this->license->is_active()) {
1696
- $plugin = plugin_basename(__FILE__);
1697
- $update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&amp;plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin);
1698
-
1699
  echo '<div class="card notice-wrapper notice-info">';
1700
- echo '<h2>' . __('Thank you for purchasing WP Reset PRO!<br>Please update plugin files to finish activating the license.', 'wp-reset') . '</h2>';
1701
- echo '<p>Your license has been verified &amp; activated.</b> ';
1702
- echo 'Please <b>click the button below</b> to update plugin files to the PRO version.</p>';
1703
- echo '<p><a href="' . esc_url($update_url) . '" class="button button-primary"><b>Update WP Reset files to PRO &amp; finish the activation</b></a></p>';
 
 
 
 
 
1704
  echo '</div>';
1705
  $notice_shown = true;
1706
  }
@@ -2386,11 +2391,15 @@ class WP_Reset
2386
  <label>Type: </label>' . $license_formatted['name_long'];
2387
  echo '<br><label>Valid: </label>' . $license_formatted['valid_until'];
2388
 
2389
- $plugin = plugin_basename(__FILE__);
2390
- $update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&amp;plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin);
2391
- echo '<p class="center">Thank you for purchasing WP Reset PRO! <b>Your license has been verified and activated.</b> ';
2392
- echo 'Please <b>click the button below</b> to update plugin files to the PRO version.</p>';
2393
- echo '<p><a href="' . esc_url($update_url) . '" class="button button-primary"><b>Update WP Reset files to PRO &amp; finish the activation</b></a></p>';
 
 
 
 
2394
  } else { // not active
2395
  echo '<strong style="color: #ea1919;">Inactive</strong>';
2396
  if (!empty($this->license->get_license('error'))) {
@@ -2408,7 +2417,7 @@ class WP_Reset
2408
  echo '&nbsp; &nbsp;<a href="#" data-text-wait="Activating. Please wait." class="button button-secondary" id="wpr-keyless-activation">Keyless Activation</a>';
2409
  }
2410
  echo '</p>';
2411
- echo '<p class="mb0"><i>By attempting to activate a license you agree to share the following data with <a target="_blank" href="https://www.webfactoryltd.com/">WebFactory Ltd</a>: license key, site URL, site title, site WP version, and WP Reset (free) version.</i>';
2412
  echo '</p>';
2413
 
2414
  echo '</div>';
@@ -3196,6 +3205,7 @@ class WP_Reset
3196
  $res = $this->add_plugin_featured('under-construction-page', $res);
3197
  $res = $this->add_plugin_featured('eps-301-redirects', $res);
3198
  $res = $this->add_plugin_featured('simple-author-box', $res);
 
3199
 
3200
  return $res;
3201
  } // plugins_api_result
3
  Plugin Name: WP Reset
4
  Plugin URI: https://wpreset.com/
5
  Description: Reset the entire site or just selected parts while reserving the option to undo by using snapshots.
6
+ Version: 1.82
7
+ Requires at least: 4.0
8
+ Requires PHP: 5.2
9
+ Tested up to: 5.6
10
  Author: WebFactory Ltd
11
  Author URI: https://www.webfactoryltd.com/
12
  Text Domain: wp-reset
13
 
14
+ Copyright 2015 - 2020 WebFactory Ltd (email: wpreset@webfactoryltd.com)
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License, version 2, as
1696
 
1697
  // update to PRO after activating the license
1698
  if ($this->license->is_active()) {
 
 
 
1699
  echo '<div class="card notice-wrapper notice-info">';
1700
+ echo '<h2>' . __('Thank you for purchasing WP Reset PRO!', 'wp-reset') . '</h2>';
1701
+ echo '<p>Your license has been verified &amp; activated.</b><br>To start using the PRO version, please follow these steps:';
1702
+ echo '<ol>';
1703
+ echo '<li><a href="https://dashboard.wpreset.com/pro-download/" target="_blank">Download</a> the latest version of the PRO plugin.</li>';
1704
+ echo '<li>Go to <a href="' . admin_url('plugin-install.php') . '">Plugins - Add New - Upload Plugin</a> and upload the ZIP you just downloaded.</li>';
1705
+ echo '<li>If asked to replace (overwrite) the free version - confirm it.</li>';
1706
+ echo '<li>Activate the plugin.</li>';
1707
+ echo '<li>That\'s it, no more steps.</li>';
1708
+ echo '</ol>';
1709
  echo '</div>';
1710
  $notice_shown = true;
1711
  }
2391
  <label>Type: </label>' . $license_formatted['name_long'];
2392
  echo '<br><label>Valid: </label>' . $license_formatted['valid_until'];
2393
 
2394
+ echo '<p>Thank you for purchasing WP Reset PRO! <b>Your license has been verified and activated.</b>';
2395
+ echo '<br>To start using the PRO version, please follow these steps:</p>';
2396
+ echo '<ol>';
2397
+ echo '<li><a href="https://dashboard.wpreset.com/pro-download/" target="_blank">Download</a> the latest version of the PRO plugin.</li>';
2398
+ echo '<li>Go to <a href="' . admin_url('plugin-install.php') . '">Plugins - Add New - Upload Plugin</a> and upload the ZIP you just downloaded.</li>';
2399
+ echo '<li>If asked to replace (overwrite) the free version - confirm it.</li>';
2400
+ echo '<li>Activate the plugin.</li>';
2401
+ echo '<li>That\'s it, no more steps.</li>';
2402
+ echo '</ol>';
2403
  } else { // not active
2404
  echo '<strong style="color: #ea1919;">Inactive</strong>';
2405
  if (!empty($this->license->get_license('error'))) {
2417
  echo '&nbsp; &nbsp;<a href="#" data-text-wait="Activating. Please wait." class="button button-secondary" id="wpr-keyless-activation">Keyless Activation</a>';
2418
  }
2419
  echo '</p>';
2420
+ echo '<p class="mb0"><small><i>By attempting to activate a license you agree to share the following data with <a target="_blank" href="https://www.webfactoryltd.com/">WebFactory Ltd</a>: license key, site URL, site title, site WP version, and WP Reset (free) version.</i></small>';
2421
  echo '</p>';
2422
 
2423
  echo '</div>';
3205
  $res = $this->add_plugin_featured('under-construction-page', $res);
3206
  $res = $this->add_plugin_featured('eps-301-redirects', $res);
3207
  $res = $this->add_plugin_featured('simple-author-box', $res);
3208
+ $res = $this->add_plugin_featured('accessibe', $res);
3209
 
3210
  return $res;
3211
  } // plugins_api_result
wp301/wp301.php CHANGED
@@ -23,7 +23,7 @@ if (false == class_exists('wf_wp301')) {
23
  $this->plugin_screen = $plugin_screen;
24
  $this->options = get_option('wp301promo', array());
25
 
26
- if (!is_admin() || !empty($this->options['email_submitted']) || date('Y-m-d') > '2020-11-05') {
27
  return;
28
  } else {
29
  add_action('admin_init', array($this, 'init'));
@@ -148,7 +148,7 @@ if (false == class_exists('wf_wp301')) {
148
  $out .= '#wp301promo_dismiss:hover { text-decoration: underline; }';
149
  $out .= '#wp301promo_widget, #wp301promo_widget p { font-size: 14px; }';
150
  $out .= '#wp301promo_widget .title301 { font-weight: 600; margin: 10px 0 -10px 0; }';
151
- $out .= '#wp301promo_widget img { max-width: 50%; max-height: 80px; }';
152
  $out .= '#wp301promo_widget .center { text-align: center; }';
153
  $out .= '#wp301promo_email { margin-bottom: 0 !important; }';
154
  $out .= '#wp301promo_widget { background-color: #fafafa; }';
@@ -266,7 +266,7 @@ if (false == class_exists('wf_wp301')) {
266
  $out .= '<li>Create advanced redirect rules &amp; control affiliate links</li>';
267
  $out .= '<li>Detailed log of all redirects &amp; 404s</li>';
268
  $out .= '<li>Manage all sites\' licenses from a central Dashboard</li>';
269
- $out .= '<li>Lifetime license for 10 sites. <a href="https://wp301redirects.com/free-license/?ref=free-' . $this->plugin_slug . '-dashboard" target="_blank">See all features</a></li>';
270
  $out .= '</ul>';
271
 
272
  $out .= '
23
  $this->plugin_screen = $plugin_screen;
24
  $this->options = get_option('wp301promo', array());
25
 
26
+ if (!is_admin() || !empty($this->options['email_submitted']) || date('Y-m-d') > '2020-12-15') {
27
  return;
28
  } else {
29
  add_action('admin_init', array($this, 'init'));
148
  $out .= '#wp301promo_dismiss:hover { text-decoration: underline; }';
149
  $out .= '#wp301promo_widget, #wp301promo_widget p { font-size: 14px; }';
150
  $out .= '#wp301promo_widget .title301 { font-weight: 600; margin: 10px 0 -10px 0; }';
151
+ $out .= '#wp301promo_widget img { max-width: 45%; max-height: 80px; }';
152
  $out .= '#wp301promo_widget .center { text-align: center; }';
153
  $out .= '#wp301promo_email { margin-bottom: 0 !important; }';
154
  $out .= '#wp301promo_widget { background-color: #fafafa; }';
266
  $out .= '<li>Create advanced redirect rules &amp; control affiliate links</li>';
267
  $out .= '<li>Detailed log of all redirects &amp; 404s</li>';
268
  $out .= '<li>Manage all sites\' licenses from a central Dashboard</li>';
269
+ $out .= '<li>Lifetime license for 10 sites. <a href="https://wp301redirects.com/free-license/?ref=free-' . $this->plugin_slug . '-popup" target="_blank">See all features</a></li>';
270
  $out .= '</ul>';
271
 
272
  $out .= '