PluginProbe
Authorizer / 2.6.20
Authorizer v2.6.20
3.15.3 3.15.2 3.15.1 3.15.0 3.14.3 3.14.4 3.14.2 3.14.1 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.10 2.9.11 2.9.12 2.9.13 2.9.2 2.9.3 2.9.6 All 126 releases
← All changes | uninstall.php +10 -23 2.9.132.6.20 View file →
@@ -1,21 +1,12 @@
1 1 <?php
2 -/**
3 - * Remove traces of plugin when uninstalling it.
4 - *
5 - * @package authorizer
6 - */
7 2
8 -/**
9 - * Exit if uninstall not called from WordPress.
10 - */
11 -if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
3 +// Exit if uninstall not called from WordPress.
4 +if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
12 5 exit();
13 6 }
14 7
15 -/**
16 - * Delete options in database.
17 - */
8 +// Delete options in database.
18 9 delete_option( 'auth_settings' );
19 10 delete_option( 'auth_settings_recently_sent_emails' );
20 11 delete_option( 'auth_settings_advanced_admin_notice' );
21 12 delete_option( 'auth_settings_advanced_login_error' );
@@ -21,27 +12,23 @@
21 12 delete_option( 'auth_settings_advanced_login_error' );
22 13 delete_option( 'auth_settings_advanced_lockouts_time_last_failed' );
23 14 delete_option( 'auth_settings_advanced_lockouts_failed_attempts' );
24 15
25 -/**
26 - * Delete multisite options.
27 - */
16 +// Delete multisite options
28 17 if ( is_multisite() ) {
29 18 delete_blog_option( BLOG_ID_CURRENT_SITE, 'auth_multisite_settings' );
30 19 }
31 20
32 -/**
33 - * For security, delete blocked users (since we can't enforce their blocked
34 - * status without this plugin enabled, which means they would be able to reset
35 - * their passwords and log in). If they have any content, reassign it to the
36 - * current user (the user uninstalling the plugin).
37 - */
21 +// For security, delete blocked users (since we can't enforce their blocked
22 +// status without this plugin enabled, which means they would be able to reset
23 +// their passwords and log in). If they have any content, reassign it to the
24 +// current user (the user uninstalling the plugin).
38 25 if ( ! is_multisite() ) {
39 - $current_user = wp_get_current_user();
40 26 $blocked_users = get_users( array(
41 - 'meta_key' => 'auth_blocked',
27 + 'meta_key' => 'auth_blocked',
42 28 'meta_value' => 'yes',
43 29 ));
30 + $current_user = wp_get_current_user();
44 31 foreach ( $blocked_users as $blocked_user ) {
45 32 wp_delete_user( $blocked_user->ID, $current_user->ID );
46 33 }
47 34 }