PluginProbe ʕ •ᴥ•ʔ
WPS Hide Login / trunk
WPS Hide Login vtrunk
trunk 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2 1.2.1 1.2.2 1.2.3 1.2.3.1 1.2.4 1.2.5 1.2.5.1 1.2.6 1.2.6.1 1.2.7 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.4.1 1.3.4.2 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.5.1 1.5.2 1.5.2.1 1.5.2.2 1.5.3 1.5.4 1.5.4.1 1.5.4.2 1.5.5 1.5.6 1.5.7 1.6 1.6.1 1.7 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.9 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.13.1 1.9.13.2 1.9.15 1.9.15.1 1.9.15.2 1.9.16 1.9.16.1 1.9.16.2 1.9.16.3 1.9.16.4 1.9.16.5 1.9.16.6 1.9.16.7 1.9.17 1.9.17.1 1.9.17.2 1.9.18 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9
wps-hide-login / uninstall.php
wps-hide-login Last commit date
3rd-party 8 years ago assets 2 years ago classes 4 months ago languages 1 year ago vendor 5 years ago autoload.php 7 years ago composer.json 3 years ago composer.lock 5 years ago readme.txt 4 months ago uninstall.php 1 year ago wps-hide-login.php 4 months ago
uninstall.php
47 lines
1 <?php
2 /**
3 * Fired when the plugin is uninstalled.
4 *
5 * @package WPS Hide Login
6 * @license GPL-2.0+
7 */
8
9 // If uninstall not called from WordPress, then exit
10 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
11 exit;
12 }
13
14 global $wpdb;
15
16 if ( is_multisite() ) {
17
18 $blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A );
19 delete_site_option( 'whl_page' );
20 delete_site_option( 'whl_redirect_admin' );
21
22 flush_rewrite_rules();
23
24 if ( $blogs ) {
25
26 foreach ( $blogs as $blog ) {
27 switch_to_blog( $blog['blog_id'] );
28 delete_option( 'whl_page' );
29 delete_option( 'whl_redirect_admin' );
30
31 flush_rewrite_rules();
32
33 //info: optimize table
34 $GLOBALS['wpdb']->query( "OPTIMIZE TABLE `" . $GLOBALS['wpdb']->prefix . "options`" );
35 restore_current_blog();
36 }
37 }
38
39 } else {
40 delete_option( 'whl_page' );
41 delete_option( 'whl_redirect_admin' );
42
43 flush_rewrite_rules();
44
45 //info: optimize table
46 $GLOBALS['wpdb']->query( "OPTIMIZE TABLE `" . $GLOBALS['wpdb']->prefix . "options`" );
47 }