WordPress Reset - Version 1.4

Version Description

January 19, 2016

  • Fix compatibility with PHP 7.0
  • Internationalization
Download this release

Release Info

Developer aristath
Plugin Icon WordPress Reset
Version 1.4
Comparing to
See all releases

Code changes from version 1.3.3 to 1.4

Files changed (2) hide show
  1. readme.txt +9 -3
  2. wordpress-reset.php +148 -114
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WordPress Reset ===
2
- Contributors: sivel
3
  Donate Link: http://sivel.net/donate
4
  Tags: wordpress-reset, wordpress, reset, admin
5
  Requires at least: 2.8
6
- Tested up to: 3.8
7
- Stable tag: 1.3.3
8
 
9
  Resets the WordPress database back to it's defaults. Deletes all customizations and content. Does not modify files only resets the database.
10
 
@@ -68,6 +68,12 @@ Fixes a deprecated notice in WordPress 3.3, removed the $auto_reactivate variabl
68
 
69
  == Changelog ==
70
 
 
 
 
 
 
 
71
  = 1.3.3 (2013-12-18): =
72
  * Fix an issue where a user does not have a user_level
73
 
1
  === WordPress Reset ===
2
+ Contributors: sivel, aristath
3
  Donate Link: http://sivel.net/donate
4
  Tags: wordpress-reset, wordpress, reset, admin
5
  Requires at least: 2.8
6
+ Tested up to: 4.5
7
+ Stable tag: 1.4
8
 
9
  Resets the WordPress database back to it's defaults. Deletes all customizations and content. Does not modify files only resets the database.
10
 
68
 
69
  == Changelog ==
70
 
71
+ = 1.4 =
72
+ January 19, 2016
73
+
74
+ * Fix compatibility with PHP 7.0
75
+ * Internationalization
76
+
77
  = 1.3.3 (2013-12-18): =
78
  * Fix an issue where a user does not have a user_level
79
 
wordpress-reset.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WordPress Reset
4
  Plugin URI: http://sivel.net/wordpress/wordpress-reset/
5
  Description: Resets the WordPress database back to it's defaults. Deletes all customizations and content. Does not modify files only resets the database.
6
  Author: Matt Martz
7
- Version: 1.3.3
8
  Author URI: http://sivel.net/
9
 
