PluginProbe ʕ •ᴥ•ʔ
SiteGuard WP Plugin / 1.7.7
SiteGuard WP Plugin v1.7.7
1.8.6 1.8.6-beta1 1.8.6-beta2 1.8.4 1.8.5 1.8.3 1.8.2 1.8.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.4.3 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.7.0 1.7.1 1.7.10 1.7.11 1.7.12 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.0-beta1 1.8.0-beta2 1.8.0-beta3 1.8.0-beta4
siteguard / uninstall.php
siteguard Last commit date
admin 3 years ago classes 2 years ago css 3 years ago images 11 years ago languages 5 years ago really-simple-captcha 2 years ago test 3 years ago .htaccess 3 years ago license.txt 11 years ago readme.txt 1 year ago siteguard.php 2 years ago uninstall.php 3 years ago
uninstall.php
34 lines
1 <?php
2
3 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
4 exit();
5 }
6
7 function remove_directory( $dir ) {
8 $files = array_diff( scandir( $dir ), array( '.' ,'..' ) );
9 foreach ( $files as $file ) {
10 if ( is_dir( "$dir/$file" ) ) {
11 remove_directory( "$dir/$file" );
12 } else {
13 unlink( "$dir/$file" );
14 }
15 }
16 return rmdir( $dir );
17 }
18
19 function delete_siteguard_plugin() {
20 global $wpdb;
21
22 delete_option( 'siteguard_config' );
23
24 $table_name = $wpdb->prefix . 'siteguard_login';
25 $wpdb->query( "DROP TABLE IF EXISTS $table_name;" );
26
27 $table_name = $wpdb->prefix . 'siteguard_history';
28 $wpdb->query( "DROP TABLE IF EXISTS $table_name;" );
29
30 remove_directory( WP_CONTENT_DIR . '/siteguard' );
31 }
32
33 delete_siteguard_plugin();
34