Current path: home/webdevt/www/demo2/wp-content/plugins/divi-contact-form-helper/
?? Go up: /home/webdevt/www/demo2/wp-content/plugins
<?php
// Ensure script execution only within WordPress environment
if (!defined('ABSPATH')) {
exit;
}
if (!function_exists('ks_pac_dcfh_delete_d5_data')):
function ks_pac_dcfh_delete_d5_data()
{
$options = get_option('divi_contact_form_helper_settings');
if (!empty($options) && $options['remove_plugin_data_when_uninstalled']) {
update_option('divi_contact_form_helper_settings', []);
}
}
ks_pac_dcfh_delete_d5_data();
endif;
if (!function_exists('ks_pac_dcfh_delete_d4_data')):
function ks_pac_dcfh_delete_d4_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_d4_data();
endif;
if (!function_exists('ks_pac_dcfh_delete_crons')):
function ks_pac_dcfh_delete_crons()
{
$matched_crons = [];
$cron_array = _get_cron_array();
if (empty($cron_array) || !is_array($cron_array)) {
return;
}
foreach ($cron_array as $timestamp => $crons) {
foreach ($crons as $hook => $events) {
if (strpos($hook, 'dcfh_') === 0) {
$matched_crons[] = $hook;
}
}
}
if (!empty($matched_crons)) {
foreach (array_unique($matched_crons) as $hook) {
wp_clear_scheduled_hook($hook);
}
}
}
ks_pac_dcfh_delete_crons();
endif;