PluginProbe ʕ •ᴥ•ʔ
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder / 2.6.6
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder v2.6.6
2.6.22 trunk 1.3 1.5.3 1.6.10 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.8.0 1.8.1 1.8.10 1.8.11 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.2 2.2.2 2.2.3 2.2.4 2.3.0 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.6.0 2.6.1 2.6.10 2.6.11 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.18 2.6.19 2.6.2 2.6.20 2.6.21 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9
wp-maintenance-mode / uninstall.php
wp-maintenance-mode Last commit date
assets 3 years ago includes 3 years ago languages 5 years ago vendor 3 years ago views 3 years ago CHANGELOG.md 3 years ago README.md 3 years ago index.php 9 years ago readme.txt 3 years ago uninstall.php 5 years ago wp-maintenance-mode.php 3 years ago
uninstall.php
63 lines
1 <?php
2
3 // If uninstall not called from WordPress, then exit
4 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
5 exit();
6 }
7
8 /**
9 * Uninstall operations
10 */
11 function single_uninstall() {
12 // delete subscribers table
13 $GLOBALS['wpdb']->query( "DROP TABLE IF EXISTS {$GLOBALS['wpdb']->prefix}wpmm_subscribers" );
14
15 // delete options
16 $options_to_delete = array(
17 'wpmm_settings',
18 'wpmm_notice',
19 'wpmm_version',
20 );
21
22 foreach ( $options_to_delete as $option ) {
23 delete_option( $option );
24 }
25
26 // delete dismissed notices meta key
27 $users_with_dismissed_notices = (array) get_users(
28 array(
29 'fields' => 'ids',
30 'meta_key' => 'wpmm_dismissed_notices',
31 )
32 );
33
34 foreach ( $users_with_dismissed_notices as $user_id ) {
35 delete_user_meta( $user_id, 'wpmm_dismissed_notices' );
36 }
37
38 // delete bot settings file (data.js)
39 $upload_dir = wp_upload_dir();
40 $bot_settings_file = ! empty( $upload_dir['basedir'] ) ? trailingslashit( $upload_dir['basedir'] ) . 'data.js' : false;
41
42 if ( $bot_settings_file !== false && file_exists( $bot_settings_file ) ) {
43 wp_delete_file( $bot_settings_file );
44 }
45 }
46
47 // Let's do it!
48 if ( is_multisite() ) {
49 single_uninstall();
50
51 // delete data foreach blog
52 $blogs_list = $GLOBALS['wpdb']->get_results( "SELECT blog_id FROM {$GLOBALS['wpdb']->blogs}", ARRAY_A );
53 if ( ! empty( $blogs_list ) ) {
54 foreach ( $blogs_list as $blog ) {
55 switch_to_blog( $blog['blog_id'] );
56 single_uninstall();
57 restore_current_blog();
58 }
59 }
60 } else {
61 single_uninstall();
62 }
63