-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathuninstall.php
More file actions
executable file
·76 lines (69 loc) · 2.38 KB
/
uninstall.php
File metadata and controls
executable file
·76 lines (69 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/**
* Uninstall UsersWP - Social Login
*
* Uninstalling UsersWP - Social Login deletes the plugin options.
*
*/
// Exit if accessed directly.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
$settings = get_option('uwp_settings', array());
if ( isset($settings[ 'uwp_uninstall_social_data' ]) && 1 == $settings[ 'uwp_uninstall_social_data' ] ) {
global $wpdb;
$wpdb->hide_errors();
$options = array(
'label_for_social_login',
'disable_admin_social_login',
'disable_admin_register_social_login',
'uwp_social_required_fields_redirect',
'uwp_social_default_role',
'enable_uwp_social_google',
'uwp_social_google_id',
'uwp_social_google_secret',
'uwp_social_google_callback',
'uwp_social_google_pick_username',
'uwp_social_google_pick_email',
'enable_uwp_social_facebook',
'uwp_social_facebook_id',
'uwp_social_facebook_secret',
'uwp_social_facebook_callback',
'uwp_social_facebook_pick_username',
'uwp_social_facebook_pick_email',
'enable_uwp_social_twitter',
'uwp_social_twitter_key',
'uwp_social_twitter_secret',
'uwp_social_twitter_callback',
'uwp_social_twitter_pick_username',
'uwp_social_twitter_pick_email',
'enable_uwp_social_linkedin',
'uwp_social_linkedin_key',
'uwp_social_linkedin_secret',
'uwp_social_linkedin_callback',
'uwp_social_linkedin_pick_username',
'uwp_social_linkedin_pick_email',
'enable_uwp_social_yahoo',
'uwp_social_yahoo_id',
'uwp_social_yahoo_secret',
'uwp_social_yahoo_callback',
'uwp_social_yahoo_pick_username',
'uwp_social_yahoo_pick_email',
'enable_uwp_social_wordpress',
'uwp_social_wordpress_id',
'uwp_social_wordpress_secret',
'uwp_social_wordpress_callback',
'uwp_social_wordpress_pick_username',
'uwp_social_wordpress_pick_email',
'uwp_uninstall_social_data',
);
$options = apply_filters('uwp_social_uninstall_data', $options);
if ( !empty( $options ) ) {
foreach ( $options as $option ) {
unset( $settings[$option] );
}
}
update_option('uwp_settings', $settings);
$tbl_social = $wpdb->prefix . "uwp_social_profiles";
$wpdb->query( "DROP TABLE IF EXISTS ".$tbl_social );
}