PluginProbe
Easy Basic Authentication – Add basic auth to site or admin area / 4.1.0
Easy Basic Authentication – Add basic auth to site or admin area v4.1.0
4.1.0 trunk 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.7 1.7.1 1.8 1.8.1 All 51 releases
easy-basic-authentication / uninstall.php

uninstall.php in Easy Basic Authentication – Add basic auth to site or admin area 4.1.0, at uninstall.php

17 lines 763 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
3 exit;
4 }
5
6 // Check if the user has selected removing all plugin data from the database after uninstalling the plugin - defaults to 0 (false)
7 $basic_auth_remove_data = get_option( 'basic_auth_plugin_remove_data_after_uninstall', '0' );
8
9 if ( $basic_auth_remove_data === '1' ) {
10 global $wpdb;
11
12 // Le opzioni del plugin non condividono tutte lo stesso prefisso: il log degli accessi
13 // si chiama basic_auth_failure_logs e con il solo LIKE 'basic_auth_plugin_%' restava
14 // nel database dopo la disinstallazione.
15 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
16 $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'basic_auth_%'");
17 }