PluginProbe
WP-Stats / 2.55
WP-Stats v2.55
3.0.1 3.0.0 trunk 1.00 2.00 2.01 2.02 2.03 2.04 2.05 2.06 2.10 2.11 2.20 2.30 2.31 2.40 2.50 2.55 2.56 2.56.1
wp-stats / uninstall.php

uninstall.php in WP-Stats 2.55, at uninstall.php

49 lines 837 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Uninstall plugin
4 */
5 if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
6 exit ();
7
8 $option_names = array(
9 'stats_mostlimit'
10 , 'stats_display'
11 , 'stats_url'
12 , 'widget_stats'
13 );
14
15
16 if ( is_multisite() ) {
17 $ms_sites = wp_get_sites();
18
19 if( 0 < sizeof( $ms_sites ) ) {
20 foreach ( $ms_sites as $ms_site ) {
21 switch_to_blog( $ms_site['blog_id'] );
22 if( sizeof( $option_names ) > 0 ) {
23 foreach( $option_names as $option_name ) {
24 delete_option( $option_name );
25 plugin_uninstalled();
26 }
27 }
28 }
29 }
30
31 restore_current_blog();
32 } else {
33 if( sizeof( $option_names ) > 0 ) {
34 foreach( $option_names as $option_name ) {
35 delete_option( $option_name );
36 plugin_uninstalled();
37 }
38 }
39 }
40
41 /**
42 * Delete plugin table when uninstalled
43 *
44 * @access public
45 * @return void
46 */
47 function plugin_uninstalled() {
48 global $wpdb;
49 }