10
  Copyright (c) 2009-2012 Matt Martz (http://sivel.net)
@@ -13,28 +13,35 @@ Author URI: http://sivel.net/
13
  */
14
 
15
  // Only run the code if we are in the admin
16
- if ( is_admin() ) :
17
-
18
- class WordPressReset {
19
- // Action/Filter Hooks
20
- function WordPressReset() {
21
- add_action( 'admin_menu', array( &$this, 'add_page' ) );
22
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
23
- add_filter( 'favorite_actions', array( &$this, 'favorites' ), 100 );
24
- add_action( 'wp_before_admin_bar_render', array( &$this, 'admin_bar_link' ) );
25
- add_filter( 'wp_mail', array( &$this, 'hijack_mail' ), 1 );
 
 
 
26
  }
27
 
28
- // favorite_actions filter hook operations
29
- // While this plugin is active put a link to the reset page in the favorites drop down.
30
- function favorites( $actions ) {
31
- $reset['tools.php?page=wordpress-reset'] = array( 'WordPress Reset', 'level_10' );
 
 
32
  return array_merge( $reset, $actions );
33
  }
34
 
35
- // wp_before_admin_bar_render action hook operations
36
- // While this plugin is active put a link to the reset page in the admin bar under the site title
37
- function admin_bar_link() {
 
 
38
  global $wp_admin_bar;
39
  $wp_admin_bar->add_menu(
40
  array(
@@ -46,10 +53,12 @@ class WordPressReset {
46
  );
47
  }
48
 
49
- // admin_init action hook operations
50
- // Checks for wordpress_reset post value and if there deletes all wp tables
51
- // and performs an install, populating the users previous password also
52
- function admin_init() {
 
 
53
  global $current_user;
54
 
55
  $wordpress_reset = ( isset( $_POST['wordpress_reset'] ) && $_POST['wordpress_reset'] == 'true' ) ? true : false;
@@ -59,15 +68,17 @@ class WordPressReset {
59
  if ( $wordpress_reset && $wordpress_reset_confirm && $valid_nonce ) {
60
  require_once( ABSPATH . '/wp-admin/includes/upgrade.php' );
61
 
62
- $blogname = get_option( 'blogname' );
63
  $admin_email = get_option( 'admin_email' );
64
  $blog_public = get_option( 'blog_public' );
65
 
66
- if ( $current_user->user_login != 'admin' )
67
  $user = get_user_by( 'login', 'admin' );
 
68
 
69
- if ( empty( $user->user_level ) || $user->user_level < 10 )
70
  $user = $current_user;
 
71
 
72
  global $wpdb, $reactivate_wp_reset_additional;
73
 
@@ -83,23 +94,27 @@ class WordPressReset {
83
  $query = $wpdb->prepare( "UPDATE $wpdb->users SET user_pass = %s, user_activation_key = '' WHERE ID = %d", $user->user_pass, $user_id );
84
  $wpdb->query( $query );
85
 
86
- $get_user_meta = function_exists( 'get_user_meta' ) ? 'get_user_meta' : 'get_usermeta';
87
  $update_user_meta = function_exists( 'update_user_meta' ) ? 'update_user_meta' : 'update_usermeta';
88
 
89
- if ( $get_user_meta( $user_id, 'default_password_nag' ) )
90
  $update_user_meta( $user_id, 'default_password_nag', false );
 
91
 
92
- if ( $get_user_meta( $user_id, $wpdb->prefix . 'default_password_nag' ) )
93
  $update_user_meta( $user_id, $wpdb->prefix . 'default_password_nag', false );
 
94
 
95
- if ( defined( 'REACTIVATE_WP_RESET' ) && REACTIVATE_WP_RESET === true )
96
- @activate_plugin( plugin_basename( __FILE__ ) );
 
97
 
98
  if ( ! empty( $reactivate_wp_reset_additional ) ) {
99
  foreach ( $reactivate_wp_reset_additional as $plugin ) {
100
  $plugin = plugin_basename( $plugin );
101
- if ( ! is_wp_error( validate_plugin( $plugin ) ) )
102
- @activate_plugin( $plugin );
 
103
  }
104
  }
105
 
@@ -110,20 +125,25 @@ class WordPressReset {
110
  exit();
111
  }
112
 
113
- if ( array_key_exists( 'reset', $_GET ) && stristr( $_SERVER['HTTP_REFERER'], 'wordpress-reset' ) )
114
  add_action( 'admin_notices', array( &$this, 'reset_notice' ) );
 
115
  }
116
 
117
- // admin_notices action hook operations
118
- // Inform the user that WordPress has been successfully reset
119
- function reset_notice() {
 
 
120
  $user = get_user_by( 'id', 1 );
121
  echo '<div id="message" class="updated fade"><p><strong>WordPress has been reset back to defaults. The user "' . $user->user_login . '" was recreated with its previous password.</strong></p></div>';
122
  do_action( 'wordpress_reset_post', $user );
123
  }
124
 
125
- // Overwrite the password, because we actually reset it after this email goes out
126
- function hijack_mail( $args ) {
 
 
127
  if ( preg_match( '/Your new WordPress (blog|site) has been successfully set up at/i', $args['message'] ) ) {
128
  $args['message'] = str_replace( 'Your new WordPress site has been successfully set up at:', 'Your WordPress site has been successfully reset, and can be accessed at:', $args['message'] );
129
  $args['message'] = preg_replace( '/Password:.+/', 'Password: previously specified password', $args['message'] );
@@ -131,55 +151,63 @@ class WordPressReset {
131
  return $args;
132
  }
133
 
134
- // admin_print_scripts action hook operations
135
- // Enqueue jQuery to the head
136
- function admin_js() {
 
 
137
  wp_enqueue_script( 'jquery' );
138
  }
139
 
140
- // admin_footer action hook operations
141
- // Do some jQuery stuff to warn the user before submission
142
- function footer_js() {
143
- ?>
144
- <script type="text/javascript">
145
- /* <![CDATA[ */
146
- jQuery('#wordpress_reset_submit').click(function(){
147
- if ( jQuery('#wordpress_reset_confirm').val() == 'reset' ) {
148
- var message = 'This action is not reversable.\n\nClicking "OK" will reset your database back to it\'s defaults. Click "Cancel" to abort.'
149
- var reset = confirm(message);
150
- if ( reset ) {
151
- jQuery('#wordpress_reset_form').submit();
 
 
 
 
 
152
  } else {
153
- jQuery('#wordpress_reset').val('false');
154
  return false;
155
  }
156
- } else {
157
- alert('Invalid confirmation word. Please type the word \'reset\' in the confirmation field.');
158
- return false;
159
- }
160
- });
161
- /* ]]> */
162
- </script>
163
- <?php
164
  }
165
 
166
- // admin_menu action hook operations
167
- // Add the settings page
168
- function add_page() {
 
 
169
  if ( current_user_can( 'level_10' ) && function_exists( 'add_management_page' ) )
170
  $hook = add_management_page( 'Reset', 'Reset', 'level_10', 'wordpress-reset', array( &$this, 'admin_page' ) );
171
  add_action( "admin_print_scripts-{$hook}", array( &$this, 'admin_js' ) );
172
  add_action( "admin_footer-{$hook}", array( &$this, 'footer_js' ) );
173
  }
174
 
175
- // add_option_page callback operations
176
- // The settings page
 
 
177
  function admin_page() {
178
  global $current_user, $reactivate_wp_reset_additional;
179
- if ( isset( $_POST['wordpress_reset_confirm'] ) && $_POST['wordpress_reset_confirm'] != 'reset' )
180
  echo '<div class="error fade"><p><strong>Invalid confirmation word. Please type the word \'reset\' in the confirmation field.</strong></p></div>';
181
- elseif ( isset( $_POST['_wpnonce'] ) )
182
  echo '<div class="error fade"><p><strong>Invalid nonce. Please try again.</strong></p></div>';
 
183
 
184
  $missing = array();
185
  if ( ! empty( $reactivate_wp_reset_additional ) ) {
@@ -192,54 +220,60 @@ class WordPressReset {
192
  }
193
 
194
  $will_reactivate = ( defined( 'REACTIVATE_WP_RESET') && REACTIVATE_WP_RESET === true ) ? true : false;
195
- ?>
196
- <div class="wrap">
197
- <div id="icon-tools" class="icon32"><br /></div>
198
- <h2>Reset</h2>
199
- <h3>Details about the reset</h3>
200
- <p><strong>After completing this reset you will taken to the dashboard.</strong></p>
201
- <?php $admin = get_user_by( 'login', 'admin' ); ?>
202
- <?php if ( ! isset( $admin->user_login ) || $admin->user_level < 10 ) : $user = $current_user; ?>
203
- <p>The 'admin' user does not exist. The user '<strong><?php echo esc_html( $user->user_login ); ?></strong>' will be recreated with its <strong>current password</strong> with user level 10.</p>
204
- <?php else : ?>
205
- <p>The '<strong>admin</strong>' user exists and will be recreated with its <strong>current password</strong>.</p>
206
- <?php endif; ?>
207
- <p>This plugin <strong>will<?php echo $will_reactivate ? '' : ' not';?> be automatically reactivated</strong> after the reset. <?php echo ! $will_reactivate ? "To have this plugin auto-reactivate add <span class='code'>define( 'REACTIVATE_WP_RESET', true );</span> to <span class='code'>wp-config.php</span>." : ''; ?></p>
208
- <?php if ( ! empty( $reactivate_wp_reset_additional ) ) : ?>
209
- <p>The following <strong>additional plugins will be reactivated</strong>:
210
- <ul style="list-style-type: disc;">
211
- <?php foreach ( $reactivate_wp_reset_additional as $plugin ) : $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); ?>
212
- <li style="margin: 5px 0 0 30px;"><strong><?php echo esc_html( $plugin_data['Name'] ); ?></strong></li>
213
- <?php endforeach; unset( $reactivate_wp_reset_additional, $plugin, $plugin_data ); ?>
214
- </ul>
215
- </p>
216
- <?php endif; ?>
217
- <?php if ( ! empty( $missing ) ) : ?>
218
- <p>The following <strong>additional plugins are missing</strong> and cannot be reactivated:
219
- <ul style="list-style-type: disc;">
220
- <?php foreach ( $missing as $plugin ) : ?>
221
- <li style="margin: 5px 0 0 30px;"><strong><?php echo esc_html( $plugin ); ?></strong></li>
222
- <?php endforeach; unset( $missing, $plugin ); ?>
223
- </ul>
224
- </p>
225
- <?php endif; ?>
226
- <h3>Reset</h3>
227
- <p>Type '<strong>reset</strong>' in the confirmation field to confirm the reset and then click the reset button:</p>
228
- <form id="wordpress_reset_form" action="" method="post">
229
- <?php wp_nonce_field( 'wordpress_reset' ); ?>
230
- <input id="wordpress_reset" type="hidden" name="wordpress_reset" value="true" />
231
- <input id="wordpress_reset_confirm" type="text" name="wordpress_reset_confirm" value="" />
232
- <p class="submit">
233
- <input id="wordpress_reset_submit" style="width: 80px;" type="submit" name="Submit" class="button-primary" value="Reset" />
234
- </p>
235
- </form>
236
- </div>
237
- <?php
 
 
 
 
 
 
238
  }
239
  }
240
 
241
  // Instantiate the class
242
- $WordPressReset = new WordPressReset();
243
 
244
  // End if for is_admin
245
- endif;
4
  Plugin URI: http://sivel.net/wordpress/wordpress-reset/
5
  Description: Resets the WordPress database back to it's defaults. Deletes all customizations and content. Does not modify files only resets the database.
6
  Author: Matt Martz
7
+ Version: 1.4
8
  Author URI: http://sivel.net/
9
 
10
  Copyright (c) 2009-2012 Matt Martz (http://sivel.net)
13
  */
14
 
15
  // Only run the code if we are in the admin
16
+ if ( is_admin() && ! class_exists( 'WordPress_Reset' ) ) :
17
+
18
+ class WordPress_Reset {
19
+ /**
20
+ * The class constructor.
21
+ * contains Action/Filter Hooks
22
+ */
23
+ public function __construct() {
24
+ add_action( 'admin_menu', array( $this, 'add_page' ) );
25
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
26
+ add_filter( 'favorite_actions', array( $this, 'favorites' ), 100 );
27
+ add_action( 'wp_before_admin_bar_render', array( $this, 'admin_bar_link' ) );
28
+ add_filter( 'wp_mail', array( $this, 'hijack_mail' ), 1 );
29
  }
30
 
31
+ /**
32
+ * favorite_actions filter hook operations
33
+ * While this plugin is active put a link to the reset page in the favorites drop down.
34
+ */
35
+ public function favorites( $actions ) {
36
+ $reset['tools.php?page=wordpress-reset'] = array( esc_html__( 'WordPress Reset' ), 'level_10' );
37
  return array_merge( $reset, $actions );
38
  }
39
 
40
+ /**
41
+ * wp_before_admin_bar_render action hook operations
42
+ * While this plugin is active put a link to the reset page in the admin bar under the site title
43
+ */
44
+ public function admin_bar_link() {
45
  global $wp_admin_bar;
46
  $wp_admin_bar->add_menu(
47
  array(
53
  );
54
  }
55
 
56
+ /**
57
+ * admin_init action hook operations
58
+ * Checks for wordpress_reset post value and if there deletes all wp tables
59
+ * and performs an install, populating the users previous password also
60
+ */
61
+ public function admin_init() {
62
  global $current_user;
63
 
64
  $wordpress_reset = ( isset( $_POST['wordpress_reset'] ) && $_POST['wordpress_reset'] == 'true' ) ? true : false;
68
  if ( $wordpress_reset && $wordpress_reset_confirm && $valid_nonce ) {
69
  require_once( ABSPATH . '/wp-admin/includes/upgrade.php' );
70
 
71
+ $blogname = get_option( 'blogname' );
72
  $admin_email = get_option( 'admin_email' );
73
  $blog_public = get_option( 'blog_public' );
74
 
75
+ if ( $current_user->user_login != 'admin' ) {
76
  $user = get_user_by( 'login', 'admin' );
77
+ }
78
 
79
+ if ( empty( $user->user_level ) || $user->user_level < 10 ) {
80
  $user = $current_user;
81
+ }
82
 
83
  global $wpdb, $reactivate_wp_reset_additional;
84
 
94
  $query = $wpdb->prepare( "UPDATE $wpdb->users SET user_pass = %s, user_activation_key = '' WHERE ID = %d", $user->user_pass, $user_id );
95
  $wpdb->query( $query );
96
 
97
+ $get_user_meta = function_exists( 'get_user_meta' ) ? 'get_user_meta' : 'get_usermeta';
98
  $update_user_meta = function_exists( 'update_user_meta' ) ? 'update_user_meta' : 'update_usermeta';
99
 
100
+ if ( $get_user_meta( $user_id, 'default_password_nag' ) ) {
101
  $update_user_meta( $user_id, 'default_password_nag', false );
102
+ }
103
 
104
+ if ( $get_user_meta( $user_id, $wpdb->prefix . 'default_password_nag' ) ) {
105
  $update_user_meta( $user_id, $wpdb->prefix . 'default_password_nag', false );
106
+ }
107
 
108
+ if ( defined( 'REACTIVATE_WP_RESET' ) && REACTIVATE_WP_RESET === true ) {
109
+ activate_plugin( plugin_basename( __FILE__ ) );
110
+ }
111
 
112
  if ( ! empty( $reactivate_wp_reset_additional ) ) {
113
  foreach ( $reactivate_wp_reset_additional as $plugin ) {
114
  $plugin = plugin_basename( $plugin );
115
+ if ( ! is_wp_error( validate_plugin( $plugin ) ) ) {
116
+ activate_plugin( $plugin );
117
+ }
118
  }
119
  }
120
 
125
  exit();
126
  }
127
 
128
+ if ( array_key_exists( 'reset', $_GET ) && stristr( $_SERVER['HTTP_REFERER'], 'wordpress-reset' ) ) {
129
  add_action( 'admin_notices', array( &$this, 'reset_notice' ) );
130
+ }
131
  }
132
 
133
+ /**
134
+ * admin_notices action hook operations
135
+ * Inform the user that WordPress has been successfully reset
136
+ */
137
+ public function reset_notice() {
138
  $user = get_user_by( 'id', 1 );
139
  echo '<div id="message" class="updated fade"><p><strong>WordPress has been reset back to defaults. The user "' . $user->user_login . '" was recreated with its previous password.</strong></p></div>';
140
  do_action( 'wordpress_reset_post', $user );
141
  }
142
 
143
+ /**
144
+ * Overwrite the password, because we actually reset it after this email goes out
145
+ */
146
+ public function hijack_mail( $args ) {
147
  if ( preg_match( '/Your new WordPress (blog|site) has been successfully set up at/i', $args['message'] ) ) {
148
  $args['message'] = str_replace( 'Your new WordPress site has been successfully set up at:', 'Your WordPress site has been successfully reset, and can be accessed at:', $args['message'] );
149
  $args['message'] = preg_replace( '/Password:.+/', 'Password: previously specified password', $args['message'] );
151
  return $args;
152
  }
153
 
154
+ /**
155
+ * admin_print_scripts action hook operations
156
+ * Enqueue jQuery to the head
157
+ */
158
+ public function admin_js() {
159
  wp_enqueue_script( 'jquery' );
160
  }
161
 
162
+ /**
163
+ * admin_footer action hook operations
164
+ * Do some jQuery stuff to warn the user before submission
165
+ */
166
+ public function footer_js() { ?>
167
+ <script type="text/javascript">
168
+ /* <![CDATA[ */
169
+ jQuery('#wordpress_reset_submit').click(function(){
170
+ if ( jQuery('#wordpress_reset_confirm').val() == 'reset' ) {
171
+ var message = 'This action is not reversable.\n\nClicking "OK" will reset your database back to it\'s defaults. Click "Cancel" to abort.'
172
+ var reset = confirm(message);
173
+ if ( reset ) {
174
+ jQuery('#wordpress_reset_form').submit();
175
+ } else {
176
+ jQuery('#wordpress_reset').val('false');
177
+ return false;
178
+ }
179
  } else {
180
+ alert('Invalid confirmation word. Please type the word \'reset\' in the confirmation field.');
181
  return false;
182
  }
183
+ });
184
+ /* ]]> */
185
+ </script>
186
+ <?php
 
 
 
 
187
  }
188
 
189
+ /**
190
+ * admin_menu action hook operations
191
+ * Add the settings page
192
+ */
193
+ public function add_page() {
194
  if ( current_user_can( 'level_10' ) && function_exists( 'add_management_page' ) )
195
  $hook = add_management_page( 'Reset', 'Reset', 'level_10', 'wordpress-reset', array( &$this, 'admin_page' ) );
196
  add_action( "admin_print_scripts-{$hook}", array( &$this, 'admin_js' ) );
197
  add_action( "admin_footer-{$hook}", array( &$this, 'footer_js' ) );
198
  }
199
 
200
+ /**
201
+ * add_option_page callback operations
202
+ * The settings page
203
+ */
204
  function admin_page() {
205
  global $current_user, $reactivate_wp_reset_additional;
206
+ if ( isset( $_POST['wordpress_reset_confirm'] ) && $_POST['wordpress_reset_confirm'] != 'reset' ) {
207
  echo '<div class="error fade"><p><strong>Invalid confirmation word. Please type the word \'reset\' in the confirmation field.</strong></p></div>';
208
+ } elseif ( isset( $_POST['_wpnonce'] ) ) {
209
  echo '<div class="error fade"><p><strong>Invalid nonce. Please try again.</strong></p></div>';
210
+ }
211
 
212
  $missing = array();
213
  if ( ! empty( $reactivate_wp_reset_additional ) ) {
220
  }
221
 
222
  $will_reactivate = ( defined( 'REACTIVATE_WP_RESET') && REACTIVATE_WP_RESET === true ) ? true : false;
223
+ ?>
224
+ <div class="wrap">
225
+ <div id="icon-tools" class="icon32"><br /></div>
226
+ <h1><?php esc_html_e( 'Reset', 'wp-reset' ); ?></h1>
227
+ <h2><?php esc_html_e( 'Details about the reset', 'wp-reset' ); ?></h2>
228
+ <p><strong><?php esc_html_e( 'After completing this reset you will be taken to the dashboard.', 'wp-reset' ); ?></strong></p>
229
+ <?php $admin = get_user_by( 'login', 'admin' ); ?>
230
+ <?php if ( ! isset( $admin->user_login ) || $admin->user_level < 10 ) : $user = $current_user; ?>
231
+ <p><?php printf( esc_html__( 'The "admin" user does not exist. The user %s will be recreated using its current password with user level 10.', 'wp-reset' ), '<strong>' . esc_html( $user->user_login ) . '</strong>' ); ?></p>
232
+ <?php else : ?>
233
+ <p><?php esc_html_e( 'The "admin" user exists and will be recreated with its current password.', 'wp-reset' ); ?></p>
234
+ <?php endif; ?>
235
+ <?php if ( $will_reactivate ) : ?>
236
+ <p><?php _e( 'This plugin <strong>will be automatically reactivated</strong> after the reset.', 'wp-reset' ); ?></p>
237
+ <?php else : ?>
238
+ <p><?php _e( 'This plugin <strong>will not be automatically reactivated</strong> after the reset.', 'wp-reset' ); ?></p>
239
+ <p><?php printf( esc_html__( 'To have this plugin auto-reactivate, add %1s to your %2s file.', 'wp-reset' ), '<span class="code"><code>define( \'REACTIVATE_WP_RESET\', true );</code></span>', '<span class="code">wp-config.php</span>' ); ?></p>
240
+ <?php endif; ?>
241
+ <?php if ( ! empty( $reactivate_wp_reset_additional ) ) : ?>
242
+ <?php esc_html_e( 'The following additional plugins will be reactivated:', 'wp-reset' ); ?>
243
+ <ul style="list-style-type: disc;">
244
+ <?php foreach ( $reactivate_wp_reset_additional as $plugin ) : ?>
245
+ <?php $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); ?>
246
+ <li style="margin: 5px 0 0 30px;"><strong><?php echo esc_html( $plugin_data['Name'] ); ?></strong></li>
247
+ <?php endforeach; ?>
248
+ <?php unset( $reactivate_wp_reset_additional, $plugin, $plugin_data ); ?>
249
+ </ul>
250
+ <?php endif; ?>
251
+ <?php if ( ! empty( $missing ) ) : ?>
252
+ <?php esc_html_e( 'The following additional plugins are missing and cannot be reactivated:', 'wp-reset' ); ?>
253
+ <ul style="list-style-type: disc;">
254
+ <?php foreach ( $missing as $plugin ) : ?>
255
+ <li style="margin: 5px 0 0 30px;"><strong><?php echo esc_html( $plugin ); ?></strong></li>
256
+ <?php endforeach; ?>
257
+ <?PHP unset( $missing, $plugin ); ?>
258
+ </ul>
259
+ <?php endif; ?>
260
+ <h3><?php esc_html_e( 'Reset', 'wp-reset' ); ?></h3>
261
+ <p><?php printf( esc_html__( 'Type %s in the confirmation field to confirm the reset and then click the reset button:', 'wp-reset' ), '<strong>reset</strong>' ); ?></p>
262
+ <form id="wordpress_reset_form" action="" method="post">
263
+ <?php wp_nonce_field( 'wordpress_reset' ); ?>
264
+ <input id="wordpress_reset" type="hidden" name="wordpress_reset" value="true" />
265
+ <input id="wordpress_reset_confirm" type="text" name="wordpress_reset_confirm" value="" />
266
+ <p class="submit">
267
+ <input id="wordpress_reset_submit" style="width: 80px;" type="submit" name="Submit" class="button-primary" value="<?php esc_html_e( 'Reset' ); ?>" />
268
+ </p>
269
+ </form>
270
+ </div>
271
+ <?php
272
  }
273
  }
274
 
275
  // Instantiate the class
276
+ $WordPress_Reset = new WordPress_Reset();
277
 
278
  // End if for is_admin
279
+ endif;