This commit is contained in:
Javier Casares 2026-08-07 14:15:58 +00:00
commit fd2880bece

View file

@ -44,8 +44,23 @@ if ( ! robotstxt_2fa_should_delete_data() ) {
// Remove plugin-level options.
delete_option( 'robotstxt_2fa_settings' );
delete_option( 'robotstxt_2fa_failed_log' );
delete_option( 'robotstxt_2fa_geoip_status' );
delete_site_option( 'robotstxt_2fa_settings' );
// Clear the GeoIP auto-download cron event.
wp_clear_scheduled_hook( 'robotstxt_2fa_geoip_update' );
// Remove the auto-downloaded GeoIP database from the uploads directory.
$robotstxt_2fa_uploads = wp_upload_dir();
if ( ! empty( $robotstxt_2fa_uploads['basedir'] ) ) {
$robotstxt_2fa_geoip_file = trailingslashit( $robotstxt_2fa_uploads['basedir'] ) . 'robotstxt-2fa/country.mmdb';
if ( is_file( $robotstxt_2fa_geoip_file ) ) {
unlink( $robotstxt_2fa_geoip_file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.unlink_unlink -- Removing our own artifact on uninstall.
}
}
global $wpdb;
$robotstxt_2fa_meta_keys = array(