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.

'; do_action( 'reset_wp_post', $current_user ); } // try to get users to switch to WP Reset function admin_notices_upgrade() { if ($this->is_plugin_page()) { return; } echo '

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.

'; echo '

Update to a stable & maintained plugin NOW This notice will go away once you stop using Reset WP.

'; } // admin_notices_upgrade function upgrade_footer() { if ($this->is_plugin_page()) { return; } $replace_url = add_query_arg(array('action' => 'replace_reset_wp', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php')); ?> is_plugin_page() ) { wp_enqueue_script( 'jquery' ); } } function footer_javascript() { ?>

Invalid confirmation. Please type \'reset-wp\' in the confirmation field.

'; elseif ( isset( $_POST['_wpnonce'] ) ) echo '

Invalid wpnonce. Please try again.

'; ?>

Reset WP

This plugin is old & unmaintained! It's been replaced by WP Reset

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 WP Reset
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

'replace_reset_wp'), admin_url('admin.php')); //echo 'Replace plugin with the new version - WP Reset
'; echo '

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!

'; ?>
body{ font-family: sans-serif; font-size: 14px; line-height: 1.5; color: #444; } a{ color:#0073aa; } a:hover{ color:#00a0d2; text-decoration:none; } '; echo '
'; echo 'If things are not done in a minute click here to return to Plugins page

'; echo 'Starting ...

'; wp_cache_flush(); $upgrader = new Plugin_Upgrader(); echo 'Check if new plugin is already installed - '; if ($this->is_plugin_installed($plugin_slug)) { echo 'it\'s installed! Making sure it\'s the latest version.'; $upgrader->upgrade($plugin_slug); $installed = true; } else { echo 'it\'s not installed. Installing.'; $installed = $upgrader->install($plugin_zip); } wp_cache_flush(); if (!is_wp_error($installed) && $installed) { echo 'Activating new plugin.'; $activate = activate_plugin($plugin_slug); if (is_null($activate)) { echo '
Deactivating old plugin.
'; deactivate_plugins(array('reset-wp/reset-wp.php')); $options = get_option('wp-reset', array()); $options['meta']['reset-wp-user'] = true; $options['dismissed_notices']['welcome'] = true; update_option('wp-reset', $options); echo ''; echo '
If you are not redirected to the new plugin in a few seconds - click here.'; } } else { echo 'Could not install WP Reset. You\'ll have to download and install manually.'; } echo '
'; } // replace function is_plugin_installed( $slug ) { if ( ! function_exists( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $all_plugins = get_plugins(); if ( !empty( $all_plugins[$slug] ) ) { return true; } else { return false; } } } $ResetWP = new ResetWP(); }