Reset WP - Version 1.1

Version Description

  • Small Fix in $wpdb->prepare query. Compatible with WordPress Version 4.8.1

=

Download this release

Release Info

Developer nikunjsoni
Plugin Icon 128x128 Reset WP
Version 1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1

Files changed (2) hide show
  1. readme.txt +8 -2
  2. reset-wp.php +6 -1
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: http://www.nikunjsoni.co.in/donate
4
  Tags: reset wp,reset-wp,reset,wp,wordpress,clean,cleaner,database,mysql,wp-admin,admin,plugin
5
  License: GPLv2
6
  Requires at least: 3.7
7
- Tested up to: 4.4
8
- Stable tag: 1.0
9
 
10
  Resets the WP Database to the default installation. It deletes all content and custom changes. Resets only database not modify or delete any files.
11
 
@@ -49,11 +49,17 @@ Usage :
49
  = 1.0 =
50
  * Initial release.
51
 
 
 
 
52
  == Upgrade Notice ==
53
 
54
  = 1.0 =
55
  * Initial release.
56
 
 
 
 
57
  == Frequently Asked Questions ==
58
 
59
  You can submit it in http://www.nikunjsoni.co.in
4
  Tags: reset wp,reset-wp,reset,wp,wordpress,clean,cleaner,database,mysql,wp-admin,admin,plugin
5
  License: GPLv2
6
  Requires at least: 3.7
7
+ Tested up to: 4.8.1
8
+ Stable tag: 1.1
9
 
10
  Resets the WP Database to the default installation. It deletes all content and custom changes. Resets only database not modify or delete any files.
11
 
49
  = 1.0 =
50
  * Initial release.
51
 
52
+ = 1.1 =
53
+ * Small Fix in $wpdb->prepare query. Compatible with WordPress Version 4.8.1
54
+
55
  == Upgrade Notice ==
56
 
57
  = 1.0 =
58
  * Initial release.
59
 
60
+ = 1.1 =
61
+ * Small Fix in $wpdb->prepare query. Compatible with WordPress Version 4.8.1
62
+
63
  == Frequently Asked Questions ==
64
 
65
  You can submit it in http://www.nikunjsoni.co.in
reset-wp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Reset WP
4
  Plugin URI: http://www.nikunjsoni.co.in
5
  Description: It resets the WordPress database to the default installation. It deletes all content and custom changes. Resets only database not modify or delete any files.
6
- Version: 1.0
7
  Author: Nikunj Soni
8
  Author URI: http://www.nikunjsoni.co.in
9
  Text Domain: Reset-WP
@@ -67,7 +67,12 @@ class ResetWP {
67
  $result = wp_install( $blogname, $user->user_login, $user->user_email, $blog_public );
68
  extract( $result, EXTR_SKIP );
69
 
 
70
  $query = $wpdb->prepare( "UPDATE $wpdb->users SET user_pass = '".$user->user_pass."', user_activation_key = '' WHERE ID = '".$user_id."' ");
 
 
 
 
71
  $wpdb->query( $query );
72
 
73
  $get_user_meta = function_exists( 'get_user_meta' ) ? 'get_user_meta' : 'get_usermeta';
3
  Plugin Name: Reset WP
4
  Plugin URI: http://www.nikunjsoni.co.in
5
  Description: It resets the WordPress database to the default installation. It deletes all content and custom changes. Resets only database not modify or delete any files.
6
+ Version: 1.1
7
  Author: Nikunj Soni
8
  Author URI: http://www.nikunjsoni.co.in
9
  Text Domain: Reset-WP
67
  $result = wp_install( $blogname, $user->user_login, $user->user_email, $blog_public );
68
  extract( $result, EXTR_SKIP );
69
 
70
+ /*
71
  $query = $wpdb->prepare( "UPDATE $wpdb->users SET user_pass = '".$user->user_pass."', user_activation_key = '' WHERE ID = '".$user_id."' ");
72
+ */
73
+
74
+ $query = $wpdb->prepare( "UPDATE $wpdb->users SET user_pass = '%s' , user_activation_key = '' WHERE ID = '%d' " , $user->user_pass, $user_id );
75
+
76
  $wpdb->query( $query );
77
 
78
  $get_user_meta = function_exists( 'get_user_meta' ) ? 'get_user_meta' : 'get_usermeta';