D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
everqlsh
/
www
/
wp-admin
/
user
/
577040
/
Filename :
dci.zip
back
Copy
PK m"}\�՝�� � start.phpnu �[��� <?php /** * Main File */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! function_exists( 'dci_dynamic_init' ) ) { function dci_dynamic_init( $params ) { if ( ! is_admin() ) { return; } $menu_slug = isset( $params['menu']['slug'] ) ? $params['menu']['slug'] : false; if ( ! $menu_slug ) { return; } $current_page = isset( $_GET['page'] ) ? $_GET['page'] : false; /** * Attach SDK to current page */ $params['current_page'] = $current_page; $params['menu_slug'] = $menu_slug; /** * Include SDK */ require_once dirname( __FILE__ ) . '/insights.php'; if ( function_exists( 'dci_sdk_insights' ) ) { dci_sdk_insights( $params ); } } } PK m"}\���:�- �- alg.drawionu �[��� <mxfile host="65bd71144e"> <diagram id="F7ZAVC8m2ZGp2q6jGnk3" name="Page-1"> <mxGraphModel dx="1155" dy="668" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> <root> <mxCell id="0"/> <mxCell id="1" parent="0"/> <mxCell id="2" value="Notice" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxGeometry x="330" y="280" width="120" height="60" as="geometry"/> </mxCell> <mxCell id="3" value="Yes / Skip" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxGeometry x="350" y="400" width="80" height="80" as="geometry"/> </mxCell> <mxCell id="4" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="3"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="530" y="680" as="sourcePoint"/> <mxPoint x="580" y="630" as="targetPoint"/> </mxGeometry> </mxCell> <mxCell id="5" value="- Data Sent<br>- Date Init for Next" style="rounded=0;whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1"> <mxGeometry x="150" y="520" width="120" height="60" as="geometry"/> </mxCell> <mxCell id="6" value="" style="endArrow=classic;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="5"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="350" y="530" as="sourcePoint"/> <mxPoint x="400" y="480" as="targetPoint"/> <Array as="points"> <mxPoint x="210" y="440"/> </Array> </mxGeometry> </mxCell> <mxCell id="7" value="Yes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> <mxGeometry x="270" y="410" width="60" height="30" as="geometry"/> </mxCell> <mxCell id="8" value="<span style="background-color: initial;">- Will show notice 30days</span><br><span style="background-color: initial;">- Data Not sent</span>" style="rounded=0;whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1"> <mxGeometry x="510" y="520" width="120" height="60" as="geometry"/> </mxCell> <mxCell id="9" value="" style="endArrow=classic;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" target="8"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="430" y="440" as="sourcePoint"/> <mxPoint x="290" y="520" as="targetPoint"/> <Array as="points"> <mxPoint x="570" y="440"/> </Array> </mxGeometry> </mxCell> <mxCell id="10" value="Skip" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> <mxGeometry x="460" y="410" width="60" height="30" as="geometry"/> </mxCell> <mxCell id="12" value="Notice Hide" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxGeometry x="330" y="630" width="120" height="60" as="geometry"/> </mxCell> <mxCell id="13" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="5" target="29"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="440" y="530" as="sourcePoint"/> <mxPoint x="490" y="480" as="targetPoint"/> <Array as="points"> <mxPoint x="210" y="760"/> </Array> </mxGeometry> </mxCell> <mxCell id="14" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="8" target="12"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="440" y="530" as="sourcePoint"/> <mxPoint x="490" y="480" as="targetPoint"/> <Array as="points"> <mxPoint x="570" y="660"/> </Array> </mxGeometry> </mxCell> <mxCell id="15" value="- Check Allow<br>- Date Valid" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1"> <mxGeometry x="330" y="40" width="120" height="60" as="geometry"/> </mxCell> <mxCell id="16" value="" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxGeometry x="350" y="160" width="80" height="80" as="geometry"/> </mxCell> <mxCell id="17" value="- Allow<br>- Date Valid" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> <mxGeometry x="220" y="150" width="120" height="30" as="geometry"/> </mxCell> <mxCell id="18" value="- Date Valid / Skip" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> <mxGeometry x="480" y="150" width="120" height="30" as="geometry"/> </mxCell> <mxCell id="19" value="- Date Valid<br>- Init" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> <mxGeometry x="400" y="230" width="120" height="30" as="geometry"/> </mxCell> <mxCell id="20" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="16" target="2"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="400" y="260" as="sourcePoint"/> <mxPoint x="450" y="210" as="targetPoint"/> </mxGeometry> </mxCell> <mxCell id="22" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="15" target="16"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="400" y="310" as="sourcePoint"/> <mxPoint x="450" y="260" as="targetPoint"/> </mxGeometry> </mxCell> <mxCell id="23" value="" style="endArrow=classic;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="16" target="5"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="440" y="400" as="sourcePoint"/> <mxPoint x="490" y="350" as="targetPoint"/> <Array as="points"> <mxPoint x="150" y="200"/> </Array> </mxGeometry> </mxCell> <mxCell id="24" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="16" target="25"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="440" y="400" as="sourcePoint"/> <mxPoint x="670" y="200" as="targetPoint"/> <Array as="points"> <mxPoint x="680" y="200"/> </Array> </mxGeometry> </mxCell> <mxCell id="25" value="Check Date" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxGeometry x="640" y="240" width="80" height="80" as="geometry"/> </mxCell> <mxCell id="26" value="- 30 Days Up" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> <mxGeometry x="540" y="240" width="120" height="30" as="geometry"/> </mxCell> <mxCell id="27" value="- 30 Days Low" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> <mxGeometry x="720" y="250" width="120" height="30" as="geometry"/> </mxCell> <mxCell id="28" value="" style="endArrow=classic;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="25" target="2"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="460" y="370" as="sourcePoint"/> <mxPoint x="510" y="320" as="targetPoint"/> <Array as="points"> <mxPoint x="640" y="310"/> </Array> </mxGeometry> </mxCell> <mxCell id="29" value="End" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1"> <mxGeometry x="330" y="730" width="120" height="60" as="geometry"/> </mxCell> <mxCell id="30" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="12" target="29"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="460" y="530" as="sourcePoint"/> <mxPoint x="510" y="480" as="targetPoint"/> </mxGeometry> </mxCell> <mxCell id="31" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="25" target="29"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="460" y="530" as="sourcePoint"/> <mxPoint x="510" y="480" as="targetPoint"/> <Array as="points"> <mxPoint x="720" y="760"/> </Array> </mxGeometry> </mxCell> </root> </mxGraphModel> </diagram> </mxfile> PK m"}\�f��� � notice.phpnu �[��� <?php /** * Insights Notice File */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! function_exists( 'dci_popup_notice' ) ) { function dci_popup_notice( $data ) { ?> <div class="dci-notice"> <div class="dci-notice-wrapper"> <div class="dci-header"> <!-- <div class="dci-logo"> <img src="plugins_url( 'assets/images/logo.png', __FILE__ );" alt="logo"> </div> --> <h2 class="dci-title"> <?php esc_html_e( 'Never miss an important update.', 'data-collector-insights' ); ?> </h2> <p class="dci-desc"> <?php esc_html_e( 'Be Top-contributor by sharing non-sensitive plugin data and create an impact to the global WordPress community today! You can receive valuable emails periodically. Learn More', 'data-collector-insights' ); ?> </p> </div> <div class="dci-actions"> <?php $dci_name = isset( $data['name'] ) ? $data['name'] : ''; $dci_date_name = isset( $data['date_name'] ) ? $data['date_name'] : ''; $dci_allow_name = isset( $data['allow_name'] ) ? $data['allow_name'] : ''; $nonce = isset( $data['nonce'] ) ? $data['nonce'] : ''; ?> <form method="get" class="dci-notice-data"> <input type="hidden" name="dci_name" value="<?php echo esc_html( $dci_name ); ?>"> <input type="hidden" name="dci_date_name" value="<?php echo esc_html( $dci_date_name ); ?>"> <input type="hidden" name="dci_allow_name" value="<?php echo esc_html( $dci_allow_name ); ?>"> <input type="hidden" name="nonce" value="<?php echo esc_html( $nonce ); ?>"> <button id="dci_allow_yes" name="dci_allow_status" value="yes" type="button" class="dci-button-allow button button-primary"> <?php esc_html_e( 'Allow & Continue', 'data-collector-insights' ); ?> </button> <button id="dci_allow_skip" name="dci_allow_status" value="skip" type="button" class="dci-button-skip button button-secondary"> <?php esc_html_e( 'Skip', 'data-collector-insights' ); ?> </button> </form> </div> <div class="dci-permission"> <p> <?php esc_html_e( 'Which permission are being granted?', 'data-collector-insights' ); ?> </p> </div> <div class="dci-data-list"> <ul> <li> <div class="dci-permission-item"> <div class="dci-icon"> <span class="dashicons dashicons-admin-users"></span> </div> <div class="dci-desc"> <h3> <?php esc_html_e( 'View Basic Profile Info.', 'data-collector-insights' ); ?> </h3> <p> <?php esc_html_e( 'Your WordPress user\'s first & last name, and email address.', 'data-collector-insights' ); ?> </p> </div> </div> </li> <li> <div class="dci-permission-item"> <div class="dci-icon"> <span class="dashicons dashicons-admin-links"></span> </div> <div class="dci-desc"> <h3> <?php esc_html_e( 'View Basic Website Info.', 'data-collector-insights' ); ?> </h3> <p> <?php esc_html_e( 'Homepage URL & title, WP & PHP versions, and site language.', 'data-collector-insights' ); ?> </p> </div> </div> </li> <li> <div class="dci-permission-item"> <div class="dci-icon"> <span class="dashicons dashicons-admin-plugins"></span> </div> <div class="dci-desc"> <h3> <?php esc_html_e( 'View Basic Plugin Info.', 'data-collector-insights' ); ?> </h3> <p> <?php esc_html_e( 'Current Plugin & SDK versions, and if active or uninstalled.', 'data-collector-insights' ); ?> </p> </div> </div> </li> </ul> </div> </div> </div> <?php } // add_action( 'in_admin_header', 'dci_popup_notice', 99999 ); } PK m"}\�:�1 �1 insights.phpnu �[��� <?php /** * Insights SDK File * SDK Version 1.0.0 */ if (!defined('ABSPATH')) { exit; } if (!class_exists('Insights_SDK')) { /** * Insights SDK Class */ class Insights_SDK { public $version = '1.1.0'; public $dci_name; public $dci_allow_name; public $dci_date_name; public $dci_count_name; public $nonce; public $params; /** * Insights SDK Version * param array $params * @return void */ public function __construct($params) { $this->params = $params; // add_action( 'admin_enqueue_scripts', array( $this, 'dci_enqueue_scripts' ) ); add_action('wp_ajax_dci_sdk_insights', array($this, 'dci_sdk_insights')); add_action('wp_ajax_dci_sdk_dismiss_notice', array($this, 'dci_sdk_dismiss_notice')); $security_key = md5($params['plugin_name']); $this->dci_name = 'dci_' . str_replace('-', '_', sanitize_title($params['plugin_name']) . '_' . $security_key); $this->dci_allow_name = 'dci_allow_status_' . $this->dci_name; $this->dci_date_name = 'dci_status_date_' . $this->dci_name; $dci_count_name = 'dci_attempt_count_' . $this->dci_name; $dci_status_db = get_option($this->dci_allow_name, false); $this->nonce = wp_create_nonce($this->dci_allow_name); /** * Modal Trigger if not init * Show Notice Modal */ if (!$dci_status_db) { $this->notice_modal($params); return; } /** * If Disallow */ if ('disallow' == $dci_status_db) { return; } /** * Skip & Date Not Expired * Show Notice Modal */ if ('skip' == $dci_status_db && true == $this->check_date()) { $this->notice_modal($params); return; } /** * Allowed & Date not Expired * No need send data to server * Else Send Data to Server */ if (!$this->check_date()) { return; } /** * Count attempt every time */ $dci_attempt = get_option($dci_count_name, 0); if (!$dci_attempt) { update_option($dci_count_name, 1); } update_option($dci_count_name, $dci_attempt + 1); /** * Next schedule date for attempt */ update_option($this->dci_date_name, gmdate('Y-m-d', strtotime("+1 month"))); /** * Prepare data */ $this->data_prepare($params); } /** * Notice Modal * * @return void */ public function notice_modal($params) { add_action('admin_enqueue_scripts', array($this, 'dci_enqueue_scripts')); if ($params['current_page'] !== $params['menu_slug']) { if (!get_transient('dismissed_notice_' . $this->dci_name)) { add_action('admin_notices', array($this, 'display_global_notice')); } return; } add_action('admin_notices', array($this, 'display_global_notice')); $dci_data = array(); $dci_data['name'] = $this->dci_name; $dci_data['date_name'] = $this->dci_date_name; $dci_data['allow_name'] = $this->dci_allow_name; $dci_data['nonce'] = wp_create_nonce('dci_sdk'); include_once dirname(__FILE__) . '/notice.php'; add_action( 'in_admin_header', function () use ($dci_data) { if (function_exists('dci_popup_notice')) { dci_popup_notice($dci_data); } }, 99999 ); } /** * If date is expired immidiate action * * @return boolean */ public function check_date() { $current_date = strtotime(gmdate('Y-m-d')); $dci_status_date = strtotime(get_option($this->dci_date_name, false)); if (!$dci_status_date) { return true; } if ($dci_status_date && $current_date >= $dci_status_date) { return true; } return false; } /** * Modal Trigger * * Not used * @return boolean */ public function modal_trigger() { if (!wp_verify_nonce($this->dci_allow_name, $this->nonce)) { echo 'Nonce Verification Failed'; return false; } $sanitized_status = sanitize_text_field($_GET['dci_allow_status']); if ($sanitized_status == 'skip') { update_option($this->dci_allow_name, 'skip'); /** * Next schedule date for attempt */ update_option($this->dci_date_name, gmdate('Y-m-d', strtotime("+1 month"))); return false; } elseif ($sanitized_status == 'yes') { update_option($this->dci_allow_name, 'yes'); return true; } return false; } /** * Reset Options Settings * @return void */ public function reset_settings() { delete_option($this->dci_allow_name); delete_option($this->dci_date_name); } /** * Data prepare for send server * * @param array $server_url * @return void */ public function data_prepare($params) { $server_url = isset($params['api_endpoint']) ? $params['api_endpoint'] : false; $public_key = isset($params['public_key']) ? $params['public_key'] : false; $custom_data = isset($params['custom_data']) ? $params['custom_data'] : false; $product_id = isset($params['product_id']) ? $params['product_id'] : false; if (!$server_url || !$public_key) { return; } /** * ================================== * * Start Own Custom Data Important * * ================================== */ $custom_data = array( 'active_modules' => get_option('element_pack_active_modules', false), 'third_party' => get_option('element_pack_third_party_widget', false), 'extend' => get_option('element_pack_elementor_extend', false), 'other_settings' => get_option('element_pack_other_settings', false), ); $custom_data = wp_json_encode($custom_data, true); /** * ================================== * * End Own Custom Data Important * * ================================== */ $data = array(); $data['public_key'] = $public_key; $data['product_id'] = $product_id; $data['custom_data'] = $custom_data; $non_sensitive_data = $this->dci_non_sensitve_data(); $data = array_merge($data, $non_sensitive_data); $this->dci_send_data_to_server($server_url, $data); } /** * Non sensitive data * * @return array */ public function dci_non_sensitve_data() { $current_user = wp_get_current_user(); $first_name = $current_user->first_name; $last_name = $current_user->last_name; if (empty($first_name) && empty($last_name)) { $first_name = null; $last_name = $current_user->display_name; } $data = array( 'first_name' => $first_name, 'last_name' => $last_name, 'email' => $current_user->user_email, 'user_role' => $current_user->roles[0], 'website_url' => $current_user->user_url, 'website_data' => array( 'website_name' => get_bloginfo('name'), 'wp_version' => get_bloginfo('version'), 'php_version' => phpversion(), 'locale' => get_locale(), 'sdk_version' => $this->version, ), ); return $data; } /** * Send data to server * * @param [string] $server_url * @param [array] $data * @return void */ public function dci_send_data_to_server($server_url, $data = null) { $args = array( 'method' => 'POST', 'timeout' => 60, 'headers' => array( 'Content-Type' => 'application/json', 'X-API-KEY' => $data['public_key'], ), 'body' => json_encode($data), ); $response = wp_remote_request($server_url, $args); if (is_wp_error($response)) { // echo 'Error: ' . $response->get_error_message(); $this->reset_settings(); } else { $response_data = wp_remote_retrieve_body($response); $response_data = json_decode($response_data, true); // print_r( $response_data ); if (isset($response_data['data']['status']) && 401 == $response_data['data']['status']) { update_option($this->dci_date_name, gmdate('Y-m-d', strtotime("+3 days"))); } } } /** * Ajax callback */ public function dci_sdk_insights() { $sanitized_status = isset($_POST['button_val']) ? sanitize_text_field($_POST['button_val']) : ''; $nonce = isset($_POST['nonce']) ? sanitize_text_field($_POST['nonce']) : ''; $allow_name = isset($_POST['allow_name']) ? sanitize_text_field($_POST['allow_name']) : ''; $date_name = isset($_POST['date_name']) ? sanitize_text_field($_POST['date_name']) : ''; if (!wp_verify_nonce($nonce, 'dci_sdk')) { wp_send_json(array( 'status' => 'error', 'title' => 'Error', 'message' => 'Nonce verification failed', )); wp_die(); } if (!current_user_can('manage_options')) { wp_send_json(array( 'status' => 'error', 'title' => 'Error', 'message' => 'Denied, you don\'t have right permission', )); wp_die(); } if ('disallow' == $sanitized_status) { update_option($allow_name, 'disallow'); } if ($sanitized_status == 'skip') { update_option($allow_name, 'skip'); /** * Next schedule date for attempt */ update_option($date_name, gmdate('Y-m-d', strtotime("+1 month"))); } elseif ($sanitized_status == 'yes') { update_option($allow_name, 'yes'); } wp_send_json(array( 'status' => 'success', 'title' => 'Success', 'message' => 'Success.', )); wp_die(); } /** * Enqueue scripts and styles. * * @since 1.0.0 */ public function dci_enqueue_scripts() { wp_enqueue_style('dci-sdk', plugins_url('assets/css/dci.css', __FILE__), array(), '1.1.0'); wp_enqueue_script('dci-sdk', plugins_url('assets/js/dci.js', __FILE__), array('jquery'), '1.1.0', true); } /** * Display Global Notice * * @return void */ public function display_global_notice() { $menu_slug = isset($this->params['menu_slug']) ? $this->params['menu_slug'] : 'javascript:void(0);'; $admin_url = add_query_arg(array( 'page' => $menu_slug, ), admin_url('admin.php')); $plugin_title = isset($this->params['plugin_title']) ? $this->params['plugin_title'] : ''; $plugin_msg = isset($this->params['plugin_msg']) ? $this->params['plugin_msg'] : ''; $plugin_icon = isset($this->params['plugin_icon']) ? $this->params['plugin_icon'] : ''; ?> <div class="dci-global-notice dci-notice-data notice notice-success is-dismissible <?php echo esc_attr(substr($this->dci_name, 0, -33)); ?>"> <div class="dci-global-header bdt-dci-notice-global-header"> <?php if (!empty($plugin_icon)) : ?> <div class="bdt-dci-notice-logo"> <img src="<?php echo esc_url($plugin_icon); ?>" alt="icon"> </div> <?php endif; ?> <div class="bdt-dci-notice-content"> <h3> <?php printf(wp_kses_post($plugin_title)); ?> </h3> <?php printf(wp_kses_post($plugin_msg)); ?> <p> <a href="<?php echo esc_url($admin_url); ?>">Learn More</a>? </p> <input type="hidden" name="dci_name" value="<?php echo esc_html($this->dci_name); ?>"> <input type="hidden" name="dci_date_name" value="<?php echo esc_html($this->dci_date_name); ?>"> <input type="hidden" name="dci_allow_name" value="<?php echo esc_html($this->dci_allow_name); ?>"> <input type="hidden" name="nonce" value="<?php echo esc_html(wp_create_nonce('dci_sdk')); ?>"> <div class="bdt-dci-notice-button-wrap"> <button name="dci_allow_status" value="yes" class="dci-button-allow"> Yes, I'd Love To Contribute </button> <button name="dci_allow_status" value="skip" class="dci-button-skip"> Skip For Now </button> <button name="dci_allow_status" value="disallow" class="dci-button-disallow dci-button-danger"> No Thanks </button> </div> </div> </div> </div> <?php } /** * Dismiss Notice * * @return void */ public function dci_sdk_dismiss_notice() { $nonce = isset($_POST['nonce']) ? sanitize_text_field($_POST['nonce']) : ''; $dci_name = isset($_POST['dci_name']) ? sanitize_text_field($_POST['dci_name']) : ''; if (!wp_verify_nonce($nonce, 'dci_sdk')) { wp_send_json(array( 'status' => 'error', 'title' => 'Error', 'message' => 'Nonce verification failed', )); wp_die(); } if (!current_user_can('manage_options')) { wp_send_json(array( 'status' => 'error', 'title' => 'Error', 'message' => 'Denied, you don\'t have right permission', )); wp_die(); } set_transient('dismissed_notice_' . $dci_name, true, 30 * DAY_IN_SECONDS); wp_send_json(array( 'status' => 'success', 'title' => 'Success', 'message' => 'Success.', )); wp_die(); } } } /** * Main Insights Function */ if (!function_exists('dci_sdk_insights')) { function dci_sdk_insights($params) { if (class_exists('Insights_SDK')) { new Insights_SDK($params); } } } PK n"}\�}�� assets/js/dci.jsnu �[��� (function ($) { // console.info("dci sdk.js loaded"); $(document).on("click", ".dci-button-allow, .dci-button-skip, .dci-button-disallow", function () { let nonce = $(this).closest('.dci-notice-data').find("[name='nonce']").val(), dci_name = $(this).closest('.dci-notice-data').find("[name='dci_name']").val(), date_name = $(this).closest('.dci-notice-data').find("[name='dci_date_name']").val(), allow_name = $(this).closest('.dci-notice-data').find("[name='dci_allow_name']").val(); $.ajax({ url: ajaxurl, type: "POST", data: { action: "dci_sdk_insights", button_val: this.value, nonce: nonce, dci_name: dci_name, date_name: date_name, allow_name: allow_name, }, success: function (response) { console.log(response); if (response.status == "success") { location.reload(); } else { alert(response.message); } }, }); }); $(document).on("click", ".dci-global-notice .notice-dismiss", function () { let nonce = $(this).closest('.dci-notice-data').find("[name='nonce']").val(), dci_name = $(this).closest('.dci-notice-data').find("[name='dci_name']").val(); $.ajax({ url: ajaxurl, type: 'POST', data: { action: 'dci_sdk_dismiss_notice', nonce: nonce, dci_name: dci_name, }, }); }); // Button Color window.CSS.registerProperty({ name: '--primaryColor', syntax: '<color>', inherits: false, initialValue: '#AA00FF', }); window.CSS.registerProperty({ name: '--secondaryColor', syntax: '<color>', inherits: false, initialValue: '#FF2661', }); })(jQuery); PK n"}\���Z Z assets/css/dci.cssnu �[��� .dci-global-notice { padding: 0; } .dci-notice { position: relative; height: 100vh; width: 100%; display: flex; justify-content: center; padding: 0px; } .dci-notice-wrapper { position: relative; background: #fff; width: 100%; max-width: 400px; margin: auto; padding: 32px; border: 1.5px solid #ddd; border-radius: 5px; } .dci-notice-wrapper::before { content: ''; background: transparent; height: 100%; width: 100%; position: absolute; z-index: -1; left: -40px; padding: 40px; top: -40px; border: 1.5px solid #cdcccc; border-radius: 5px; } .dci-header { text-align: justify; margin-bottom: 38px; } .dci-title { text-align: center; } .dci-actions { border: 1px solid #ddd; padding: 16px 10px; border-left: unset; border-right: unset; } .dci-actions form { display: flex; justify-content: space-between; margin: 0px; padding: 0px; } .dci-actions button { padding: 6px 16px !important; } .dci-permission { padding: 32px; text-align: center; } .dci-permission p { margin: 0px; font-weight: bold; font-size: 13px; color: #2271b1; } .dci-permission-item { display: flex; align-items: center; column-gap: 16px; } .dci-data-list ul { list-style: none; padding: 0px; margin: 0px; } .dci-data-list li { margin-bottom: 22px; } .dci-data-list li:last-child { margin-bottom: 0px; } .dci-data-list .dci-desc h3 { margin: 0px; margin-bottom: 5px; font-size: 1.2em; } .dci-data-list .dci-desc p { margin: 0px; font-size: 1em; } .dci-data-list .dashicons { font-size: 32px; height: 32px; width: 32px; } .dci-global-notice .dci-button-disallow { border: 0; color: #3e3d41; background-color: #eff0f4; } .dci-global-notice .dci-button-disallow:hover { background-color: #e7e7e9; } .dci-global-notice .bdt-dci-notice-button-wrap button { padding: 10px 16px; border-radius: 3px; cursor: pointer; } .dci-global-notice .dci-global-header { display: flex; align-items: flex-start; gap: 15px; padding: 25px; } .dci-global-notice .dci-global-header img { width: 45px; height: auto; vertical-align: middle; } .bdt-dci-notice-content h3 { margin: 0 0 10px; font-size: 20px; } .bdt-dci-notice-content p { margin: 0; color: #5f6169; max-width: 750px; } .bdt-dci-notice-content p a { color: #2970ee; font-weight: 500; text-decoration: none; } .bdt-dci-notice-content p a:hover { text-decoration: underline; } .bdt-dci-notice-button-wrap { margin-top: 14px; } button.notice-dismiss { padding: 25px; } .dci-global-notice .dci-button-allow { background-color: transparent; color: white; transition: --primaryColor 1s, --secondaryColor 1s; border: none; } .dci-global-notice { border-color: #e2e2e5; z-index: 99; box-shadow: none; } .dci-global-notice .dci-button-skip { border: 0; } /** * Start Element Pack Pro */ .dci-global-notice.dci_element_pack_pro .dci-button-allow { --primaryColor: #08AEEC; --secondaryColor: #20E2AD; background: linear-gradient(313deg, var(--primaryColor), var(--secondaryColor) 100%); } .dci-global-notice.dci_element_pack_pro .dci-button-allow:hover { --primaryColor: #20E2AD; ; --secondaryColor: #08AEEC; } .dci-global-notice.dci_element_pack_pro { border-left-color: #46d8bb; } .dci-global-notice.dci_element_pack_pro .dci-button-skip { background-color: #e0f5ff; } .dci-global-notice.dci_element_pack_pro .dci-button-skip:hover { background-color: #d9f1fd; } /** * Start Ultimate Post Kit */ .dci-global-notice.dci_ultimate_post_kit .dci-button-allow { --primaryColor: #60DF54; --secondaryColor: #08C972; background: linear-gradient(313deg, var(--primaryColor), var(--secondaryColor) 100%); } .dci-global-notice.dci_ultimate_post_kit .dci-button-allow:hover { --primaryColor: #08C972; --secondaryColor: #60DF54; } .dci-global-notice.dci_ultimate_post_kit { border-left-color: #60DF54; } .dci-global-notice.dci_ultimate_post_kit .dci-button-skip { background-color: rgba(86, 220, 88, 0.212); } .dci-global-notice.dci_ultimate_post_kit .dci-button-skip:hover { background-color: rgba(86, 220, 88, 0.348); } /** * Start Prime Slider */ .dci-global-notice.dci_prime_slider .dci-button-allow { --primaryColor: #FE506C; --secondaryColor: #FC6A2A; background: linear-gradient(313deg, var(--primaryColor), var(--secondaryColor) 100%); } .dci-global-notice.dci_prime_slider .dci-button-allow:hover { --primaryColor: #FC6A2A; --secondaryColor: #FE506C; } .dci-global-notice.dci_prime_slider { border-left-color: #FC6A2A; } .dci-global-notice.dci_prime_slider .dci-button-skip { background-color: rgba(252, 142, 108, 0.322); } .dci-global-notice.dci_prime_slider .dci-button-skip:hover { background-color: rgba(252, 142, 108, 0.422); }PK m"}\�՝�� � start.phpnu �[��� PK m"}\���:�- �- � alg.drawionu �[��� PK m"}\�f��� � �0 notice.phpnu �[��� PK m"}\�:�1 �1 �@ insights.phpnu �[��� PK n"}\�}�� �r assets/js/dci.jsnu �[��� PK n"}\���Z Z z assets/css/dci.cssnu �[��� PK � ��