HEX
Server: LiteSpeed
System: Linux cde2.duelhost.dk 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User: dtptviut (1121)
PHP: 8.0.30
Disabled: exec,system,passthru,shell_exec,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/dtptviut/domains/teleweb.dk/public_html/wp-content/plugins/happyforms/uninstall.php
<?php

if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    die;
}

// Free version specific options
delete_transient( 'happyforms_review_notice_recommend' );
delete_option( 'happyforms_modal_dismissed_onboarding' );
delete_option( 'happyforms_show_powered_by' );
delete_option( '_happyforms_received_submissions' );

// Stop cleanup if upgrade version is currently active.
if ( defined( 'HAPPYFORMS_UPGRADE_VERSION' ) ) {
	return;
}

// Forms
$statuses = array( 'publish', 'trash', 'any' );

foreach( $statuses as $status ) {
	$form_ids = get_posts( array(
		'post_type' => 'happyform',
		'post_status' => $status,
		'numberposts' => -1,
		'fields' => 'ids',
	) );

	foreach( $form_ids as $form_id ) {
		wp_delete_post( $form_id, true );
	}
}

// General options
delete_option( 'widget_happyforms_widget' );
delete_option( 'happyforms-tracking' );
delete_option( 'ttf_updates_key_happyforms' );

// User meta
$users = get_users();

foreach( $users as $user ) {
	delete_user_meta( $user->ID, 'happyforms-dismissed-notices' );
	delete_transient( 'happyforms_admin_notices_' . md5( $user->user_login ) );
	delete_user_meta( $user->ID, 'happyforms-settings-sections-states' );
}

// Migrations
delete_option( 'happyforms-data-version' );

// Old deactivation flag
delete_option( '_happyforms_cleanup_on_deactivate' );