Current path: home/webdevt/www/demo2/wp-content/plugins/divi-contact-form-helper/d5/server/
?? Go up: /home/webdevt/www/demo2/wp-content/plugins/divi-contact-form-helper/d5
<?php
use KS_PAC_DCFH\ContactFormHelperApp;
// Required Autoload
require_once KS_PAC_DCFH_PLUGIN_DIR.'/vendor/autoload.php';
// Dashboard Core
require_once KS_PAC_DCFH_PLUGIN_DIR.'/dashboard/dashboard.php';
// Container
if (!function_exists('ks_pac_dcfh_app')):
function ks_pac_dcfh_app(): ContactFormHelperApp
{
return ContactFormHelperApp::instance();
}
endif;
// Debug Helper
if (!function_exists('ks_pac_dcfh_dd')):
function ks_pac_dcfh_dd($data = '', bool $exit = true): void
{
echo '<pre>'.print_r($data, true).'</pre>'; //phpcs:ignore
if ($exit) {
exit(1);
}
}
endif;
// Log Helper
if (!function_exists('ks_pac_dcfh_log')):
function ks_pac_dcfh_log($data, $delete = false, $filename = ''): void
{
// phpcs:disable
$filename = sanitize_file_name($filename ?: debug_backtrace()[1]['function'] ?? 'default').'.log';
$filepath = WP_CONTENT_DIR.'/'.$filename;
if ($delete && file_exists($filepath)) {
wp_delete_file($filepath);
}
ini_set('error_log', $filepath);
if (is_array($data) || is_object($data)) {
error_log(print_r($data, true));
} else {
error_log($data);
}
// phpcs:enable
}
endif;