HEX
Server: LiteSpeed
System: Linux spg20.cloudpowerdns.com 5.14.0-611.35.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 25 03:46:09 EST 2026 x86_64
User: carrerup (3153)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //proc/thread-self/cwd/wp-content/plugins/24tt-document-verifier/uninstall.php
<?php
/**
 * Fired when the plugin is uninstalled.
 *
 * This file cleans up the database options to prevent bloat.
 * However, to protect our users' critical institutional data, 
 * we deliberately DO NOT delete the actual Document records (CPTs) 
 * or their attached meta data.
 */

// SECURITY: If uninstall is not called directly from WordPress, exit immediately.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	exit;
}

/**
 * 1. CLEAN UP PLUGIN SETTINGS (Options)
 * We delete the lightweight configuration settings so we don't leave junk in the database.
 */
$options_to_delete = array(
	'ttdvr_public_categories',
	'ttdvr_show_pdf_link',
	'ttdvr_search_label',
	'ttdvr_db_version'
);

foreach ( $options_to_delete as $option ) {
	delete_option( $option );
}

/**
 * 2. CLEAN UP TEMPORARY DATA (Transients)
 */
delete_transient( 'ttdvr_upgrade_complete' );
delete_transient( 'ttdvr_bulk_upload_message' );
delete_transient( 'ttdvr_bulk_upload_message_type' );

/**
 * 3. CLEAN UP USER META (Dismissed Notices)
 * We loop through users to remove the flag that hides the 5-star review notice.
 */
global $wpdb;
$wpdb->query( "DELETE FROM {$wpdb->usermeta} WHERE meta_key = 'ttdvr_review_notice_dismissed'" );

/**
 * NOTE ON DOCUMENT DATA:
 * We intentionally DO NOT loop through and delete posts of type 'ttdvr_document'.
 * Institutions rely on this data. If they accidentally delete the plugin, 
 * they can simply reinstall it, and all their documents will instantly reappear.
 */