HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/csm/public_html/wp-content/plugins/wordpress-popup/uninstall.php
<?php
/**
 * Hustle Uninstall methods
 * Called when plugin is deleted
 *
 * @since 4.0.3
 * @package Hustle
 */

// If uninstall.php is not called by WordPress, die.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	die;
}

// Require helper file for uninstallation.
if ( ! class_exists( 'Hustle_Deletion' ) ) {
	require_once dirname( __FILE__ ) . '/inc/hustle-deletion.php';
}

// Get Hustle settings for the main site.
$hustle_settings = get_option( 'hustle_settings', array() );

$reset_main_site_settings = ! empty( $hustle_settings['data'] )
		&& ! empty( $hustle_settings['data']['reset_settings_uninstall'] )
		&& '1' === $hustle_settings['data']['reset_settings_uninstall'];

if ( ! is_multisite() ||
		empty( $hustle_settings['data']['reset_all_sites'] )
		|| '1' !== $hustle_settings['data']['reset_all_sites'] ) {
	hustle_reset_settings( $reset_main_site_settings );
} else {
	$sites = get_sites();

	foreach ( $sites as $site ) {
		$site_id = $site->blog_id;

		// Switch to blog before deleting settings.
		switch_to_blog( $site_id );
		hustle_reset_settings( $reset_main_site_settings );
		restore_current_blog();
	}
}

/**
 * Remove all Hustle settings for the current blog
 *
 * @param bool $reset_main_site_settings Should reset settings or not.
 */
function hustle_reset_settings( $reset_main_site_settings ) {
	Hustle_Deletion::clear_cronjobs();

	if ( ! is_main_site() || $reset_main_site_settings ) {
		Hustle_Deletion::hustle_reset_notifications();
		Hustle_Deletion::hustle_delete_custom_options();
		Hustle_Deletion::hustle_delete_addon_options( hustle_addon_slugs() );
		Hustle_Deletion::hustle_clear_modules();
		Hustle_Deletion::hustle_clear_module_submissions();
		Hustle_Deletion::hustle_clear_module_views();
		Hustle_Deletion::hustle_drop_custom_tables();
	}
}

/**
 * Delete slug params
 *
 * @since 1.4
 */
function hustle_addon_slugs() {
	$addon_slugs = array(
		'activecampaign',
		'aweber',
		'campaignmonitor',
		'constantcontact',
		'convertkit',
		'e_newsletter',
		'getresponse',
		'hubspot',
		'icontact',
		'infusionsoft',
		'mad_mimi',
		'mailchimp',
		'mailerlite',
		'mautic',
		'sendgrid',
		'sendinblue',
		'sendy',
		'zapier',
	);

	return $addon_slugs;
}