v0.2.0
This commit is contained in:
commit
f936aeb807
1 changed files with 15710 additions and 0 deletions
32
uninstall.php
Normal file
32
uninstall.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Uninstall cleanup for the 2FA (by ROBOTSTXT) plugin.
|
||||
*
|
||||
* @package Robotstxt_2FA
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
delete_option( 'robotstxt_2fa_settings' );
|
||||
delete_site_option( 'robotstxt_2fa_settings' );
|
||||
|
||||
global $wpdb;
|
||||
|
||||
$meta_keys = array(
|
||||
'robotstxt_2fa_user_settings',
|
||||
'robotstxt_2fa_email_challenge',
|
||||
'robotstxt_2fa_last_verifications',
|
||||
'robotstxt_2fa_recovery_codes',
|
||||
'robotstxt_2fa_otp_secret',
|
||||
);
|
||||
|
||||
foreach ( $meta_keys as $meta_key ) {
|
||||
$wpdb->query(
|
||||
$wpdb->prepare(
|
||||
"DELETE FROM {$wpdb->usermeta} WHERE meta_key = %s",
|
||||
$meta_key
|
||||
)
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue