This commit is contained in:
Javier Casares 2026-08-17 18:34:57 +00:00
commit b9029e62fe
14 changed files with 1750 additions and 946 deletions

View file

@ -5,7 +5,7 @@
* Fired when the plugin is uninstalled.
*
* @package ROBOTSTXT_OG
* @version 1.0.0
* @version 1.2.1
*/
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
@ -79,6 +79,14 @@ function robotstxt_og_uninstall_cleanup(): void {
// Clear related transients.
delete_transient( 'robotstxt_og_diagnostics_cache' );
// Clear the legacy self-updater cache (updater removed in 1.2.1). Site
// transients are network-wide on Multisite, so one call covers all sites.
delete_site_transient( 'robotstxt_updater_' . md5( 'robotstxt-og/robotstxt-og.php' ) );
// Delete the per-user Manager notice dismissal flag. User meta is
// network-global on Multisite, so one call covers all users and sites.
delete_metadata( 'user', 0, '_robotstxt_og_manager_notice_dismissed', '', true );
// On Multisite, clean up site-by-site.
if ( is_multisite() ) {
$sites = get_sites(