PluginProbe
WProofreader spell & grammar check plugin for WordPress / trunk
WProofreader spell & grammar check plugin for WordPress vtrunk
3.2.1 3.2.2 3.2.0 trunk 1.0 1.1 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.6.1 2.6.10 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7.0 2.7.1 All 28 releases
webspellchecker / uninstall.php

uninstall.php in WProofreader spell & grammar check plugin for WordPress trunk, at uninstall.php

33 lines 806 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * The code in this file runs when a plugin is uninstalled from the WordPress dashboard.
5 */
6
7 /* If uninstall is not called from WordPress exit. */
8 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
9 exit;
10 }
11
12 /**
13 * Remove all plugin options for the current site.
14 */
15 function wsc_proofreader_uninstall_site() {
16 delete_option( 'wsc' );
17 delete_option( 'wsc_proofreader_version' );
18 delete_option( 'wsc_proofreader_info' );
19 delete_option( 'wsc_proofreader' );
20 delete_transient( 'wsc_proofreader_info_cache' );
21 }
22
23 if ( is_multisite() ) {
24 $wsc_site_ids = get_sites( array( 'fields' => 'ids', 'number' => 0 ) );
25 foreach ( $wsc_site_ids as $wsc_site_id ) {
26 switch_to_blog( $wsc_site_id );
27 wsc_proofreader_uninstall_site();
28 restore_current_blog();
29 }
30 } else {
31 wsc_proofreader_uninstall_site();
32 }
33