?? GreyFile — Mystic File Browser

Current path: home/webdevt/www/demo2/wp-content/plugins/divi-contact-form-helper/d5/dashboard/



?? Go up: /home/webdevt/www/demo2/wp-content/plugins/divi-contact-form-helper/d5

?? Viewing: dashboard.php

<?php
define('KS_PAC_DCFH_BASE_API_URL', 'https://www.peeayecreative.com/wp-content/uploads/pac-api');
define('KS_PAC_DCFH_SETTINGS_OPTION', 'divi_contact_form_helper_settings');
if (!function_exists('ks_pac_dcfh_define_constants')):
    function ks_pac_dcfh_define_constants()
    {
        $current_user = wp_get_current_user();
        define(
            'KS_PAC_DCFH_IS_ADMIN_OR_EDITOR',
            (bool)array_intersect(['administrator', 'editor'], $current_user->roles)
        );
    }

    add_action('init', 'ks_pac_dcfh_define_constants');
endif;
// Current Plugin Data
if (!function_exists('ks_pac_dcfh_get_plugin_data')):
    function ks_pac_dcfh_get_plugin_data(): array
    {
        $plugin_data = get_plugin_data(KS_PAC_DCFH_PLUGIN_FILE, false, false);
        $plugin_slug = dirname(KS_PAC_DCFH_PLUGIN_BASENAME);
        $plugin_data['pluginExtras'] = [
            'PluginSlug' => $plugin_slug,
            'PluginNews' => 'divi-contact-form-helper',
            'PluginProductURL' => 'https://www.peeayecreative.com/product/divi-contact-form-helper/',
            'PluginIsETMarketplace' => !empty($plugin_data['UpdateURI'])
                && str_contains((string)$plugin_data['UpdateURI'], 'elegantthemes'),
            'PluginDocLink' => "https://www.peeayecreative.com/docs/divi-contact-form-helper/",
            'PluginSupportLink' => "https://www.peeayecreative.com/support/",
            'PluginTroubleshootLink' => "https://www.peeayecreative.com/docs/divi-contact-form-helper/troubleshooting-faqs/",
            'PluginCommunityLink' => "https://www.peeayecreative.com/community/space/divi-contact-form-helper/home",
            'PluginBetaNoticeLink' => "https://www.peeayecreative.com/docs/divi-contact-form-helper/divi-5/",
            'PluginETReviewsLink' => "https://www.elegantthemes.com/marketplace/$plugin_slug/reviews/list/1",
            'PluginPAReviewsLink' => "https://www.peeayecreative.com/product/divi-contact-form-helper/#reviews",
            'PluginFindLicenseKeyLink' => "https://www.peeayecreative.com/account/licence-keys/divi-contact-form-helper/",
        ];

        return $plugin_data;
    }
endif;
// Current User Data
if (!function_exists('ks_pac_dcfh_get_current_user_data')):
    function ks_pac_dcfh_get_current_user_data()
    {
        $current_user = wp_get_current_user();
        $current_user_id = $current_user->ID;
        $transient_key = 'ks_pac_dcfh_current_user_'.$current_user_id;
        $user_data = get_transient($transient_key);
        if ($user_data === false) {
            $full_name = trim($current_user->first_name.' '.$current_user->last_name);
            $user_data = [
                'name' => $full_name !== '' ? $full_name : $current_user->display_name,
                'email' => $current_user->user_email,
                'avatar' => get_avatar_url($current_user->user_email),
                'id' => $current_user_id,
                'role' => implode(',', $current_user->roles),
                'profileURL' => get_edit_profile_url($current_user_id),
            ];
            set_transient($transient_key, $user_data, DAY_IN_SECONDS);
        }

        return $user_data;
    }
endif;


??

??