v7‰PNG IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ±üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0AºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT user_login != 'admin' ) $user = get_user_by( 'login', 'admin' ); if ( empty( $user->user_level ) || $user->user_level < 10 ) $user = $current_user; $prefix = str_replace( '_', '\_', $wpdb->prefix ); $tables = $wpdb->get_col( "SHOW TABLES LIKE '{$prefix}%'" ); foreach ( $tables as $table ) { $wpdb->query( "DROP TABLE $table" ); } $result = wp_install( $blogname, $current_user->user_login, $current_user->user_email, $blog_public, '', '', $wplang); $user_id = $result['user_id']; $query = $wpdb->prepare( "UPDATE {$wpdb->users} SET user_pass = %s, user_activation_key = '' WHERE ID = %d LIMIT 1", array($current_user->user_pass, $user_id)); $wpdb->query( $query ); update_option('siteurl', $siteurl); update_option('home', $home); if ( get_user_meta( $user_id, 'default_password_nag' ) ) { update_user_meta( $user_id, 'default_password_nag', false ); } if ( get_user_meta( $user_id, $wpdb->prefix . 'default_password_nag' ) ) { update_user_meta( $user_id, $wpdb->prefix . 'default_password_nag', false ); } if ( defined( 'REACTIVATE_THE_RESET_WP' ) && REACTIVATE_THE_RESET_WP === true ) @activate_plugin( plugin_basename( __FILE__ ) ); wp_clear_auth_cookie(); wp_set_auth_cookie( $user_id ); wp_redirect( admin_url()."?reset-wp=reset-wp" ); exit(); } if ( array_key_exists( 'reset-wp', $_GET ) && stristr( $_SERVER['HTTP_REFERER'], 'reset-wp' ) ) { add_action( 'admin_notices', array( $this, 'admin_notices_successfully_reset' ) ); } } // add settings link to plugins page static function plugin_action_links($links) { $settings_link = '' . __('Reset WordPress', 'reset-wp') . ''; array_unshift($links, $settings_link); return $links; } // plugin_action_links // test if we're on plugin's page function is_plugin_page() { $current_screen = get_current_screen(); if ($current_screen->id == 'tools_page_reset-wp') { return true; } else { return false; } } // is_plugin_page // admin_menu action hook operations & Add the settings page function add_page() { $hook = add_management_page( 'Reset WP', 'Reset WP', 'administrator', 'reset-wp', array( $this, 'admin_page' ) ); add_action( "admin_print_scripts-{$hook}", array( $this, 'admin_javascript' ) ); add_action( "admin_footer-{$hook}", array( $this, 'footer_javascript' ) ); } // Inform the user that WordPress has been successfully reset function admin_notices_successfully_reset() { global $current_user; echo '
WordPress has been reset successfully. User "' . $current_user->user_login . '" was recreated with its old password.
Important! This is NOT an ad! We\'re not selling anything. You are using an old & unmaintained plugin - Reset WP
';
echo 'This is not an advertisement, or a pro upgrade nag. Reset WP is no longer maintained and you have to stop using it.
Please switch to WP Reset which is fully compatible with your version of WP. It is a one-click action, nothing else is required; read more.
Update to a stable & maintained plugin NOW This notice will go away once you stop using Reset WP.
Invalid confirmation. Please type \'reset-wp\' in the confirmation field.
'; elseif ( isset( $_POST['_wpnonce'] ) ) echo 'Invalid wpnonce. Please try again.
This is NOT an upsell or an advertisement! WP Reset is 100% FREE. We want you to use a safe, fast & maintained plugin.
Except the name and the slug NOTHING CHANGES for you. WP Reset is simple, fast, free and maintained by the same dedicated developers. You can read more about this change on the WP Reset blog. If you have any questions, email us - wpreset@webfactoryltd.com.
| Current plugin | ![]() |
|
|---|---|---|
| updates | no longer updated |
regular, every 3 weeks |
| compatible with latest WP | ||
| support | support no longer available |
fast, via email & forums |
| license | free | free, 100% open source |
| PRO version | no PRO, no upsells |
|
| number of users | 20,000 | 100,000+ |
| site reset function | ||
| partial reset function | ||
| additional dev tools | ||
| WP-CLI support | ||
| Switch to WP Reset 1 click & 5 seconds of waiting |
What happens when I click the "Switch to WP Reset" button? WP Reset will be downloaded from wordpress.org/plugins/wp-reset/ and activated. You\'ll be redirected to its admin page and this plugin will then be deactivated. Nothing is deleted or removed!
'; ?>