HEX
Server: Apache/2.4.65 (Debian)
System: Linux 88f31f35b0b8 6.1.0-38-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.147-1 (2025-08-02) x86_64
User: www-data (33)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/plugins/wptelegram/uninstall.php
<?php
/**
 * Fired when the plugin is uninstalled.
 *
 * @link       https://wpsocio.com
 * @since      1.0.0
 *
 * @package    WPTelegram
 */

// If uninstall not called from WordPress, then exit.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) || ! WP_UNINSTALL_PLUGIN || dirname( WP_UNINSTALL_PLUGIN ) !== dirname( plugin_basename( __FILE__ ) ) ) {

	status_header( 404 );
	exit;
}

/**
 * Cleans up the stale data.
 *
 * @return void
 */
function uninstall_wptelegram() {
	$options = get_option( 'wptelegram', '' );

	$options = json_decode( $options, true );

	if ( isset( $options['advanced']['clean_uninstall'] ) && false === $options['advanced']['clean_uninstall'] ) {
		return;
	}

	delete_option( 'wptelegram' );
	delete_option( 'wptelegram_ver' );
}

uninstall_wptelegram();