This commit is contained in:
Javier Casares 2026-08-18 12:00:07 +00:00
commit 0c4fda16c0

19
uninstall.php Normal file
View file

@ -0,0 +1,19 @@
<?php
/**
* Uninstall routine for Hello (by ROBOTSTXT).
*
* Plugin data is preserved by default. Removal only happens when the user
* explicitly enabled the "Delete plugin data on uninstall" setting.
*
* @package ROBOTSTXT_Hello
*/
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
if ( '1' === get_option( 'robotstxt_hello_delete_data', '' ) ) {
delete_metadata( 'user', 0, 'robotstxt_hello_dismissed_manager_notice', '', true );
}
delete_option( 'robotstxt_hello_delete_data' );