?? GreyFile — Mystic File Browser

Current path: home/webdevt/www/cryptoimpot.fr/wp-content/plugins/divi-contact-form-helper/



?? Go up: /home/webdevt/www/cryptoimpot.fr/wp-content/plugins

?? Viewing: uninstall.php

<?php
// Ensure script execution only within WordPress environment
if (!defined('ABSPATH')) {
    exit;
}
/**
 * Deletes specific plugin data if the corresponding option is set.
 */
if (!function_exists('ks_pac_dcfh_delete_plugin_data')):
    function ks_pac_dcfh_delete_plugin_data()
    {
        $options = get_option('et_divi');
        if (!empty($options) && isset($options['pwh_pac_dcfh_delete_plugin_data']) && 'on' === $options['pwh_pac_dcfh_delete_plugin_data']) {
            $filtered_options = array_filter($options, function ($key) {
                return strpos($key, 'pwh_dcfh_') !== 0;
            }, ARRAY_FILTER_USE_KEY);
            if (!empty($filtered_options)) {
                update_option('et_divi', $filtered_options);
            }
        }
    }

    ks_pac_dcfh_delete_plugin_data();
endif;
/**
 * Function to delete scheduled cron jobs added by the plugin.
 */
if (!function_exists('ks_pac_dcfh_delete_plugin_cron_jobs')):
    function ks_pac_dcfh_delete_plugin_cron_jobs()
    {
        $cron_jobs = [
            'dcfh_entries_backup_daily',
            'dcfh_entries_backup_hourly',
            'dcfh_entries_backup_twicedaily',
            'dcfh_entries_backup_weekly',
            'dcfh_entries_backup_monthly',
            'dcfh_delete_tmp_files',
        ];
        foreach ($cron_jobs as $cron_job) {
            if (wp_next_scheduled($cron_job)) {
                wp_clear_scheduled_hook($cron_job);
            }
        }
    }

    ks_pac_dcfh_delete_plugin_cron_jobs();
endif;


??

??