PluginProbe ʕ •ᴥ•ʔ
SiteGuard WP Plugin / 1.8.7
SiteGuard WP Plugin v1.8.7
1.8.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 2 weeks ago classes 4 days ago css 3 weeks ago images 1 month ago languages 4 days ago really-simple-captcha 1 month ago changelog.txt 1 month ago license.txt 11 years ago readme.txt 4 days ago siteguard.php 4 days ago uninstall.php 3 weeks ago
uninstall.php
41 lines
1 <?php
2
3 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
4 exit();
5 }
6
7 function remove_directory( $dir ) {
8 if ( ! is_dir( $dir ) ) {
9 return true;
10 }
11 $entries = @scandir( $dir );
12 if ( ! is_array( $entries ) ) {
13 return false;
14 }
15 $files = array_diff( $entries, array( '.', '..' ) );
16 foreach ( $files as $file ) {
17 if ( is_dir( "$dir/$file" ) ) {
18 remove_directory( "$dir/$file" );
19 } else {
20 @unlink( "$dir/$file" );
21 }
22 }
23 return @rmdir( $dir );
24 }
25
26 function delete_siteguard_plugin() {
27 global $wpdb;
28
29 delete_option( 'siteguard_config' );
30
31 $table_name = $wpdb->prefix . 'siteguard_login';
32 $wpdb->query( "DROP TABLE IF EXISTS $table_name;" );
33
34 $table_name = $wpdb->prefix . 'siteguard_history';
35 $wpdb->query( "DROP TABLE IF EXISTS $table_name;" );
36
37 remove_directory( WP_CONTENT_DIR . '/siteguard' );
38 }
39
40 delete_siteguard_plugin();
41