Import legacy nurinda.co.id website
This commit is contained in:
1 parent
3f59bb9038
commit
6e21646ac4
13389 files changed
+3246690
No files matched your search
@@ -0,0 +1,248 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin Chaty Settings
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (get_option('cht_position') == 'custom') {
|
||||
update_option('cht_position', 'right');
|
||||
}
|
||||
|
||||
$chtLicenseKey = get_option('cht_license_key');
|
||||
$proClass = "none_pro";
|
||||
?>
|
||||
<div class="sr-only">
|
||||
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient" x1="0.892" y1="0.192" x2="0.128" y2="0.85" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#4a64d5"/>
|
||||
<stop offset="0.322" stop-color="#9737bd"/>
|
||||
<stop offset="0.636" stop-color="#f15540"/>
|
||||
<stop offset="1" stop-color="#fecc69"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<circle class="color-element" cx="19.5" cy="19.5" r="19.5" fill="url(#linear-gradient)"/>
|
||||
<path id="Path_1923" data-name="Path 1923" d="M13.177,0H5.022A5.028,5.028,0,0,0,0,5.022v8.155A5.028,5.028,0,0,0,5.022,18.2h8.155A5.028,5.028,0,0,0,18.2,13.177V5.022A5.028,5.028,0,0,0,13.177,0Zm3.408,13.177a3.412,3.412,0,0,1-3.408,3.408H5.022a3.411,3.411,0,0,1-3.408-3.408V5.022A3.412,3.412,0,0,1,5.022,1.615h8.155a3.412,3.412,0,0,1,3.408,3.408v8.155Z" transform="translate(10 10.4)" fill="#fff"/>
|
||||
<path id="Path_1924" data-name="Path 1924" d="M45.658,40.97a4.689,4.689,0,1,0,4.69,4.69A4.695,4.695,0,0,0,45.658,40.97Zm0,7.764a3.075,3.075,0,1,1,3.075-3.075A3.078,3.078,0,0,1,45.658,48.734Z" transform="translate(-26.558 -26.159)" fill="#fff"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="container <?php echo esc_attr($proClass) ?>" dir="ltr" id="chaty-container">
|
||||
<main class="main">
|
||||
<form id="cht-form" action="options.php" method="POST" enctype="multipart/form-data">
|
||||
<?php settings_fields($this->pluginSlug); ?>
|
||||
|
||||
<!-- ---------------------
|
||||
Header Step (choose your chat channel | customize social widget launcher | triggers and targeting)
|
||||
---------------------- -->
|
||||
<div class="chaty-header z-50 flex sm:flex-wrap gap-y-3 items-center justify-between sm:justify-center lg:justify-center bg-white p-1.5 fixed top-0 left-0 w-full" id="chaty-header-tab-label">
|
||||
<a href="<?php echo esc_url( $this->getDashboardUrl() ) ?>">
|
||||
<img class="max-w-[100px]" src="<?php echo esc_url(CHT_PLUGIN_URL.'admin/assets/images/logo-color.svg'); ?>" alt="Chaty" class="logo">
|
||||
</a>
|
||||
|
||||
<ul class="chaty-app-tabs md:flex-1 sm:flex items-start justify-between sm:min-w-[665px]">
|
||||
<li class="m-0">
|
||||
<a href="javascript:;" class="chaty-tab <?php echo ($step == 0) ? "active" : "completed" ?>" data-tab-id="chaty-tab-social-channel" id="chaty-social-channel" data-tab="first" data-tab-index="">
|
||||
<span class="chaty-tabs-heading"></span>
|
||||
<span class="sm:inline chaty-tabs-subheading">1. Choose your channels</span>
|
||||
<span class="inline sm:hidden chaty-tabs-subheading">Channels</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="my-0">
|
||||
<a href="javascript:;" class="chaty-tab <?php echo ($step == 1) ? "active" : (($step == 2) ? "completed" : "") ?>" data-tab-id="chaty-tab-customize-widget" id="chaty-app-customize-widget" data-tab-index="" data-tab="middle" data-forced-save="yes">
|
||||
<span class="chaty-tabs-heading"></span>
|
||||
<span class="sm:inline chaty-tabs-subheading">2. Customize your widget</span>
|
||||
<span class="inline sm:hidden chaty-tabs-subheading">Customization</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="m-0">
|
||||
<a href="javascript:;" class="chaty-tab <?php echo ($step == 2) ? "active" : "" ?>" data-tab-id="chaty-tab-triger-targeting" id="chaty-triger-targeting" data-tab="last" data-tab-index="" data-forced-save="yes">
|
||||
<span class="chaty-tabs-heading"></span>
|
||||
<span class="sm:inline chaty-tabs-subheading">3. Triggers and targeting</span>
|
||||
<span class="inline sm:hidden chaty-tabs-subheading">Triggers</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- footer start -->
|
||||
<footer class="footer-buttons relative space-x-2 step-<?php echo esc_attr($step) ?>">
|
||||
|
||||
<div class="flex items-center flex-wrap gap-3 justify-center space-x-3">
|
||||
<div class="flex items-center space-x-2">
|
||||
<button type="button" class="hidden sm:flex back-button" id="back-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M15.8333 10H4.16668" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10 15.8333L4.16668 9.99996L10 4.16663" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span><?php esc_html_e("Back", "chaty") ?></span>
|
||||
</button>
|
||||
<button type="button" class="hidden sm:flex next-button" id="next-button">
|
||||
<span><?php esc_html_e("Next", "chaty") ?></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M4.16677 10H15.8334" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10.0001 4.16663L15.8334 9.99996L10.0001 15.8333" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<span class="save-button-container">
|
||||
<button type="submit" class="save-button" id="save-button" name="save_button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M15.8333 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V4.16667C2.5 3.72464 2.67559 3.30072 2.98816 2.98816C3.30072 2.67559 3.72464 2.5 4.16667 2.5H13.3333L17.5 6.66667V15.8333C17.5 16.2754 17.3244 16.6993 17.0118 17.0118C16.6993 17.3244 16.2754 17.5 15.8333 17.5Z" stroke="currentColor" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.1666 17.5V10.8334H5.83331V17.5" stroke="currentColor" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M5.83331 2.5V6.66667H12.5" stroke="currentColor" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span><?php esc_html_e("Save Widget", "chaty") ?></span>
|
||||
</button>
|
||||
<button class="arrow-btn">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M5 7.5L10 12.5L15 7.5" stroke="currentColor" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<span>
|
||||
</div>
|
||||
|
||||
<input type="submit" class="save-dashboard-button hidden" id="save-dashboard-button" name="save_and_view_dashboard" value="<?php esc_html_e('Save & View Dashboard', 'chaty'); ?>" />
|
||||
<input type="hidden" name="current_step" value="<?php echo esc_attr($step) ?>" id="current_step">
|
||||
</footer>
|
||||
<!-- footer ends -->
|
||||
</div>
|
||||
<!-- end of header step -->
|
||||
<!-- responsive next prev button -->
|
||||
<div class="responsive-nav-btns footer-buttons step-<?php echo esc_attr($step) ?>">
|
||||
<button type="button" class="flex back-button" id="back-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M15.8333 10H4.16668" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10 15.8333L4.16668 9.99996L10 4.16663" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span><?php esc_html_e("Back", "chaty") ?></span>
|
||||
</button>
|
||||
<button type="button" class="flex next-button" id="next-button">
|
||||
<span><?php esc_html_e("Next", "chaty") ?></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M4.16677 10H15.8334" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10.0001 4.16663L15.8334 9.99996L10.0001 15.8333" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- settings and preview start -->
|
||||
<div class="js-error-message">
|
||||
|
||||
</div>
|
||||
<section class="grid grid-cols-1 lg:grid-cols-3 rounded-lg border border-gray-150/40 bg-white" id="chaty-widget-body-tab">
|
||||
<!-- settings column start -->
|
||||
<div class="settings-column col-span-2 border-r border-gray-150/40">
|
||||
<!--/* Social channel list section */-->
|
||||
<div id="chaty-tab-social-channel" class="social-channel-tabs <?php echo ($step == 1) ? "active" : "" ?>">
|
||||
<h1 class="section-title font-primary text-cht-gray-150 text-2xl border-b border-gray-150/40 px-4 sm:px-8 py-5">
|
||||
<strong><?php esc_html_e("Step 1:", "chaty") ?></strong> <?php esc_html_e("Choose your channels", "chaty") ?>
|
||||
</h1>
|
||||
<div class="p-3 sm:p-5 md:p-8">
|
||||
<?php require_once 'channels-section.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--/* Customize widget section */-->
|
||||
<div id="chaty-tab-customize-widget" class="social-channel-tabs <?php echo ($step == 2) ? "active" : "" ?>">
|
||||
<h1 class="section-title font-primary text-cht-gray-150 text-2xl border-b border-gray-150/40 px-4 sm:px-8 py-5">
|
||||
<strong><?php esc_html_e("Step 2:", "chaty") ?></strong> <?php esc_html_e("Customize your widget", "chaty") ?>
|
||||
</h1>
|
||||
<div class="p-3 sm:p-5 md:p-8">
|
||||
<?php require_once 'customize-widget-section.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--/* Customize widget section */-->
|
||||
<div id="chaty-tab-triger-targeting" class="social-channel-tabs <?php echo ($step == 3) ? "active" : "" ?>">
|
||||
<h1 class="section-title font-primary text-cht-gray-150 text-2xl border-b border-gray-150/40 px-4 sm:px-8 py-5">
|
||||
<strong><?php esc_html_e("Step 3:", "chaty") ?></strong> <?php esc_html_e("Triggers and targeting", "chaty") ?>
|
||||
</h1>
|
||||
<div class="p-5 md:p-8">
|
||||
<?php require_once 'trigger-and-target.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" name="nonce" value="<?php echo esc_attr(wp_create_nonce("chaty_plugin_nonce")) ?>">
|
||||
<?php
|
||||
$createdOn = get_option('cht_created_on');
|
||||
if ($createdOn === false) {
|
||||
$createdOn = "";
|
||||
}
|
||||
|
||||
if (get_option('cht_active') === false) {
|
||||
$createdOn = date("Y-m-d");
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
jQuery("#toplevel_page_chaty-app li").removeClass("current");
|
||||
jQuery("#toplevel_page_chaty-app li:eq(2)").addClass("current")
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="cht_created_on" value="<?php echo esc_attr($createdOn) ?>" />
|
||||
<input type="hidden" name="button_type" id="button_type" />
|
||||
<!-- settings column end -->
|
||||
<!-- preview column start -->
|
||||
<aside class="preview-section-chaty pb-20 z-0">
|
||||
<div class="preview sticky top-28 ease-linear duration-300 mx-auto" id="admin-preview">
|
||||
<h2 class="text-white text-center"> </h2>
|
||||
<div class="page border rounded-md">
|
||||
<div class="page-header bg-cht-gray-150/10">
|
||||
<svg width="40" height="8" viewBox="0 0 40 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="4" cy="4" r="4" fill="#C6D7E3"></circle>
|
||||
<circle cx="20" cy="4" r="4" fill="#C6D7E3"></circle>
|
||||
<circle cx="36" cy="4" r="4" fill="#C6D7E3"></circle>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="page-body">
|
||||
<div class="chaty-preview border-t rounded-bl-md rounded-br-md">
|
||||
<div class="chaty-preview-channels"></div>
|
||||
<div class="chaty-preview-cta"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="switch-preview">
|
||||
<input data-gramm_editor="false" type="radio" id="previewDesktop" name="switchPreview" class="js-switch-preview switch-preview__input" checked="checked">
|
||||
<label for="previewDesktop" class="switch-preview__label switch-preview__desktop">
|
||||
<svg class="pointer-events-none" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" svg-inline="" focusable="false" tabindex="-1"><path d="M16.667 15c.916 0 1.666-.75 1.666-1.667V5c0-.917-.75-1.667-1.666-1.667H3.333c-.916 0-1.666.75-1.666 1.667v8.333c0 .917.75 1.667 1.666 1.667h-2.5a.836.836 0 00-.833.833c0 .459.375.834.833.834h18.334a.836.836 0 00.833-.834.836.836 0 00-.833-.833h-2.5zM4.167 5h11.666c.459 0 .834.375.834.833V12.5a.836.836 0 01-.834.833H4.167a.836.836 0 01-.834-.833V5.833c0-.458.375-.833.834-.833z" fill="currentColor"></path></svg>
|
||||
</label>
|
||||
<input data-gramm_editor="false" type="radio" id="previewMobile" name="switchPreview" class="js-switch-preview switch-preview__input">
|
||||
<label for="previewMobile" class="switch-preview__label switch-preview__mobile">
|
||||
<svg class="pointer-events-none" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" svg-inline="" focusable="false" tabindex="-1"><path d="M12.916.833H6.25c-1.15 0-2.083.934-2.083 2.084v14.166c0 1.15.933 2.084 2.083 2.084h6.666c1.15 0 2.084-.934 2.084-2.084V2.917c0-1.15-.934-2.084-2.084-2.084zm-3.333 17.5c-.691 0-1.25-.558-1.25-1.25 0-.691.559-1.25 1.25-1.25.692 0 1.25.559 1.25 1.25 0 .692-.558 1.25-1.25 1.25zM13.333 15h-7.5V3.333h7.5V15z" fill="currentColor"></path></svg>
|
||||
</label>
|
||||
</div>
|
||||
<div id="custom-css"></div>
|
||||
</div>
|
||||
</aside>
|
||||
</section>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<div class="chaty-sticky-buttons">
|
||||
<!-- form sticky save button -->
|
||||
<button class="btn-save-sticky">
|
||||
<span><?php esc_html_e('Save', 'chaty'); ?></span>
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M21.5 0.5H0.5V27.5H27.5V6.5L21.5 0.5ZM14 24.5C11.51 24.5 9.5 22.49 9.5 20C9.5 17.51 11.51 15.5 14 15.5C16.49 15.5 18.5 17.51 18.5 20C18.5 22.49 16.49 24.5 14 24.5ZM18.5 9.5H3.5V3.5H18.5V9.5Z"
|
||||
fill="white" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- chaty help button -->
|
||||
<a class="btn-help"><?php esc_html_e('help', 'chaty'); ?><span>?</span></a>
|
||||
|
||||
<!-- chaty preview button -->
|
||||
<a href="javascript:;" class="preview-help-btn"><?php esc_html_e('Preview', 'chaty'); ?></a>
|
||||
</div>
|
||||
<?php require_once 'popup.php';
|
||||
@@ -0,0 +1,916 @@
|
||||
<?php
|
||||
/**
|
||||
* Contact form leads
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$value = get_option('cht_social_'.$social['slug']);
|
||||
// get setting for media if already saved
|
||||
$imageUrl = plugin_dir_url("")."chaty/admin/assets/images/chaty-default.png";
|
||||
if (empty($value)) {
|
||||
// Initialize default values if not found
|
||||
$value = [
|
||||
'value' => '',
|
||||
'is_mobile' => 'checked',
|
||||
'is_desktop' => 'checked',
|
||||
'image_id' => '',
|
||||
'title' => $social['title'],
|
||||
'bg_color' => "",
|
||||
];
|
||||
}
|
||||
|
||||
if (!isset($value['bg_color']) || empty($value['bg_color'])) {
|
||||
$value['bg_color'] = $social['color'];
|
||||
// Initialize background color value if not exists. 2.1.0 change
|
||||
}
|
||||
|
||||
if (!isset($value['image_id'])) {
|
||||
$value['image_id'] = '';
|
||||
// Initialize custom image id if not exists. 2.1.0 change
|
||||
}
|
||||
|
||||
if (!isset($value['title'])) {
|
||||
$value['title'] = $social['title'];
|
||||
// Initialize title if not exists. 2.1.0 change
|
||||
}
|
||||
|
||||
if (!isset($value['fa_icon'])) {
|
||||
$value['fa_icon'] = "";
|
||||
// Initialize title if not exists. 2.1.0 change
|
||||
}
|
||||
|
||||
if (!isset($value['value'])) {
|
||||
$value['value'] = "";
|
||||
// Initialize title if not exists. 2.1.0 change
|
||||
}
|
||||
|
||||
$imageId = $value['image_id'];
|
||||
$status = 0;
|
||||
if (!empty($imageId)) {
|
||||
$imageUrl = wp_get_attachment_image_src($imageId, "full")[0];
|
||||
// get custom image URL if exists
|
||||
$status = 1;
|
||||
}
|
||||
|
||||
if ($imageUrl == "") {
|
||||
$imageUrl = plugin_dir_url("")."chaty/admin/assets/images/chaty-default.png";
|
||||
// Initialize with default image if custom image is not exists
|
||||
$status = 0;
|
||||
$imageId = "";
|
||||
}
|
||||
|
||||
$color = "";
|
||||
if (!empty($value['bg_color'])) {
|
||||
$color = "background-color: ".$value['bg_color'];
|
||||
// set background color of icon it it is exists
|
||||
}
|
||||
|
||||
if ($social['slug'] == "Whatsapp") {
|
||||
// $val = $value['value'];
|
||||
// $val = str_replace("+", "", $val);
|
||||
// $value['value'] = $val;
|
||||
} else if ($social['slug'] == "Facebook_Messenger") {
|
||||
$val = $value['value'];
|
||||
$val = str_replace("facebook.com", "m.me", $val);
|
||||
// Replace facebook.com with m.me version 2.0.1 change.
|
||||
$val = str_replace("www.", "", $val);
|
||||
// Replace www. with blank version 2.0.1 change.
|
||||
$value['value'] = $val;
|
||||
|
||||
$val = trim($val, "/");
|
||||
$valArray = explode("/", $val);
|
||||
$total = (count($valArray) - 1);
|
||||
$lastValue = $valArray[$total];
|
||||
$lastValue = explode("-", $lastValue);
|
||||
$totalText = (count($lastValue) - 1);
|
||||
$totalText = $lastValue[$totalText];
|
||||
|
||||
if (is_numeric($totalText)) {
|
||||
$valArray[$total] = $totalText;
|
||||
$value['value'] = implode("/", $valArray);
|
||||
}
|
||||
}//end if
|
||||
|
||||
$value['value'] = esc_attr(wp_unslash($value['value']));
|
||||
$value['title'] = esc_attr(wp_unslash($value['title']));
|
||||
|
||||
$svgIcon = $social['svg'];
|
||||
|
||||
$helpTitle = "";
|
||||
$helpText = "";
|
||||
$helpLink = "";
|
||||
|
||||
if ((isset($social['help']) && !empty($social['help'])) || isset($social['help_link'])) {
|
||||
$helpTitle = isset($social['help_title']) ? $social['help_title'] : "Doesn't work?";
|
||||
$helpText = isset($social['help']) ? $social['help'] : "";
|
||||
if (isset($social['help_link']) && !empty($social['help_link'])) {
|
||||
$helpLink = $social['help_link'];
|
||||
}
|
||||
}
|
||||
|
||||
$channelType = "";
|
||||
$placeholder = $social['example'];
|
||||
if ($social['slug'] == "Link" || $social['slug'] == "Custom_Link" || $social['slug'] == "Custom_Link_3" || $social['slug'] == "Custom_Link_4" || $social['slug'] == "Custom_Link_5") {
|
||||
if (isset($value['channel_type'])) {
|
||||
$channelType = esc_attr(wp_unslash($value['channel_type']));
|
||||
}
|
||||
|
||||
if (!empty($channelType)) {
|
||||
foreach ($this->socials as $icon) {
|
||||
if ($icon['slug'] == $channelType) {
|
||||
$svgIcon = $icon['svg'];
|
||||
|
||||
$placeholder = $icon['example'];
|
||||
|
||||
if ((isset($icon['help']) && !empty($icon['help'])) || isset($icon['help_link'])) {
|
||||
$helpTitle = isset($icon['help_title']) ? $icon['help_title'] : "Doesn't work?";
|
||||
$helpText = isset($icon['help']) ? $icon['help'] : "";
|
||||
if (isset($icon['help_link']) && !empty($icon['help_link'])) {
|
||||
$helpLink = $icon['help_link'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}//end if
|
||||
|
||||
if (empty($channelType)) {
|
||||
$channelType = $social['slug'];
|
||||
}
|
||||
|
||||
if(!empty($value['value'])) {
|
||||
if($social['slug'] == "Whatsapp" || $social['slug'] == "SMS" || $social['slug'] == "Viber") {
|
||||
$val = $value['value'];
|
||||
$val = str_replace("+","",$val);
|
||||
$val = str_replace("-","",$val);
|
||||
$val = str_replace(" ","",$val);
|
||||
$value['value'] = "+" . $val;
|
||||
}
|
||||
if ($social['slug'] == "Telegram" || $social['slug'] == "Instagram" || $social['slug'] == "Snapchat" || $social['slug'] == "TikTok") {
|
||||
$value['value'] = trim($value['value'], "@");
|
||||
$value['value'] = "@" . $value['value'];
|
||||
}
|
||||
}
|
||||
|
||||
$isAgent = 0;
|
||||
?>
|
||||
<!-- Social media setting box: start -->
|
||||
<li data-id="<?php echo esc_attr($social['slug']) ?>" class="chaty-channel <?php echo ($isAgent == 1) ? "has-agent-view" : "" ?>" data-channel="<?php echo esc_attr($channelType) ?>" id="chaty-social-<?php echo esc_attr($social['slug']) ?>">
|
||||
<!-- channel default settings start -->
|
||||
<div class="channels-selected__item <?php echo esc_attr(($status) ? "img-active" : "") ?> free 1 available">
|
||||
<!-- icon and input field start -->
|
||||
<div class="chaty-default-settings space-x-3 flex items-center">
|
||||
<!-- drag icon and channel icon start -->
|
||||
<div class="flex space-x-2 items-center">
|
||||
<div class="move-icon opacity-0 transition duration-150 hover:opacity-100 cursor-grab">
|
||||
<img src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/move-icon.png") ?>">
|
||||
</div>
|
||||
<div class="icon icon-md active" data-label="<?php echo esc_attr($social['title']); ?>" id="chaty_image_<?php echo esc_attr($social['slug']) ?>">
|
||||
<span style="" class="custom-chaty-image custom-image-<?php echo esc_attr($social['slug']) ?>" id="image_data_<?php echo esc_attr($social['slug']) ?>">
|
||||
<img src="<?php echo esc_url($imageUrl) ?>" />
|
||||
<span onclick="remove_chaty_image('<?php echo esc_attr($social['slug']) ?>')" class="remove-icon-img"></span>
|
||||
</span>
|
||||
<span class="default-chaty-icon <?php echo (isset($value['fa_icon'])&&!empty($value['fa_icon'])) ? "has-fa-icon" : "" ?> custom-icon-<?php echo esc_attr($social['slug']) ?> default_image_<?php echo esc_attr($social['slug']) ?>">
|
||||
<?php echo $svgIcon; ?>
|
||||
<span class="facustom-icon" style="background-color: <?php echo esc_attr($value['bg_color']) ?>"><i class="<?php echo esc_attr($value['fa_icon']) ?>"></i></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- drag icon and channel icon end -->
|
||||
<!-- input field start-->
|
||||
<?php if ($social['slug'] != 'Contact_Us') { ?>
|
||||
<?php if (($social['slug'] == "Whatsapp" || $channelType == "Whatsapp") && !empty($value['value'])) {
|
||||
// $value['value'] = trim($value['value'], "+");
|
||||
// $value['value'] = "+".$value['value'];
|
||||
} ?>
|
||||
<div class="channels__input-box flex-auto">
|
||||
<input data-label="<?php echo esc_attr($social['title']) ?>" placeholder="<?php echo esc_attr($placeholder); ?>" type="text" class="channels__input custom-channel-<?php echo esc_attr($channelType) ?> <?php echo isset($social['attr']) ? $social['attr'] : "" ?>" name="cht_social_<?php echo esc_attr($social['slug']); ?>[value]" value="<?php echo esc_attr(wp_unslash($value['value'])); ?>" data-gramm_editor="false" id="channel_input_<?php echo esc_attr($social['slug']); ?>" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- input field end -->
|
||||
</div>
|
||||
<!-- icon and input field end -->
|
||||
|
||||
<!-- example and help text start -->
|
||||
<div class="flex items-center flex-wrap gap-3 pl-20 ml-1">
|
||||
<?php if ($social['slug'] != 'Contact_Us') { ?>
|
||||
|
||||
|
||||
<!-- checking for extra help message for social media -->
|
||||
<div class="help-section inline-block relative">
|
||||
<?php if ((isset($social['help']) && !empty($social['help'])) || isset($social['help_link'])) { ?>
|
||||
<div class="viber-help">
|
||||
<?php if (isset($helpLink) && !empty($helpLink)) { ?>
|
||||
<a class="help-link" href="<?php echo esc_url($helpLink) ?>" target="_blank"><?php echo esc_attr($helpTitle); ?></a>
|
||||
<?php } else if (isset($helpText) && !empty($helpText)) { ?>
|
||||
<?php
|
||||
$allowedHTML = [
|
||||
'a' => [
|
||||
'href' => [],
|
||||
'title' => [],
|
||||
'target' => []
|
||||
],
|
||||
'br' => [],
|
||||
'em' => [],
|
||||
'strong' => [],
|
||||
]; ?>
|
||||
<span class="help-text"><?php echo wp_kses($helpText, $allowedHTML); ?></span>
|
||||
<!-- $helpText contains HTML -->
|
||||
<span class="help-title"><?php echo esc_attr($helpTitle); ?></span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php }//end if
|
||||
?>
|
||||
</div>
|
||||
<!-- example and help text end -->
|
||||
<!-- whatsapp settings start -->
|
||||
<?php if ($social['slug'] == "Whatsapp" || $social['slug'] == "Link" || $social['slug'] == "Custom_Link" || $social['slug'] == "Custom_Link_3" || $social['slug'] == "Custom_Link_4" || $social['slug'] == "Custom_Link_5") { ?>
|
||||
<div class="Whatsapp-settings sm:pl-20 ml-1 mt-2 font-primary text-cht-gray-150 advanced-settings extra-chaty-settings">
|
||||
<?php $embeddedWindow = isset($value['embedded_window']) ? $value['embedded_window'] : "no"; ?>
|
||||
<div class="chaty-setting-col">
|
||||
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[embedded_window]" value="no">
|
||||
<label class="flex mt-1 items-center chaty-switch full-width chaty-embedded-window" for="whatsapp_embedded_window_<?php echo esc_attr($social['slug']); ?>">
|
||||
<input type="checkbox" class="embedded_window-checkbox" name="cht_social_<?php echo esc_attr($social['slug']); ?>[embedded_window]" id="whatsapp_embedded_window_<?php echo esc_attr($social['slug']); ?>" value="yes" <?php checked($embeddedWindow, "yes") ?>>
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e("WhatsApp Chat Popup", "chaty") ?> 💬
|
||||
<div class="html-tooltip top">
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round">
|
||||
</path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="tooltip-text top">
|
||||
<?php esc_html_e("Show an embedded WhatsApp window to your visitors with a welcome message. Your users can start typing their own message and start a conversation with you right away once they are forwarded to the WhatsApp app.", "chaty") ?>
|
||||
<img src="<?php echo esc_url(CHT_PLUGIN_URL) ?>/admin/assets/images/whatsapp-popup.gif" />
|
||||
</span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<!-- advance setting for Whatsapp -->
|
||||
<div class="whatsapp-welcome-message mt-4 <?php echo ($embeddedWindow == "yes") ? "active" : "" ?>">
|
||||
<div class="chaty-setting-col">
|
||||
<label style="display: block; width: 100%" for="cht_social_embedded_message_<?php echo esc_attr($social['slug']); ?>"><?php esc_html_e("Welcome message", "chaty") ?></label>
|
||||
<div class="full-width">
|
||||
<div class="full-width">
|
||||
<?php $unique_id = uniqid(); ?>
|
||||
<?php $embeddedMessage = isset($value['embedded_message']) ? $value['embedded_message'] : esc_html__("How can I help you? :)", "chaty"); ?>
|
||||
<textarea class="chaty-setting-textarea chaty-whatsapp-setting-textarea" data-id="<?php echo esc_attr($unique_id) ?>" id="cht_social_embedded_message_<?php echo esc_attr($unique_id) ?>" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[embedded_message]"><?php echo esc_textarea($embeddedMessage) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chaty-setting-col">
|
||||
<?php $isDefaultOpen = isset($value['is_default_open']) ? $value['is_default_open'] : ""; ?>
|
||||
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[is_default_open]" value="no">
|
||||
<label class="chaty-switch" for="whatsapp_default_open_embedded_window_<?php echo esc_attr($social['slug']); ?>">
|
||||
<input type="checkbox" name="cht_social_<?php echo esc_attr($social['slug']); ?>[is_default_open]" id="whatsapp_default_open_embedded_window_<?php echo esc_attr($social['slug']); ?>" value="yes" <?php checked($isDefaultOpen, "yes") ?>>
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e("Open the window on load", "chaty") ?>
|
||||
<span class="icon label-tooltip" data-label="Open the WhatsApp chat popup on page load, after the user sends a message or closes the window, the window will stay closed to avoid disruption">
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }//end if
|
||||
?>
|
||||
<!-- whatsapp settings end -->
|
||||
|
||||
<!-- device, agent and settings button start -->
|
||||
<div class="flex items-center sm:pl-20 ml-1 mt-2">
|
||||
<?php if ($social['slug'] == 'Contact_Us') { ?>
|
||||
<?php $fields = [
|
||||
'name' => [
|
||||
'title' => "Name",
|
||||
'placeholder' => "Enter your name",
|
||||
'is_required' => 1,
|
||||
'type' => 'input',
|
||||
'is_enabled' => 1,
|
||||
],
|
||||
'email' => [
|
||||
'title' => "Email",
|
||||
'placeholder' => "Enter your email address",
|
||||
'is_required' => 1,
|
||||
'type' => 'email',
|
||||
'is_enabled' => 1,
|
||||
],
|
||||
'phone' => [
|
||||
'title' => "Phone",
|
||||
'placeholder' => "Enter your phone number",
|
||||
'is_required' => 1,
|
||||
'type' => 'input',
|
||||
'is_enabled' => 1,
|
||||
],
|
||||
'message' => [
|
||||
'title' => "Message",
|
||||
'placeholder' => "Enter your message",
|
||||
'is_required' => 1,
|
||||
'type' => 'textarea',
|
||||
'is_enabled' => 1,
|
||||
],
|
||||
];
|
||||
echo '<div class="form-field-setting-col">';
|
||||
foreach ($fields as $label => $field) {
|
||||
$saved_value = isset($value[$label]) ? $value[$label] : [];
|
||||
$field_value = [
|
||||
'is_active' => (isset($saved_value['is_active'])) ? $saved_value['is_active'] : 'yes',
|
||||
'is_required' => (isset($saved_value['is_required'])) ? $saved_value['is_required'] : 'yes',
|
||||
'placeholder' => (isset($saved_value['placeholder'])) ? $saved_value['placeholder'] : $field['placeholder'],
|
||||
];
|
||||
?>
|
||||
<div class="field-setting-col mb-2.5">
|
||||
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[<?php echo esc_attr($label) ?>][is_active]" value="no">
|
||||
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[<?php echo esc_attr($label) ?>][is_required]" value="no">
|
||||
|
||||
<div class="block">
|
||||
<label class="chaty-switch chaty-switch-toggle text-cht-gray-150 text-base" for="field_for_<?php echo esc_attr($social['slug']); ?>_<?php echo esc_attr($label) ?>">
|
||||
<input type="checkbox" class="chaty-field-setting" name="cht_social_<?php echo esc_attr($social['slug']); ?>[<?php echo esc_attr($label) ?>][is_active]" id="field_for_<?php echo esc_attr($social['slug']); ?>_<?php echo esc_attr($label) ?>" value="yes" <?php checked($field_value['is_active'], "yes") ?>>
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php echo esc_attr($field['title']) ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-settings <?php echo ($field_value['is_active'] == "yes") ? "active" : "" ?>">
|
||||
<div class="chaty-setting-col py-4 grid sm:grid-cols-2 items-center gap-3">
|
||||
<div>
|
||||
<input class="rounded-lg w-full" id="placeholder_for_<?php echo esc_attr($social['slug']); ?>_<?php echo esc_attr($label) ?>" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[<?php echo esc_attr($label) ?>][placeholder]" value="<?php echo esc_attr($field_value['placeholder']) ?>" >
|
||||
</div>
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="checkbox">
|
||||
<label for="field_required_for_<?php echo esc_attr($social['slug']); ?>_<?php echo esc_attr($label) ?>" class="chaty-checkbox text-cht-gray-150 text-base flex items-center">
|
||||
<input class="sr-only" type="checkbox" id="field_required_for_<?php echo esc_attr($social['slug']); ?>_<?php echo esc_attr($label) ?>" name="cht_social_<?php echo esc_attr($social['slug']); ?>[<?php echo esc_attr($label) ?>][is_required]" value="yes" <?php checked($field_value['is_required'], "yes") ?> />
|
||||
<span class="mt-[3px] mr-2"></span>
|
||||
<?php esc_html_e("Required?", "chaty") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }//end foreach
|
||||
echo '</div>'; ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="flex items-center sm:pl-20 ml-1">
|
||||
<div class="channels__device-box">
|
||||
<div class="device-box">
|
||||
<?php
|
||||
$slug = esc_attr($this->del_space($social['slug']));
|
||||
$slug = str_replace(' ', '_', $slug);
|
||||
$isDesktop = isset($value['is_desktop']) && $value['is_desktop'] == "checked" ? "checked" : '';
|
||||
$isMobile = isset($value['is_mobile']) && $value['is_mobile'] == "checked" ? "checked" : '';
|
||||
?>
|
||||
<!-- setting for desktop -->
|
||||
<label class="device_view" for="<?php echo esc_attr($slug); ?>Desktop">
|
||||
<input type="checkbox" id="<?php echo esc_attr($slug); ?>Desktop" class="channels__view-check sr-only js-chanel-icon js-chanel-desktop" data-type="<?php echo str_replace(' ', '_', strtolower(esc_attr($this->del_space($social['slug'])))); ?>" name="cht_social_<?php echo esc_attr($social['slug']); ?>[is_desktop]" value="checked" data-gramm_editor="false" <?php echo esc_attr($isDesktop) ?> />
|
||||
<span class="channels__view-txt">
|
||||
<svg width="16" height="12" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.3333 10.0001C14.0667 10.0001 14.6667 9.40008 14.6667 8.66675V2.00008C14.6667 1.26675 14.0667 0.666748 13.3333 0.666748H2.66667C1.93333 0.666748 1.33333 1.26675 1.33333 2.00008V8.66675C1.33333 9.40008 1.93333 10.0001 2.66667 10.0001H0.666667C0.3 10.0001 0 10.3001 0 10.6667C0 11.0334 0.3 11.3334 0.666667 11.3334H15.3333C15.7 11.3334 16 11.0334 16 10.6667C16 10.3001 15.7 10.0001 15.3333 10.0001H13.3333ZM3.33333 2.00008H12.6667C13.0333 2.00008 13.3333 2.30008 13.3333 2.66675V8.00008C13.3333 8.36675 13.0333 8.66675 12.6667 8.66675H3.33333C2.96667 8.66675 2.66667 8.36675 2.66667 8.00008V2.66675C2.66667 2.30008 2.96667 2.00008 3.33333 2.00008Z" />
|
||||
</svg>
|
||||
</span>
|
||||
<span class="device-tooltip">
|
||||
<span class="on"><?php esc_html_e("Hide on desktop", "chaty") ?></span>
|
||||
<span class="off"><?php esc_html_e("Show on desktop", "chaty") ?></span>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<!-- setting for mobile -->
|
||||
<label class="device_view" for="<?php echo esc_attr($slug); ?>Mobile">
|
||||
<input type="checkbox" id="<?php echo esc_attr($slug); ?>Mobile" class="channels__view-check sr-only js-chanel-icon js-chanel-mobile" data-type="<?php echo str_replace(' ', '_', strtolower(esc_attr($this->del_space($social['slug'])))); ?>" name="cht_social_<?php echo esc_attr($social['slug']); ?>[is_mobile]" value="checked" data-gramm_editor="false" <?php echo esc_attr($isMobile) ?>>
|
||||
<span class="channels__view-txt">
|
||||
<svg width="9" height="16" viewBox="0 0 9 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.33301 0.666748H1.99967C1.07967 0.666748 0.333008 1.41341 0.333008 2.33341V13.6667C0.333008 14.5867 1.07967 15.3334 1.99967 15.3334H7.33301C8.25301 15.3334 8.99967 14.5867 8.99967 13.6667V2.33341C8.99967 1.41341 8.25301 0.666748 7.33301 0.666748ZM4.66634 14.6667C4.11301 14.6667 3.66634 14.2201 3.66634 13.6667C3.66634 13.1134 4.11301 12.6667 4.66634 12.6667C5.21967 12.6667 5.66634 13.1134 5.66634 13.6667C5.66634 14.2201 5.21967 14.6667 4.66634 14.6667ZM7.66634 12.0001H1.66634V2.66675H7.66634V12.0001Z" />
|
||||
</svg>
|
||||
</span>
|
||||
<span class="device-tooltip">
|
||||
<span class="on"><?php esc_html_e("Hide on mobile", "chaty") ?></span>
|
||||
<span class="off"><?php esc_html_e("Show on mobile", "chaty") ?></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($slug != 'Custom_Link' && $slug != 'Custom_Link_3' && $slug != 'Custom_Link_4' && $slug != 'Custom_Link_5' && $slug != 'Contact_Us' && $slug != 'Link') { ?>
|
||||
<div class="channels__agent-box relative">
|
||||
<a href="#" class="add-agent-btn space-x-1 pro-button-wrap">
|
||||
<svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.25 5.14286C6.69975 5.14286 7.875 3.99159 7.875 2.57143C7.875 1.15127 6.69975 0 5.25 0C3.80025 0 2.625 1.15127 2.625 2.57143C2.625 3.99159 3.80025 5.14286 5.25 5.14286Z" fill="currentColor" />
|
||||
<path d="M5.25 6.85714C8.1495 6.85714 10.5 9.15968 10.5 12H0C0 9.15968 2.35051 6.85714 5.25 6.85714Z" fill="currentColor" />
|
||||
<path d="M12.25 3.42857C12.25 2.95518 11.8582 2.57143 11.375 2.57143C10.8918 2.57143 10.5 2.95518 10.5 3.42857V4.28571H9.625C9.14175 4.28571 8.75 4.66947 8.75 5.14286C8.75 5.61624 9.14175 6 9.625 6H10.5V6.85714C10.5 7.33053 10.8918 7.71429 11.375 7.71429C11.8582 7.71429 12.25 7.33053 12.25 6.85714V6H13.125C13.6082 6 14 5.61624 14 5.14286C14 4.66947 13.6082 4.28571 13.125 4.28571H12.25V3.42857Z" fill="currentColor" />
|
||||
</svg>
|
||||
<span><?php esc_html_e("Add Agents", "chaty"); ?></span>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('Learn more here: https://premio.io/help/chaty/how-to-use-chaty-with-different-agents/', 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div class="pro-button">
|
||||
<span class="pro-btn text-white rounded-md bg-cht-primary hover:text-white">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty');?>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php } else if($slug != 'Contact_Us') { ?>
|
||||
<div class="channels__agent-box transparent relative hidden">
|
||||
<a href="#" class="add-agent-btn pro-button-wrap">
|
||||
<svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.25 5.14286C6.69975 5.14286 7.875 3.99159 7.875 2.57143C7.875 1.15127 6.69975 0 5.25 0C3.80025 0 2.625 1.15127 2.625 2.57143C2.625 3.99159 3.80025 5.14286 5.25 5.14286Z" fill="white" />
|
||||
<path d="M5.25 6.85714C8.1495 6.85714 10.5 9.15968 10.5 12H0C0 9.15968 2.35051 6.85714 5.25 6.85714Z" fill="white" />
|
||||
<path d="M12.25 3.42857C12.25 2.95518 11.8582 2.57143 11.375 2.57143C10.8918 2.57143 10.5 2.95518 10.5 3.42857V4.28571H9.625C9.14175 4.28571 8.75 4.66947 8.75 5.14286C8.75 5.61624 9.14175 6 9.625 6H10.5V6.85714C10.5 7.33053 10.8918 7.71429 11.375 7.71429C11.8582 7.71429 12.25 7.33053 12.25 6.85714V6H13.125C13.6082 6 14 5.61624 14 5.14286C14 4.66947 13.6082 4.28571 13.125 4.28571H12.25V3.42857Z" fill="white" />
|
||||
</svg>
|
||||
<span><?php esc_html_e("Add Agents", "chaty"); ?></span>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('Learn more here: https://premio.io/help/chaty/how-to-use-chaty-with-different-agents/', 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div class="pro-button">
|
||||
<span class="pro-btn text-white rounded-md bg-cht-primary hover:text-white">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty');?>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php }//end if
|
||||
?>
|
||||
|
||||
<?php
|
||||
$closeClass = "active";
|
||||
if ($social['slug'] == 'Contact_Us') {
|
||||
$settingStatus = get_option("chaty_contact_us_setting");
|
||||
if ($settingStatus === false) {
|
||||
$closeClass = "";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- settings button -->
|
||||
<div class="chaty-settings <?php echo esc_attr($closeClass) ?>" data-nonce="<?php echo wp_create_nonce($social['slug']."-settings") ?>" id="<?php echo esc_attr($social['slug']); ?>-close-btn" onclick="toggle_chaty_setting('<?php echo esc_attr($social['slug']); ?>')">
|
||||
<a class="flex items-center space-x-1.5" href="javascript:;">
|
||||
<span>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12.9332 9.99984C12.8444 10.2009 12.818 10.424 12.8572 10.6402C12.8964 10.8565 12.9995 11.056 13.1532 11.2132L13.1932 11.2532C13.3171 11.377 13.4155 11.5241 13.4826 11.6859C13.5497 11.8478 13.5842 12.0213 13.5842 12.1965C13.5842 12.3717 13.5497 12.5452 13.4826 12.7071C13.4155 12.869 13.3171 13.016 13.1932 13.1398C13.0693 13.2638 12.9223 13.3621 12.7604 13.4292C12.5986 13.4963 12.4251 13.5309 12.2498 13.5309C12.0746 13.5309 11.9011 13.4963 11.7392 13.4292C11.5774 13.3621 11.4303 13.2638 11.3065 13.1398L11.2665 13.0998C11.1094 12.9461 10.9098 12.843 10.6936 12.8038C10.4773 12.7646 10.2542 12.7911 10.0532 12.8798C9.85599 12.9643 9.68782 13.1047 9.56937 13.2835C9.45092 13.4624 9.38736 13.672 9.3865 13.8865V13.9998C9.3865 14.3535 9.24603 14.6926 8.99598 14.9426C8.74593 15.1927 8.40679 15.3332 8.05317 15.3332C7.69955 15.3332 7.36041 15.1927 7.11036 14.9426C6.86031 14.6926 6.71984 14.3535 6.71984 13.9998V13.9398C6.71467 13.7192 6.64325 13.5052 6.51484 13.3256C6.38644 13.1461 6.20699 13.0094 5.99984 12.9332C5.79876 12.8444 5.57571 12.818 5.35944 12.8572C5.14318 12.8964 4.94362 12.9995 4.7865 13.1532L4.7465 13.1932C4.62267 13.3171 4.47562 13.4155 4.31376 13.4826C4.15189 13.5497 3.97839 13.5842 3.80317 13.5842C3.62795 13.5842 3.45445 13.5497 3.29258 13.4826C3.13072 13.4155 2.98367 13.3171 2.85984 13.1932C2.73587 13.0693 2.63752 12.9223 2.57042 12.7604C2.50332 12.5986 2.46879 12.4251 2.46879 12.2498C2.46879 12.0746 2.50332 11.9011 2.57042 11.7392C2.63752 11.5774 2.73587 11.4303 2.85984 11.3065L2.89984 11.2665C3.05353 11.1094 3.15663 10.9098 3.19584 10.6936C3.23505 10.4773 3.20858 10.2542 3.11984 10.0532C3.03533 9.85599 2.89501 9.68782 2.71615 9.56937C2.53729 9.45092 2.32769 9.38736 2.11317 9.3865H1.99984C1.64622 9.3865 1.30708 9.24603 1.05703 8.99598C0.80698 8.74593 0.666504 8.40679 0.666504 8.05317C0.666504 7.69955 0.80698 7.36041 1.05703 7.11036C1.30708 6.86031 1.64622 6.71984 1.99984 6.71984H2.05984C2.2805 6.71467 2.49451 6.64325 2.67404 6.51484C2.85357 6.38644 2.99031 6.20699 3.0665 5.99984C3.15525 5.79876 3.18172 5.57571 3.14251 5.35944C3.10329 5.14318 3.00019 4.94362 2.8465 4.7865L2.8065 4.7465C2.68254 4.62267 2.58419 4.47562 2.51709 4.31376C2.44999 4.15189 2.41545 3.97839 2.41545 3.80317C2.41545 3.62795 2.44999 3.45445 2.51709 3.29258C2.58419 3.13072 2.68254 2.98367 2.8065 2.85984C2.93033 2.73587 3.07739 2.63752 3.23925 2.57042C3.40111 2.50332 3.57462 2.46879 3.74984 2.46879C3.92506 2.46879 4.09856 2.50332 4.26042 2.57042C4.42229 2.63752 4.56934 2.73587 4.69317 2.85984L4.73317 2.89984C4.89029 3.05353 5.08985 3.15663 5.30611 3.19584C5.52237 3.23505 5.74543 3.20858 5.9465 3.11984H5.99984C6.19702 3.03533 6.36518 2.89501 6.48363 2.71615C6.60208 2.53729 6.66565 2.32769 6.6665 2.11317V1.99984C6.6665 1.64622 6.80698 1.30708 7.05703 1.05703C7.30708 0.80698 7.64621 0.666504 7.99984 0.666504C8.35346 0.666504 8.6926 0.80698 8.94264 1.05703C9.19269 1.30708 9.33317 1.64622 9.33317 1.99984V2.05984C9.33402 2.27436 9.39759 2.48395 9.51604 2.66281C9.63449 2.84167 9.80266 2.98199 9.99984 3.0665C10.2009 3.15525 10.424 3.18172 10.6402 3.14251C10.8565 3.10329 11.056 3.00019 11.2132 2.8465L11.2532 2.8065C11.377 2.68254 11.5241 2.58419 11.6859 2.51709C11.8478 2.44999 12.0213 2.41545 12.1965 2.41545C12.3717 2.41545 12.5452 2.44999 12.7071 2.51709C12.869 2.58419 13.016 2.68254 13.1398 2.8065C13.2638 2.93033 13.3621 3.07739 13.4292 3.23925C13.4963 3.40111 13.5309 3.57462 13.5309 3.74984C13.5309 3.92506 13.4963 4.09856 13.4292 4.26042C13.3621 4.42229 13.2638 4.56934 13.1398 4.69317L13.0998 4.73317C12.9461 4.89029 12.843 5.08985 12.8038 5.30611C12.7646 5.52237 12.7911 5.74543 12.8798 5.9465V5.99984C12.9643 6.19702 13.1047 6.36518 13.2835 6.48363C13.4624 6.60208 13.672 6.66565 13.8865 6.6665H13.9998C14.3535 6.6665 14.6926 6.80698 14.9426 7.05703C15.1927 7.30708 15.3332 7.64621 15.3332 7.99984C15.3332 8.35346 15.1927 8.6926 14.9426 8.94264C14.6926 9.19269 14.3535 9.33317 13.9998 9.33317H13.9398C13.7253 9.33402 13.5157 9.39759 13.3369 9.51604C13.158 9.63449 13.0177 9.80266 12.9332 9.99984V9.99984Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
<span><?php esc_html_e("Settings", "chaty") ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- device, agent and settings button end -->
|
||||
|
||||
|
||||
<!-- advance setting fields: start -->
|
||||
<?php $className = "not-is-pro"; ?>
|
||||
<div class="chaty-advance-settings mt-5 space-y-4 <?php echo esc_attr($className); ?>" style="<?php echo (empty($closeClass) && $social['slug'] == 'Contact_Us') ? "display:block" : ""; ?>">
|
||||
<!-- Settings for custom icon and color -->
|
||||
<div class="chaty-setting-col sm:flex items-center space-y-2 sm:space-y-0 sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44"><?php esc_html_e("Icon Appearance", "chaty") ?></label>
|
||||
<div class="flex items-center">
|
||||
<!-- input for custom color -->
|
||||
<input type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[bg_color]" class="chaty-color-field chaty-bg-color" value="<?php echo esc_attr($value['bg_color']) ?>" />
|
||||
|
||||
<!-- button to upload custom image -->
|
||||
<div class="pro-features upload-image mx-2">
|
||||
<div class="pro-item">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>" class="upload-chaty-icon"><span class="dashicons dashicons-upload"></span> <?php esc_html_e("Custom Image", "chaty") ?></a>
|
||||
</div>
|
||||
<div class="pro-button">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_html_e('Upgrade to Pro', 'chaty');?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pro-features upload-image">
|
||||
<div class="pro-item">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>" class="upload-chaty-icon"><?php esc_html_e("Change Icon", "chaty") ?></a>
|
||||
</div>
|
||||
<div class="pro-button">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_html_e('Upgrade to Pro', 'chaty');?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($social['slug'] == "Link" || $social['slug'] == "Custom_Link" || $social['slug'] == "Custom_Link_3" || $social['slug'] == "4" || $social['slug'] == "Custom_Link_5") {
|
||||
$channelType = "";
|
||||
$channelValue= "";
|
||||
if (isset($value['channel_type'])) {
|
||||
$channelType = esc_attr(wp_unslash($value['channel_type']));
|
||||
$channelValue= $value['channel_type'];
|
||||
}
|
||||
|
||||
$socials = $this->socials;
|
||||
?>
|
||||
<div class="chaty-setting-col space-y-2 sm:space-y-0 sm:flex sm:items-center sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44"><?php esc_html_e("Channel type", "chaty") ?></label>
|
||||
<div>
|
||||
<!-- input for custom title -->
|
||||
<select class="channel-select-input" name="cht_social_<?php echo esc_attr($social['slug']); ?>[channel_type]" value="<?php echo esc_attr($channelValue) ?>">
|
||||
<option value="<?php echo esc_attr($social['slug']) ?>"><?php esc_html_e("Custom channel", "chaty") ?></option>
|
||||
<?php foreach ($socials as $socialIcon) {
|
||||
$selected = ($socialIcon['slug'] == $channelType) ? "selected" : "";
|
||||
if ($socialIcon['slug'] != 'Custom_Link' && $socialIcon['slug'] != 'Custom_Link_3' && $socialIcon['slug'] != 'Custom_Link_4' && $socialIcon['slug'] != 'Custom_Link_5' && $socialIcon['slug'] != 'Contact_Us' && $socialIcon['slug'] != 'Link') { ?>
|
||||
<option <?php echo esc_attr($selected) ?> value="<?php echo esc_attr($socialIcon['slug']) ?>"><?php echo esc_attr($socialIcon['title']) ?></option>
|
||||
<?php }
|
||||
}?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}//end if
|
||||
?>
|
||||
|
||||
<div class="chaty-setting-col sm:flex sm:items-center space-y-2 sm:space-y-0 sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44"><?php esc_html_e("On Hover Text", "chaty") ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('The text that will appear next to your channel when a visitor hovers over it', 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div>
|
||||
<input type="text" class="chaty-title" name="cht_social_<?php echo esc_attr($social['slug']); ?>[title]" value="<?php echo esc_attr($value['title']) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Contact_Us-settings advanced-settings">
|
||||
<div class="chaty-setting-col sm:flex sm:items-center space-y-2 sm:space-y-0 sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44"><?php esc_html_e("Contact Form Title", "chaty") ?></label>
|
||||
<div>
|
||||
<?php $contactFormTitle = isset($value['contact_form_title']) ? $value['contact_form_title'] : esc_html__("Contact Us", "chaty"); ?>
|
||||
<input id="cht_social_message_<?php echo esc_attr($social['slug']); ?>_form_title" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[contact_form_title]" value="<?php echo esc_attr($contactFormTitle) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-field-setting-col my-3 space-y-4">
|
||||
<div class="form-field-title">Submit Button</div>
|
||||
|
||||
<?php $fieldValue = isset($value['button_text_color']) ? $value['button_text_color'] : "#ffffff" ?>
|
||||
<div class="chaty-setting-col flex items-center space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44" for="button_text_color_for_<?php echo esc_attr($social['slug']); ?>"><?php esc_html_e("Text color", "chaty") ?></label>
|
||||
<div>
|
||||
<input id="button_text_color_for_<?php echo esc_attr($social['slug']); ?>" class="chaty-color-field button-color" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[button_text_color]" value="<?php echo esc_attr($fieldValue); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $fieldValue = isset($value['button_bg_color']) ? $value['button_bg_color'] : "#A886CD" ?>
|
||||
<div class="chaty-setting-col flex items-center space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44" for="button_bg_color_for_<?php echo esc_attr($social['slug']); ?>"><?php esc_html_e("Background color", "chaty") ?></label>
|
||||
<div>
|
||||
<input id="button_bg_color_for_<?php echo esc_attr($social['slug']); ?>" class="chaty-color-field button-color" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[button_bg_color]" value="<?php echo esc_attr($fieldValue); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $fieldValue = isset($value['button_text']) ? $value['button_text'] : "Chat" ?>
|
||||
<div class="chaty-setting-col sm:flex sm:items-center sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44" for="button_text_for_<?php echo esc_attr($social['slug']); ?>"><?php esc_html_e("Button text", "chaty") ?></label>
|
||||
<div>
|
||||
<input id="button_text_for_<?php echo esc_attr($social['slug']); ?>" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[button_text]" value="<?php echo esc_attr($fieldValue); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php $fieldValue = isset($value['thanks_message']) ? $value['thanks_message'] : "Your message was sent successfully" ?>
|
||||
<div class="chaty-setting-col sm:flex sm:items-center sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44" for="thanks_message_for_<?php echo esc_attr($social['slug']); ?>"><?php esc_html_e("Thank you message", "chaty") ?></label>
|
||||
<div>
|
||||
<input id="thanks_message_for_<?php echo esc_attr($social['slug']); ?>" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[thanks_message]" value="<?php echo esc_attr($fieldValue); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $fieldValue = isset($value['redirect_action']) ? $value['redirect_action'] : "no" ?>
|
||||
<div class="chaty-setting-col">
|
||||
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[redirect_action]" value="no">
|
||||
<label class="chaty-switch flex items-center font-primary text-cht-gray-150" for="redirect_action_<?php echo esc_attr($social['slug']); ?>">
|
||||
<input type="checkbox" class="chaty-redirect-setting" name="cht_social_<?php echo esc_attr($social['slug']); ?>[redirect_action]" id="redirect_action_<?php echo esc_attr($social['slug']); ?>" value="yes" <?php checked($fieldValue, "yes") ?>>
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e("Redirect visitors after submission", "chaty") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="redirect_action-settings <?php echo ($fieldValue == "yes") ? "active" : "" ?>">
|
||||
<?php $fieldValue = isset($value['redirect_link']) ? $value['redirect_link'] : "" ?>
|
||||
<div class="chaty-setting-col sm:flex sm:items-center sm:space-x-3 my-2">
|
||||
<label class="font-primary text-cht-gray-150 w-44" for="redirect_link_for_<?php echo esc_attr($social['slug']); ?>"><?php esc_html_e("Redirect link", "chaty") ?></label>
|
||||
<div>
|
||||
<input id="redirect_link_for_<?php echo esc_attr($social['slug']); ?>" placeholder="<?php echo site_url("/") ?>" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[redirect_link]" value="<?php echo esc_attr($fieldValue); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php $fieldValue = isset($value['link_in_new_tab']) ? $value['link_in_new_tab'] : "no" ?>
|
||||
<div class="chaty-setting-col sm:flex sm:items-center">
|
||||
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[link_in_new_tab]" value="no">
|
||||
<label class="chaty-switch font-primary text-cht-gray-150" for="link_in_new_tab_<?php echo esc_attr($social['slug']); ?>">
|
||||
<input type="checkbox" class="chaty-field-setting" name="cht_social_<?php echo esc_attr($social['slug']); ?>[link_in_new_tab]" id="link_in_new_tab_<?php echo esc_attr($social['slug']); ?>" value="yes" <?php checked($fieldValue, "yes") ?>>
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e("Open in a new tab", "chaty") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $fieldValue = isset($value['close_form_after']) ? $value['close_form_after'] : "no" ?>
|
||||
<div class="chaty-setting-col">
|
||||
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[close_form_after]" value="no">
|
||||
<label class="chaty-switch flex items-center font-primary text-cht-gray-150" for="close_form_after_<?php echo esc_attr($social['slug']); ?>">
|
||||
<input type="checkbox" class="chaty-close_form_after-setting" name="cht_social_<?php echo esc_attr($social['slug']); ?>[close_form_after]" id="close_form_after_<?php echo esc_attr($social['slug']); ?>" value="yes" <?php checked($fieldValue, "yes") ?>>
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e("Close form automatically after submission", "chaty") ?>
|
||||
<span class="icon label-tooltip inline-message hidden sm:inline-block" data-label="<?php esc_html_e("Close the form automatically after a few seconds based on your choice", "chaty") ?>">
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="close_form_after-settings <?php echo ($fieldValue == "yes") ? "active" : "" ?>">
|
||||
<?php $fieldValue = isset($value['close_form_after_seconds']) ? $value['close_form_after_seconds'] : "3" ?>
|
||||
<div class="chaty-setting-col sm:flex sm:items-center sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44" for="close_form_after_seconds_<?php echo esc_attr($social['slug']); ?>"><?php esc_html_e("Close after(Seconds)", "chaty") ?></label>
|
||||
<div>
|
||||
<input id="close_form_after_seconds_<?php echo esc_attr($social['slug']); ?>" type="number" min="0" name="cht_social_<?php echo esc_attr($social['slug']); ?>[close_form_after_seconds]" value="<?php echo esc_attr($fieldValue); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-field-setting-col my-3 space-y-4">
|
||||
<input type="hidden" value="no"name="cht_social_<?php echo esc_attr($social['slug']); ?>[send_leads_in_email]">
|
||||
<input type="hidden" value="yes" name="cht_social_<?php echo esc_attr($social['slug']); ?>[save_leads_locally]">
|
||||
<?php $fieldValue = isset($val['save_leads_locally']) ? $val['save_leads_locally'] : "yes" ?>
|
||||
<div class="chaty-setting-col">
|
||||
<label class="text-cht-gray-150 font-primary full-width chaty-switch" for="save_leads_locally_<?php echo esc_attr($social['slug']); ?>">
|
||||
<input type="checkbox" disabled id="save_leads_locally_<?php echo esc_attr($social['slug']); ?>" value="yes" name="cht_social_<?php echo esc_attr($social['slug']); ?>[save_leads_locally]" <?php checked($fieldValue, "yes") ?>>
|
||||
<div class="chaty-slider round"></div>
|
||||
Save leads to<a href="<?php echo admin_url("admin.php?page=chaty-contact-form-feed") ?>" target="_blank">this site</a>
|
||||
<div class="html-tooltip hidden sm:inline-block top no-position">
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="tooltip-text top">Your leads will be saved in your local database, you'll be able to find them <a target="_blank"href="<?php echo admin_url("admin.php?page=chaty-contact-form-feed") ?>">here</a></span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<?php $fieldValue = isset($value['send_leads_in_email']) ? $value['send_leads_in_email'] : "no" ?>
|
||||
<div class="chaty-setting-col">
|
||||
<label class="flex items-center group flex-wrap gap-2 text-cht-gray-150" for="save_leads_to_email_<?php echo esc_attr($social['slug']); ?>" class="email-setting full-width font-primary text-cht-gray-150">
|
||||
<div class="chaty-switch">
|
||||
<input class="email-setting-field" disabled type="checkbox" id="save_leads_to_email_<?php echo esc_attr($social['slug']); ?>" value="yes" name="cht_social_<?php echo esc_attr($social['slug']); ?>[send_leads_in_email]">
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e('Send leads to your email', 'chaty') ?>
|
||||
</div>
|
||||
<div>
|
||||
<span class="icon label-tooltip" data-label="Get your leads by email, whenever you get a new email you'll get an email notification">
|
||||
<span class="mt-1.5 inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<a class="opacity-0 px-5 py-1.5 group-hover:opacity-100 ml-4 pro-btn bg-cht-primary inline-block rounded-[6px] text-white hover:text-white" target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty');?>
|
||||
</a>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="email-settings <?php echo ($fieldValue == "yes") ? "active" : "" ?>">
|
||||
<div class="chaty-setting-col">
|
||||
<label for="email_for_<?php echo esc_attr($social['slug']); ?>"><?php esc_html_e("Email address", "chaty") ?></label>
|
||||
<div>
|
||||
<?php $fieldValue = isset($value['email_address']) ? $value['email_address'] : "" ?>
|
||||
<input id="email_for_<?php echo esc_attr($social['slug']); ?>" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[email_address]" value="<?php echo esc_attr($fieldValue); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="chaty-setting-col">
|
||||
<label for="sender_name_for_<?php echo esc_attr($social['slug']); ?>"><?php esc_html_e("Sender's name", "chaty") ?></label>
|
||||
<div>
|
||||
<?php $fieldValue = isset($value['sender_name']) ? $value['sender_name'] : "" ?>
|
||||
<input id="sender_name_for_<?php echo esc_attr($social['slug']); ?>" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[sender_name]" value="<?php echo esc_attr($fieldValue); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="chaty-setting-col">
|
||||
<label for="email_subject_for_<?php echo esc_attr($social['slug']); ?>"><?php esc_html_e("Email subject", "chaty") ?></label>
|
||||
<div>
|
||||
<?php $fieldValue = isset($value['email_subject']) ? $value['email_subject'] : "New lead from Chaty - {name} - {date} {hour}" ?>
|
||||
<input id="email_subject_for_<?php echo esc_attr($social['slug']); ?>" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[email_subject]" value="<?php echo esc_attr($fieldValue); ?>">
|
||||
<div class="mail-merge-tags">
|
||||
<span>{name}</span><span>{phone}</span><span>{email}</span><span>{date}</span><span>{hour}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $field_value = isset($value['enable_recaptcha']) ? $value['enable_recaptcha'] : "no" ?>
|
||||
<input type="hidden" value="no" name="cht_social_<?php echo esc_attr($social['slug']); ?>[enable_recaptcha]" >
|
||||
<div class="chaty-setting-col">
|
||||
<label class="flex items-center group flex-wrap gap-2 text-cht-gray-150" for="enable_recaptcha_<?php echo esc_attr($social['slug']); ?>" class="email-setting full-width font-primary text-cht-gray-150">
|
||||
<div class="chaty-switch">
|
||||
<input class="captcha-setting-field" type="checkbox" id="enable_recaptcha_<?php echo esc_attr($social['slug']); ?>" value="yes" name="cht_social_<?php echo esc_attr($social['slug']); ?>[enable_recaptcha]" <?php checked($field_value, "yes") ?> disabled>
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e('Enable reCAPTCHA', 'chaty') ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center">
|
||||
<?php printf(esc_html__("Click %s to add your website. (please make sure you select V3). After adding your website you'll get your site Key and secret key.", "chaty"), "<a target='_blank' href='https://www.google.com/recaptcha/admin/create'>".esc_html__("here", "chaty")."</a>") ?>
|
||||
</span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<a class="opacity-0 px-5 py-1.5 group-hover:opacity-100 ml-4 pro-btn bg-cht-primary inline-block rounded-[6px] text-white hover:text-white" target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty');?>
|
||||
</a>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Whatsapp-settings advanced-settings">
|
||||
<?php $preSetMessage = isset($value['pre_set_message']) ? $value['pre_set_message'] : ""; ?>
|
||||
<div class="chaty-setting-col sm:flex items-start space-y-2 sm:space-y-0 sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44 mt-2">
|
||||
<?php esc_html_e("Pre Set Message", "chaty") ?>
|
||||
<span class="icon label-tooltip inline-tooltip"data-label="Add your own pre-set message that's automatically added to the user's message. You can also use merge tags and add the URL or the title of the current visitor's page. E.g. you can add the current URL of a product to the message so you know which product the visitor is talking about when the visitor messages you">
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="inline-block" width="20" height="27" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div class="pro-features">
|
||||
<div class="pro-item">
|
||||
<?php $preSetMessage = isset($value['pre_set_message']) ? $value['pre_set_message'] : ""; ?>
|
||||
<input disabled id="cht_social_message_<?php echo esc_attr($social['slug']); ?>" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[pre_set_message]" value="<?php echo esc_attr($preSetMessage) ?>">
|
||||
<span class="supported-tags mt-2">
|
||||
<span class="icon label-tooltip support-tooltip" data-label="{title} tag grabs the page title of the webpage">{title}</span> and <span class="icon label-tooltip support-tooltip" data-label="{url} tag grabs the URL of the page">{url}</span> tags are supported
|
||||
</span>
|
||||
</div>
|
||||
<div class="pro-button h-[44px]">
|
||||
<a target="_blank" class="rounded-[6px]" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_html_e('Upgrade to Pro', 'chaty');?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Email-settings advanced-settings">
|
||||
<div class="chaty-setting-col sm:flex items-start sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44 space-x-2"><?php esc_html_e("Mail Subject", "chaty") ?>
|
||||
<span class="icon label-tooltip inline-tooltip" data-label="Add your own pre-set message that's automatically added to the user's message. You can also use merge tags and add the URL or the title of the current visitor's page. E.g. you can add the current URL of a product to the message so you know which product the visitor is talking about when the visitor messages you">
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round">
|
||||
</path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div>
|
||||
<div class="pro-features">
|
||||
<div class="pro-item">
|
||||
<input disabled id="cht_social_message_<?php echo esc_attr($social['slug']); ?>" type="text" name="" value="">
|
||||
<span class="supported-tags mt-2"><span class="icon label-tooltip support-tooltip" data-label="{title} tag grabs the page title of the webpage">{title}</span> and <span class="icon label-tooltip support-tooltip" data-label="{url} tag grabs the URL of the page">{url}</span> tags aresupported</span>
|
||||
</div>
|
||||
<div class="pro-button">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_html_e('Upgrade to Pro', 'chaty');?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="WeChat-settings advanced-settings">
|
||||
<div class="chaty-setting-col flex items-center space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44"><?php esc_html_e("Upload QR Code", "chaty") ?></label>
|
||||
<div>
|
||||
<a target="_blank" class="cht-upload-image-pro" id="upload_qr_code" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>">
|
||||
<span class="dashicons dashicons-upload"></span>
|
||||
</a>
|
||||
<a target="_blank" class="text-cht-primary hover:text-cht-primary hover:underline font-primary" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_html_e('Upgrade to Pro', 'chaty');?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="Link-settings Custom_Link-settings Custom_Link_3-settings Custom_Link_4-settings Custom_Link_5-settings advanced-settings">
|
||||
<?php $isChecked = (!isset($value['new_window']) || $value['new_window'] == 1) ? 1 : 0; ?>
|
||||
<div class="clear clearfix"></div>
|
||||
<div class="chaty-setting-col flex items-center space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 sm:w-44"><?php esc_html_e("Open In a New Tab", "chaty") ?></label>
|
||||
<div>
|
||||
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[new_window]" value="0">
|
||||
<label class="channels__view" for="cht_social_window_<?php echo esc_attr($social['slug']); ?>">
|
||||
<input id="cht_social_window_<?php echo esc_attr($social['slug']); ?>" type="checkbox" class="channels__view-check" name="cht_social_<?php echo esc_attr($social['slug']); ?>[new_window]" value="1" <?php checked($isChecked,1) ?>>
|
||||
<span class="chaty-slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Linkedin-settings advanced-settings">
|
||||
<?php $isChecked = "personal"; ?>
|
||||
<!-- Advance setting for Custom Link -->
|
||||
<div class="chaty-setting-col sm:flex sm:items-center sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44"><?php esc_html_e("LinkedIn", "chaty") ?></label>
|
||||
<div class="cta-action-radio tab-tab-select bg-cht-gray-50 inline-block rounded-md p-1">
|
||||
<div class="i-block">
|
||||
<label class="custom-control custom-radio">
|
||||
<input type="radio" name="cht_social_<?php echo esc_attr($social['slug']); ?>[link_type]" class="custom-control-input" <?php checked($isChecked, "personal") ?> value="personal" />
|
||||
<span class="custom-control-label px-2 py-1 inline-block text-cht-gray-150 rounded-[3px]"><?php esc_html_e("Personal", "chaty") ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="i-block">
|
||||
<label class="custom-control custom-radio">
|
||||
<input type="radio" name="cht_social_<?php echo esc_attr($social['slug']); ?>[link_type]" class="custom-control-input" <?php checked($isChecked, "company") ?> value="company" />
|
||||
<span class="custom-control-label px-2 py-1 inline-block text-cht-gray-150 rounded-[3px]"><?php esc_html_e("Company", "chaty") ?></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $useWhatsappWeb = isset($value['use_whatsapp_web']) ? $value['use_whatsapp_web'] : "yes"; ?>
|
||||
<div class="Whatsapp-settings advanced-settings">
|
||||
<div class="chaty-setting-col sm:flex items-start space-y-2 sm:space-y-0 sm:space-x-3">
|
||||
<label class="font-primary text-cht-gray-150 w-44 mt-2"><?php esc_html_e("Whatsapp Web", "chaty") ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e("If unchecked, visitors will be redirected to chat with you via the WhatsApp desktop app. Please note if they don't have it installed, they'll be redirected to WhatsApp Web", 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[use_whatsapp_web]" value="no" />
|
||||
<div>
|
||||
<div class="checkbox">
|
||||
<label for="cht_social_<?php echo esc_attr($social['slug']); ?>_use_whatsapp_web" class="chaty-checkbox font-primary text-cht-gray-150">
|
||||
<input class="sr-only" type="checkbox" id="cht_social_<?php echo esc_attr($social['slug']); ?>_use_whatsapp_web" name="cht_social_<?php echo esc_attr($social['slug']); ?>[use_whatsapp_web]" value="yes" <?php echo checked($useWhatsappWeb, "yes") ?> />
|
||||
<span></span>
|
||||
<?php esc_html_e("Use Whatsapp Web directly on desktop", "chaty") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- advance setting fields: end -->
|
||||
|
||||
<!-- remove social media setting button: start -->
|
||||
<button type="button" class="btn-cancel absolute right-2 top-2 text-cht-gray-150 hover:text-red-500" data-social="<?php echo esc_attr($social['slug']); ?>">
|
||||
<svg class="pointer-events-none" data-v-1cf7b632="" width="18" height="18" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" svg-inline="" focusable="false" tabindex="-1">
|
||||
<path data-v-1cf7b632="" d="M2 4h12M5.333 4V2.667a1.333 1.333 0 011.334-1.334h2.666a1.333 1.333 0 011.334 1.334V4m2 0v9.333a1.334 1.334 0 01-1.334 1.334H4.667a1.334 1.334 0 01-1.334-1.334V4h9.334z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<!-- remove social media setting button: end -->
|
||||
|
||||
</div>
|
||||
<!-- channel default settings end -->
|
||||
</li>
|
||||
<!-- Social media setting box: end -->
|
||||
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
/**
|
||||
* Contact form leads
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div style="display: none">
|
||||
<?php
|
||||
$embeddedMessage = "";
|
||||
$settings = [
|
||||
'media_buttons' => false,
|
||||
'wpautop' => false,
|
||||
'drag_drop_upload' => false,
|
||||
'textarea_name' => 'chat_editor_channel',
|
||||
'textarea_rows' => 4,
|
||||
'quicktags' => false,
|
||||
'tinymce' => [
|
||||
'toolbar1' => 'bold, italic, underline',
|
||||
'toolbar2' => '',
|
||||
'toolbar3' => '',
|
||||
],
|
||||
];
|
||||
wp_editor($embeddedMessage, "chat_editor_channel", $settings);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<section class="section one chaty-setting-form" xmlns="http://www.w3.org/1999/html">
|
||||
<?php
|
||||
$chtWidgetTitle = get_option("cht_widget_title");
|
||||
$chtWidgetTitle = empty($chtWidgetTitle) ? "Widget-1" : $chtWidgetTitle;
|
||||
if (isset($_GET['widget_title']) && empty(!$_GET['widget_title'])) {
|
||||
$chtWidgetTitle = filter_input(INPUT_GET, 'widget_title');
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="chaty-input mb-10">
|
||||
<label class="font-primary text-cht-gray-150 text-base block mb-3" for="cht_widget_title"><?php esc_html_e('Name', 'chaty'); ?></label>
|
||||
<input class="w-full sm:w-96" id="cht_widget_title" type="text" name="cht_widget_title" value="<?php echo esc_attr($chtWidgetTitle) ?>">
|
||||
</div>
|
||||
<?php
|
||||
// } ?>
|
||||
<?php
|
||||
$socialApp = get_option('cht_numb_slug');
|
||||
$socialApp = trim($socialApp, ",");
|
||||
$socialApp = explode(",", $socialApp);
|
||||
$socialApp = array_unique($socialApp);
|
||||
$imageUrl = plugin_dir_url("")."chaty/admin/assets/images/chaty-default.png";
|
||||
?>
|
||||
<input type="hidden" id="default_image" value="<?php echo esc_url($imageUrl) ?>" />
|
||||
<div class="channels-icons flex max-w-full flex-wrap" id="channel-list">
|
||||
<?php if ($this->socials) :
|
||||
foreach ($this->socials as $key => $social) :
|
||||
$value = get_option('cht_social'.'_'.$social['slug']);
|
||||
$activeClass = '';
|
||||
foreach ($socialApp as $keySoc) :
|
||||
if ($keySoc == $social['slug']) {
|
||||
$activeClass = 'active';
|
||||
}
|
||||
endforeach;
|
||||
$customClass = in_array($social['slug'], array("Link", "Custom_Link", "Custom_Link_3", "Custom_Link_4", "Custom_Link_5", "Custom_Link_6"))?"custom-link":"";
|
||||
?>
|
||||
<div class="icon cursor-pointer icon-sm chat-channel-<?php echo esc_attr($social['slug']); ?> <?php echo esc_attr($activeClass) ?> <?php echo esc_attr($customClass) ?>" data-social="<?php echo esc_attr($social['slug']); ?>" data-label="<?php echo esc_attr($social['title']); ?>">
|
||||
<span class="icon-box">
|
||||
<?php echo $social['svg']; ?>
|
||||
</span>
|
||||
<span class="channel-title"><?php echo esc_html($social['title']); ?></span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="custom-channel-button">
|
||||
<a href="#">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" svg-inline="" focusable="false" tabindex="-1"><path d="M15.833 1.75H4.167A2.417 2.417 0 001.75 4.167v11.666a2.417 2.417 0 002.417 2.417h11.666a2.417 2.417 0 002.417-2.417V4.167a2.417 2.417 0 00-2.417-2.417zM10 6.667v6.666" stroke="#83A1B7" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.667 10h6.666" stroke="#83A1B7" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"></path></svg>
|
||||
<?php esc_html_e('Custom Channel', 'chaty'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="add_slug" name="cht_numb_slug" placeholder="test" value="<?php echo esc_attr(get_option('cht_numb_slug')); ?>" id="cht_numb_slug" >
|
||||
|
||||
<div class="channels-selected mt-4" id="channels-selected-list">
|
||||
<div class="channel-empty-state relative <?php echo esc_attr(count($this->socials) == 0?"active":"") ?>"">
|
||||
<img class="-left-3 sm:-left-5 md:-left-8 relative" src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/empty-state-star.png") ?>"/>
|
||||
<p class="absolute top-4 left-0 text-base text-cht-gray-150 w-52 text-center opacity-60"><?php esc_html_e('So many channels to choose from...', 'chaty'); ?></p>
|
||||
</div>
|
||||
<ul id="channels-selected-list" class="channels-selected-list channels-selected">
|
||||
<?php if ($this->socials) {
|
||||
$social = get_option('cht_numb_slug');
|
||||
$social = explode(",", $social);
|
||||
$social = array_unique($social);
|
||||
foreach ($social as $keySoc) {
|
||||
foreach ($this->socials as $key => $social) {
|
||||
if ($social['slug'] != $keySoc) {
|
||||
// compare social media slug
|
||||
continue;
|
||||
}
|
||||
|
||||
include "channel.php";
|
||||
?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php }; ?>
|
||||
<?php
|
||||
$proClass = "free";
|
||||
$text = get_option("cht_close_button_text");
|
||||
$text = strip_tags(($text === false) ? "Hide" : $text);
|
||||
?>
|
||||
<!-- close setting strat -->
|
||||
<li class="chaty-cls-setting" data-id="" id="chaty-social-close">
|
||||
<div class="channels-selected__item pro 1 available flex items-start space-x-3 ml-4">
|
||||
<div class="chaty-default-settings">
|
||||
<div class="move-icon hidden">
|
||||
<img src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/move-icon.png") ?>" style="opacity:0"; />
|
||||
</div>
|
||||
<div class="icon icon-md active" data-label="close">
|
||||
<span id="image_data_close">
|
||||
<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="26" cy="26" rx="26" ry="26" fill="#A886CD"></ellipse><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"></rect><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"></rect></svg>
|
||||
</span>
|
||||
<span class="default_image_close" style="display: none;">
|
||||
<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="26" cy="26" rx="26" ry="26" fill="#A886CD"></ellipse><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"></rect><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"></rect></svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="channels__input-box cls-btn-settings active">
|
||||
<input type="text" class="channels__input" name="cht_close_button_text" value="<?php echo esc_attr((wp_unslash($text))) ?>" >
|
||||
</div>
|
||||
<div class="input-example cls-btn-settings active font-primary text-cht-gray-150 text-base mt-1">
|
||||
<?php esc_html_e('On hover Close button text', 'chaty'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!-- close setting end -->
|
||||
</ul>
|
||||
|
||||
<div class="channels-selected__item disabled" style="opacity: 0; display: none;"></div>
|
||||
|
||||
<input type="hidden" id="is_pro_plugin" value="0" />
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
var PRO_PLUGIN_URL = "<?php echo esc_url(CHT_PRO_URL) ?>";
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
<?php
|
||||
/**
|
||||
* Chaty Deactivate Form
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
.chaty-hidden {
|
||||
overflow: hidden;
|
||||
}
|
||||
.chaty-popup-overlay .chaty-internal-message {
|
||||
margin: 3px 0 3px 22px;
|
||||
display: none;
|
||||
}
|
||||
.chaty-reason-input {
|
||||
margin: 3px 0 3px 22px;
|
||||
display: none;
|
||||
}
|
||||
.chaty-reason-input input[type="text"] {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
.chaty-popup-overlay {
|
||||
background: rgba(0, 0, 0, .8);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
overflow: auto;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease-in-out :
|
||||
}
|
||||
.chaty-popup-overlay.chaty-active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
.chaty-serveypanel {
|
||||
width: 600px;
|
||||
background: #fff;
|
||||
margin: 65px auto 0;
|
||||
}
|
||||
.chaty-popup-header {
|
||||
background: #f1f1f1;
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.chaty-popup-header h2 {
|
||||
margin: 0;
|
||||
}
|
||||
.chaty-popup-body {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.chaty-popup-footer {
|
||||
background: #f9f3f3;
|
||||
padding: 10px 20px;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
.chaty-popup-footer:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
.action-btns {
|
||||
float: right;
|
||||
}
|
||||
.chaty-anonymous {
|
||||
display: none;
|
||||
}
|
||||
.attention, .error-message {
|
||||
color: red;
|
||||
font-weight: 600;
|
||||
display: none;
|
||||
}
|
||||
.chaty-spinner {
|
||||
display: none;
|
||||
}
|
||||
.chaty-spinner img {
|
||||
margin-top: 3px;
|
||||
}
|
||||
.chaty-hidden-input {
|
||||
padding: 10px 0 0;
|
||||
display: none;
|
||||
}
|
||||
.chaty-hidden-input input[type='text'] {
|
||||
padding: 0 10px;
|
||||
width: 100%;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
}
|
||||
.chaty--popup-overlay textarea {
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
span.chaty-error-message {
|
||||
color: #dd0000;
|
||||
font-weight: 600;
|
||||
}
|
||||
.chaty-popup-body h3 {
|
||||
line-height: 24px;
|
||||
}
|
||||
.chaty-popup-body textarea {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
}
|
||||
.chaty--popup-overlay .form-control input {
|
||||
width: 100%;
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
.chaty-serveypanel .form-control input {
|
||||
width: 100%;
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
</style>
|
||||
<!-- modal for plugin deactivation popup -->
|
||||
<div class="chaty-popup-overlay">
|
||||
<div class="chaty-serveypanel">
|
||||
<!-- form start -->
|
||||
<form action="#" method="post" id="chaty-deactivate-form">
|
||||
<div class="chaty-popup-header font-medium">
|
||||
<h2><?php esc_html_e('Quick feedback about Chaty', 'chaty'); ?> 🙏</h2>
|
||||
</div>
|
||||
<div class="chaty-popup-body">
|
||||
<h3><?php esc_html_e('Your feedback will help us improve the product, please tell us why did you decide to deactivate Chaty :)', 'chaty'); ?></h3>
|
||||
<div class="form-control">
|
||||
<input type="email" value="<?php echo get_option('admin_email') ?>" placeholder="<?php echo _e("Email address", 'chaty') ?>" id="chaty-deactivation-email_id">
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<label></label>
|
||||
<textarea placeholder="<?php esc_html_e("Your comment", 'chaty') ?>" id="chaty-deactivation-comment"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chaty-popup-footer">
|
||||
<label class="chaty-anonymous">
|
||||
<input type="checkbox"/><?php esc_html_e('Anonymous feedback', 'chaty'); ?>
|
||||
</label>
|
||||
<input type="button" class="button button-secondary button-skip chaty-popup-skip-feedback" value="Skip & Deactivate">
|
||||
<div class="action-btns">
|
||||
<span class="chaty-spinner"><img src="<?php echo esc_url(admin_url('/images/spinner.gif')); ?>" alt=""></span>
|
||||
<input type="submit" class="button button-secondary button-deactivate chaty-popup-allow-deactivate" value="Submit & Deactivate" disabled="disabled">
|
||||
<a href="#" class="button button-primary chaty-popup-button-close"><?php esc_html_e('Cancel', 'chaty'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function ($) {
|
||||
$(function () {
|
||||
var chatyPluginSlug = 'chaty';
|
||||
// Code to fire when the DOM is ready.
|
||||
$(document).on('click', 'tr[data-slug="' + chatyPluginSlug + '"] .deactivate', function (e) {
|
||||
e.preventDefault();
|
||||
$('.chaty-popup-overlay').addClass('chaty-active');
|
||||
$('body').addClass('chaty-hidden');
|
||||
});
|
||||
$(document).on('click', '.chaty-popup-button-close', function () {
|
||||
close_popup();
|
||||
});
|
||||
$(document).on('click', ".chaty-serveypanel,tr[data-slug='" + chatyPluginSlug + "'] .deactivate", function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
$(document).click(function () {
|
||||
close_popup();
|
||||
});
|
||||
$('.chaty-reason label').on('click', function () {
|
||||
$(".chaty-hidden-input").hide();
|
||||
jQuery(".chaty-error-message").remove();
|
||||
if ($(this).find('input[type="radio"]').is(':checked')) {
|
||||
$(this).closest("li").find('.chaty-hidden-input').show();
|
||||
}
|
||||
});
|
||||
$(document).on("keyup", "#chaty-deactivation-comment", function(){
|
||||
if($.trim($(this).val()) == "") {
|
||||
$(".chaty-popup-allow-deactivate").attr("disabled", true);
|
||||
} else {
|
||||
$(".chaty-popup-allow-deactivate").attr("disabled", false);
|
||||
}
|
||||
});
|
||||
$('input[type="radio"][name="chaty-selected-reason"]').on('click', function (event) {
|
||||
$(".chaty-popup-allow-deactivate").removeAttr('disabled');
|
||||
});
|
||||
$(document).on('submit', '#chaty-deactivate-form', function (event) {
|
||||
event.preventDefault();
|
||||
_reason = "";
|
||||
if(jQuery.trim(jQuery("#chaty-deactivation-comment").val()) == "") {
|
||||
jQuery("#alt_plugin").after("<span class='chaty-error-message'>Please provide your feedback</span>");
|
||||
return false;
|
||||
} else {
|
||||
_reason = jQuery.trim(jQuery("#chaty-deactivation-comment").val());
|
||||
}
|
||||
jQuery('[name="chaty-selected-reason"]:checked').val();
|
||||
var email_id = jQuery.trim(jQuery("#chaty-deactivation-email_id").val());
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action: 'chaty_plugin_deactivate',
|
||||
reason: _reason,
|
||||
email_id: email_id,
|
||||
nonce: '<?php echo esc_attr(wp_create_nonce("chaty_deactivate_nonce")) ?>'
|
||||
},
|
||||
beforeSend: function () {
|
||||
$(".chaty-spinner").show();
|
||||
$(".chaty-popup-allow-deactivate").attr("disabled", "disabled");
|
||||
}
|
||||
}).done(function () {
|
||||
$(".chaty-spinner").hide();
|
||||
$(".chaty-popup-allow-deactivate").removeAttr("disabled");
|
||||
window.location.href = $("tr[data-slug='" + chatyPluginSlug + "'] .deactivate a").attr('href');
|
||||
});
|
||||
});
|
||||
$('.chaty-popup-skip-feedback').on('click', function (e) {
|
||||
window.location.href = $("tr[data-slug='" + chatyPluginSlug + "'] .deactivate a").attr('href');
|
||||
});
|
||||
function close_popup() {
|
||||
$('.chaty-popup-overlay').removeClass('chaty-active');
|
||||
$('#chaty-deactivate-form').trigger("reset");
|
||||
$(".chaty-popup-allow-deactivate").attr('disabled', 'disabled');
|
||||
$(".chaty-reason-input").hide();
|
||||
$('body').removeClass('chaty-hidden');
|
||||
$('.message.error-message').hide();
|
||||
}
|
||||
});
|
||||
})(jQuery); // This invokes the function above and allows us to use '$' in place of 'jQuery' in our code.
|
||||
</script>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Contact form leads
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div class="chaty-popup" id="chaty-intro-popup" style="display: block">
|
||||
<div class="chaty-popup-box shadow-xl rounded-lg bg-white px-8 py-10 text-center bg-cover bg-no-repeat" style="background-image: url(<?php echo esc_url(CHT_PLUGIN_URL.'images/popup-bg.png'); ?>)">
|
||||
|
||||
<button class="close-chaty-popup text-white bg-cht-gray-150 absolute right-2 top-2 hover:bg-slate-600" style="line-height: 1px">
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M15 5L5 15" stroke="currentColor" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M5 5L15 15" stroke="currentColor" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<a href="<?php echo esc_url( $this->getDashboardUrl() ) ?>">
|
||||
<img class="mx-auto mb-4 inline-block" src="<?php echo esc_url(CHT_PLUGIN_URL.'admin/assets/images/logo-color.svg'); ?>"/>
|
||||
</a>
|
||||
<h2 class="font-primary text-cht-gray-150 text-3xl mb-3">Welcome to Chaty 🎉</h2>
|
||||
<p class="font-primary text-base text-cht-gray-150 max-w-[558px] mb-5 mx-auto">
|
||||
Select chat channels that you'd like to add to your store, and fill out your info. For more info visit our <a class="text-primary hover:unde" target="_blank" href="https://premio.io/help/chaty/?utm_soruce=wordpresschaty">Help Center</a> and check the video.
|
||||
</p>
|
||||
|
||||
<iframe class="font-primary text-sm text-cht-gray-150 mb-8 w-[530px] mx-auto bg-cht-primary/40 rounded-xl" height="300" src="https://www.youtube.com/embed/i6t05AeuyWg?rel=0&start=28"></iframe>
|
||||
|
||||
<button class="btn rounded-md text-base shadow-lg inline-flex items-center space-x-2 shadow-cht-primary/60 font-normal font-primary" type="button">
|
||||
<span>Go to Chaty</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<input type="hidden" id="chaty_update_popup_status" value="<?php echo wp_create_nonce("chaty_update_popup_status") ?>">
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* Contact form leads
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
*
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$data = [
|
||||
'logo' => CHT_PLUGIN_URL . 'admin/assets/images/logo-color.svg',
|
||||
'upgrade_url' => $this->getUpgradeMenuItemUrl(),
|
||||
'upgrade_text' => esc_html__('Upgrade to Pro', 'chaty'),
|
||||
'title' => esc_html__( 'Create a new Chaty widgets for your website. What can you use it for?', 'chaty' ),
|
||||
'features' => array(
|
||||
[
|
||||
'logo' => CHT_PLUGIN_URL . "admin/assets/images/pro-devices.png",
|
||||
'title' => esc_html__("Create separate designs for desktop and mobile", "chaty"),
|
||||
'desc' => esc_html__("E.g. the mobile version can have a bigger widget, in a different color and a different position", "chaty")
|
||||
],
|
||||
[
|
||||
'logo' => CHT_PLUGIN_URL . "admin/assets/images/pro-language.png",
|
||||
'title' => esc_html__("Create separate designs for desktop and mobile", "chaty"),
|
||||
'desc' => esc_html__("You can show different form and buttons based on URL (E.g. WhatsApp message to a French number and call your French phone number)", "chaty")
|
||||
],
|
||||
[
|
||||
'logo' => CHT_PLUGIN_URL . "admin/assets/images/pro-widget.png",
|
||||
'title' => esc_html__("Show separate widgets for different products", "chaty"),
|
||||
'desc' => esc_html__("On your website (e.g. you can show the Facebook Messenger channel for products in the yourdomain.com/high-end/* category)", "chaty")
|
||||
],
|
||||
[
|
||||
'logo' => CHT_PLUGIN_URL . "admin/assets/images/pro-page.png",
|
||||
'title' => esc_html__("Display different channels for your landing pages", "chaty"),
|
||||
'desc' => esc_html__("This way you can track the results better and have the right person assign to the relevant channel.", "chaty")
|
||||
],
|
||||
[
|
||||
'logo' => CHT_PLUGIN_URL . "admin/assets/images/pro-support.png",
|
||||
'title' => esc_html__("Show one widget on your support and contact pages", "chaty"),
|
||||
'desc' => esc_html__("and a different widget on your sales pages.", "chaty")
|
||||
],
|
||||
[
|
||||
'logo' => CHT_PLUGIN_URL . "admin/assets/images/pro-chat.png",
|
||||
'title' => esc_html__("Display different call-to-action messages", "chaty"),
|
||||
'desc' => esc_html__("for different pages on your website or separate call-to-action messages for mobile and desktop", "chaty")
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
?>
|
||||
<div class="container mt-6">
|
||||
<a href="<?php echo esc_url( $this->getDashboardUrl() ) ?>">
|
||||
<img src="<?php echo esc_url($data['logo']); ?>" alt="Chaty" class="logo">
|
||||
</a>
|
||||
<header class="flex py-4 flex-col items-start sm:flex-row sm:justify-between">
|
||||
<h2 class="font-primary text-cht-gray-150 text-[26px] font-semibold">
|
||||
<?php echo esc_attr($data['title']) ?>
|
||||
</h2>
|
||||
<a class="btn text-base mt-3 sm:mt-0 rounded-lg font-normal border-cht-primary bg-cht-primary text-white drop-shadow-3xl" href="<?php echo esc_url($data['upgrade_url']); ?>">
|
||||
<?php echo esc_attr($data['upgrade_text']) ?>
|
||||
</a>
|
||||
</header>
|
||||
<main>
|
||||
<div class="chaty-new-widget-row">
|
||||
<ul class="grid grid-cols-1 sm:grid-cols-3 gap-5 mt-2">
|
||||
<?php foreach( $data['features'] as $item ): ?>
|
||||
<li class="bg-white shadow-cht-gray-150/10 rounded-xl border border-solid border-gray-300 overflow-hidden">
|
||||
<div class="p-5 border-b-4 border-cht-primary h-full">
|
||||
<img class="mb-5" src="<?php echo esc_url($item['logo']) ?>"/>
|
||||
<h2 class="text-cht-gray-150 pb-3 font-semibold font-primary text-[18px]"><?php echo esc_attr($item['title']) ?></h2>
|
||||
<p class="text-sm font-primary font-normal text-[#49687ECC]"><?php echo esc_attr($item['desc']) ?></p>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
@@ -0,0 +1,396 @@
|
||||
<?php
|
||||
/**
|
||||
* Contact form leads
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $wpdb;
|
||||
$tableName = $wpdb->prefix.'chaty_contact_form_leads';
|
||||
|
||||
$paged = filter_input(INPUT_GET, 'paged');
|
||||
$current = isset($paged)&&!empty($paged)&&is_numeric($paged)&&$paged > 0 ? $paged : 1;
|
||||
$current = intval($current);
|
||||
|
||||
$searchFor = "all_time";
|
||||
$searchList = [
|
||||
'today' => esc_html__('Today', 'chaty'),
|
||||
'yesterday' => esc_html__('Yesterday', 'chaty'),
|
||||
'last_7_days' => esc_html__('Last 7 Days', 'chaty'),
|
||||
'last_30_days' => esc_html__('Last 30 Days', 'chaty'),
|
||||
'this_week' => esc_html__('This Week', 'chaty'),
|
||||
'this_month' => esc_html__('This Month', 'chaty'),
|
||||
'all_time' => esc_html__('All Time', 'chaty'),
|
||||
'custom' => esc_html__('Custom Date', 'chaty')
|
||||
];
|
||||
|
||||
$searchFor = filter_input(INPUT_GET, 'search_for');
|
||||
if (isset($searchFor) && !empty($searchFor) && isset($searchList[$searchFor])) {
|
||||
$searchFor = esc_attr($searchFor);
|
||||
} else {
|
||||
$searchFor = "all_time";
|
||||
}
|
||||
|
||||
$startDate = "";
|
||||
$endDate = "";
|
||||
if ($searchFor == "today") {
|
||||
$startDate = date("Y-m-d");
|
||||
$endDate = date("Y-m-d");
|
||||
} else if ($searchFor == "yesterday") {
|
||||
$startDate = date("Y-m-d", strtotime("-1 days"));
|
||||
$endDate = date("Y-m-d", strtotime("-1 days"));
|
||||
} else if ($searchFor == "last_7_days") {
|
||||
$startDate = date("Y-m-d", strtotime("-7 days"));
|
||||
$endDate = date("Y-m-d");
|
||||
} else if ($searchFor == "last_30_days") {
|
||||
$startDate = date("Y-m-d", strtotime("-30 days"));
|
||||
$endDate = date("Y-m-d");
|
||||
} else if ($searchFor == "this_week") {
|
||||
$startDate = date("Y-m-d", strtotime('monday this week'));
|
||||
$endDate = date("Y-m-d");
|
||||
} else if ($searchFor == "this_month") {
|
||||
$startDate = date("Y-m-01");
|
||||
$endDate = date("Y-m-d");
|
||||
} else if ($searchFor == "custom") {
|
||||
$startDate = filter_input(INPUT_GET, 'start_date');
|
||||
if (!empty($startDate)) {
|
||||
$startDate = esc_attr($startDate);
|
||||
} else {
|
||||
$startDate = "";
|
||||
}
|
||||
|
||||
$endDate = filter_input(INPUT_GET, 'end_date');
|
||||
if (!empty($endDate)) {
|
||||
$endDate = esc_attr($endDate);
|
||||
} else {
|
||||
$endDate = "";
|
||||
}
|
||||
}//end if
|
||||
|
||||
$hasSearch = filter_input(INPUT_GET, 'search');
|
||||
$hasSearch = isset($hasSearch)&&!empty($hasSearch) ? $hasSearch : false;
|
||||
|
||||
$query = "SELECT count(id) as total_records FROM ".$tableName;
|
||||
$search = "";
|
||||
|
||||
$condition = "";
|
||||
$conditionArray = [];
|
||||
if ($hasSearch !== false) {
|
||||
$search = $hasSearch;
|
||||
$hasSearch = '%'.esc_sql($hasSearch).'%';
|
||||
$condition .= " (name LIKE %s OR email LIKE %s OR phone_number LIKE %s OR message LIKE %s)";
|
||||
$conditionArray[] = $hasSearch;
|
||||
$conditionArray[] = $hasSearch;
|
||||
$conditionArray[] = $hasSearch;
|
||||
$conditionArray[] = $hasSearch;
|
||||
}
|
||||
|
||||
$startDate = esc_attr($startDate);
|
||||
$endDate = esc_attr($endDate);
|
||||
if (!empty($startDate) && !empty($endDate)) {
|
||||
if (!empty($condition)) {
|
||||
$condition .= " AND ";
|
||||
}
|
||||
|
||||
$cStartDate = date("Y-m-d 00:00:00", strtotime($startDate));
|
||||
$cEndDate = date("Y-m-d 23:59:59", strtotime($endDate));
|
||||
$condition .= " created_on >= %s AND created_on <= %s";
|
||||
$conditionArray[] = $cStartDate;
|
||||
$conditionArray[] = $cEndDate;
|
||||
}
|
||||
|
||||
if (!empty($condition)) {
|
||||
$query .= " WHERE ".$condition;
|
||||
}
|
||||
|
||||
$query .= " ORDER BY ID DESC";
|
||||
|
||||
if (!empty($conditionArray)) {
|
||||
$query = $wpdb->prepare($query, $conditionArray);
|
||||
}
|
||||
|
||||
$totalRecords = $wpdb->get_var($query);
|
||||
$perPage = 15;
|
||||
$totalPages = ceil($totalRecords / $perPage);
|
||||
|
||||
$query = "SELECT * FROM ".$tableName;
|
||||
if (!empty($condition)) {
|
||||
$query .= " WHERE ".$condition;
|
||||
}
|
||||
|
||||
if ($current > $totalPages) {
|
||||
$current = 1;
|
||||
}
|
||||
|
||||
$startFrom = (($current - 1) * $perPage);
|
||||
|
||||
$query .= " ORDER BY ID DESC";
|
||||
$query .= " LIMIT $startFrom, $perPage";
|
||||
|
||||
if (!empty($conditionArray)) {
|
||||
$query = $wpdb->prepare($query, $conditionArray);
|
||||
}
|
||||
?>
|
||||
<div class="wrap">
|
||||
<?php
|
||||
$result = $wpdb->get_results($query);
|
||||
?>
|
||||
<div>
|
||||
<?php if ($result || !empty($search) || $searchFor != 'all_time') { ?>
|
||||
<!-- header top -->
|
||||
<div class="flex flex-wrap justify-between pt-5">
|
||||
<a href="<?php echo esc_url( $this->getDashboardUrl() ) ?>">
|
||||
<img class="w-32" src="<?php echo esc_url(CHT_PLUGIN_URL.'admin/assets/images/logo-color.svg'); ?>" alt="Chaty">
|
||||
</a>
|
||||
<span class="mt-3 sm:mt-0 font-primary text-3xl text-cht-gray-150"><?php esc_html_e('Contact Form Leads', 'chaty') ?></span>
|
||||
</div>
|
||||
|
||||
<!-- header -->
|
||||
<div class="flex flex-wrap gap-3 justify-between items-center contact-form-leads-header mt-4 pb-2">
|
||||
<div>
|
||||
<?php if ($result) { ?>
|
||||
<div>
|
||||
<div class="alignleft actions bulkactions flex items-center">
|
||||
<select name="action" id="bulk-action-selector-top">
|
||||
<option value=""><?php esc_html_e('Bulk Actions', 'chaty') ?></option>
|
||||
<option value="delete_message"><?php esc_html_e('Delete', 'chaty') ?></option>
|
||||
</select>
|
||||
<input type="submit" id="doaction" class="action btn cursor-pointer" value="<?php esc_html_e("Apply", "chaty") ?>" >
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<form class="flex items-center flex-wrap gap-3" action="<?php echo admin_url("admin.php") ?>" method="get">
|
||||
<label class="screen-reader-text" for="post-search-input"><?php esc_html_e("Search:", "chaty") ?></label>
|
||||
<select class="search-input mr-5" name="search_for" style="" id="date-range">
|
||||
<?php foreach ($searchList as $key => $value) { ?>
|
||||
<option <?php selected($key, $searchFor) ?> value="<?php echo esc_attr($key) ?>"><?php echo esc_attr($value) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<input type="search" class="search-input" name="search" value="<?php echo esc_attr($search) ?>" class="">
|
||||
<input type="submit" class="cursor-pointer btn" id="search-submit" class="button" value="<?php esc_html_e("Search", "chaty") ?>">
|
||||
<input type="hidden" name="page" value="chaty-contact-form-feed" />
|
||||
<div class="date-range <?php echo ($searchFor == "custom" ? "active" : "") ?>">
|
||||
<input type="search" class="search-input" name="start_date" id="start_date" value="<?php echo esc_attr($startDate) ?>" autocomplete="off" placeholder="Start date">
|
||||
<input type="search" class="search-input" name="end_date" id="end_date" value="<?php echo esc_attr($endDate) ?>" autocomplete="off" placeholder="End date">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php }//end if
|
||||
?>
|
||||
<form action="" method="post" class="responsive-table contact-form-lead">
|
||||
<?php if ($result) { ?>
|
||||
<table border="0" cellspacing="0" cellpadding="0" class="border-separate w-full rounded-lg border border-cht-gray-50 mb-5" id="contact-feed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-tl-lg text-cht-gray-150 text-sm font-semibold font-primary py-3 px-2 bg-cht-primary-50" style="width:1%"><?php esc_html_e('Bulk', 'chaty');?></th>
|
||||
<th class="text-center text-cht-gray-150 text-sm font-semibold font-primary py-3 px-5 bg-cht-primary-50"><?php esc_html_e('ID', 'chaty');?></th>
|
||||
<th class="text-center text-cht-gray-150 text-sm font-semibold font-primary py-3 px-5 bg-cht-primary-50"><?php esc_html_e('Widget Name', 'chaty');?></th>
|
||||
<th class="text-center text-cht-gray-150 text-sm font-semibold font-primary py-3 px-5 bg-cht-primary-50"><?php esc_html_e('Name', 'chaty');?></th>
|
||||
<th class="text-center text-cht-gray-150 text-sm font-semibold font-primary py-3 px-5 bg-cht-primary-50"><?php esc_html_e('Email', 'chaty');?></th>
|
||||
<th class="text-center text-cht-gray-150 text-sm font-semibold font-primary py-3 px-5 bg-cht-primary-50"><?php esc_html_e('Phone number', 'chaty');?></th>
|
||||
<th class="text-center text-cht-gray-150 text-sm font-semibold font-primary py-3 px-5 bg-cht-primary-50"><?php esc_html_e('Message', 'chaty');?></th>
|
||||
<th class="text-center text-cht-gray-150 text-sm font-semibold font-primary py-3 px-5 bg-cht-primary-50"><?php esc_html_e('Date', 'chaty');?></th>
|
||||
<th class="text-center text-cht-gray-150 text-sm font-semibold font-primary py-3 px-5 bg-cht-primary-50"><?php esc_html_e('URL', 'chaty');?></th>
|
||||
<th class="rounded-tr-lg text-cht-gray-150 text-sm font-semibold font-primary py-3 px-2 bg-cht-primary-50"><?php esc_html_e('Delete', 'chaty');?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($result as $res) {
|
||||
if ($res->widget_id == 0) {
|
||||
$widgetName = "Default";
|
||||
} else {
|
||||
$widgetName = get_option("cht_widget_title_".$res->widget_id);
|
||||
if (empty($widgetName)) {
|
||||
$widgetName = "Widget #".($res->widget_id + 1);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr data-id="<?php echo esc_attr($res->id) ?>">
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center border-r">
|
||||
<div class="checkbox">
|
||||
<label for="checkbox_<?php echo esc_attr($res->id) ?>" class="chaty-checkbox text-cht-gray-150 text-base items-center">
|
||||
<input class="sr-only" type="checkbox" id="checkbox_<?php echo esc_attr($res->id) ?>" name="chaty_leads[]" value="<?php echo esc_attr($res->id) ?>" />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center border-r border-t" data-title="<?php esc_html_e('ID', 'chaty');?>">
|
||||
<?php echo esc_attr($res->id) ?>
|
||||
</td>
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center border-r border-t" data-title="<?php esc_html_e('Widget Name', 'chaty');?>">
|
||||
<?php echo esc_attr(stripslashes($widgetName)) ?>
|
||||
</td>
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center border-r border-t" data-title="<?php esc_html_e('Name', 'chaty');?>">
|
||||
<?php echo esc_attr(stripslashes($res->name)) ?>
|
||||
</td>
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center border-r border-t" data-title="<?php esc_html_e('Email', 'chaty');?>">
|
||||
<?php echo esc_attr(stripslashes($res->email)) ?>
|
||||
</td>
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center border-r border-t" data-title="<?php esc_html_e('Phone number', 'chaty');?>">
|
||||
<?php echo esc_attr(stripslashes($res->phone_number)) ?>
|
||||
</td>
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center border-r border-t" data-title="<?php esc_html_e('Message', 'chaty');?>">
|
||||
<?php echo nl2br(esc_attr(stripslashes($res->message))) ?>
|
||||
</td>
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center border-r border-t" data-title="<?php esc_html_e('Date', 'chaty');?>">
|
||||
<?php echo esc_attr($res->created_on) ?>
|
||||
</td>
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center border-r border-t" data-title="<?php esc_html_e('URL', 'chaty');?>">
|
||||
<a class="url" target="_blank" href="<?php echo esc_url($res->ref_page) ?>">
|
||||
<span class="dashicons dashicons-external"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center">
|
||||
<a class="remove-record" href="#">
|
||||
<span class="dashicons dashicons-trash"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }//end foreach
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
if ($totalPages > 1) {
|
||||
$baseURL = admin_url("admin.php?paged=%#%&page=chaty-contact-form-feed");
|
||||
if (!empty($search)) {
|
||||
$baseURL .= "&search=".esc_attr($search);
|
||||
}
|
||||
|
||||
echo '<div class="custom-pagination">';
|
||||
echo paginate_links(
|
||||
[
|
||||
'base' => $baseURL,
|
||||
'total' => $totalPages,
|
||||
'current' => $current,
|
||||
'format' => '?paged=%#%',
|
||||
'show_all' => false,
|
||||
'type' => 'list',
|
||||
'end_size' => 3,
|
||||
'mid_size' => 1,
|
||||
'prev_next' => true,
|
||||
'prev_text' => sprintf('%1$s', '<span class="dashicons dashicons-arrow-left-alt2"></span>'),
|
||||
'next_text' => sprintf('%1$s', '<span class="dashicons dashicons-arrow-right-alt2"></span>'),
|
||||
'add_args' => false,
|
||||
'add_fragment' => '',
|
||||
]
|
||||
);
|
||||
echo "</div>";
|
||||
}//end if
|
||||
?>
|
||||
<div class="leads-buttons flex items-center gap-3 flex-wrap">
|
||||
<a href="<?php echo admin_url("?download_chaty_file=chaty_contact_leads&nonce=".wp_create_nonce("download_chaty_contact_leads")) ?>" class="btn rounded-lg inline-block" id="wpappp_export_to_csv" value="Export to CSV"><?php esc_html_e('Download & Export to CSV', 'chaty') ?></a>
|
||||
<input type="button" class="inline-block cursor-pointer rounded-lg bg-transparent border-red-500 text-red-500 hover:bg-red-500/10 focus:bg-red-500/10 hover:text-red-500 btn btn-primary" id="chaty_delete_all_leads" value="Delete All Data">
|
||||
</div>
|
||||
<?php } else if (!empty($search) || $searchFor != "all_time") { ?>
|
||||
<div class="chaty-updates-form pt-7">
|
||||
<div class="testimonial-error-message max-w-screen-sm font-primary mx-auto">
|
||||
<p class="px-5 text-2xl text-center"><?php esc_html_e('No records are found', 'chaty') ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="container mt-12">
|
||||
<div class="chaty-table no-widgets py-20 bg-cover rounded-lg border border-cht-gray-50">
|
||||
<img class="mx-auto w-60" src="<?php echo esc_url(CHT_PLUGIN_URL . "/admin/assets/images/stars-image.png") ?>" />
|
||||
<div class="text-center">
|
||||
<div class="update-title text-cht-gray-150 text-3xl sm:text-4xl pb-5"><?php esc_html('Contact Form Leads', 'chaty') ?></div>
|
||||
<p class="font-primary text-base text-cht-gray-150 -mt-2 max-w-screen-sm px-5 mx-auto">
|
||||
<?php esc_html_e("Your contact form leads will appear here once you get some leads. Please make sure you've added the contact form channel to your Chaty channels in order to collect leads", 'chaty') ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }//end if
|
||||
?>
|
||||
<input type="hidden" name="remove_chaty_leads" value="<?php echo wp_create_nonce("remove_chaty_leads") ?>">
|
||||
<input type="hidden" name="paged" value="<?php echo esc_attr($current) ?>">
|
||||
<input type="hidden" name="search" value="<?php echo esc_attr($search) ?>">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function() {
|
||||
var selectedURL = '<?php echo admin_url("admin.php?page=chaty-contact-form-feed&remove_chaty_leads=".wp_create_nonce("remove_chaty_leads")."&action=delete_message&paged={$current}&search=".esc_attr($search)."&chaty_leads=") ?>';
|
||||
jQuery(document).on("click", ".remove-record", function(e) {
|
||||
e.preventDefault();
|
||||
var redirectRemoveURL = selectedURL + jQuery(this).closest("tr").data("id");
|
||||
if (confirm("<?php esc_html_e("Are you sure you want to delete Record with ID# ", "chaty") ?>" + jQuery(this).closest("tr").data("id"))) {
|
||||
window.location = redirectRemoveURL;
|
||||
}
|
||||
});
|
||||
jQuery(document).on("click", "#doaction", function(e){
|
||||
if(jQuery("#bulk-action-selector-top").val() == "delete_message") {
|
||||
if(jQuery("#contact-feed input:checked").length) {
|
||||
|
||||
var selectedIds = [];
|
||||
jQuery("#contact-feed input:checked").each(function(){
|
||||
selectedIds.push(jQuery(this).val());
|
||||
});
|
||||
if(selectedIds.length) {
|
||||
selectedIds = selectedIds.join(",");
|
||||
var redirectRemoveURL = selectedURL+selectedIds;
|
||||
if(confirm("<?php esc_html_e("Are you sure you want to delete selected records?", "chaty") ?>")) {
|
||||
window.location = redirectRemoveURL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
jQuery(document).on("click", "#chaty_delete_all_leads", function(e) {
|
||||
e.preventDefault();
|
||||
var redirectRemoveURL = selectedURL + "remove-all";
|
||||
if (confirm("<?php esc_html_e("Are you sure you want to delete all Record from the database?", "chaty") ?>")) {
|
||||
window.location = redirectRemoveURL;
|
||||
}
|
||||
});
|
||||
jQuery("#date-range").on("change", function() {
|
||||
if (jQuery(this).val() == "custom") {
|
||||
jQuery(".date-range").addClass("active");
|
||||
} else {
|
||||
jQuery(".date-range").removeClass("active");
|
||||
}
|
||||
});
|
||||
if (jQuery("#start_date").length) {
|
||||
jQuery("#start_date").datepicker({
|
||||
dateFormat: 'yy-mm-dd',
|
||||
altFormat: 'yy-mm-dd',
|
||||
maxDate: 0,
|
||||
onSelect: function(d, i) {
|
||||
var minDate = jQuery("#start_date").datepicker('getDate');
|
||||
minDate.setDate(minDate.getDate()); //add two days
|
||||
jQuery("#end_date").datepicker("option", "minDate", minDate);
|
||||
if (jQuery("#end_date").val() <= jQuery("#start_date").val()) {
|
||||
jQuery("#end_date").val(jQuery("#start_date").val());
|
||||
}
|
||||
|
||||
if (jQuery("#end_date").val() == "") {
|
||||
jQuery("#end_date").val(jQuery("#start_date").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (jQuery("#end_date").length) {
|
||||
jQuery("#end_date").datepicker({
|
||||
dateFormat: 'yy-mm-dd',
|
||||
altFormat: 'yy-mm-dd',
|
||||
maxDate: 0,
|
||||
minDate: 0,
|
||||
onSelect: function(d, i) {
|
||||
if (jQuery("#start_date").val() == "") {
|
||||
jQuery("#start_date").val(jQuery("#end_date").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,644 @@
|
||||
<?php
|
||||
/**
|
||||
* Chaty Popups for widget and contact form lead
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$cta_type = "simple-view";
|
||||
|
||||
?>
|
||||
<section class="section section2" xmlns="http://www.w3.org/1999/html">
|
||||
<?php $class = count($this->socials) > 1 ? "active" : ""; ?>
|
||||
|
||||
<div class="form-horizontal grid gap-7">
|
||||
|
||||
<div class="chaty-inline-title">
|
||||
<?php esc_html_e("Popup Message Design and Behavior", "chaty"); ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('Choose between two types of pop-up designs, set pop-up text, color and set a custom behavior of the widget based on visitor interaction.', 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="cta-options">
|
||||
<div class="cta-option">
|
||||
<input id="cta-option-simple-view" name="cta_type" value="simple-view" type="radio" class="sr-only" checked />
|
||||
<label class="chat-icon" for="cta-option-simple-view">
|
||||
<span class="cta-default">
|
||||
<svg width="136" height="135" viewBox="0 0 136 135" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0 16C0 8.45753 0 4.68629 2.34315 2.34315C4.68629 0 8.45753 0 16 0H120C127.542 0 131.314 0 133.657 2.34315C136 4.68629 136 8.45753 136 16V119C136 126.542 136 130.314 133.657 132.657C131.314 135 127.542 135 120 135H16C8.45753 135 4.68629 135 2.34315 132.657C0 130.314 0 126.542 0 119V16Z" fill="white"/> <g clip-path="url(#clip0_5493_27508)"> <path d="M112 123C118.627 123 124 117.627 124 111C124 104.373 118.627 99 112 99C105.373 99 100 104.373 100 111C100 117.627 105.373 123 112 123Z" fill="#C6D7E3"/> <path d="M113.958 108.156H107.024C106.18 108.156 105.469 108.867 105.469 109.712V114.334C105.469 115.178 106.18 115.89 107.024 115.89H112.624L114.847 118.112C114.935 118.201 114.98 118.201 115.158 118.201C115.247 118.201 115.247 118.201 115.291 118.201C115.424 118.112 115.513 117.978 115.513 117.801V109.712C115.513 108.867 114.802 108.156 113.958 108.156Z" fill="white"/> <path d="M116.27 105.844H109.337C108.492 105.844 107.781 106.555 107.781 107.399H113.959C115.248 107.399 116.27 108.422 116.27 109.71V114.866L117.115 115.71C117.203 115.799 117.248 115.799 117.426 115.799C117.515 115.799 117.515 115.799 117.559 115.799C117.692 115.71 117.781 115.577 117.781 115.399V107.399C117.826 106.555 117.115 105.844 116.27 105.844Z" fill="white"/> </g> <circle cx="112" cy="51" r="10" fill="#EAEFF2"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M115.557 47.4628C115.095 46.9977 114.545 46.629 113.94 46.3779C113.334 46.1268 112.685 45.9983 112.029 46C109.281 46 107.043 48.2372 107.042 50.9872C107.042 51.8661 107.271 52.7239 107.707 53.4806L107 56.0645L109.644 55.3706C110.375 55.7687 111.195 55.9774 112.027 55.9778H112.029C114.778 55.9778 117.016 53.7406 117.017 50.9906C117.019 50.3353 116.891 49.6861 116.64 49.0806C116.39 48.4751 116.022 47.9252 115.557 47.4628ZM112.029 55.1361H112.028C111.285 55.1362 110.556 54.9364 109.918 54.5578L109.767 54.4678L108.198 54.8795L108.616 53.35L108.518 53.1933C108.103 52.5325 107.883 51.7677 107.884 50.9872C107.885 48.7017 109.744 46.8422 112.031 46.8422C112.576 46.841 113.115 46.9478 113.618 47.1565C114.121 47.3651 114.578 47.6715 114.962 48.0578C115.348 48.4423 115.653 48.8994 115.862 49.4028C116.07 49.9062 116.176 50.4458 116.174 50.9906C116.173 53.2761 114.314 55.1361 112.029 55.1361Z" fill="#83A1B7"/> <path d="M113.457 51.6253C113.571 51.667 114.183 51.9681 114.308 52.0309C114.432 52.0931 114.516 52.1247 114.547 52.177C114.578 52.2292 114.578 52.4786 114.474 52.7697C114.371 53.0609 113.873 53.3264 113.633 53.362C113.418 53.3936 113.147 53.4075 112.848 53.3125C112.668 53.2547 112.436 53.1781 112.138 53.0497C110.888 52.5097 110.071 51.2514 110.009 51.1681L110.007 51.1659C109.939 51.0749 109.5 50.4869 109.5 49.8786C109.5 49.2653 109.822 48.9642 109.936 48.8392C109.978 48.7917 110.029 48.7534 110.086 48.7267C110.144 48.6999 110.206 48.6852 110.269 48.6836C110.348 48.6833 110.428 48.6848 110.507 48.6881C110.584 48.6914 110.687 48.6592 110.787 48.9009C110.891 49.1503 111.141 49.7636 111.172 49.8264C111.203 49.8886 111.224 49.9614 111.182 50.0447C111.141 50.1281 111.12 50.1797 111.058 50.2525C110.996 50.3253 110.927 50.4153 110.871 50.4709C110.808 50.5331 110.743 50.6003 110.816 50.7253C110.889 50.8503 111.139 51.2581 111.509 51.5886C111.986 52.0131 112.387 52.1447 112.512 52.207C112.636 52.2692 112.709 52.2592 112.782 52.1759C112.854 52.0925 113.093 51.812 113.177 51.6875C113.26 51.5631 113.343 51.5836 113.457 51.6253Z" fill="#83A1B7"/> <path d="M112 31.7647C117.523 31.7647 122 27.3205 122 21.8382C122 16.356 117.523 11.9117 112 11.9117C106.477 11.9117 102 16.356 102 21.8382C102 27.3205 106.477 31.7647 112 31.7647Z" fill="#EAEFF2"/> <path d="M113.882 17.2065H109.7C109.018 17.2073 108.363 17.4769 107.88 17.9561C107.397 18.4354 107.126 19.0852 107.125 19.7629V23.9142C107.126 24.5921 107.397 25.242 107.88 25.7213C108.363 26.2007 109.018 26.4704 109.7 26.4712H113.882C114.565 26.4705 115.22 26.2009 115.703 25.7215C116.186 25.2422 116.458 24.5922 116.458 23.9142V19.7629C116.458 19.0851 116.186 18.4352 115.703 17.956C115.22 17.4767 114.565 17.2072 113.882 17.2065V17.2065ZM115.63 23.9142C115.63 24.3742 115.445 24.8151 115.118 25.1404C114.79 25.4656 114.346 25.6485 113.882 25.6491H109.7C109.237 25.6487 108.793 25.4658 108.465 25.1405C108.137 24.8152 107.953 24.3742 107.953 23.9142V19.7629C107.953 19.3031 108.138 18.8623 108.465 18.5371C108.793 18.212 109.237 18.0291 109.7 18.0286H113.882C114.346 18.0291 114.79 18.2121 115.118 18.5373C115.445 18.8625 115.63 19.3035 115.63 19.7634V23.9147V23.9142Z" fill="#83A1B7"/> <path d="M111.795 19.4516C111.319 19.4517 110.854 19.5918 110.459 19.8541C110.064 20.1164 109.756 20.4892 109.574 20.9253C109.392 21.3615 109.344 21.8414 109.437 22.3043C109.53 22.7673 109.759 23.1926 110.095 23.5264C110.431 23.8601 110.86 24.0875 111.326 24.1796C111.792 24.2717 112.276 24.2245 112.715 24.0439C113.155 23.8633 113.53 23.5574 113.794 23.165C114.
Line truncated
|
||||
</span>
|
||||
<span class="cta-selected">
|
||||
<svg width="136" height="136" viewBox="0 0 136 136" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0 16C0 8.45753 0 4.68629 2.34315 2.34315C4.68629 0 8.45753 0 16 0H120C127.542 0 131.314 0 133.657 2.34315C136 4.68629 136 8.45753 136 16V120C136 127.542 136 131.314 133.657 133.657C131.314 136 127.542 136 120 136H16C8.45753 136 4.68629 136 2.34315 133.657C0 131.314 0 127.542 0 120V16Z" fill="url(#paint0_linear_5493_27214)"/> <g clip-path="url(#clip0_5493_27214)"> <path d="M112 123C118.627 123 124 117.627 124 111C124 104.373 118.627 99 112 99C105.373 99 100 104.373 100 111C100 117.627 105.373 123 112 123Z" fill="#B78DEB"/> <path d="M113.958 108.156H107.024C106.18 108.156 105.469 108.867 105.469 109.712V114.334C105.469 115.178 106.18 115.89 107.024 115.89H112.624L114.847 118.112C114.935 118.201 114.98 118.201 115.158 118.201C115.247 118.201 115.247 118.201 115.291 118.201C115.424 118.112 115.513 117.978 115.513 117.801V109.712C115.513 108.867 114.802 108.156 113.958 108.156Z" fill="white"/> <path d="M116.27 105.844H109.337C108.492 105.844 107.781 106.555 107.781 107.399H113.959C115.248 107.399 116.27 108.422 116.27 109.71V114.866L117.115 115.71C117.203 115.799 117.248 115.799 117.426 115.799C117.515 115.799 117.515 115.799 117.559 115.799C117.692 115.71 117.781 115.577 117.781 115.399V107.399C117.826 106.555 117.115 105.844 116.27 105.844Z" fill="white"/> </g> <circle cx="112" cy="51" r="10" fill="#49E670"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M115.557 47.4628C115.095 46.9977 114.545 46.629 113.94 46.3779C113.334 46.1268 112.685 45.9983 112.029 46C109.281 46 107.043 48.2372 107.042 50.9872C107.042 51.8661 107.271 52.7239 107.707 53.4806L107 56.0645L109.644 55.3706C110.375 55.7687 111.195 55.9774 112.027 55.9778H112.029C114.778 55.9778 117.016 53.7406 117.017 50.9906C117.019 50.3353 116.891 49.6861 116.64 49.0806C116.39 48.4751 116.022 47.9252 115.557 47.4628ZM112.029 55.1361H112.028C111.285 55.1362 110.556 54.9364 109.918 54.5578L109.767 54.4678L108.198 54.8795L108.616 53.35L108.518 53.1933C108.103 52.5325 107.883 51.7677 107.884 50.9872C107.885 48.7017 109.744 46.8422 112.031 46.8422C112.576 46.841 113.115 46.9478 113.618 47.1565C114.121 47.3651 114.578 47.6715 114.962 48.0578C115.348 48.4423 115.653 48.8994 115.862 49.4028C116.07 49.9062 116.176 50.4458 116.174 50.9906C116.173 53.2761 114.314 55.1361 112.029 55.1361Z" fill="white"/> <path d="M113.457 51.6253C113.571 51.667 114.183 51.9681 114.308 52.0309C114.432 52.0931 114.516 52.1247 114.547 52.177C114.578 52.2292 114.578 52.4786 114.474 52.7697C114.371 53.0609 113.873 53.3264 113.633 53.362C113.418 53.3936 113.147 53.4075 112.848 53.3125C112.668 53.2547 112.436 53.1781 112.138 53.0497C110.888 52.5097 110.071 51.2514 110.009 51.1681L110.007 51.1659C109.939 51.0749 109.5 50.4869 109.5 49.8786C109.5 49.2653 109.822 48.9642 109.936 48.8392C109.978 48.7917 110.029 48.7534 110.086 48.7267C110.144 48.6999 110.206 48.6852 110.269 48.6836C110.348 48.6833 110.428 48.6848 110.507 48.6881C110.584 48.6914 110.687 48.6592 110.787 48.9009C110.891 49.1503 111.141 49.7636 111.172 49.8264C111.203 49.8886 111.224 49.9614 111.182 50.0447C111.141 50.1281 111.12 50.1797 111.058 50.2525C110.996 50.3253 110.927 50.4153 110.871 50.4709C110.808 50.5331 110.743 50.6003 110.816 50.7253C110.889 50.8503 111.139 51.2581 111.509 51.5886C111.986 52.0131 112.387 52.1447 112.512 52.207C112.636 52.2692 112.709 52.2592 112.782 52.1759C112.854 52.0925 113.093 51.812 113.177 51.6875C113.26 51.5631 113.343 51.5836 113.457 51.6253Z" fill="white"/> <path d="M112 32C117.523 32 122 27.5228 122 22C122 16.4772 117.523 12 112 12C106.477 12 102 16.4772 102 22C102 27.5228 106.477 32 112 32Z" fill="url(#paint1_linear_5493_27214)"/> <path d="M113.882 17.334H109.7C109.018 17.3348 108.363 17.6064 107.88 18.0892C107.397 18.572 107.126 19.2266 107.125 19.9094V24.0914C107.126 24.7743 107.397 25.429 107.88 25.9119C108.363 26.3948 109.018 26.6665 109.7 26.6673H113.882C114.565 26.6666 115.22 26.395 115.703 25.9121C116.186 25.4292 116.458 24.7744 116.458 24.0914V19.9094C116.458 19.2265 116.186 18.5718 115.703 18.089C115.22 17.6062 114.565 17.3347 113.882 17.334V17.334ZM115.63 24.0914C115.63 24.5548 115.445 24.999 115.118 25.3266C114.79 25.6543 114.346 25.8386 113.882 25.8391H109.7C109.237 25.8387 108.793 25.6544 108.465 25.3268C108.137 24.9991 107.953 24.5548 107.953 24.0914V19.9094C107.953 19.4461 108.138 19.002 108.465 18.6745C108.793 18.347 109.237 18.1627 109.7 18.1622H113.882C114.346 18.1627 114.79 18.347 115.118 18.6747C115.445 19.0023 115.63 19.4465 115.63 19.9099V24.0919V24.0914Z" fill="white"/> <path d="M111.795 19.5957C111.319 19.5958 110.854 19.7369 110.459 20.0012C110.064 20.2654 109.756 20.641 109.574 21.0803C109.392 21.5197 109.344 22.0032 109.437 22.4696C109.53 22.936 109.759 23.3644 110.095 23.7006C110.431 24.0369 110.86 24.2659 111.326 24.3587C111.792 24.4515 112.276 24.4039 112.715 24.222C113.155 24.0401 113.53 23.7319 113.794 23.3366C114.059 22.9412
Line truncated
|
||||
</span>
|
||||
</label>
|
||||
<label class="chat-label" for="cta-option-simple-view"><span></span> <?php esc_html_e("Simple view", "chaty"); ?></label>
|
||||
</div>
|
||||
<div class="cta-option" id="cta-option-chat-view-pro">
|
||||
<div class="pro-feature-box">
|
||||
<div class="pro-option">
|
||||
<input id="cta-option-chat-view" disabled name="cta_type" value="chat-view" type="radio" class="sr-only" />
|
||||
<label class="chat-icon" for="cta-option-chat-view">
|
||||
<span class="cta-default">
|
||||
<svg width="136" height="136" viewBox="0 0 136 136" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0 16C0 8.45753 0 4.68629 2.34315 2.34315C4.68629 0 8.45753 0 16 0H120C127.542 0 131.314 0 133.657 2.34315C136 4.68629 136 8.45753 136 16V120C136 127.542 136 131.314 133.657 133.657C131.314 136 127.542 136 120 136H16C8.45753 136 4.68629 136 2.34315 133.657C0 131.314 0 127.542 0 120V16Z" fill="white"/> <g clip-path="url(#clip0_5493_27235)"> <path d="M112 124C118.627 124 124 118.627 124 112C124 105.373 118.627 100 112 100C105.373 100 100 105.373 100 112C100 118.627 105.373 124 112 124Z" fill="#C6D7E3"/> <path d="M113.958 109.156H107.024C106.18 109.156 105.469 109.867 105.469 110.711V115.334C105.469 116.178 106.18 116.889 107.024 116.889H112.624L114.847 119.111C114.935 119.2 114.98 119.2 115.158 119.2C115.247 119.2 115.247 119.2 115.291 119.2C115.424 119.111 115.513 118.978 115.513 118.8V110.711C115.513 109.867 114.802 109.156 113.958 109.156Z" fill="white"/> <path d="M116.27 106.844H109.337C108.492 106.844 107.781 107.555 107.781 108.4H113.959C115.248 108.4 116.27 109.422 116.27 110.711V115.866L117.115 116.711C117.203 116.8 117.248 116.8 117.426 116.8C117.515 116.8 117.515 116.8 117.559 116.8C117.692 116.711 117.781 116.578 117.781 116.4V108.4C117.826 107.555 117.115 106.844 116.27 106.844Z" fill="white"/> </g> <rect x="12" y="12" width="112" height="83" rx="8" fill="#EAEFF2"/> <rect x="20" y="40" width="94" height="4" rx="2" fill="#C6D7E3"/> <rect opacity="0.3" x="12" y="12" width="112" height="20" fill="#C6D7E3"/> <rect x="20" y="48" width="86" height="4" rx="2" fill="#C6D7E3"/> <rect x="20" y="56" width="45" height="4" rx="2" fill="#C6D7E3"/> <path d="M117 19L111 25" stroke="#83A1B7" stroke-linecap="round" stroke-linejoin="round"/> <path d="M111 19L117 25" stroke="#83A1B7" stroke-linecap="round" stroke-linejoin="round"/> <g clip-path="url(#clip1_5493_27235)"> <path d="M71 87C74.866 87 78 83.866 78 80C78 76.134 74.866 73 71 73C67.134 73 64 76.134 64 80C64 83.866 67.134 87 71 87Z" fill="#C6D7E3"/> </g> <g clip-path="url(#clip2_5493_27235)"> <path d="M49 87C52.866 87 56 83.866 56 80C56 76.134 52.866 73 49 73C45.134 73 42 76.134 42 80C42 83.866 45.134 87 49 87Z" fill="#C6D7E3"/> </g> <g clip-path="url(#clip3_5493_27235)"> <path d="M27 87C30.866 87 34 83.866 34 80C34 76.134 30.866 73 27 73C23.134 73 20 76.134 20 80C20 83.866 23.134 87 27 87Z" fill="#C6D7E3"/> </g> <defs> <clipPath id="clip0_5493_27235"> <rect width="24" height="24" fill="white" transform="translate(100 100)"/> </clipPath> <clipPath id="clip1_5493_27235"> <rect width="14" height="14" fill="white" transform="translate(64 73)"/> </clipPath> <clipPath id="clip2_5493_27235"> <rect width="14" height="14" fill="white" transform="translate(42 73)"/> </clipPath> <clipPath id="clip3_5493_27235"> <rect width="14" height="14" fill="white" transform="translate(20 73)"/> </clipPath> </defs> </svg>
|
||||
</span>
|
||||
<span class="cta-selected">
|
||||
<svg width="136" height="136" viewBox="0 0 136 136" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0 16C0 8.45753 0 4.68629 2.34315 2.34315C4.68629 0 8.45753 0 16 0H120C127.542 0 131.314 0 133.657 2.34315C136 4.68629 136 8.45753 136 16V120C136 127.542 136 131.314 133.657 133.657C131.314 136 127.542 136 120 136H16C8.45753 136 4.68629 136 2.34315 133.657C0 131.314 0 127.542 0 120V16Z" fill="white"/> <path d="M0 16C0 8.45753 0 4.68629 2.34315 2.34315C4.68629 0 8.45753 0 16 0H120C127.542 0 131.314 0 133.657 2.34315C136 4.68629 136 8.45753 136 16V120C136 127.542 136 131.314 133.657 133.657C131.314 136 127.542 136 120 136H16C8.45753 136 4.68629 136 2.34315 133.657C0 131.314 0 127.542 0 120V16Z" fill="url(#paint0_linear_5493_27529)"/> <g clip-path="url(#clip0_5493_27529)"> <path d="M112 124C118.627 124 124 118.627 124 112C124 105.373 118.627 100 112 100C105.373 100 100 105.373 100 112C100 118.627 105.373 124 112 124Z" fill="#B78DEB"/> <path d="M113.958 109.156H107.024C106.18 109.156 105.469 109.867 105.469 110.711V115.334C105.469 116.178 106.18 116.889 107.024 116.889H112.624L114.847 119.111C114.935 119.2 114.98 119.2 115.158 119.2C115.247 119.2 115.247 119.2 115.291 119.2C115.424 119.111 115.513 118.978 115.513 118.8V110.711C115.513 109.867 114.802 109.156 113.958 109.156Z" fill="white"/> <path d="M116.27 106.844H109.337C108.492 106.844 107.781 107.555 107.781 108.4H113.959C115.248 108.4 116.27 109.422 116.27 110.711V115.866L117.115 116.711C117.203 116.8 117.248 116.8 117.426 116.8C117.515 116.8 117.515 116.8 117.559 116.8C117.692 116.711 117.781 116.578 117.781 116.4V108.4C117.826 107.555 117.115 106.844 116.27 106.844Z" fill="white"/> </g> <g filter="url(#filter0_d_5493_27529)"> <rect x="12" y="12" width="112" height="83" rx="8" fill="white"/> <rect x="20" y="40" width="94" height="4" rx="2" fill="#B78DEB" fill-opacity="0.4"/> <rect x="12" y="12" width="112" height="20" fill="#B78DEB" fill-opacity="0.2"/> <rect x="20" y="48" width="86" height="4" rx="2" fill="#B78DEB" fill-opacity="0.4"/> <rect x="20" y="56" width="45" height="4" rx="2" fill="#B78DEB" fill-opacity="0.4"/> <path d="M117 19L111 25" stroke="#83A1B7" stroke-linecap="round" stroke-linejoin="round"/> <path d="M111 19L117 25" stroke="#83A1B7" stroke-linecap="round" stroke-linejoin="round"/> <circle cx="49" cy="80" r="7" fill="#49E670"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M51.4901 77.524C51.1666 77.1984 50.7818 76.9403 50.3579 76.7645C49.9341 76.5887 49.4795 76.4988 49.0206 76.5C47.0964 76.5 45.5299 78.0661 45.5292 79.9911C45.5292 80.6063 45.6898 81.2067 45.9951 81.7364L45.5 83.5451L47.3507 83.0594C47.8627 83.3381 48.4362 83.4842 49.0191 83.4845H49.0206C50.9444 83.4845 52.5109 81.9184 52.5117 79.9934C52.513 79.5347 52.4234 79.0803 52.248 78.6564C52.0727 78.2326 51.8151 77.8477 51.4901 77.524ZM49.0206 82.8953H49.0194C48.4997 82.8953 47.9895 82.7555 47.5424 82.4905L47.4367 82.4275L46.3384 82.7156L46.6313 81.645L46.5624 81.5353C46.2719 81.0727 46.118 80.5374 46.1187 79.9911C46.1195 78.3912 47.4211 77.0896 49.0218 77.0896C49.403 77.0887 49.7806 77.1635 50.1327 77.3095C50.4848 77.4556 50.8045 77.67 51.0732 77.9405C51.3433 78.2096 51.5574 78.5296 51.7031 78.882C51.8488 79.2343 51.9233 79.6121 51.9221 79.9934C51.9213 81.5933 50.6197 82.8953 49.0206 82.8953Z" fill="white"/> <path d="M50.0197 80.4377C50.0998 80.4669 50.5283 80.6777 50.6158 80.7216C50.7026 80.7652 50.7613 80.7873 50.7831 80.8239C50.8048 80.8605 50.8048 81.0351 50.7321 81.2388C50.6594 81.4426 50.3109 81.6285 50.1433 81.6534C49.9928 81.6756 49.8027 81.6853 49.5938 81.6188C49.4674 81.5783 49.3049 81.5247 49.0964 81.4348C48.2214 81.0568 47.6498 80.176 47.6062 80.1177L47.6051 80.1162C47.5575 80.0525 47.25 79.6408 47.25 79.2151C47.25 78.7857 47.4752 78.575 47.5553 78.4875C47.5845 78.4542 47.6203 78.4274 47.6604 78.4087C47.7005 78.3899 47.744 78.3797 47.7882 78.3786C47.8438 78.3784 47.8995 78.3794 47.9551 78.3817C48.0087 78.384 48.0807 78.3615 48.1511 78.5306C48.2238 78.7052 48.3984 79.1346 48.4202 79.1785C48.4423 79.2221 48.4567 79.273 48.4276 79.3313C48.3984 79.3897 48.384 79.4258 48.3404 79.4768C48.2969 79.5277 48.2491 79.5907 48.2098 79.6296C48.1658 79.6732 48.1203 79.7202 48.1713 79.8077C48.2222 79.8952 48.3972 80.1807 48.6566 80.4121C48.9899 80.7092 49.2711 80.8013 49.3582 80.8449C49.4453 80.8885 49.4962 80.8815 49.5472 80.8231C49.5981 80.7648 49.7653 80.5684 49.8237 80.4813C49.882 80.3942 49.9399 80.4086 50.0197 80.4377Z" fill="white"/> <path d="M27 87C30.866 87 34 83.866 34 80C34 76.134 30.866 73 27 73C23.134 73 20 76.134 20 80C20 83.866 23.134 87 27 87Z" fill="url(#paint1_linear_5493_27529)"/> <path d="M28.324 76.7334H25.3965C24.9186 76.734 24.4604 76.9241 24.1224 77.262C23.7844 77.6 23.5943 78.0582 23.5938 78.5362V81.4636C23.5942 81.9416 23.7843 82.3999 24.1223 82.738C24.4602 83.076 24.9185 83.2662 25.3965 83.2667H28.324C28.802 83.2663 29.2604 83.0761 29.5984 82.7381C29.9365 82.4 30.1266 81.9417 30.1271 81.4636V78.5362C30.1265 78.0582
Line truncated
|
||||
</span>
|
||||
</label>
|
||||
<label class="chat-label" for="cta-option-chat-view"><span></span> <?php esc_html_e("Chat view (Pro)", "chaty"); ?></label>
|
||||
</div>
|
||||
<a href="javascript:;" class="upgrade-btn"><?php esc_html_e("Upgrade to Pro", "chaty"); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item widget-icon__block chaty-widget-icon o-channel <?php echo esc_attr($class) ?>">
|
||||
<label class="form-horizontal__item-label text-cht-gray-150 font-primary block text-base mb-3"><?php esc_html_e('Widget icon', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('Select the icon for your widget or upload a custom icon. Please make sure you upload an image file of the following types: PNG/JPEG/JPG/GIF/SVG. The max file size is up to 100KB', 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<?php
|
||||
$proClass = "has-free";
|
||||
$widgetIcon = get_option('widget_icon');
|
||||
$disabled = "disabled";
|
||||
?>
|
||||
<div class="widget-icon__wrap space-x-4 sm:space-x-7 pb-5 items-center inline-flex <?php echo esc_attr($proClass) ?>">
|
||||
|
||||
<label class="custom-control custom-radio relative">
|
||||
<input type="radio" name="widget_icon" class="custom-control-input js-widget-i " value="chat-base" data-type="chat-base" data-gramm_editor="false" <?php checked($widgetIcon, "chat-base") ?> />
|
||||
<i class="icon-chat" data-type="chat-base">
|
||||
<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54"style="enable-background:new -496 507.7 54 54;" xml:space="preserve">
|
||||
<style type="text/css">.st1 { fill: #FFFFFF; }.st0 { fill: #808080; }</style>
|
||||
<g><circle cx="-469" cy="534.7" r="27" fill="#a886cd"/></g>
|
||||
<path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>
|
||||
<path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,530.8-478.2,530.5-477.7,530.5z"/>
|
||||
<path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,533.9-478.2,533.5-477.7,533.5z"/>
|
||||
</svg>
|
||||
</i>
|
||||
<span class="custom-control-radio"></span>
|
||||
</label>
|
||||
|
||||
<label class="custom-control custom-radio relative">
|
||||
<input type="radio" name="widget_icon" class="custom-control-input js-widget-i" value="chat-smile" data-type="chat-smile" data-gramm_editor="false" <?php checked($widgetIcon, "chat-smile") ?> >
|
||||
<i class="icon-chat" data-type="chat-smile">
|
||||
<svg version="1.1" id="smile" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.8 507.1 54 54" style="enable-background:new -496.8 507.1 54 54;" xml:space="preserve">
|
||||
<style type="text/css">.st1 { fill: #FFFFFF; }.st2 { fill: none; stroke: #808080; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }</style>
|
||||
<g><circle cx="-469.8" cy="534.1" r="27" fill="#a886cd"/></g>
|
||||
<path class="st1" d="M-459.5,523.5H-482c-2.1,0-3.7,1.7-3.7,3.7v13.1c0,2.1,1.7,3.7,3.7,3.7h19.3l5.4,5.4c0.2,0.2,0.4,0.2,0.7,0.2c0.2,0,0.2,0,0.4,0c0.4-0.2,0.6-0.6,0.6-0.9v-21.5C-455.8,525.2-457.5,523.5-459.5,523.5z"/>
|
||||
<path class="st2" d="M-476.5,537.3c2.5,1.1,8.5,2.1,13-2.7"/>
|
||||
<path class="st2" d="M-460.8,534.5c-0.1-1.2-0.8-3.4-3.3-2.8"/>
|
||||
</svg>
|
||||
</i>
|
||||
<span class="custom-control-radio"></span>
|
||||
</label>
|
||||
|
||||
<label class="custom-control custom-radio relative">
|
||||
<input type="radio" name="widget_icon" class="custom-control-input js-widget-i" value="chat-bubble" data-type="chat-bubble" data-gramm_editor="false" <?php checked($widgetIcon, "chat-bubble") ?> />
|
||||
<i class="icon-chat" data-type="chat-bubble">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.9 507.1 54 54" style="enable-background:new -496.9 507.1 54 54;" xml:space="preserve">
|
||||
<style type="text/css">.st1 { fill: #FFFFFF; }</style>
|
||||
<g><circle cx="-469.9" cy="534.1" r="27" fill="#a886cd"/></g>
|
||||
<path class="st1" d="M-472.6,522.1h5.3c3,0,6,1.2,8.1,3.4c2.1,2.1,3.4,5.1,3.4,8.1c0,6-4.6,11-10.6,11.5v4.4c0,0.4-0.2,0.7-0.5,0.9 c-0.2,0-0.2,0-0.4,0c-0.2,0-0.5-0.2-0.7-0.4l-4.6-5c-3,0-6-1.2-8.1-3.4s-3.4-5.1-3.4-8.1C-484.1,527.2-478.9,522.1-472.6,522.1z M-462.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-464.6,534.6-463.9,535.3-462.9,535.3z M-469.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-471.7,534.6-471,535.3-469.9,535.3z M-477,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-478.8,534.6-478.1,535.3-477,535.3z"/>
|
||||
</svg>
|
||||
</i>
|
||||
<span class="custom-control-radio"></span>
|
||||
</label>
|
||||
|
||||
<label class="custom-control custom-radio relative add-border">
|
||||
<input type="radio" name="widget_icon" class="custom-control-input js-widget-i" value="chat-db" data-type="chat-db" data-gramm_editor="false" <?php checked($widgetIcon, "chat-db") ?> />
|
||||
<i class="icon-chat" data-type="chat-db">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.1 54 54" style="enable-background:new -496 507.1 54 54;" xml:space="preserve">
|
||||
<style type="text/css">.st1 {fill: #FFFFFF;}</style>
|
||||
<g><circle cx="-469" cy="534.1" r="27" fill="#a886cd"/></g>
|
||||
<path class="st1" d="M-464.6,527.7h-15.6c-1.9,0-3.5,1.6-3.5,3.5v10.4c0,1.9,1.6,3.5,3.5,3.5h12.6l5,5c0.2,0.2,0.3,0.2,0.7,0.2 c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18.2C-461.1,529.3-462.7,527.7-464.6,527.7z"/>
|
||||
<path class="st1" d="M-459.4,522.5H-475c-1.9,0-3.5,1.6-3.5,3.5h13.9c2.9,0,5.2,2.3,5.2,5.2v11.6l1.9,1.9c0.2,0.2,0.3,0.2,0.7,0.2 c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18C-455.9,524.1-457.5,522.5-459.4,522.5z"/>
|
||||
</svg>
|
||||
</i>
|
||||
<span class="custom-control-radio"></span>
|
||||
</label>
|
||||
|
||||
<label class="custom-control custom-radio relative custom-icon-selection group">
|
||||
<button type="button" disabled class="select-cta-fa-icon" id="select-cta-fa-icon"><?php esc_html_e("Icons Library", "chaty") ?></button>
|
||||
<button type="button" disabled class="select-cta-image"><?php esc_html_e("Upload", "chaty") ?></button>
|
||||
<a class="custom-image-upgrade-btn" target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl()); ?>">
|
||||
<?php esc_html_e('Upgrade Now', 'chaty'); ?>
|
||||
</a>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item">
|
||||
<label class="align-top form-horizontal__item-label font-primary text-cht-gray-150 text-base mb-2 block"><?php esc_html_e("Position", "chaty") ?>:</label>
|
||||
<div class="tab-tab-select bg-cht-gray-50 flex-wrap gap-2 inline-flex items-center rounded-md p-1">
|
||||
<?php
|
||||
$position = get_option('cht_position');
|
||||
$position = ($position != "left" && $position != "right") ? "right" : $position;
|
||||
?>
|
||||
<label class="custom-control custom-radio" for="left-position">
|
||||
<input type="radio" id="left-position" name="cht_position" class="custom-control-input" <?php checked($position, "left") ?> value="left" />
|
||||
<span class="custom-control-label"><?php esc_html_e('Left', 'chaty'); ?></span>
|
||||
</label>
|
||||
|
||||
<label class="custom-control custom-radio" for="right-position">
|
||||
<input type="radio" id="right-position" name="cht_position" class="custom-control-input" <?php checked($position, "right") ?> value="right" />
|
||||
<span class="custom-control-label"><?php esc_html_e('Right', 'chaty'); ?></span>
|
||||
</label>
|
||||
|
||||
<span class="custom-control group relative custom-radio free-custom-radio">
|
||||
<input type="radio" class="custom-control-input" disabled>
|
||||
<span class="custom-control-label pointer-events-none"><?php esc_html_e('Custom Position', 'chaty'); ?> </span>
|
||||
<a class="absolute opacity-0 block z-40 group-hover:opacity-100 hover:text-white left-0 top-0 h-full py-[3px] text-base w-full text-center text-white rounded-[3px] bg-cht-primary" target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl()); ?>">
|
||||
(<?php esc_html_e('Upgrade to Pro', 'chaty'); ?>)
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item flex-center chaty-default-state single-channel-setting active">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base block mb-3"><?php esc_html_e('Default state', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('When the page loads, choose the default state of the widget. Choose between hover to open, opened by default or click to open states.', 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div>
|
||||
<?php
|
||||
$states = [
|
||||
"click" => esc_html__("Click to open", "chaty"),
|
||||
"hover" => esc_html__("Hover to open", "chaty"),
|
||||
"open" => esc_html__("Opened by default", "chaty"),
|
||||
];
|
||||
$state = get_option('chaty_default_state');
|
||||
$state = empty($state) ? "click" : $state;
|
||||
?>
|
||||
<select name="chaty_default_state" id="chaty_default_state" class="chaty-select">
|
||||
<?php foreach ($states as $key => $value) : ?>
|
||||
<option value="<?php echo esc_attr($key); ?>" <?php selected($state, $key); ?>><?php echo esc_attr($value); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item flex-center hide-show-button <?php echo esc_attr($state == "open" ? "active" : "") ?>">
|
||||
<input type="hidden" name="cht_close_button" value="no" >
|
||||
<label class="form-horizontal__item-label text-cht-gray-150 font-primary text-base mb-2 block" for="cht_close_button"><?php esc_html_e('Show close button', 'chaty');?>:</label>
|
||||
<div>
|
||||
<label class="switch group inline-flex">
|
||||
<?php $closeButton = get_option('cht_close_button'); ?>
|
||||
<?php $closeButton = empty($closeButton) ? "yes" : $closeButton; ?>
|
||||
<input data-gramm_editor="false" type="checkbox" id="cht_close_button" name="cht_close_button" value="yes" <?php checked($closeButton, "yes") ?> >
|
||||
<span class="chaty-slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$color = $this->get_current_color();
|
||||
$color = empty($color) ? '#A886CD' : $color;
|
||||
?>
|
||||
<div class="form-horizontal__item chaty-widget-color o-channel <?php echo esc_attr($class) ?>">
|
||||
<label class="align-top form-horizontal__item-label font-primary text-cht-gray-150 text-base mb-2 block"><?php esc_html_e('Widget icon color', 'chaty'); ?>:</label>
|
||||
<div>
|
||||
<div class="color-picker-dropdown inline-block">
|
||||
<div class="color-picker-box">
|
||||
<div class="color-picker-radio">
|
||||
<label style="background-color: #A886CD">
|
||||
<input type="checkbox" name="cht_color" value="#A886CD" title="Purple" <?php checked($color, '#A886CD') ?> >
|
||||
<span></span>
|
||||
</label>
|
||||
|
||||
<label style="background-color: #86CD91">
|
||||
<input type="checkbox" name="cht_color" value="#86CD91" title="Green" <?php checked($color, '#86CD91') ?> />
|
||||
<span></span>
|
||||
</label>
|
||||
|
||||
<label style="background-color: #4F6ACA">
|
||||
<input type="checkbox" name="cht_color" value="#4F6ACA" title="Blue" <?php checked($color, '#4F6ACA') ?> />
|
||||
<span></span>
|
||||
</label>
|
||||
|
||||
<label style="background-color: #FF6060">
|
||||
<input type="checkbox" name="cht_color" value="#FF6060" title="Red" <?php checked($color, '#FF6060') ?> >
|
||||
<span></span>
|
||||
</label>
|
||||
|
||||
<label style="background-color: #000">
|
||||
<input type="checkbox" name="cht_color" value="#000" title="Black" <?php checked($color, '#000') ?> >
|
||||
<span></span>
|
||||
</label>
|
||||
|
||||
<label style="background-color: #EEF075">
|
||||
<input type="checkbox" name="cht_color" value="#EEF075" title="Yellow" <?php checked($color, '#EEF075') ?> >
|
||||
<span></span>
|
||||
</label>
|
||||
|
||||
<label style="background-color: #FF95EE">
|
||||
<input type="checkbox" name="cht_color" value="#FF95EE" title="Pink" <?php checked($color, '#FF95EE') ?> >
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="color-picker-custom">
|
||||
<div>
|
||||
<div class="circle">?</div>
|
||||
<span class="text-cht-gray-150 font-primary text-base"><?php esc_html_e('Custom color', 'chaty'); ?></span>
|
||||
<a class="text-cht-primary hover:text-cht-primary hover:underline font-primary text-base" target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl()); ?>">
|
||||
(<?php esc_html_e('Upgrade to Pro', 'chaty'); ?>)
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<input type="input" name="cht_custom_colo" placeholder="HEX code: #ffffff" value="" readonly style="cursor:not-allowed;width: 227px;" />
|
||||
<button class="btn ml-2 py-2 px-5 rounded-sm"><?php esc_html_e('Ok', 'chaty'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php $color = $this->get_current_color(); ?>
|
||||
<button class="color-picker-btn-close text-cht-gray-150">
|
||||
<svg width="12" height="7" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0L4.31505 3.77708L8.63008 0" transform="translate(1.37436 1.31006)" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M0 0L4.31505 3.77708L8.63008 0" transform="translate(1.37436 1.31006)" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button class="color-picker-btn text-cht-gray-150">
|
||||
<?php $color = !empty($color) ? $color : '#A886CD'; ?>
|
||||
<span class="circle" style="background-color: <?php echo esc_attr($color) ?>"></span>
|
||||
<span class="text">
|
||||
<?php
|
||||
if (!empty($color)) {
|
||||
$colors = $this->colors;
|
||||
if (isset($colors[$color])) {
|
||||
echo esc_attr($colors[$color]);
|
||||
} else {
|
||||
esc_html_e('Custom', 'chaty');
|
||||
}
|
||||
} else {
|
||||
esc_html_e('Purple', 'chaty');
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<i class="cht-arrow-icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base mb-2 inline-block"><?php esc_html_e('Widget size', 'chaty') ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('Change the size of your Chaty widget. S is the smallest and XXL is the largest. You can also set custom sizes (the actual size of the Chaty widget is not reflected on the preview. View the size changes on the actual website)', 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div class="flex items-center space-x-2">
|
||||
<?php
|
||||
$size = get_option('cht_widget_size');
|
||||
$size = empty($size) ? 54 : $size;
|
||||
$fixedSizes = ["44", "54", "70", "84", "94"];
|
||||
?>
|
||||
<!-- custom widget size start -->
|
||||
<div class="tab-tab-select bg-cht-gray-50 rounded-md p-1 flex-wrap gap-1 inline-flex items-center">
|
||||
<label class="custom-control custom-radio" for="size-s">
|
||||
<input type="radio" id="size-s" class="custom-control-input widget-size-control" <?php checked($size, "44") ?> value="44" />
|
||||
<span class="custom-control-label"><?php esc_html_e('S', 'chaty') ?></span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio" for="size-m">
|
||||
<input type="radio" id="size-m" class="custom-control-input widget-size-control" <?php checked($size, "54") ?> value="54" />
|
||||
<span class="custom-control-label"><?php esc_html_e('M', 'chaty') ?></span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio" for="size-l">
|
||||
<input type="radio" id="size-l" class="custom-control-input widget-size-control" <?php checked($size, "70") ?> value="70" />
|
||||
<span class="custom-control-label"><?php esc_html_e('L', 'chaty') ?></span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio" for="size-xl">
|
||||
<input type="radio" id="size-xl" class="custom-control-input widget-size-control" <?php checked($size, "84") ?> value="84" />
|
||||
<span class="custom-control-label"><?php esc_html_e('XL', 'chaty') ?></span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio" for="size-xxl">
|
||||
<input type="radio" id="size-xxl" class="custom-control-input widget-size-control" <?php checked($size, "94") ?> value="94" />
|
||||
<span class="custom-control-label"><?php esc_html_e('XXL', 'chaty') ?></span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio" for="size-custom">
|
||||
<input type="radio" id="size-custom" class="custom-control-input widget-size-control" value="<?php echo esc_attr($size) ?>" <?php echo in_array($size, $fixedSizes) ? '': 'checked' ?> >
|
||||
<span class="custom-control-label"><?php esc_html_e('Custom', 'chaty') ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<!-- custom widget size ends -->
|
||||
</div>
|
||||
<div id="custom-widget-size" class="max-w-[410px]" style="display: <?php echo in_array($size, $fixedSizes) ? 'none' : 'block' ?>" >
|
||||
<div class="position-pro">
|
||||
<div class="text-cht-gray-150/70">
|
||||
<label class="text-base text-cht-gray-150/70"><?php esc_html_e('Custom widget size', 'chaty') ?>:</label>
|
||||
<input type="number" min="0" max="2000" class="widget-size-control" value="<?php echo esc_attr($size) ?>" placeholder="<?php echo esc_attr($size) ?>">px
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input id="custom-widget-size-input" name="cht_widget_size" type="hidden" value="<?php echo esc_attr($size) ?>"/>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item cht-option-settings" >
|
||||
<label class="align-top form-horizontal__item-label font-primary text-cht-gray-150 text-base block mb-3"><?php esc_html_e('Call to action', 'chaty'); ?>:</label>
|
||||
<div class="disable-message" data-label='<?php esc_html_e('When the default state is set to "Opened by default", the "Call to action" feature doesn\'t apply because the Chaty widget is already open.', 'chaty') ?>'>
|
||||
<?php
|
||||
$cta = get_option('cht_cta');
|
||||
?>
|
||||
<textarea data-value="<?php echo esc_attr($cta) ?>" class="test_textarea titleColor rounded-lg text-cht-gray-150 text-base font-primary" cols="40" rows="2" name="cht_cta" placeholder="<?php esc_html_e('Message us!', 'chaty'); ?>" ><?php echo esc_attr((wp_unslash($cta))) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item flex-center">
|
||||
<label class="align-top form-horizontal__item-label font-primary text-cht-gray-150 text-base block mb-2">
|
||||
<?php esc_html_e('Call to action behavior', 'chaty'); ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('Choose how the CTA button would appear. "Hide after first click" hides the CTA button after the first visit. If you select the second option, the CTA stays visible all the time', "chaty") ?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div class="cta-action-radio tab-tab-select bg-cht-gray-50 inline-block rounded-md p-1" id="cta-action">
|
||||
<?php
|
||||
$ctaAction = get_option('cht_cta_action');
|
||||
$ctaAction = empty($ctaAction) ? "click" : $ctaAction;
|
||||
?>
|
||||
<div class=" disable-message" data-label='<?php esc_html_e('When the default state is set to "Opened by default", the "Show call to action" feature doesn\'t apply because the Chaty widget is already open.','chaty') ?>' for="all_time-cht_cta_action">
|
||||
<label class="custom-control custom-radio">
|
||||
<input type="radio" id="click-cht_cta_action" name="cht_cta_action" class="custom-control-input" <?php checked($ctaAction, "click") ?> value="click" />
|
||||
<span class="custom-control-label"><?php esc_html_e('Hide after first click', 'chaty'); ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class=" disable-message" data-label='<?php esc_html_e('When the default state is set to "Opened by default", the "Show call to action" feature doesn\'t apply because the Chaty widget is already open.','chaty') ?>' for="all_time-cht_cta_action">
|
||||
<label class="custom-control custom-radio">
|
||||
<input type="radio" id="all_time-cht_cta_action" name="cht_cta_action" class="custom-control-input" <?php checked($ctaAction, "all_time") ?> value="all_time" />
|
||||
<span class="custom-control-label"><?php esc_html_e('Show all the time', 'chaty'); ?></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="color-setting">
|
||||
<div class="color-box flex flex-wrap gap-5 sm:gap-8">
|
||||
<div>
|
||||
<?php
|
||||
$val = get_option("cht_cta_text_color");
|
||||
$val = ($val === false) ? "#333333" : $val;
|
||||
?>
|
||||
<div class="form-horizontal__item flex items-center gap-2 flex-center">
|
||||
<label class="form-horizontal__item-label font-primary text-base text-cht-gray-150 block"><?php esc_html_e('Call to action text color', 'chaty');?>:</label>
|
||||
<div class="disable-message" data-label='<?php esc_html_e('When the default state is set to "Opened by default", the "Attention effect" feature doesn\'t apply because the Chaty widget is already open.', 'chaty') ?>'>
|
||||
<input value="<?php echo esc_attr($val) ?>" type="text" class="chaty-color-field" name="cht_cta_text_color" id="cht_cta_text_color">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
$val = get_option("cht_cta_bg_color");
|
||||
$val = ($val === false) ? "#ffffff" : $val;
|
||||
?>
|
||||
<div class="form-horizontal__item flex items-center gap-2 flex-center">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base block"><?php esc_html_e('Call to action background', 'chaty');?>:</label>
|
||||
<div class="disable-message" data-label='<?php esc_html_e('When the default state is set to "Opened by default", the "Attention effect" feature doesn\'t apply because the Chaty widget is already open.', 'chaty') ?>'>
|
||||
<input value="<?php echo esc_attr($val) ?>" type="text" class="chaty-color-field" name="cht_cta_bg_color" id="cht_cta_bg_color">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item flex-center">
|
||||
<input type="hidden" name="cht_google_analytics" value="0" >
|
||||
<label class="form-horizontal__item-label text-cht-gray-150 font-primary text-base mb-2 block"><?php esc_html_e('Google Analytics', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php echo sprintf(esc_html__('Enable google analytics tracking on the widget clicks. You can %s', 'chaty'),"<a href='https://premio.io/help/chaty/how-do-i-track-chaty-clicks-using-google-analytics/' target='_blank'>".esc_html__("learn more here", "chaty")."</a>") ;?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div>
|
||||
<label class="switch group inline-flex">
|
||||
<?php
|
||||
$checked = get_option('cht_google_analytics');
|
||||
?>
|
||||
<input data-gramm_editor="false" type="checkbox" name="cht_google_analytics" value="1" <?php checked($checked, 1) ?> <?php echo esc_attr($disabled) ?> >
|
||||
<span class="chaty-slider round"></span>
|
||||
<a target="_blank" class="opacity-0 px-5 py-1.5 group-hover:opacity-100 ml-4 pro-btn bg-cht-primary rounded-[6px] text-white hover:text-white" href="<?php echo esc_url($this->getUpgradeMenuItemUrl()); ?>">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty'); ?>
|
||||
</a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item chaty-icon-view active chaty-chat-view-option">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base block mb-3" for="chaty_icons_view"><?php esc_html_e('Icons view', 'chaty');?>:</label>
|
||||
<div>
|
||||
<?php
|
||||
$mode = get_option('chaty_icons_view');
|
||||
$mode = empty($mode) ? "vertical" : $mode;
|
||||
?>
|
||||
<div class="tab-tab-select bg-cht-gray-50 inline-block rounded-md p-1">
|
||||
<label class="custom-control custom-radio" for="vertical-position">
|
||||
<input type="radio" id="vertical-position" name="chaty_icons_view" class="custom-control-input" <?php checked($mode, "vertical") ?> value="vertical" />
|
||||
<span class="custom-control-label"><?php esc_html_e('Vertical', 'chaty'); ?></span>
|
||||
</label>
|
||||
|
||||
<label class="custom-control custom-radio" for="horizontal-position">
|
||||
<input type="radio" id="horizontal-position" name="chaty_icons_view" class="custom-control-input" <?php checked($mode, "horizontal") ?> value="horizontal" />
|
||||
<span class="custom-control-label"><?php esc_html_e('Horizontal', 'chaty'); ?></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item flex-center">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base mb-3 block">
|
||||
<?php esc_html_e('Attention effect', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('The attention effect will appear on your site until your website visitors engage with the widget for the first time. After the first engagement, the attention effect will not appear again.','chaty') ?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div class="disable-message" data-label='<?php esc_html_e('When the default state is set to "Opened by default", the "Attention effect" feature doesn\'t apply because the Chaty widget is already open.','chaty') ?>'>
|
||||
<?php
|
||||
$group = '';
|
||||
$effects = [
|
||||
"" => "None",
|
||||
"jump" => "Bounce",
|
||||
"waggle" => "Waggle",
|
||||
"sheen" => "Sheen",
|
||||
"spin" => "Spin",
|
||||
"fade" => "Fade",
|
||||
"shockwave" => "Shockwave",
|
||||
"blink" => "Blink",
|
||||
"pulse-icon" => "Pulse",
|
||||
];
|
||||
$effect = get_option('chaty_attention_effect');
|
||||
$effect = empty($effect) ? "" : $effect;
|
||||
?>
|
||||
<select name="chaty_attention_effect" class="chaty-select" id="chaty_attention_effect" data-effect="<?php echo esc_attr($effect) ?>">
|
||||
<?php foreach ($effects as $key => $value) : ?>
|
||||
<option value="<?php echo esc_attr($key); ?>" <?php selected($effect, $key); ?>><?php echo esc_attr($value); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item flex-center">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 block text-base mb-3">
|
||||
<?php esc_html_e('Pending messages', 'chaty');?>
|
||||
<span class="icon label-tooltip" data-label="<?php esc_html_e("Increase your click-rate by displaying a pending messages icon near your Chaty widget to let your visitors know that you\"re waiting for them to contact you.", 'chaty') ?>">
|
||||
<span class="ml-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div class="disable-message" data-label='<?php esc_html_e('When the default state is set to "Opened by default", the "Pending messages" feature doesn\'t apply because the Chaty widget is already open.', 'chaty') ?>'>
|
||||
<label class="switch">
|
||||
<?php
|
||||
$checked = get_option('cht_pending_messages');
|
||||
$checked = empty($checked) ? "off" : $checked;
|
||||
$activeClass = ($checked == "on") ? "active" : "";
|
||||
?>
|
||||
<input type="hidden" name="cht_pending_messages" value="off">
|
||||
<input type="checkbox" id="cht_pending_messages" name="cht_pending_messages" value="on" <?php checked($checked, "on") ?> >
|
||||
<span class="chaty-slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item flex-center pending-message-items <?php echo esc_attr($activeClass) ?>">
|
||||
<div class="group-control-wrap p-3 space-y-2 relative -top-3 max-w-[410px]">
|
||||
<?php
|
||||
$val = get_option("cht_number_of_messages");
|
||||
$val = ($val === false || empty($val)) ? "1" : $val;
|
||||
?>
|
||||
<div class="form-horizontal__item float-left flex pending-message-items items-center gap-2 <?php echo esc_attr($activeClass) ?>">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base"><?php esc_html_e('Number of messages', 'chaty');?>:</label>
|
||||
<div>
|
||||
<input value="<?php echo esc_attr($val) ?>" style="border-color:#eaeff2" min="0" type="number" class="cht-input w-16 border border-solid text-center hover:border-cht-primary text-cht-gray-150 px-[0_!important]" name="cht_number_of_messages" id="cht_number_of_messages">
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear-both"></div>
|
||||
<?php
|
||||
$val = get_option("cht_number_color");
|
||||
$val = ($val === false || empty($val)) ? "#ffffff" : $val;
|
||||
?>
|
||||
<div class="form-horizontal__item flex pending-message-items mr-4 float-left items-center gap-2 <?php echo esc_attr($activeClass) ?>">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base"><?php esc_html_e('Number color', 'chaty');?>:</label>
|
||||
<div>
|
||||
<input value="<?php echo esc_attr($val) ?>" type="text" class="chaty-color-field w-16" name="cht_number_color" id="cht_number_color">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$val = get_option("cht_number_bg_color");
|
||||
$val = ($val === false || empty($val)) ? "#dd0000" : $val;
|
||||
?>
|
||||
<div class="form-horizontal__item flex pending-message-items float-left items-center gap-2 <?php echo esc_attr($activeClass) ?>">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base"><?php esc_html_e('Background color', 'chaty');?>:</label>
|
||||
<div>
|
||||
<input value="<?php echo esc_attr($val) ?>" type="text" class="chaty-color-field w-16" name="cht_number_bg_color" id="cht_number_bg_color">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item font-section">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base block mb-2"><?php esc_html_e('Font Family', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e("System Stack is the font that comes preloaded with your operating system. For example, if you are using Mac, you would be able to use mac's native font.", 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div>
|
||||
<?php
|
||||
$font = get_option('cht_widget_font');
|
||||
$font = ($font === false)?"System Stack":$font;
|
||||
?>
|
||||
<select name="cht_widget_font" class="form-fonts" id="cht_widget_font">
|
||||
<option value="">Select font family</option>
|
||||
<?php $group = '';
|
||||
foreach ($fonts as $key => $value):
|
||||
if ($value != $group) {
|
||||
echo '<optgroup label="' . $value . '">';
|
||||
$group = $value;
|
||||
}
|
||||
$key_value = $key;
|
||||
if($key == "-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',sans-serif") {
|
||||
$key_value = 'system_font';
|
||||
}
|
||||
?>
|
||||
<option data-group="<?php echo esc_attr($value); ?>" value="<?php echo esc_attr($key_value); ?>" data-type="<?php echo esc_attr($value); ?>" <?php selected($font, $key_value); ?>><?php echo esc_attr($key); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="chaty_site_url" value="<?php echo site_url("/") ?>" >
|
||||
<?php $requestData = filter_input_array(INPUT_GET); ?>
|
||||
<?php if (isset($requestData['page']) && $requestData['page'] == "chaty-widget-settings") { ?>
|
||||
<input type="hidden" name="widget" value="new-widget" >
|
||||
<?php } else if (isset($requestData['widget']) && !empty($requestData['widget']) && is_numeric($requestData['widget']) && $requestData['widget'] > 0) { ?>
|
||||
<input type="hidden" name="widget" value="<?php echo esc_attr($requestData['widget']) ?>" >
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<div id="custom-css"></div>
|
||||
@@ -0,0 +1,382 @@
|
||||
<?php
|
||||
/**
|
||||
* Chaty Popups for widget and contact form lead
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$chatyWidgets = [];
|
||||
$widget = "";
|
||||
$dateStatus = false;
|
||||
$isDeleted = get_option("cht_is_default_deleted");
|
||||
if ($isDeleted === false) {
|
||||
$chtWidgetTitle = get_option("cht_widget_title");
|
||||
$chtWidgetTitle = empty($chtWidgetTitle) ? "Widget-1" : $chtWidgetTitle;
|
||||
$status = get_option("cht_active");
|
||||
$date = get_option("cht_created_on");
|
||||
$dateStatus = ($date === false || empty($date)) ? 0 : 1;
|
||||
$widget = [
|
||||
'title' => $chtWidgetTitle,
|
||||
'index' => 0,
|
||||
'nonce' => wp_create_nonce("chaty_remove__0"),
|
||||
'status' => $status,
|
||||
'created_on' => $date,
|
||||
];
|
||||
$chatyWidgets[] = $widget;
|
||||
}
|
||||
|
||||
$status = get_option("cht_active");
|
||||
$widgetURL = admin_url("admin.php?page=chaty-upgrade");
|
||||
if ($status === false) {
|
||||
$chatyWidgets = [];
|
||||
$widgetURL = admin_url("admin.php?page=chaty-app&widget=0");
|
||||
}
|
||||
?>
|
||||
<div class="wrap">
|
||||
<div class="container" dir="ltr">
|
||||
<?php settings_errors(); ?>
|
||||
|
||||
<header class="flex py-2 flex-col items-start sm:flex-row sm:justify-between">
|
||||
<a href="<?php echo esc_url( $this->getDashboardUrl() ) ?>">
|
||||
<img src="<?php echo esc_url(CHT_PLUGIN_URL.'admin/assets/images/logo-color.svg'); ?>" alt="Chaty" class="logo">
|
||||
</a>
|
||||
<div class="flex items-center mt-8 sm:mt-0 space-x-3">
|
||||
<a class="btn rounded-lg font-normal text-base bg-gray-100 border-gray-400 text-cht-gray-150 hover:bg-cht-gray-150/10 hover:text-cht-gray-150" href="<?php echo esc_url($widgetURL) ?>">
|
||||
<?php esc_html_e('Create New Widget', 'chaty'); ?>
|
||||
</a>
|
||||
<a class="text-base text-cht-primary border border-solid border-cht-primary rounded-lg px-3 sm:px-5 py-1.5 sm:py-2.5 transition duration-200 ease-linear hover:text-cht-primary hover:bg-cht-primary/10 inline-block font-normal" href="<?php echo esc_url($this->getUpgradeMenuItemUrl()); ?>">
|
||||
<?php esc_html_e('Upgrade Now', 'chaty'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="chaty-table">
|
||||
<?php if (count($chatyWidgets)) { ?>
|
||||
<div class="responsive-table dashboard">
|
||||
<table class="border-separate w-full rounded-lg border border-cht-gray-50" cellspacing="0" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-28 rounded-tl-lg text-cht-gray-150 text-sm font-semibold font-primary py-3 px-2 bg-cht-primary-50"><?php esc_html_e("Status", 'chaty'); ?></th>
|
||||
<th class="text-left text-cht-gray-150 text-sm font-semibold font-primary py-3 px-5 bg-cht-primary-50"><?php esc_html_e("Widget name", 'chaty'); ?></th>
|
||||
<?php if ($dateStatus) { ?>
|
||||
<th class="text-left text-cht-gray-150 text-sm font-semibold font-primary py-3 px-5 bg-cht-primary-50"><?php esc_html_e("Created On", 'chaty'); ?></th>
|
||||
<?php } ?>
|
||||
<th class="w-36 rounded-tr-lg text-cht-gray-150 text-sm font-semibold font-primary py-3 px-2 bg-cht-primary-50"><?php esc_html_e("Actions", 'chaty'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($chatyWidgets as $widget) { ?>
|
||||
<tr id="widget_<?php echo esc_attr($widget['index']) ?>" data-widget="<?php echo esc_attr($widget['index']) ?>" data-nonce="<?php echo esc_attr($widget['nonce']) ?>">
|
||||
<td class="bg-white py-3.5 px-5 text-cht-gray-150 font-primary text-sm text-center">
|
||||
<label class="chaty-switch" for="trigger_on_time<?php echo esc_attr($widget['index']) ?>">
|
||||
<input type="checkbox" class="change-chaty-status" name="chaty_trigger_on_time" id="trigger_on_time<?php echo esc_attr($widget['index']) ?>" value="yes" <?php checked($widget['status'], 1) ?>>
|
||||
<div class="chaty-slider round"></div>
|
||||
</label>
|
||||
</td>
|
||||
<td class="border-t bg-white border-x py-3.5 text-cht-gray-150 font-primary text-sm text-left px-5 border-cht-gray-50 widget-title" data-title="<?php esc_html_e("Widget name", 'chaty'); ?>"><?php echo esc_attr($widget['title']) ?></td>
|
||||
<?php if ($dateStatus) { ?>
|
||||
<?php if (!empty($widget['created_on'])) {?>
|
||||
<td class="border-t bg-white py-3.5 text-cht-gray-150 font-primary text-sm text-left px-5 border-r border-cht-gray-50" data-title="<?php esc_html_e("Created On", 'chaty'); ?>"><?php echo date("F j, Y", strtotime($widget['created_on'])) ?></td>
|
||||
<?php } else { ?>
|
||||
<td class="border-t bg-white py-3.5 text-cht-gray-150 font-primary text-sm text-left px-5 border-r border-cht-gray-50" data-title="<?php esc_html_e("Created On", 'chaty'); ?>"> </td>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<td class="bg-white py-3.5 px-5">
|
||||
<div class="font-primary text-cht-gray-150 relative">
|
||||
<div class="flex items-stretch justify-center">
|
||||
<a class="border-l text-center text-xs border-t leading-5 border-b border-cht-gray-150/30 px-2.5 py-1 rounded-tl-md rounded-bl-md inline-block duration-200 ease-linear hover:bg-cht-gray-150/10 focus:text-cht-gray-150"
|
||||
href="<?php echo esc_url(admin_url("admin.php?page=chaty-app&widget=".esc_attr($widget['index']))) ?>">
|
||||
<?php esc_html_e("Edit", "chaty") ?>
|
||||
</a>
|
||||
<span class="action-dropdown-btn border border-cht-gray-150/30 rounded-tr-md rounded-br-md px-1 inline-block cursor-pointer duration-200 ease-linear hover:bg-cht-gray-150/10">
|
||||
<svg class="pointer-events-none" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg" svg-inline="" focusable="false" tabindex="-1">
|
||||
<path d="M8 8.667a.667.667 0 100-1.334.667.667 0 000 1.334zM8 4a.667.667 0 100-1.333A.667.667 0 008 4zM8 13.333A.667.667 0 108 12a.667.667 0 000 1.333z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="action-dropdown z-10 hidden absolute top-full mt-1 right-4 bg-white p-3 rounded-lg simple-shadow border border-cht-gray-150/10">
|
||||
<a class="clone-widget flex items-center text-base rounded-lg py-2 px-3 w-36 hover:bg-cht-primary/10 hover:text-cht-gray-150 space-x-2" href="javascript:;">
|
||||
<svg width="15" height="15" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" svg-inline="" focusable="false" tabindex="-1">
|
||||
<path d="M13.333 6h-6C6.597 6 6 6.597 6 7.333v6c0 .737.597 1.334 1.333 1.334h6c.737 0 1.334-.597 1.334-1.334v-6c0-.736-.597-1.333-1.334-1.333z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.333 10h-.666a1.333 1.333 0 01-1.334-1.333v-6a1.333 1.333 0 011.334-1.334h6A1.333 1.333 0 0110 2.667v.666" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
<span><?php esc_html_e("Duplicate", "chaty") ?></span>
|
||||
</a>
|
||||
<a class="rename-widget text-base rounded-lg py-2 px-3 flex items-center w-36 hover:bg-cht-primary/10 hover:text-cht-gray-150 space-x-2" href="javascript:;">
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" svg-inline="" focusable="false" tabindex="-1"><path d="M14.166 2.5A2.357 2.357 0 0117.5 5.833L6.25 17.083l-4.583 1.25 1.25-4.583L14.166 2.5z" stroke="#83A1B7" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"></path></svg>
|
||||
<span><?php esc_html_e("Rename", "chaty") ?></span>
|
||||
</a>
|
||||
<hr class="border border-cht-gray-150/10 my-1" />
|
||||
<a class="remove-widget text-base rounded-lg py-2 px-3 flex items-center w-36 hover:bg-cht-primary/10 hover:text-cht-gray-150 space-x-2" href="javascript:;">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" svg-inline="" focusable="false" tabindex="-1"><path d="M2 4h12M5.333 4V2.667a1.333 1.333 0 011.334-1.334h2.666a1.333 1.333 0 011.334 1.334V4m2 0v9.333a1.334 1.334 0 01-1.334 1.334H4.667a1.334 1.334 0 01-1.334-1.334V4h9.334z" stroke="#ff424d" stroke-linecap="round" stroke-linejoin="round"></path></svg>
|
||||
<span class="text-cht-red "><?php esc_html_e("Delete", "chaty") ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }//end foreach
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="chaty-table no-widgets py-20 bg-cover rounded-lg border border-cht-gray-50">
|
||||
<img class="mx-auto w-60" src="<?php echo CHT_PLUGIN_URL ?>/admin/assets/images/stars-image.png" />
|
||||
<p class="font-primary text-base text-cht-gray-150 -mt-2 max-w-screen-sm px-5 mx-auto"><?php esc_html_e("Create widgets for WhatsApp, Facebook Messenger, Telegram & 20+ more channels. Adding a new Chaty widget takes a minute - start now 🚀", "chaty") ?></p>
|
||||
<div class="flex items-center space-x-3 mt-5 justify-center">
|
||||
<a class="btn rounded-lg drop-shadow-3xl" href="<?php echo admin_url("admin.php?page=chaty-app&widget=0") ?>"><?php esc_html_e("Create Widget", "chaty") ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php }//end if
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chaty-popup" id="clone-widget">
|
||||
<div class="chaty-popup-outer"></div>
|
||||
<div class="chaty-popup-inner popup-pos-bottom">
|
||||
<div class="chaty-popup-content">
|
||||
<div class="chaty-popup-close">
|
||||
<a href="javascript:void(0)" class="close-delete-pop close-chaty-popup-btn">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15.6 15.5c-.53.53-1.38.53-1.91 0L8.05 9.87 2.31 15.6c-.53.53-1.38.53-1.91 0s-.53-1.38 0-1.9l5.65-5.64L.4 2.4C-.13 1.87-.13 1.02.4.49s1.38-.53 1.91 0l5.64 5.63L13.69.39c.53-.53 1.38-.53 1.91 0s.53 1.38 0 1.91L9.94 7.94l5.66 5.65c.52.53.52 1.38 0 1.91z"></path></svg>
|
||||
</a>
|
||||
</div>
|
||||
<form class="" action="<?php echo admin_url("admin.php?page=chaty-widget-settings") ?>" method="get">
|
||||
<div class="a-card a-card--normal">
|
||||
<div class="chaty-popup-header font-medium">
|
||||
<?php esc_html_e("Duplicate Widget?", "chaty") ?>
|
||||
</div>
|
||||
<div class="chaty-popup-body">
|
||||
<?php esc_html_e("Please select a name for your new duplicate widget", "chaty") ?>
|
||||
<div class="chaty-popup-input">
|
||||
<input type="text" name="widget_title" id="widget_title">
|
||||
<input type="hidden" name="copy-from" id="widget_clone_id">
|
||||
<input type="hidden" name="page" value="chaty-widget-settings">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="delete_widget_id" value="">
|
||||
<div class="chaty-popup-footer">
|
||||
<button type="submit" class="btn btn-primary"><?php esc_html_e("Create Widget", "chaty") ?></button>
|
||||
<button type="button" class="btn btn-default close-chaty-popup-btn"><?php esc_html_e("Cancel", "chaty") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chaty-popup" id="rename-widget">
|
||||
<div class="chaty-popup-outer"></div>
|
||||
<div class="chaty-popup-inner popup-pos-bottom">
|
||||
<div class="chaty-popup-content">
|
||||
<div class="chaty-popup-close">
|
||||
<a href="javascript:void(0)" class="close-delete-pop close-chaty-popup-btn right-2 top-2 relative">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15.6 15.5c-.53.53-1.38.53-1.91 0L8.05 9.87 2.31 15.6c-.53.53-1.38.53-1.91 0s-.53-1.38 0-1.9l5.65-5.64L.4 2.4C-.13 1.87-.13 1.02.4.49s1.38-.53 1.91 0l5.64 5.63L13.69.39c.53-.53 1.38-.53 1.91 0s.53 1.38 0 1.91L9.94 7.94l5.66 5.65c.52.53.52 1.38 0 1.91z"></path></svg>
|
||||
</a>
|
||||
</div>
|
||||
<form class="" action="<?php echo admin_url("admin.php?page=chaty-widget-settings") ?>" method="get" id="rename-widget-form">
|
||||
<div class="a-card a-card--normal">
|
||||
<div class="chaty-popup-header text-left font-primary text-cht-gray-150 font-medium py-3 px-3 sm:p-5 relative">
|
||||
<?php esc_html_e("Rename Widget", "chaty") ?>
|
||||
</div>
|
||||
<div class="chaty-popup-body px-4 py-4 sm:px-8 sm:py-5">
|
||||
<p class=" text-base font-primary text-cht-gray-150">
|
||||
<?php esc_html_e("Enter new name for widget", "chaty") ?>
|
||||
</p>
|
||||
<div class="chaty-popup-input">
|
||||
<input type="text" name="widget_title" id="widget_new_title">
|
||||
<input type="hidden" name="widget_id" id="widget_rename_id">
|
||||
<input type="hidden" name="page" value="chaty-widget-settings">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="delete_widget_id" value="">
|
||||
<div class="flex justify-end py-5 px-8 space-x-5">
|
||||
<button type="button" class="rounded-lg btn bg-transparent border-cht-gray-150 text-cht-gray-150 hover:text-cht-gray-150 hover:bg-cht-gray-150/10 btn-default close-chaty-popup-btn"><?php esc_html_e("Cancel", "chaty") ?></button>
|
||||
<button type="submit" class="btn rounded-lg btn-primary drop-shadow-3xl"><?php esc_html_e("Rename Widget", "chaty") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chaty-popup" id="delete-widget">
|
||||
<div class="chaty-popup-outer"></div>
|
||||
<div class="chaty-popup-inner popup-pos-bottom">
|
||||
<div class="chaty-popup-content">
|
||||
<div class="chaty-popup-close">
|
||||
<a href="javascript:void(0)" class="close-delete-pop close-chaty-popup-btn right-2 top-2 relative">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15.6 15.5c-.53.53-1.38.53-1.91 0L8.05 9.87 2.31 15.6c-.53.53-1.38.53-1.91 0s-.53-1.38 0-1.9l5.65-5.64L.4 2.4C-.13 1.87-.13 1.02.4.49s1.38-.53 1.91 0l5.64 5.63L13.69.39c.53-.53 1.38-.53 1.91 0s.53 1.38 0 1.91L9.94 7.94l5.66 5.65c.52.53.52 1.38 0 1.91z"></path></svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="a-card a-card--normal">
|
||||
<div class="chaty-popup-header text-left font-primary text-cht-gray-150 font-medium p-5 relative">
|
||||
<?php esc_html_e("Delete Widget?", "chaty") ?>
|
||||
</div>
|
||||
<div class="chaty-popup-body p-5 text-base font-primary text-cht-gray-150">
|
||||
<?php esc_html_e("Are you sure you want to delete this widget?", "chaty") ?>
|
||||
</div>
|
||||
<input type="hidden" id="delete_widget_id" value="">
|
||||
<div class="flex justify-end p-5 space-x-5">
|
||||
<button type="button" class="rounded-lg btn btn-default close-chaty-popup-btn bg-transparent border-cht-gray-150 text-cht-gray-150 hover:text-cht-gray-150 hover:bg-cht-gray-150/10"><?php esc_html_e("Cancel", "chaty") ?></button>
|
||||
<button type="button" class="rounded-lg bg-transparent border-red-500 text-red-500 hover:bg-red-500/10 hover:text-red-500 btn btn-primary" id="delete-widget-btn" onclick="javascript:removeWidgetItem();"><?php esc_html_e("Delete Widget", "chaty") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var dataWidget = -1;
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
jQuery(document).on("click", ".clone-widget", function(){
|
||||
window.location = "<?php echo esc_url(admin_url("admin.php?page=chaty-upgrade")); ?>";
|
||||
});
|
||||
|
||||
jQuery(document).on("click", ".change-chaty-status", function(e){
|
||||
dataWidget = jQuery(this).closest("tr").data("widget");
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'change_chaty_widget_status',
|
||||
widget_nonce: jQuery("#widget_"+dataWidget).data("nonce"),
|
||||
widget_index: "_"+jQuery("#widget_"+dataWidget).data("widget")
|
||||
},
|
||||
beforeSend: function (xhr) {
|
||||
|
||||
},
|
||||
success: function (res) {
|
||||
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
jQuery(document).on("click", ".remove-widget", function(){
|
||||
dataWidget = jQuery(this).closest("tr").data("widget");
|
||||
jQuery("#delete-widget").show();
|
||||
});
|
||||
|
||||
/* IIFE: action column button show hide scripts */
|
||||
(()=>{
|
||||
|
||||
let $openedScope = null;
|
||||
function showHideDropdown( $scope, toggle = false ) {
|
||||
if( $scope && toggle ) {
|
||||
$scope.find('.action-dropdown-btn').addClass('bg-cht-gray-150/10');
|
||||
$scope.find('.action-dropdown').slideDown(250, 'linear');
|
||||
}
|
||||
if( $scope && !toggle ) {
|
||||
$scope.find('.action-dropdown-btn').removeClass('bg-cht-gray-150/10');
|
||||
$scope.find('.action-dropdown').slideUp(250, 'linear');
|
||||
}
|
||||
}
|
||||
|
||||
// show element when click on 3 dots
|
||||
jQuery('.action-dropdown-btn').on('click', function(){
|
||||
const $scope = jQuery(this).parent().parent();
|
||||
const isSame = $scope.is( $openedScope );
|
||||
if( !isSame ) {
|
||||
showHideDropdown( $openedScope )
|
||||
showHideDropdown( $scope, true );
|
||||
$openedScope = $scope;
|
||||
}
|
||||
else {
|
||||
showHideDropdown( $scope, false );
|
||||
$openedScope = null;
|
||||
}
|
||||
})
|
||||
|
||||
//hide elemnt when click out of element
|
||||
jQuery(document).on('click', function(ev){
|
||||
if( !ev.target.closest('.action-dropdown-btn')) {
|
||||
showHideDropdown($openedScope)
|
||||
$openedScope = null
|
||||
}
|
||||
})
|
||||
|
||||
// show rename modal
|
||||
jQuery(".rename-widget").on('click', function(){
|
||||
jQuery(".chaty-popup-content").removeClass("form-loading");
|
||||
jQuery('#rename-widget').show();
|
||||
var WidgetId = jQuery(this).closest("tr").data("widget");
|
||||
jQuery("#widget_rename_id").val(WidgetId);
|
||||
var WidgetName = jQuery(this).closest("tr").find(".widget-title").text();
|
||||
jQuery("#widget_new_title").val(WidgetName);
|
||||
dataWidget = WidgetId;
|
||||
});
|
||||
|
||||
// rename form submit
|
||||
jQuery(document).on("submit", "#rename-widget-form", function(e){
|
||||
jQuery("#rename-widget .chaty-popup-content").removeClass("form-loading");
|
||||
jQuery("#widget_new_title").removeClass("input-error");
|
||||
jQuery(this).find(".form-error-message").remove();
|
||||
if(jQuery("#widget_new_title").val() == "") {
|
||||
jQuery("#widget_new_title").addClass("input-error");
|
||||
jQuery("#widget_new_title").after("<span class='form-error-message'><?php esc_html_e("Widget name is required", "chaty") ?></span>");
|
||||
} else {
|
||||
jQuery("#rename-widget .chaty-popup-content").addClass("form-loading");
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'rename_chaty_widget',
|
||||
widget_nonce: jQuery("#widget_"+dataWidget).data("nonce"),
|
||||
widget_index: "_"+jQuery("#widget_"+dataWidget).data("widget"),
|
||||
widget_title: jQuery("#widget_new_title").val()
|
||||
},
|
||||
beforeSend: function (xhr) {
|
||||
jQuery("#rename-widget-form .btn-primary").prop("disabled", true);
|
||||
|
||||
},
|
||||
success: function (res) {
|
||||
window.location = res;
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
})()
|
||||
});
|
||||
|
||||
function removeWidgetItem() {
|
||||
if(dataWidget == -1) {
|
||||
return;
|
||||
}
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'remove_chaty_widget',
|
||||
widget_nonce: jQuery("#widget_"+dataWidget).data("nonce"),
|
||||
widget_index: "_"+jQuery("#widget_"+dataWidget).data("widget")
|
||||
},
|
||||
beforeSend: function (xhr) {
|
||||
jQuery("#delete-widget .chaty-popup-content").addClass("form-loading");
|
||||
jQuery("#delete-widget-btn").prop("disabled", true);
|
||||
|
||||
},
|
||||
success: function (res) {
|
||||
window.location = res;
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/**
|
||||
* Chaty Popups for widget and contact form lead
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$showFirstChatyBox = get_option("show_first_chaty_box");
|
||||
if ($showFirstChatyBox == 1) {
|
||||
update_option("show_first_chaty_box", 2);
|
||||
?>
|
||||
<div class="first-chaty-popup">
|
||||
<div class="first-chaty-popup-overlay"></div>
|
||||
<div class="first-chaty-popup-content">
|
||||
<div class="first-chaty-popup-data">
|
||||
<a href="#" class="close-first-popup">
|
||||
<img src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/x.svg" alt="chaty" />
|
||||
</a>
|
||||
<a href="<?php echo esc_url( $this->getDashboardUrl() ) ?>">
|
||||
<img class="mx-auto" src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/logo-color.svg" alt="chaty" />
|
||||
</a>
|
||||
<div class="first-title"><?php esc_html_e("Your first widget is up!", "chaty"); ?> 🎉</div>
|
||||
<div class="first-des"><?php printf(esc_html__("Yay - we're happy you chose Chaty for your website. If you run into anything, the %s is always here for you.", "chaty"), "<a target='_blank' href='https://premio.io/help/chaty/?utm_source=firstwidget'><b>".esc_html__("help center", "chaty")."</b></a>"); ?></div>
|
||||
<div class="first-button">
|
||||
<a href="<?php echo admin_url("admin.php?page=chaty-app") ?>"><?php esc_html_e("Go to Dashboard", "chaty"); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
$showFirstChatyLeadBox = get_option("show_first_chaty_lead_box");
|
||||
if ($showFirstChatyLeadBox == 1) {
|
||||
update_option("show_first_chaty_lead_box", 2);
|
||||
?>
|
||||
<div class="first-chaty-popup">
|
||||
<div class="first-chaty-popup-overlay"></div>
|
||||
<div class="first-chaty-popup-content chaty-lead">
|
||||
<div class="first-chaty-popup-data">
|
||||
<a href="#" class="close-first-popup">
|
||||
<img src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/x.svg" alt="chaty" />
|
||||
</a>
|
||||
<a href="<?php echo esc_url( $this->getDashboardUrl() ) ?>">
|
||||
<img class="mx-auto" src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/logo-color.svg" alt="chaty" />
|
||||
</a>
|
||||
<div class="first-title"><?php esc_html_e("Congratulations", "chaty"); ?> 👏</div>
|
||||
<div class="first-des p-50">
|
||||
<p>You just got your first lead from Chaty. Click on the <b>Show me</b> button to display your contact form leads</p>
|
||||
<p><b>Upgrade to Chaty Pro 🚀</b> to get leads to your email along with advanced triggers & targeting & more cool features</p>
|
||||
</div>
|
||||
<div class="show-lead-btn">
|
||||
<a href="<?php echo admin_url("admin.php?page=chaty-contact-form-feed") ?>" class="">Show me the new lead</a><span class="dashicons dashicons-arrow-right"></span>
|
||||
</div>
|
||||
<div class="first-button lead-btn">
|
||||
<a target="_blank" href="<?php echo admin_url("admin.php?page=chaty-app-upgrade") ?>"><?php esc_html_e("Upgrade to Pro", "chaty"); ?><span>🚀</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}//end if
|
||||
}//end if
|
||||
?>
|
||||
<script>
|
||||
jQuery(document).ready(function(){
|
||||
jQuery(document).on("click", ".close-first-popup", function(e){
|
||||
e.preventDefault();
|
||||
jQuery(this).closest(".first-chaty-popup").hide();
|
||||
});
|
||||
jQuery(document).on("click", ".first-chaty-popup-overlay", function(e){
|
||||
jQuery(".first-chaty-popup").hide();
|
||||
});
|
||||
jQuery(document).on("click", ".first-chaty-popup-content", function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
.chaty-help-btn,.chaty-help-form{position:fixed;z-index:1001;display:none}.chaty-help-btn{display:block!important;right:20px;bottom:20px}.chaty-help-btn a{box-shadow:0 0 5px rgb(0 0 0 / 20%);display:block;border:3px solid #fff;width:50px;height:50px;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;position:relative}.chaty-help-btn a img{width:100%;height:auto;display:block;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%}.chaty-help-form{right:85px;border:1px solid #e9edf0;bottom:25px;background:#fff;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;width:320px;direction:ltr;opacity:0;transition:.4s;-webkit-transition:.4s;-moz-transition:.4s}.chaty-help-form.active{opacity:1;pointer-events:inherit;display:block}.chaty-help-header{background:#f4f4f4;border-bottom:1px solid #e9edf0;padding:5px 20px;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px 10px 0 0;font-size:16px;text-align:right}.chaty-help-header b{float:left}.chaty-help-content{margin-bottom:10px;padding:20px 20px 10px}.chaty-help-form p{margin:0 0 1em}.folder-form-field{margin-bottom:10px}.folder-form-field input,.folder-form-field textarea{min-height:1px;line-height:1.4;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:5px 10px;display:block;width:100%;box-sizing:border-box;border:1px solid #c5c5c5}.folder-form-field textarea{width:100%;height:100px;margin-bottom:0}.chaty-help-button{border:none;padding:8px 0;width:100%;background:#ff6624;color:#fff;border-radius:18px;cursor:pointer}.chaty-help-form .error-message{font-weight:400;font-size:14px;display:block}.chaty-help-form input.input-error,.chaty-help-form textarea.input-error{border-color:#dc3232}.chaty-help-btn span.tooltiptext{position:absolute;background:#000;font-size:12px;color:#fff;top:-35px;width:140%;text-align:center;left:-20%;border-radius:5px;direction:ltr}p.error-p,p.success-p{margin:0;font-size:14px;text-align:center}.chaty-help-btn span.tooltiptext:after{bottom:-10px;content:"";transform:translateX(-50%);height:10px;width:0;border-width:10px 5px 0;border-style:solid;border-color:#000 transparent transparent;left:50%;position:absolute}p.success-p{color:green}p.error-p{color:#dc3232}html[dir=rtl] .chaty-help-btn{left:20px;right:auto}html[dir=rtl] .chaty-help-form{left:85px;right:auto}.folder-popup-body h3{line-height:24px}.folder-popup-overlay .form-control input{width:100%;margin:0 0 15px}body.plugins-php .tooltiptext{display:none}.help-form-footer{text-align:center}.help-form-footer p{margin:0;padding:0}.help-form-footer p+p{margin:0;padding:10px 0}.chaty-form-response p{margin:0;padding:8px 0}
|
||||
</style>
|
||||
<div class="chaty-help-form">
|
||||
<form action="<?php echo esc_url(admin_url('admin-ajax.php')) ?>" method="post" id="chaty-help-form">
|
||||
<div class="chaty-help-header">
|
||||
<b>Gal Dubinski</b> Co-Founder at Premio
|
||||
</div>
|
||||
<div class="chaty-help-content">
|
||||
<p><?php esc_html_e("Hello! Are you experiencing any problems with Chaty? Please let me know :)", 'chaty'); ?></p>
|
||||
<div class="folder-form-field">
|
||||
<input type="text" name="user_email" id="user_email" placeholder="<?php esc_html_e("Email", 'chaty'); ?>">
|
||||
</div>
|
||||
<div class="folder-form-field">
|
||||
<textarea type="text" name="textarea_text" id="textarea_text" placeholder="<?php esc_html_e("How can I help you?", 'chaty'); ?>"></textarea>
|
||||
</div>
|
||||
<div class="form-button">
|
||||
<button type="submit" class="chaty-help-button" ><?php esc_html_e("Chat") ?></button>
|
||||
<input type="hidden" name="action" value="wcp_admin_send_message_to_owner" >
|
||||
<input type="hidden" id="nonce" name="nonce" value="<?php echo esc_attr(wp_create_nonce('chaty_send_message_to_owner')) ?>" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="help-form-footer">
|
||||
<p><?php esc_html_e("Or", 'chaty'); ?></p>
|
||||
<p><a href="https://premio.io/help/chaty/?utm_source=pluginspage" target="_blank"><?php esc_html_e("Visit our Help Center >>", 'chaty'); ?></a></p>
|
||||
</div>
|
||||
</form>
|
||||
<div class="chaty-form-response"></div>
|
||||
</div>
|
||||
<div class="chaty-help-btn">
|
||||
<!-- Free/Pro Only URL Change -->
|
||||
<a class="chaty-help-tooltip" href="javascript:;"><img src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/premio-owner.png") ?>" alt="<?php esc_html_e("Need help?", 'chaty'); ?>" /></a>
|
||||
<?php
|
||||
$option = get_option("hide_chaty_cta");
|
||||
if ($option !== "yes") { ?>
|
||||
<span class="tooltiptext"><?php esc_html_e("Need help?", "chaty") ?></span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function(){
|
||||
jQuery("#chaty-help-form").submit(function(){
|
||||
jQuery(".chaty-help-button").attr("disabled",true);
|
||||
jQuery(".chaty-help-button").text("<?php esc_html_e("Sending Request...") ?>");
|
||||
formData = jQuery(this).serialize();
|
||||
jQuery.ajax({
|
||||
url: "<?php echo esc_url(admin_url('admin-ajax.php')) ?>",
|
||||
data: formData,
|
||||
type: "post",
|
||||
success: function(responseArray){
|
||||
jQuery("#chaty-help-form").find(".error-message").remove();
|
||||
jQuery("#chaty-help-form").find(".input-error").removeClass("input-error");
|
||||
if(responseArray.error == 1) {
|
||||
jQuery(".chaty-help-button").attr("disabled",false);
|
||||
jQuery(".chaty-help-button").text("<?php esc_html_e("Chat", 'chaty'); ?>");
|
||||
for(i=0;i<responseArray.errors.length;i++) {
|
||||
jQuery("#"+responseArray.errors[i]['key']).addClass("input-error");
|
||||
jQuery("#"+responseArray.errors[i]['key']).after('<span class="error-message">'+responseArray.errors[i]['message']+'</span>');
|
||||
}
|
||||
} else if(responseArray.status == 1) {
|
||||
jQuery(".chaty-help-button").text("<?php esc_html_e("Done!", 'chaty'); ?>");
|
||||
setTimeout(function(){
|
||||
jQuery("#user_email").val("");
|
||||
jQuery("#textarea_text").val("");
|
||||
jQuery("#chaty-help-form").hide();
|
||||
jQuery(".chaty-help-header").hide();
|
||||
jQuery(".help-form-footer").hide();
|
||||
jQuery(".chaty-form-response").html("<p class='success-p'><?php esc_html_e("Your message is sent successfully.", 'chaty'); ?></p>");
|
||||
},1000);
|
||||
} else if(responseArray.status == 0) {
|
||||
jQuery("#chaty-help-form").hide();
|
||||
jQuery(".chaty-help-header").hide();
|
||||
jQuery(".help-form-footer").hide();
|
||||
jQuery(".chaty-form-response").html("<p class='error-p'><?php printf(esc_html__("There is some problem in sending request. Please send us mail on %s", 'chaty'), "<a href='mailto:contact@premio.io'>contact@premio.io</a>"); ?></p>");
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
jQuery(".chaty-help-tooltip").click(function(e){
|
||||
e.stopPropagation();
|
||||
jQuery("#chaty-help-form").show();
|
||||
jQuery(".chaty-help-header").show();
|
||||
jQuery(".help-form-footer").show();
|
||||
jQuery(".chaty-form-response").html("");
|
||||
jQuery(".chaty-help-btn").toggle();
|
||||
jQuery(".chaty-help-form").toggleClass("active");
|
||||
if(jQuery(".chaty-help-btn .tooltiptext").length) {
|
||||
jQuery(".chaty-help-btn .tooltiptext").remove();
|
||||
jQuery.ajax({
|
||||
url: "<?php echo esc_url(admin_url('admin-ajax.php')) ?>",
|
||||
data: {
|
||||
nonce: "<?php echo wp_create_nonce("hide_chaty_cta") ?>",
|
||||
action: "hide_chaty_cta"
|
||||
},
|
||||
type: "post",
|
||||
success: function (responseText) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
jQuery(".chaty-help-form").click(function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
jQuery("body").click(function(){
|
||||
jQuery(".chaty-help-form").removeClass("active");
|
||||
if(jQuery(".chaty-help-form").hasClass("active")) {
|
||||
jQuery(".chaty-help-btn").show();
|
||||
} else {
|
||||
jQuery(".chaty-help-btn").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,249 @@
|
||||
<?php
|
||||
/**
|
||||
* Chaty Popups
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div class="chaty-popup" id="custom-message-popup">
|
||||
<div class="chaty-popup-outer"></div>
|
||||
<div class="chaty-popup-inner popup-pos-bottom">
|
||||
<div class="chaty-popup-content">
|
||||
<div class="chaty-popup-close">
|
||||
<a href="javascript:void(0)" class="close-delete-pop close-chaty-popup-btn">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15.6 15.5c-.53.53-1.38.53-1.91 0L8.05 9.87 2.31 15.6c-.53.53-1.38.53-1.91 0s-.53-1.38 0-1.9l5.65-5.64L.4 2.4C-.13 1.87-.13 1.02.4.49s1.38-.53 1.91 0l5.64 5.63L13.69.39c.53-.53 1.38-.53 1.91 0s.53 1.38 0 1.91L9.94 7.94l5.66 5.65c.52.53.52 1.38 0 1.91z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="a-card a-card--normal">
|
||||
<div class="chaty-popup-header font-medium font-primary">
|
||||
<?php esc_html_e("No channel was selected", 'chaty'); ?>
|
||||
</div>
|
||||
<div class="chaty-popup-body">
|
||||
<?php esc_html_e("Please select at least one chat channel before publishing your widget", 'chaty'); ?>
|
||||
</div>
|
||||
<input type="hidden" id="delete_widget_id" value="">
|
||||
<div class="chaty-popup-footer">
|
||||
<button type="button" class="btn btn-default check-for-numbers"><?php esc_html_e("Save Anyway", 'chaty'); ?></button>
|
||||
<button type="button" class="close-chaty-popup-btn channel-setting-btn btn btn-primary"><?php esc_html_e("Change Number", 'chaty'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chaty-popup" id="no-device-popup">
|
||||
<div class="chaty-popup-outer"></div>
|
||||
<div class="chaty-popup-inner popup-pos-bottom">
|
||||
<div class="chaty-popup-content">
|
||||
<div class="chaty-popup-close">
|
||||
<a href="javascript:void(0)" class="close-delete-pop close-chaty-popup-btn relative top-2 right-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15.6 15.5c-.53.53-1.38.53-1.91 0L8.05 9.87 2.31 15.6c-.53.53-1.38.53-1.91 0s-.53-1.38 0-1.9l5.65-5.64L.4 2.4C-.13 1.87-.13 1.02.4.49s1.38-.53 1.91 0l5.64 5.63L13.69.39c.53-.53 1.38-.53 1.91 0s.53 1.38 0 1.91L9.94 7.94l5.66 5.65c.52.53.52 1.38 0 1.91z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="a-card a-card--normal">
|
||||
<div class="chaty-popup-header text-cht-gray-150 py-4 font-medium text-left px-5">
|
||||
<?php esc_html_e("No channel was selected", 'chaty'); ?>
|
||||
</div>
|
||||
<div class="text-cht-gray-150 text-base px-5 py-6">
|
||||
<?php esc_html_e("Please select at least one chat channel before publishing your widget", 'chaty'); ?>
|
||||
</div>
|
||||
<input type="hidden" id="delete_widget_id" value="">
|
||||
<div class="chaty-popup-footer flex px-5">
|
||||
<button type="button" class="close-chaty-popup-btn channel-setting-btn btn btn-primary rounded-lg mr-5"><?php esc_html_e("Select Channel", 'chaty'); ?></button>
|
||||
<button type="button" class="btn btn-default check-for-triggers btn btn-primary btn rounded-lg btn-primary bg-transparent text-cht-gray-150 border-cht-gray-150 hover:bg-transparent hover:text-cht-gray-150"><?php esc_html_e("Save Anyway", 'chaty'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="chaty-popup" id="no-device-value">
|
||||
<div class="chaty-popup-outer"></div>
|
||||
<div class="chaty-popup-inner popup-pos-bottom">
|
||||
<div class="chaty-popup-content">
|
||||
<div class="chaty-popup-close">
|
||||
<a href="javascript:void(0)" class="close-delete-pop close-chaty-popup-btn relative top-2 right-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15.6 15.5c-.53.53-1.38.53-1.91 0L8.05 9.87 2.31 15.6c-.53.53-1.38.53-1.91 0s-.53-1.38 0-1.9l5.65-5.64L.4 2.4C-.13 1.87-.13 1.02.4.49s1.38-.53 1.91 0l5.64 5.63L13.69.39c.53-.53 1.38-.53 1.91 0s.53 1.38 0 1.91L9.94 7.94l5.66 5.65c.52.53.52 1.38 0 1.91z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="a-card a-card--normal">
|
||||
<div class="chaty-popup-header text-cht-gray-150 font-medium py-4 text-left px-5">
|
||||
<?php esc_html_e("Fill out at least one channel details", 'chaty'); ?>
|
||||
</div>
|
||||
<div class="text-cht-gray-150 text-base px-5 py-6">
|
||||
<?php esc_html_e("You need to fill out at least one channel details for Chaty to show up on your website", 'chaty'); ?>
|
||||
</div>
|
||||
<input type="hidden" id="delete_widget_id" value="">
|
||||
<div class="chaty-popup-footer flex px-5">
|
||||
<button type="button" class="btn rounded-lg btn-default check-for-triggers bg-transparent text-cht-gray-150 border-cht-gray-150 hover:bg-transparent hover:text-cht-gray-150 mr-5"><?php esc_html_e("Save Anyway", 'chaty'); ?></button>
|
||||
<button type="button" class="close-chaty-popup-btn channel-setting-btn btn rounded-lg btn-primary"><?php esc_html_e("Fill channel details", 'chaty'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chaty-popup" id="device-popup">
|
||||
<div class="chaty-popup-outer"></div>
|
||||
<div class="chaty-popup-inner popup-pos-bottom">
|
||||
<div class="chaty-popup-content">
|
||||
<div class="chaty-popup-close">
|
||||
<a href="javascript:void(0)" class="close-delete-pop close-chaty-popup-btn">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15.6 15.5c-.53.53-1.38.53-1.91 0L8.05 9.87 2.31 15.6c-.53.53-1.38.53-1.91 0s-.53-1.38 0-1.9l5.65-5.64L.4 2.4C-.13 1.87-.13 1.02.4.49s1.38-.53 1.91 0l5.64 5.63L13.69.39c.53-.53 1.38-.53 1.91 0s.53 1.38 0 1.91L9.94 7.94l5.66 5.65c.52.53.52 1.38 0 1.91z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="a-card a-card--normal">
|
||||
<div class="chaty-popup-header text-cht-gray-150 font-medium py-4 text-left px-5">
|
||||
<?php esc_html_e("No device was selected", 'chaty'); ?>
|
||||
</div>
|
||||
<div class="text-cht-gray-150 text-base px-5 py-6">
|
||||
<?php esc_html_e("Please select mobile/desktop before publishing your widget", 'chaty'); ?>
|
||||
</div>
|
||||
<input type="hidden" id="delete_widget_id" value="">
|
||||
<div class="chaty-popup-footer flex px-5">
|
||||
<button type="button" class="btn btn-default check-for-triggers rounded-lg bg-transparent text-cht-gray-150 border-cht-gray-150 hover:bg-transparent hover:text-cht-gray-150 mr-5"><?php esc_html_e("Save Anyway", 'chaty'); ?></button>
|
||||
<button type="button" class="close-chaty-popup-btn channel-setting-btn btn rounded-lg btn-primary"><?php esc_html_e("Select Device", 'chaty'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chaty-popup" id="trigger-popup">
|
||||
<div class="chaty-popup-outer"></div>
|
||||
<div class="chaty-popup-inner popup-pos-bottom">
|
||||
<div class="chaty-popup-content">
|
||||
<div class="chaty-popup-close">
|
||||
<a href="javascript:void(0)" class="close-delete-pop close-chaty-popup-btn relative top-2 right-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15.6 15.5c-.53.53-1.38.53-1.91 0L8.05 9.87 2.31 15.6c-.53.53-1.38.53-1.91 0s-.53-1.38 0-1.9l5.65-5.64L.4 2.4C-.13 1.87-.13 1.02.4.49s1.38-.53 1.91 0l5.64 5.63L13.69.39c.53-.53 1.38-.53 1.91 0s.53 1.38 0 1.91L9.94 7.94l5.66 5.65c.52.53.52 1.38 0 1.91z"></path></svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="a-card a-card--normal">
|
||||
<div class="chaty-popup-header font-medium text-cht-gray-150 py-4 text-left px-5">
|
||||
<?php esc_html_e("No trigger was selected", 'chaty'); ?>
|
||||
</div>
|
||||
<div class="text-cht-gray-150 text-base px-5 py-6">
|
||||
<?php esc_html_e("Please select a trigger before publishing your widget", 'chaty'); ?>
|
||||
</div>
|
||||
<input type="hidden" id="delete_widget_id" value="">
|
||||
<div class="chaty-popup-footer flex px-5">
|
||||
<button type="button" class="btn-default check-for-status btn rounded-lg btn-primary bg-transparent text-cht-gray-150 border-cht-gray-150 hover:bg-transparent hover:text-cht-gray-150 mr-5"><?php esc_html_e("Save Anyway", 'chaty'); ?></button>
|
||||
<button type="button" class="close-chaty-popup-btn select-trigger-btn btn btn-primary rounded-lg"><?php esc_html_e("Select Trigger", 'chaty'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chaty-popup" id="status-popup">
|
||||
<div class="chaty-popup-outer"></div>
|
||||
<div class="chaty-popup-inner popup-pos-bottom">
|
||||
<div class="chaty-popup-content">
|
||||
<div class="chaty-popup-close">
|
||||
<a href="javascript:void(0)" class="close-delete-pop close-chaty-popup-btn relative top-2 right-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15.6 15.5c-.53.53-1.38.53-1.91 0L8.05 9.87 2.31 15.6c-.53.53-1.38.53-1.91 0s-.53-1.38 0-1.9l5.65-5.64L.4 2.4C-.13 1.87-.13 1.02.4.49s1.38-.53 1.91 0l5.64 5.63L13.69.39c.53-.53 1.38-.53 1.91 0s.53 1.38 0 1.91L9.94 7.94l5.66 5.65c.52.53.52 1.38 0 1.91z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="a-card a-card--normal">
|
||||
<div class="chaty-popup-header font-medium text-cht-gray-150 py-4 text-left px-5">
|
||||
<?php esc_html_e("Chaty is currently off", 'chaty'); ?>
|
||||
</div>
|
||||
<div class="text-cht-gray-150 text-base px-5 py-6">
|
||||
<?php esc_html_e("Chaty is currently turned off, would you like to save and show it on your site?", 'chaty'); ?>
|
||||
</div>
|
||||
<input type="hidden" id="delete_widget_id" value="">
|
||||
<div class="chaty-popup-footer flex px-5">
|
||||
<button type="button" class="btn-default status-and-save btn-primary btn rounded-lg bg-transparent text-cht-gray-150 border-cht-gray-150 hover:bg-transparent hover:text-cht-gray-150 mr-5"><?php esc_html_e("Just save and keep it off", 'chaty'); ?></button>
|
||||
<button type="button" class="btn-primary change-status-btn change-status-and-save btn rounded-lg"><?php esc_html_e("Save & Show on my site", 'chaty'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="first-chaty-popup" id="agent-popup">
|
||||
<div class="first-chaty-popup-overlay"></div>
|
||||
<div class="upgrade-to-premium bg-white relative overflow-hidden">
|
||||
<div class="first-chaty-popup-data">
|
||||
<a href="#" class="close-first-popup close-popup">
|
||||
<img src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/x.svg" alt="chaty" />
|
||||
</a>
|
||||
<img class="mx-auto max-w-[200px]" src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/agent-list.png" alt="chaty" />
|
||||
<div class="text-[#49687E] mb-4 mt-2 font-primary text-2xl sm:text-3xl"><?php esc_html_e("👑 Multiple Agents is a Premium Feature", "chaty"); ?></div>
|
||||
<div class="text-base text-center font-normal font-primary max-w-[452px] mx-auto text-[#49687E] p-25">
|
||||
Show <b class="font-medium">multiple agents</b> under a single channel. <b class="font-medium">For example</b>, allow visitors to reach for pre-sales info or support with different channels on WhatsApp or any other channel.
|
||||
</div>
|
||||
<div class="mt-10 relative z-10">
|
||||
<a class="text-white border border-cht-primary bg-cht-primary focus:text-white hover:bg-[#9455e1] ease-linear duration-200 hover:text-white px-10 py-2.5 inline-flex items-center space-x-3 rounded-lg mx-auto text-base font-primary drop-shadow-3xl" target="_blank" href="<?php echo admin_url("admin.php?page=chaty-app-upgrade") ?>">
|
||||
<?php esc_html_e("Upgrade to Pro", "chaty"); ?>
|
||||
<svg width="17" height="16" viewBox="0 0 17 16" fill="none">
|
||||
<path d="M6.5 12L10.5 8L6.5 4" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<img class="absolute z-0 left-0 bottom-0" src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/particle.png" alt="chaty" />
|
||||
<img class="absolute z-0 right-0 top-[30%] drop-shadow-xl" src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/particle2.png" alt="chaty" />
|
||||
<img class="absolute z-0 left-5 drop-shadow-xl top-8" src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/particle3.png" alt="chaty" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="chaty-popup" id="chat-view-popup" >
|
||||
<div class="chat-view-popup-overlay"></div>
|
||||
<div class="chat-view-popup-content">
|
||||
<div class="chat-view-popup-data">
|
||||
<div class="chaty-popup-close">
|
||||
<a href="javascript:void(0)" class="close-delete-pop close-chaty-popup-btn relative top-2 right-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15.6 15.5c-.53.53-1.38.53-1.91 0L8.05 9.87 2.31 15.6c-.53.53-1.38.53-1.91 0s-.53-1.38 0-1.9l5.65-5.64L.4 2.4C-.13 1.87-.13 1.02.4.49s1.38-.53 1.91 0l5.64 5.63L13.69.39c.53-.53 1.38-.53 1.91 0s.53 1.38 0 1.91L9.94 7.94l5.66 5.65c.52.53.52 1.38 0 1.91z"></path></svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="chat-view-data">
|
||||
<div class="chat-view-data-left">
|
||||
<div class="chat-view-content">
|
||||
<img src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/pro-feature.png">
|
||||
<div class="view-pro-title"><?php esc_html_e("Upgrade to Pro", "chaty"); ?> 🎉</div>
|
||||
<div class="view-pro-desc"><?php esc_html_e("Enjoy awesome features like chat view, a customized pop-up view. Use the amazing WooCommerce customization to add merge tags like the title, URL, product name, and more. Customize pop-ups for various products, pages, and more!", "chaty"); ?></div>
|
||||
<div class="view-pro-btn">
|
||||
<a target="_blank" href="<?php echo admin_url("admin.php?page=chaty-app-upgrade") ?>">
|
||||
<?php esc_html_e("Upgrade to Pro", "chaty"); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="view-pro-bottom">
|
||||
<span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg><?php esc_html_e("Cancel anytime. No strings attached", "chaty"); ?></span>
|
||||
<span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg><?php esc_html_e("30 days refund", "chaty"); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-view-data-right">
|
||||
<div class="chat-view-content">
|
||||
<div class="chat-slider">
|
||||
<div class="chat-slides">
|
||||
<div class="chat-slide chat-slide-1 active" data-slide="1">
|
||||
<img src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/chat-view-preview.png" alt="chaty" />
|
||||
<span class="text-bottom"><?php esc_html_e("Chat view for all your channels!", "chaty"); ?></span>
|
||||
</div>
|
||||
<div class="chat-slide chat-slide-2" data-slide="2">
|
||||
<span class="text-top"><?php esc_html_e("Customize Pop-ups for product pages!", "chaty"); ?></span>
|
||||
<img src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/woo-commerce-preview.png" alt="chaty" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-slider-options">
|
||||
<ul>
|
||||
<li><a href="javascript:;" class="prev-slide">❮</a></li>
|
||||
<li><a href="javascript:;" class="slide-option slide-1 active" data-slide="1"><span></span></a></li>
|
||||
<li><a href="javascript:;" class="slide-option slide-2" data-slide="2"><span></span></a></li>
|
||||
<li><a href="javascript:;" class="next-slide">❯</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* Chaty Analytics Pro Feature
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<header class="flex py-4 flex-col items-start sm:flex-row sm:justify-between">
|
||||
<a href="<?php echo esc_url( $this->getDashboardUrl() ) ?>">
|
||||
<img src="<?php echo esc_url(CHT_PLUGIN_URL.'admin/assets/images/logo-color.svg'); ?>" alt="Chaty" class="logo">
|
||||
</a>
|
||||
</header>
|
||||
|
||||
<div class="bg-white flex rounded-lg border border-solid border-[#EAEFF2]">
|
||||
<div class="px-7 py-8 flex-1">
|
||||
<h2 class="text-cht-gray-150 font-medium font-primary text-xl md:text-3xl max-w-[400px] md:leading-[40px]"><?php esc_html_e("Unlock Chaty Analytics. What can you use it for?", "chaty") ?></h2>
|
||||
<ul class="mt-7 flex flex-col space-y-2">
|
||||
<li class="flex items-center py-6 px-7 bg-[#F9FAFB] rounded-md space-x-6 text-cht-gray-150 text-lg font-primary">
|
||||
<img width="42" height="59" src="data:image/png;base64,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
Line truncated
|
||||
<span class="max-w-[305px]"><?php esc_html_e("Discover which chat channels are most commonly used", "chaty") ?></span>
|
||||
</li>
|
||||
<li class="flex items-center py-6 px-7 bg-[#F9FAFB] rounded-md space-x-6 text-cht-gray-150 text-lg font-primary">
|
||||
<img width="42" height="59" src="data:image/png;base64,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
Line truncated
|
||||
<span><?php esc_html_e("Get full stats on your widgets and turn data into actionable steps to increase conversation rate", "chaty") ?></span>
|
||||
</li>
|
||||
<li class="flex items-center py-6 px-7 bg-[#F9FAFB] rounded-md space-x-6 text-cht-gray-150 text-lg font-primary">
|
||||
<img width="42" height="59" src="data:image/png;base64,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
Line truncated
|
||||
<span><?php esc_html_e("Unlock your widgets' open-rate and find out how your call-to-action messages are performing", "chaty") ?></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="flex items-center mt-5 space-x-3">
|
||||
<a class="btn rounded-lg drop-shadow-3xl font-normal" href="<?php echo esc_url($this->getUpgradeMenuItemUrl()); ?>">
|
||||
<?php esc_html_e('Upgrade To Pro', 'chaty'); ?>
|
||||
</a>
|
||||
<a class="new-demo-button btn rounded-lg font-normal bg-gray-100 border-gray-400 text-cht-gray-150 hover:bg-cht-gray-150 hover:text-white" href="javascript:;" class="new-demo-button"><?php esc_html_e("Demo", "chaty") ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden xl:inline-block w-[520px] mt-5">
|
||||
<img class="h-full w-auto" src="<?php echo esc_url(plugins_url('../../admin/assets/images/license-image.png', __FILE__)); ?>" alt="Chaty" class="logo">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="analytics-popup">
|
||||
<div class="analytics-overlay"></div>
|
||||
<div class="analytics-popup-content">
|
||||
<div class="popup-data">
|
||||
<div class="close-popup">
|
||||
<a href="javascript:;"><span class="dashicons dashicons-no-alt"></span></a>
|
||||
</div>
|
||||
<img src="<?php echo CHT_PLUGIN_URL ?>/admin/assets/images/analytics-image.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function(){
|
||||
jQuery(document).on("click", ".analytics-popup-content .close-popup a, .analytics-overlay, .analytics-popup-content", function(e){
|
||||
jQuery(".analytics-popup").hide();
|
||||
});
|
||||
jQuery(document).on("click", ".new-demo-button", function(e){
|
||||
jQuery(".analytics-popup").show();
|
||||
});
|
||||
jQuery(document).on("click", ".analytics-popup-content img", function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,514 @@
|
||||
<?php
|
||||
/**
|
||||
* Recommended Plugins
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<style>
|
||||
a.hide-recommended-btn {
|
||||
background: #1da1f4;
|
||||
display: block;
|
||||
float: right;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
padding: 5px 20px;
|
||||
font-size: 18px;
|
||||
/* font-weight: bold; */
|
||||
border-radius: 4px;
|
||||
}
|
||||
.ui-dialog-titlebar {
|
||||
background: none !important;
|
||||
}
|
||||
.ui-dialog {
|
||||
z-index: 999999;
|
||||
text-align: center;
|
||||
}
|
||||
.ui-dialog-buttonpane {
|
||||
border: none;
|
||||
background: transparent;
|
||||
padding-top: 0;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonset{
|
||||
float:none;
|
||||
text-align: center;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-button {
|
||||
margin: 0 10px;
|
||||
}
|
||||
.ui-dialog-buttonpane .ui-dialog-buttonset .red-btn,
|
||||
.ui-dialog-buttonpane .ui-dialog-buttonset .purple-btn,
|
||||
.ui-dialog-buttonpane .ui-dialog-buttonset .gray-btn {
|
||||
background-color: #ffffff;
|
||||
color: #fff;
|
||||
border-color: #1da1f4;
|
||||
line-height: 1.4;
|
||||
padding: 5px 0;
|
||||
height: auto;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
font-size: 16px;
|
||||
min-width: 150px;
|
||||
color: #1da1f4;
|
||||
}
|
||||
.ui-dialog-buttonpane .ui-dialog-buttonset .red-btn {
|
||||
background-color: #1da1f4;
|
||||
border-color: #1da1f4;
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
wp_enqueue_style( 'wp-jquery-ui-dialog' );
|
||||
wp_enqueue_script( 'jquery-ui-dialog' );
|
||||
// You may comment this out IF you're sure the function exists.
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
||||
remove_all_filters('plugins_api');
|
||||
$pluginsAllowedTags = array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'title' => array(),
|
||||
'target' => array(),
|
||||
),
|
||||
'abbr' => array( 'title' => array() ),
|
||||
'acronym' => array( 'title' => array() ),
|
||||
'code' => array(),
|
||||
'pre' => array(),
|
||||
'em' => array(),
|
||||
'strong' => array(),
|
||||
'ul' => array(),
|
||||
'ol' => array(),
|
||||
'li' => array(),
|
||||
'p' => array(),
|
||||
'br' => array(),
|
||||
);
|
||||
|
||||
$recommendedPlugins = array();
|
||||
/* Poptin Plugins */
|
||||
$args = [
|
||||
'slug' => 'poptin',
|
||||
'fields' => [
|
||||
'short_description' => true,
|
||||
'icons' => true,
|
||||
'reviews' => false, // excludes all reviews
|
||||
],
|
||||
];
|
||||
$data = plugins_api( 'plugin_information', $args );
|
||||
if ( $data && ! is_wp_error( $data ) ) {
|
||||
$recommendedPlugins['poptin'] = $data;
|
||||
$recommendedPlugins['poptin']->name = 'Poptin: Beautiful Pop Ups and Embedded Inline Contact Forms for Your Website';
|
||||
$recommendedPlugins['poptin']->short_description = 'Pop ups and contact forms builder for your website. Get more sales, leads, and subscribers with beautiful popups & inline forms templates, no coding skills required';
|
||||
}
|
||||
|
||||
/* Folders Plugins */
|
||||
$args = [
|
||||
'slug' => 'folders',
|
||||
'fields' => [
|
||||
'short_description' => true,
|
||||
'icons' => true,
|
||||
'reviews' => false, // excludes all reviews
|
||||
],
|
||||
];
|
||||
$data = plugins_api( 'plugin_information', $args );
|
||||
if ( $data && ! is_wp_error( $data ) ) {
|
||||
$recommendedPlugins['folders'] = $data;
|
||||
$recommendedPlugins['folders']->name = 'Folders: Organize Your Media Library, Posts, Pages & Custom posts Using Drag & Drop';
|
||||
$recommendedPlugins['folders']->short_description = 'Folders is a powerful WordPress plugin that will help you quickly and easily organize and manage your Media library files, Pages, Posts, and Custom Posts in folders';
|
||||
}
|
||||
|
||||
/* mystickyelements Plugins */
|
||||
$args = [
|
||||
'slug' => 'mystickyelements',
|
||||
'fields' => [
|
||||
'short_description' => true,
|
||||
'icons' => true,
|
||||
'reviews' => false, // excludes all reviews
|
||||
],
|
||||
];
|
||||
$data = plugins_api( 'plugin_information', $args );
|
||||
if ( $data && ! is_wp_error( $data ) ) {
|
||||
$recommendedPlugins['mystickyelements'] = $data;
|
||||
$recommendedPlugins['mystickyelements']->name = 'All-in-one Floating Contact Form, Call, Chat, and 50+ Social Icon Tabs – My Sticky Elements';
|
||||
$recommendedPlugins['mystickyelements']->short_description = 'Add floating form and tabs on any side of your website to help your visitors contact you and easily find your Facebook page, YouTube channel, open hours';
|
||||
}
|
||||
|
||||
/* Stars Ttestimonials Plugins */
|
||||
$args = [
|
||||
'slug' => 'stars-testimonials-with-slider-and-masonry-grid',
|
||||
'fields' => [
|
||||
'short_description' => true,
|
||||
'icons' => true,
|
||||
'reviews' => false, // excludes all reviews
|
||||
],
|
||||
];
|
||||
$data = plugins_api( 'plugin_information', $args );
|
||||
if ( $data && ! is_wp_error( $data ) ) {
|
||||
$recommendedPlugins['stars-testimonials'] = $data;
|
||||
$recommendedPlugins['stars-testimonials']->name = 'Stars Testimonials: Responsive Testimonials, Social Proof, and Customer Reviews';
|
||||
$recommendedPlugins['stars-testimonials']->short_description = 'Simple but yet powerful testimonial WordPress plugin for your website. Display responsive website testimonials and customer reviews with ease and increase conversion rate';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<div class="wrap mystickyelement-wrap recommended-plugins">
|
||||
<h2>
|
||||
<?php _e('Try out our recommended plugins', 'chaty'); ?>
|
||||
<a class="hide-recommended-btn" href="#" class=""><?php _e('Hide From Menu', 'chaty');?></a>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="wrap recommended-plugins">
|
||||
<div class="wp-list-table widefat plugin-install">
|
||||
<div class="the-list">
|
||||
<?php
|
||||
foreach ( (array) $recommendedPlugins as $plugin ) {
|
||||
if ( is_object( $plugin ) ) {
|
||||
$plugin = (array) $plugin;
|
||||
}
|
||||
|
||||
// Display the group heading if there is one.
|
||||
if ( isset( $plugin['group'] ) && $plugin['group'] != $group ) {
|
||||
if ( isset( $this->groups[ $plugin['group'] ] ) ) {
|
||||
$group_name = $this->groups[ $plugin['group'] ];
|
||||
if ( isset( $plugins_group_titles[ $group_name ] ) ) {
|
||||
$group_name = $plugins_group_titles[ $group_name ];
|
||||
}
|
||||
} else {
|
||||
$group_name = $plugin['group'];
|
||||
}
|
||||
|
||||
// Starting a new group, close off the divs of the last one.
|
||||
if ( ! empty( $group ) ) {
|
||||
echo '</div></div>';
|
||||
}
|
||||
|
||||
echo '<div class="plugin-group"><h3>' . esc_html( $group_name ) . '</h3>';
|
||||
// Needs an extra wrapping div for nth-child selectors to work.
|
||||
echo '<div class="plugin-items">';
|
||||
|
||||
$group = $plugin['group'];
|
||||
}
|
||||
$title = wp_kses( $plugin['name'], $pluginsAllowedTags );
|
||||
|
||||
// Remove any HTML from the description.
|
||||
$description = strip_tags( $plugin['short_description'] );
|
||||
$version = wp_kses( $plugin['version'], $pluginsAllowedTags );
|
||||
|
||||
$name = strip_tags( $title . ' ' . $version );
|
||||
|
||||
$author = wp_kses( $plugin['author'], $pluginsAllowedTags );
|
||||
if ( ! empty( $author ) ) {
|
||||
/* translators: %s: Plugin author. */
|
||||
$author = ' <cite>' . sprintf( __( 'By %s' ), $author ) . '</cite>';
|
||||
}
|
||||
|
||||
$requires_php = isset( $plugin['requires_php'] ) ? $plugin['requires_php'] : null;
|
||||
$requires_wp = isset( $plugin['requires'] ) ? $plugin['requires'] : null;
|
||||
|
||||
$compatible_php = is_php_version_compatible( $requires_php );
|
||||
$compatible_wp = is_wp_version_compatible( $requires_wp );
|
||||
$tested_wp = ( empty( $plugin['tested'] ) || version_compare( get_bloginfo( 'version' ), $plugin['tested'], '<=' ) );
|
||||
|
||||
$action_links = array();
|
||||
|
||||
if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) {
|
||||
$status = install_plugin_install_status( $plugin );
|
||||
|
||||
switch ( $status['status'] ) {
|
||||
case 'install':
|
||||
if ( $status['url'] ) {
|
||||
if ( $compatible_php && $compatible_wp ) {
|
||||
$action_links[] = sprintf(
|
||||
'<a class="install-now button" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
|
||||
esc_attr( $plugin['slug'] ),
|
||||
esc_url( $status['url'] ),
|
||||
/* translators: %s: Plugin name and version. */
|
||||
esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $name ) ),
|
||||
esc_attr( $name ),
|
||||
__( 'Install Now' )
|
||||
);
|
||||
} else {
|
||||
$action_links[] = sprintf(
|
||||
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
|
||||
_x( 'Cannot Install', 'plugin' )
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'update_available':
|
||||
if ( $status['url'] ) {
|
||||
if ( $compatible_php && $compatible_wp ) {
|
||||
$action_links[] = sprintf(
|
||||
'<a class="update-now button aria-button-if-js" data-plugin="%s" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
|
||||
esc_attr( $status['file'] ),
|
||||
esc_attr( $plugin['slug'] ),
|
||||
esc_url( $status['url'] ),
|
||||
/* translators: %s: Plugin name and version. */
|
||||
esc_attr( sprintf( _x( 'Update %s now', 'plugin' ), $name ) ),
|
||||
esc_attr( $name ),
|
||||
__( 'Update Now' )
|
||||
);
|
||||
} else {
|
||||
$action_links[] = sprintf(
|
||||
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
|
||||
_x( 'Cannot Update', 'plugin' )
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'latest_installed':
|
||||
case 'newer_installed':
|
||||
if ( is_plugin_active( $status['file'] ) ) {
|
||||
$action_links[] = sprintf(
|
||||
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
|
||||
_x( 'Active', 'plugin' )
|
||||
);
|
||||
} elseif ( current_user_can( 'activate_plugin', $status['file'] ) ) {
|
||||
$button_text = __( 'Activate' );
|
||||
/* translators: %s: Plugin name. */
|
||||
$button_label = _x( 'Activate %s', 'plugin' );
|
||||
$activate_url = add_query_arg(
|
||||
array(
|
||||
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $status['file'] ),
|
||||
'action' => 'activate',
|
||||
'plugin' => $status['file'],
|
||||
),
|
||||
network_admin_url( 'plugins.php' )
|
||||
);
|
||||
|
||||
if ( is_network_admin() ) {
|
||||
$button_text = __( 'Network Activate' );
|
||||
/* translators: %s: Plugin name. */
|
||||
$button_label = _x( 'Network Activate %s', 'plugin' );
|
||||
$activate_url = add_query_arg( array( 'networkwide' => 1 ), $activate_url );
|
||||
}
|
||||
|
||||
$action_links[] = sprintf(
|
||||
'<a href="%1$s" class="button activate-now" aria-label="%2$s">%3$s</a>',
|
||||
esc_url( $activate_url ),
|
||||
esc_attr( sprintf( $button_label, $plugin['name'] ) ),
|
||||
$button_text
|
||||
);
|
||||
} else {
|
||||
$action_links[] = sprintf(
|
||||
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
|
||||
_x( 'Installed', 'plugin' )
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$details_link = self_admin_url(
|
||||
'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .
|
||||
'&TB_iframe=true&width=600&height=550'
|
||||
);
|
||||
|
||||
$action_links[] = sprintf(
|
||||
'<a href="%s" class="thickbox open-plugin-details-modal" aria-label="%s" data-title="%s">%s</a>',
|
||||
esc_url( $details_link ),
|
||||
/* translators: %s: Plugin name and version. */
|
||||
esc_attr( sprintf( __( 'More information about %s' ), $name ) ),
|
||||
esc_attr( $name ),
|
||||
__( 'More Details' )
|
||||
);
|
||||
|
||||
if ( ! empty( $plugin['icons']['svg'] ) ) {
|
||||
$plugin_icon_url = $plugin['icons']['svg'];
|
||||
} elseif ( ! empty( $plugin['icons']['2x'] ) ) {
|
||||
$plugin_icon_url = $plugin['icons']['2x'];
|
||||
} elseif ( ! empty( $plugin['icons']['1x'] ) ) {
|
||||
$plugin_icon_url = $plugin['icons']['1x'];
|
||||
} else {
|
||||
$plugin_icon_url = $plugin['icons']['default'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the install action links for a plugin.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param string[] $action_links An array of plugin action links. Defaults are links to Details and Install Now.
|
||||
* @param array $plugin The plugin currently being listed.
|
||||
*/
|
||||
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
|
||||
|
||||
$last_updated_timestamp = strtotime( $plugin['last_updated'] );
|
||||
?>
|
||||
<div class="plugin-card plugin-card-<?php echo sanitize_html_class( $plugin['slug'] ); ?>">
|
||||
<?php
|
||||
if ( ! $compatible_php || ! $compatible_wp ) {
|
||||
echo '<div class="notice inline notice-error notice-alt"><p>';
|
||||
if ( ! $compatible_php && ! $compatible_wp ) {
|
||||
_e( 'This plugin doesn’t work with your versions of WordPress and PHP.' );
|
||||
if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
|
||||
printf(
|
||||
/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
|
||||
' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ),
|
||||
self_admin_url( 'update-core.php' ),
|
||||
esc_url( wp_get_update_php_url() )
|
||||
);
|
||||
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
||||
} elseif ( current_user_can( 'update_core' ) ) {
|
||||
printf(
|
||||
/* translators: %s: URL to WordPress Updates screen. */
|
||||
' ' . __( '<a href="%s">Please update WordPress</a>.' ),
|
||||
self_admin_url( 'update-core.php' )
|
||||
);
|
||||
} elseif ( current_user_can( 'update_php' ) ) {
|
||||
printf(
|
||||
/* translators: %s: URL to Update PHP page. */
|
||||
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
|
||||
esc_url( wp_get_update_php_url() )
|
||||
);
|
||||
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
||||
}
|
||||
} elseif ( ! $compatible_wp ) {
|
||||
_e( 'This plugin doesn’t work with your version of WordPress.' );
|
||||
if ( current_user_can( 'update_core' ) ) {
|
||||
printf(
|
||||
/* translators: %s: URL to WordPress Updates screen. */
|
||||
' ' . __( '<a href="%s">Please update WordPress</a>.' ),
|
||||
self_admin_url( 'update-core.php' )
|
||||
);
|
||||
}
|
||||
} elseif ( ! $compatible_php ) {
|
||||
_e( 'This plugin doesn’t work with your version of PHP.' );
|
||||
if ( current_user_can( 'update_php' ) ) {
|
||||
printf(
|
||||
/* translators: %s: URL to Update PHP page. */
|
||||
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
|
||||
esc_url( wp_get_update_php_url() )
|
||||
);
|
||||
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
||||
}
|
||||
}
|
||||
echo '</p></div>';
|
||||
}
|
||||
?>
|
||||
<div class="plugin-card-top">
|
||||
<div class="name column-name">
|
||||
<h3>
|
||||
<a href="<?php echo esc_url( $details_link ); ?>" class="thickbox open-plugin-details-modal">
|
||||
<?php echo esc_attr($title); ?>
|
||||
<img src="<?php echo esc_attr( $plugin_icon_url ); ?>" class="plugin-icon" alt="" />
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="action-links">
|
||||
<?php
|
||||
if ( $action_links ) {
|
||||
echo '<ul class="plugin-action-buttons"><li>' . implode( '</li><li>', $action_links ) . '</li></ul>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="desc column-description">
|
||||
<p><?php echo esc_html($description); ?></p>
|
||||
<p class="authors"><?php echo wp_kses( $author, $pluginsAllowedTags ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plugin-card-bottom">
|
||||
<div class="vers column-rating">
|
||||
<?php
|
||||
wp_star_rating(
|
||||
array(
|
||||
'rating' => $plugin['rating'],
|
||||
'type' => 'percent',
|
||||
'number' => $plugin['num_ratings'],
|
||||
)
|
||||
);
|
||||
?>
|
||||
<span class="num-ratings" aria-hidden="true">(<?php echo number_format_i18n( $plugin['num_ratings'] ); ?>)</span>
|
||||
</div>
|
||||
<div class="column-updated">
|
||||
<strong><?php _e( 'Last Updated:' ); ?></strong>
|
||||
<?php
|
||||
/* translators: %s: Human-readable time difference. */
|
||||
printf( __( '%s ago' ), human_time_diff( $last_updated_timestamp ) );
|
||||
?>
|
||||
</div>
|
||||
<div class="column-downloaded">
|
||||
<?php
|
||||
if ( $plugin['active_installs'] >= 1000000 ) {
|
||||
$active_installs_millions = floor( $plugin['active_installs'] / 1000000 );
|
||||
$active_installs_text = sprintf(
|
||||
/* translators: %s: Number of millions. */
|
||||
_nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ),
|
||||
number_format_i18n( $active_installs_millions )
|
||||
);
|
||||
} elseif ( 0 == $plugin['active_installs'] ) {
|
||||
$active_installs_text = _x( 'Less Than 10', 'Active plugin installations' );
|
||||
} else {
|
||||
$active_installs_text = number_format_i18n( $plugin['active_installs'] ) . '+';
|
||||
}
|
||||
/* translators: %s: Number of installations. */
|
||||
printf( __( '%s Active Installations' ), $active_installs_text );
|
||||
?>
|
||||
</div>
|
||||
<div class="column-compatibility">
|
||||
<?php
|
||||
if ( ! $tested_wp ) {
|
||||
echo '<span class="compatibility-untested">' . __( 'Untested with your version of WordPress' ) . '</span>';
|
||||
} elseif ( ! $compatible_wp ) {
|
||||
echo '<span class="compatibility-incompatible">' . __( '<strong>Incompatible</strong> with your version of WordPress' ) . '</span>';
|
||||
} else {
|
||||
echo '<span class="compatibility-compatible">' . __( '<strong>Compatible</strong> with your version of WordPress' ) . '</span>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="hide-recommeded-plugins" style="display:none;" title="<?php _e('Are you sure?','mystickyelements');?>">
|
||||
<p><?php _e( "If you hide the recommended plugins page from your menu, it won't appear there again. Are you sure you'd like to do it?", 'mystickyelements');?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
( function( $ ) {
|
||||
"use strict";
|
||||
$(document).ready(function(){
|
||||
$('a.hide-recommended-btn').on('click',function(event){
|
||||
event.preventDefault();
|
||||
$( "#hide-recommeded-plugins" ).dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
draggable: false,
|
||||
height: 'auto',
|
||||
width: 400,
|
||||
open: function (event, ui) {
|
||||
$(".ui-widget-overlay").click(function () {
|
||||
$('#hide-recommeded-plugins').dialog('close');
|
||||
});
|
||||
},
|
||||
buttons: {
|
||||
"Hide it": {
|
||||
click: function () {
|
||||
window.location = "<?php echo admin_url('admin.php?page=chaty-app&hide_chaty_recommended_plugin=1&nonce='.wp_create_nonce("chaty_recommended_plugin"));?>";
|
||||
},
|
||||
text: 'Hide it',
|
||||
class: 'btn red-btn'
|
||||
},
|
||||
"Keep it": {
|
||||
click: function () {
|
||||
$(this).dialog('close');
|
||||
},
|
||||
text: 'Keep it',
|
||||
class: 'btn alt gray-btn'
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
})( jQuery );
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,629 @@
|
||||
<?php
|
||||
/**
|
||||
* Trigger and Targeting Setting
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$days = [
|
||||
"0" => "Everyday of week",
|
||||
"1" => "Sunday",
|
||||
"2" => "Monday",
|
||||
"3" => "Tuesday",
|
||||
"4" => "Wednesday",
|
||||
"5" => "Thursday",
|
||||
"6" => "Friday",
|
||||
"7" => "Saturday",
|
||||
"8" => "Sunday to Thursday",
|
||||
"9" => "Monday to Friday",
|
||||
"10" => "Weekend",
|
||||
];
|
||||
$url_options = [
|
||||
'home' => esc_html__("Homepage", "chaty"),
|
||||
'page_contains' => esc_html__('Link that contain', "chaty"),
|
||||
'page_has_url' => esc_html__('A specific link', "chaty"),
|
||||
'page_start_with' => esc_html__('Links starting with', "chaty"),
|
||||
'page_end_with' => esc_html__('Links ending with', "chaty"),
|
||||
'wp_pages' => esc_html__('WordPress Pages', "chaty"),
|
||||
'wp_posts' => esc_html__('WordPress Posts', "chaty"),
|
||||
'wp_categories' => esc_html__('WordPress Categories', "chaty"),
|
||||
'wp_tags' => esc_html__('WordPress Tags', "chaty")
|
||||
];
|
||||
$hasWooCommerce = 0;
|
||||
if(is_plugin_active("woocommerce/woocommerce.php")) {
|
||||
$hasWooCommerce = 1;
|
||||
}
|
||||
if($hasWooCommerce) {
|
||||
$url_options['wc_products'] = esc_html__('WooCommerce products', "chaty");
|
||||
$url_options['wc_products_on_sale'] = esc_html__('WooCommerce products on sale', "chaty");
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="section">
|
||||
<div class="form-horizontal space-y-7">
|
||||
<div class="form-horizontal__item" id="trigger-setting">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base block mb-3">
|
||||
<?php esc_html_e('Trigger', 'chaty');?>:
|
||||
</label>
|
||||
<?php
|
||||
$cht_active = get_option('cht_active');
|
||||
$cht_active = ($cht_active === false) ? 1 : $cht_active;
|
||||
?>
|
||||
<!-- button for activiting widget -->
|
||||
<input type="hidden" name="cht_active" value="0">
|
||||
<div class="flex items-center space-x-2">
|
||||
<div>
|
||||
<input type="hidden" name="cht_active" value="0" >
|
||||
<label class="text-base text-cht-gray-150 font-primary" for="active_widget"><?php esc_html_e("Active", "chaty") ?></label>
|
||||
</div>
|
||||
<label class="chaty-switch font-primary text-cht-gray-150 text-base" for="active_widget">
|
||||
<input type="checkbox" id="active_widget" name="cht_active" class="cht_active" name="cht_active" value="1" <?php checked($cht_active, 1) ?>>
|
||||
<div class="chaty-slider round"></div>
|
||||
</label>
|
||||
</div>
|
||||
<!-- end of wiget button button -->
|
||||
|
||||
<!-- show when widget is deactivated -->
|
||||
<div class="widget-disable-alert bg-[#f9fafb] text-[#49687E] mt-3 select-none flex items-center space-x-3.5 text-base w-52 justify-center rounded-lg border border-solid border-[#eaeff2] py-4">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M10.2898 3.86001L1.81978 18C1.64514 18.3024 1.55274 18.6453 1.55177 18.9945C1.55079 19.3437 1.64127 19.6871 1.8142 19.9905C1.98714 20.2939 2.2365 20.5468 2.53748 20.7239C2.83847 20.901 3.18058 20.9962 3.52978 21H20.4698C20.819 20.9962 21.1611 20.901 21.4621 20.7239C21.763 20.5468 22.0124 20.2939 22.1853 19.9905C22.3583 19.6871 22.4488 19.3437 22.4478 18.9945C22.4468 18.6453 22.3544 18.3024 22.1798 18L13.7098 3.86001C13.5315 3.56611 13.2805 3.32313 12.981 3.15449C12.6814 2.98585 12.3435 2.89726 11.9998 2.89726C11.656 2.89726 11.3181 2.98585 11.0186 3.15449C10.7191 3.32313 10.468 3.56611 10.2898 3.86001Z" fill="#FFC700" stroke="#CB9E00" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 9V13" stroke="#092030" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 17H12.01" stroke="#092030" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span><?php esc_html_e("Widget turned off", "chaty") ?></span>
|
||||
</div>
|
||||
|
||||
<div class="trigger-block group-control-wrap trigger-block-wrapper">
|
||||
<div class="p-5">
|
||||
<?php $checked = get_option('chaty_trigger_on_time') ?>
|
||||
<?php $time = get_option('chaty_trigger_time'); ?>
|
||||
<?php $time = empty($time) ? "0" : $time; ?>
|
||||
<?php $checked = empty($checked) ? "yes" : $checked; ?>
|
||||
<input type="hidden" name="chaty_trigger_on_time" value="no" >
|
||||
<div class="trigger-option-block flex space-x-3 items-center">
|
||||
<label class="chaty-switch font-primary text-cht-gray-150 text-base" for="trigger_on_time">
|
||||
<input type="checkbox" name="chaty_trigger_on_time" id="trigger_on_time" value="yes" <?php checked($checked, "yes") ?> >
|
||||
<div class="chaty-slider round"></div>
|
||||
</label>
|
||||
<div class="trigger-block-input text-cht-gray-150 text-base font-primary">
|
||||
Display after <input type="number" min="0" id="chaty_trigger_time" name="chaty_trigger_time" value="<?php echo esc_attr($time) ?>"> seconds on the page
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
// Inline comment. ?>
|
||||
<?php $checked = get_option('chaty_trigger_on_exit') ?>
|
||||
<?php $time = get_option('chaty_trigger_on_exit'); ?>
|
||||
<?php $time = empty($time) ? "0" : $time; ?>
|
||||
<?php $checked = empty($checked) ? "no" : $checked; ?>
|
||||
<div class="trigger-option-block flex space-x-3 py-3 items-center">
|
||||
<div>
|
||||
<input type="hidden" name="chaty_trigger_on_exit" value="no" >
|
||||
<label class="chaty-switch font-primary text-cht-gray-150 text-base" for="chaty_trigger_on_exit">
|
||||
<input type="checkbox" name="chaty_trigger_on_exit" id="chaty_trigger_on_exit" value="yes" <?php checked($checked, "yes") ?> >
|
||||
<div class="chaty-slider round"></div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="trigger-block-input font-primary text-base text-cht-gray-150 mt-2">
|
||||
<?php esc_html_e('Display when visitor is about to leave the page', 'chaty') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $checked = get_option('chaty_trigger_on_scroll') ?>
|
||||
<?php $time = get_option('chaty_trigger_on_page_scroll'); ?>
|
||||
<?php $time = empty($time) ? "0" : $time; ?>
|
||||
<?php $checked = empty($checked) ? "no" : $checked; ?>
|
||||
<div class="trigger-option-block flex items-center space-x-3">
|
||||
<div>
|
||||
<input type="hidden" name="chaty_trigger_on_scroll" value="no" >
|
||||
<label class="chaty-switch font-primary text-cht-gray-150 text-base" for="chaty_trigger_on_scroll">
|
||||
<input type="checkbox" name="chaty_trigger_on_scroll" id="chaty_trigger_on_scroll" value="yes" <?php checked($checked, "yes") ?> >
|
||||
<div class="chaty-slider round"></div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="trigger-block-input text-base font-primary text-cht-gray-150">
|
||||
Display after <input type="number" min="0" id="chaty_trigger_on_page_scroll" name="chaty_trigger_on_page_scroll" value="<?php echo esc_attr($time) ?>"> % on page
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- tooltip -->
|
||||
<div class="trigger-tooltip border-t border-x-0 border-b-0 border-solid border-[#eaeff2] py-3.5 px-5">
|
||||
<span data-target="uid-123456" class="chaty-targeted-collapse flex-inline items-center font-primary text-base space-x-1 text-cht-primary cursor-pointer">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span><?php esc_html_e("How triggers works?", "chaty") ?></span>
|
||||
</span>
|
||||
<p id="uid-123456" class="text-sm text-cht-gray-150 font-primary px-2 pt-2 hidden"><?php esc_html_e("Your Chaty widget will first appear to the user according to the selected trigger. After the widget appeared for the first time, it'll always be visible on-load - once the user is aware of the widget, the user expects it to always appear", "chaty") ?></p>
|
||||
</div> <!-- end trigger tooltip -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-horizontal__item">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base block mb-3">
|
||||
<?php esc_html_e("Show on pages", "chaty") ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e("Use this feature to show the widget for specific products, posts or on certain posts or pages by excluding or including them in the rules", "chaty") ?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div class="chaty-option-box">
|
||||
<div class="chaty-page-options relative hidden" id="chaty-pro-options">
|
||||
<div class="chaty-page-option relative group-control-wrap p-5 mb-3">
|
||||
<div class="url-content">
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div class="url-select">
|
||||
<select class="cht-free-required url-select" id="url_shown_on___count___option">
|
||||
<option disabled value="show_on"><?php esc_html_e("Show on", "chaty") ?></option>
|
||||
<option disabled value="not_show_on"><?php esc_html_e("Don't show on", "chaty") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="url-option">
|
||||
<select class="url-options" id="url_rules___count___option">
|
||||
<option selected="selected" value=""><?php esc_html_e("Select Rule", "chaty") ?></option>
|
||||
<?php foreach ($url_options as $key => $value) {
|
||||
echo '<option disabled value="'.esc_attr($key).'">'.esc_attr($value).'</option>';
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center mt-4">
|
||||
<div class="url-box">
|
||||
<span class='chaty-url'><?php echo esc_url(site_url("/")); ?></span>
|
||||
</div>
|
||||
|
||||
<div class="url-values flex-auto">
|
||||
<input type="text" class="cht-free-required" value="" id="url_rules___count___value" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="url-buttons">
|
||||
<a class="remove-chaty absolute" href="javascript:;">
|
||||
<svg width="14" height="13" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="15.6301" height="2.24494" rx="1.12247" transform="translate(2.26764 0.0615997) rotate(45)" fill="white"></rect>
|
||||
<rect width="15.6301" height="2.24494" rx="1.12247" transform="translate(13.3198 1.649) rotate(135)" fill="white"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chaty-pro-feature">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript:;" class="create-rule border border-solid border-cht-gray-150/60 text-cht-gray-150 text-base px-3 py-1 rounded-lg inline-block hover:text-cht-primary hover:border-cht-primary mr-4" id="create-rule">Add Rule</a>
|
||||
<a href="javascript:;" class="remove-rules hidden rounded-lg bg-transparent px-3 py-1 border border-red-500 text-red-500 hover:bg-red-500/10 focus:bg-red-500/10 hover:text-red-500 btn-primary">Remove Rules</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item flex-center" id="scroll-to-item">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base block mb-3">
|
||||
<?php esc_html_e('Date scheduling', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('Schedule the specific time and date when your Chaty widget appears.', 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<?php
|
||||
$timezone = "";
|
||||
$startDate = "";
|
||||
$startTime = "";
|
||||
$endDate = "";
|
||||
$endTime = "";
|
||||
$status = "no";
|
||||
?>
|
||||
<div class="chaty-option-box">
|
||||
<div id="date-schedule" class="<?php echo ($status == "yes") ? "active" : "" ?>">
|
||||
<div class="date-schedule-box group-control-wrap p-5">
|
||||
<div class="date-schedule relative">
|
||||
<!-- input fields start -->
|
||||
<div class="date-schedule-items">
|
||||
<div class="select-box">
|
||||
<label class="font-primary text-cht-gray-150 text-base block mb-2"><?php esc_html_e('Timezone', 'chaty');?></label>
|
||||
<select class="select2-box font-primary text-cht-gray-150 text-base" name="cht_date_rules[timezone]" id="cht_date_rules_time_zone">
|
||||
<?php echo chaty_timezone_choice($timezone, true);?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="date-time-box grid grid-cols-2 gap-4">
|
||||
<div class="date-select-option">
|
||||
<label for="date_start_date" class="font-primary text-cht-gray-150 text-base block mb-2">
|
||||
<?php esc_html_e('Start Date', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('Schedule a date from which the Chaty widget will be displayed (the starting date is included)', 'chaty');?></span>
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<input type="text" class="ui-timepicker-input" name="cht_date_rules[start_date]" id="date_start_date" value="<?php echo esc_attr($startDate) ?>" >
|
||||
</div>
|
||||
<div class="time-select-option">
|
||||
<label class="font-primary text-cht-gray-150 text-base block mb-2" for="date_start_time"><?php esc_html_e('Start Time', 'chaty');?></label>
|
||||
<input type="text" name="cht_date_rules[start_time]" id="date_start_time" value="<?php echo esc_attr($startTime) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="date-time-box grid grid-cols-2 gap-4">
|
||||
<div class="date-select-option">
|
||||
<label class="font-primary text-cht-gray-150 text-base flex my-2" for="date_start_date">
|
||||
<?php esc_html_e('End Date', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e('Schedule a date from which the Chaty widget will stop being displayed (the end date is included)', 'chaty');?></span>
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<input type="text" name="cht_date_rules[end_date]" id="date_end_date" value="<?php echo esc_attr($endDate) ?>">
|
||||
</div>
|
||||
|
||||
<div class="time-select-option">
|
||||
<label for="date_end_time" class="font-primary text-cht-gray-150 text-base block my-2"><?php esc_html_e('End Time', 'chaty');?></label>
|
||||
<input type="text" name="cht_date_rules[end_time]" id="date_end_time" value="<?php echo esc_attr($endTime) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<!-- input fields end -->
|
||||
</div>
|
||||
<div class="chaty-pro-feature">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl()) ?>">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<a href="javascript:;" class="remove-rules rounded-lg bg-transparent border-red-500 text-red-500 hover:bg-red-500/10 focus:bg-red-500/10 hover:text-red-500 px-3 py-1 border btn-primary inline-block mt-5" id="remove-date-rule"><?php esc_html_e('Remove Rules', 'chaty');?></a>
|
||||
</div>
|
||||
<div class="date-schedule-button">
|
||||
<a href="javascript:;" class="create-rule border border-solid border-cht-gray-150/60 text-cht-gray-150 text-base px-3 py-1 rounded-lg inline-block hover:text-cht-primary hover:border-cht-primary" id="create-date-rule"><?php esc_html_e('Add Rule', 'chaty');?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="cht_date_rules[status]" id="cht_date_rules" value="<?php echo esc_attr($status) ?>" />
|
||||
</div>
|
||||
<div class="form-horizontal__item flex-center">
|
||||
<label class="form-horizontal__item-label font-primary text-cht-gray-150 text-base block mb-3">
|
||||
<?php esc_html_e('Days and hours', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e("Display the widget on specific days and hours based on your opening days and hours", "chaty") ?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div class="chaty-option-box">
|
||||
<div class="chaty-page-options relative hidden" id="chaty-page-options">
|
||||
<div class="chaty-data-and-time-rules group-control-wrap mb-3 p-5 relative">
|
||||
<div class="chaty-date-time-option first last" data-index="__count__">
|
||||
<div class="date-time-content pointer-events-none grid sm:grid-cols-2 gap-4">
|
||||
<div class="date-time-data space-y-3">
|
||||
|
||||
<div class="day-select col-span-2">
|
||||
<label class="block font-primary text-base text-cht-gray-150 mb-1.5"><?php esc_html_e("Select Day", "chaty") ?></label>
|
||||
<select class="cht-free-required w-full text-cht-gray-150" id="url_shown_on___count___option">
|
||||
<?php foreach ($days as $key => $value) { ?>
|
||||
<option value="<?php echo esc_attr($key) ?>"><?php echo esc_attr($value) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="select-time-form">
|
||||
<label class="block font-primary text-base text-cht-gray-150 mb-1.5"><?php esc_html_e("From", "chaty") ?></label>
|
||||
<input type="text" class="cht-free-required time-picker w-full ui-timepicker-input" value="" id="start_time___count__" />
|
||||
</div>
|
||||
|
||||
<div class="select-time-to">
|
||||
<label class="block font-primary text-base text-cht-gray-150 mb-1.5"><?php esc_html_e("To", "chaty") ?></label>
|
||||
<input type="text" class="cht-free-required time-picker w-full ui-timepicker-input" value="" id="end_time___count__" />
|
||||
</div>
|
||||
|
||||
<div class="day-label col-span-2">
|
||||
<label class="block font-primary text-base text-cht-gray-150 mb-1.5"><?php esc_html_e("GMT", "chaty") ?></label>
|
||||
<select class="cht-free-required gmt-data w-full text-cht-gray-150" id="url_shown_on___count___option">
|
||||
<?php echo chaty_timezone_choice("", false) ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chaty-pro-feature">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl()) ?>">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript:;" class="create-rule border border-solid border-cht-gray-150/60 text-cht-gray-150 text-base px-3 py-1 rounded-lg inline-block hover:text-cht-primary hover:border-cht-primary mr-4" id="create-data-and-time-rule">Add Rule</a>
|
||||
<a href="javascript:;" class="remove-rules hidden rounded-lg bg-transparent px-3 py-1 border border-red-500 text-red-500 hover:bg-red-500/10 focus:bg-red-500/10 hover:text-red-500 btn-primary">Remove Rules</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item" id="custom-rules">
|
||||
<label class="form-horizontal__item-label text-cht-gray-150 font-primary text-base mb-2 inline-block">
|
||||
<?php esc_html_e("Traffic source", "chaty") ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e("Show the widget only to visitors who come from specific traffic sources including direct traffic, social networks, search engines, Google Ads, or any other traffic source.", "chaty") ?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<?php
|
||||
$checked = get_option('chaty_traffic_source');
|
||||
$checked = empty($checked) ? "no" : $checked;
|
||||
?>
|
||||
<div class="chaty-option-box traffic-options-box <?php echo ($checked == "yes") ? "active" : "" ?>">
|
||||
<div class="traffic-default">
|
||||
<a href="javascript:;" class="create-rule border border-solid border-cht-gray-150/60 text-cht-gray-150 text-base px-3 py-1 rounded-lg inline-block hover:text-cht-primary hover:border-cht-primary" id="update-chaty-traffic-source-rule"><?php esc_html_e("Add Rule", "chaty") ?></a>
|
||||
<input type="hidden" name="chaty_traffic_source" id="chaty_traffic_source" value="<?php echo esc_attr($checked) ?>">
|
||||
</div>
|
||||
<div class="traffic-active">
|
||||
<div class="trigger-block no-margin">
|
||||
<div class="chaty-pro-block space-y-3">
|
||||
<?php
|
||||
$checked = get_option('chaty_traffic_source_direct_visit');
|
||||
$checked = empty($checked) ? "no" : $checked;
|
||||
?>
|
||||
<input type="hidden" name="chaty_traffic_source_direct_visit" value="no">
|
||||
<div class="mb-2">
|
||||
<label class="chaty-switch text-cht-gray-150 text-base font-primary" for="chaty_traffic_source_direct_visit">
|
||||
<input type="checkbox" disabled="disabled" name="chaty_traffic_source_direct_visit" id="chaty_traffic_source_direct_visit" value="yes" >
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e("Direct visit", "chaty") ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e("Show the Chaty to visitors who arrived to your website from direct traffic", "chaty") ?></span>
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
$checked = get_option('chaty_traffic_source_social_network');
|
||||
$checked = empty($checked) ? "no" : $checked;
|
||||
?>
|
||||
<div class="my-2">
|
||||
<input type="hidden" name="chaty_traffic_source_social_network" value="no">
|
||||
<label class="chaty-switch font-primary text-cht-gray-150 text-base" for="chaty_traffic_source_social_network">
|
||||
<input type="checkbox" disabled="disabled" name="chaty_traffic_source_social_network" id="chaty_traffic_source_social_network" value="yes" >
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e("Social networks", "chaty") ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e("Show the Chaty to visitors who arrived to your website from social networks including: Facebook, Twitter, Pinterest, Instagram, Google+, LinkedIn, Delicious, Tumblr, Dribbble, StumbleUpon, Flickr, Plaxo, Digg and more", "chaty") ?></span>
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
$checked = get_option('chaty_traffic_source_search_engine');
|
||||
$checked = empty($checked) ? "no" : $checked;
|
||||
?>
|
||||
<div class="my-2">
|
||||
<input type="hidden" name="chaty_traffic_source_search_engine" value="no">
|
||||
<label class="chaty-switch font-primary text-cht-gray-150 text-base" for="chaty_traffic_source_search_engine">
|
||||
<input type="checkbox" disabled="disabled" name="chaty_traffic_source_search_engine" id="chaty_traffic_source_search_engine" value="yes" >
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e("Search engines", "chaty") ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e("Show the Chaty to visitors who arrived from search engines including: Google, Bing, Yahoo!, Yandex, AOL, Ask, WOW, WebCrawler, Baidu and more", "chaty") ?></span>
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
$checked = get_option('chaty_traffic_source_google_ads');
|
||||
$checked = empty($checked) ? "no" : $checked;
|
||||
?>
|
||||
<div class="mt-2">
|
||||
<input type="hidden" name="chaty_traffic_source_google_ads" value="no">
|
||||
<label class="chaty-switch text-cht-gray-150 font-primary text-base" for="chaty_traffic_source_google_ads">
|
||||
<input type="checkbox" disabled="disabled" name="chaty_traffic_source_google_ads" id="chaty_traffic_source_google_ads" value="yes" >
|
||||
<div class="chaty-slider round"></div>
|
||||
<?php esc_html_e("Google Ads", "chaty") ?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e("Show the Chaty to visitors who arrived from search engines including: Google, Bing, Yahoo!, Yandex, AOL, Ask, WOW, WebCrawler, Baidu and more", "chaty") ?></span>
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
$customRules = get_option("chaty_custom_traffic_rules")
|
||||
?>
|
||||
<div class="traffic-custom-rules">
|
||||
<div class="custom-rule-title text-cht-gray-150 font-primary text-base"><?php esc_html_e("Specific URL", "chaty") ?></div>
|
||||
<div class="traffic-custom-rules-box">
|
||||
<?php if (!empty($customRules) && is_array($customRules) && count($customRules) > 0) {
|
||||
foreach ($customRules as $key => $rule) { ?>
|
||||
<div class="custom-traffic-rule">
|
||||
<div class="traffic-option">
|
||||
<select name="chaty_custom_traffic_rules[<?php echo esc_attr($key) ?>][url_option]">
|
||||
<option value="contain" <?php selected($rule['url_option'], "contain") ?>>Contains</option>
|
||||
<option value="not_contain" <?php selected($rule['url_option'], "not_contain") ?>>Not contains</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="traffic-url">
|
||||
<input type="text" name="chaty_custom_traffic_rules[<?php echo esc_attr($key) ?>][url_value]" value="<?php echo esc_attr($rule['url_value']) ?>" placeholder="https://www.example.com" />
|
||||
</div>
|
||||
<div class="traffic-action">
|
||||
<a class="remove-traffic-option" href="javascript:;">
|
||||
<svg width="14" height="13" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="15.6301" height="2.24494" rx="1.12247" transform="translate(2.26764 0.0615997) rotate(45)" fill="white"></rect>
|
||||
<rect width="15.6301" height="2.24494" rx="1.12247" transform="translate(13.3198 1.649) rotate(135)" fill="white"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php }//end foreach
|
||||
} else { ?>
|
||||
<div class="custom-traffic-rule">
|
||||
<div class="traffic-option">
|
||||
<select name="chaty_custom_traffic_rules[0][url_option]">
|
||||
<option value="contain"><?php esc_html_e("Contains", "chaty") ?></option>
|
||||
<option value="not_contain"><?php esc_html_e("Not contains", "chaty") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="traffic-url">
|
||||
<input type="text" name="chaty_custom_traffic_rules[0][url_value]" />
|
||||
</div>
|
||||
<div class="traffic-action">
|
||||
<a class="remove-traffic-option" href="javascript:;">
|
||||
<svg width="14" height="13" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="15.6301" height="2.24494" rx="1.12247" transform="translate(2.26764 0.0615997) rotate(45)" fill="white"></rect>
|
||||
<rect width="15.6301" height="2.24494" rx="1.12247" transform="translate(13.3198 1.649) rotate(135)" fill="white"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php }//end if
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chaty-pro-feature">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear clearfix"></div>
|
||||
<div class="traffic-rule-actions">
|
||||
<a href="javascript:;" class="create-rule border border-solid border-cht-gray-150/60 text-cht-gray-150 text-base px-3 py-1 rounded-lg inline-block hover:text-cht-primary hover:border-cht-primary mr-4" id="add-traffic-rule"><?php esc_html_e("Add Rule", "chaty") ?></a>
|
||||
<a href="javascript:;" class="remove-rules rounded-lg bg-transparent px-3 py-1 border border-red-500 text-red-500 hover:bg-red-500/10 focus:bg-red-500/10 hover:text-red-500 btn-primary inline-block" id="remove-traffic-rules"><?php esc_html_e("Remove Rules", "chaty") ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item">
|
||||
<label class="form-horizontal__item-label mb-3 inline-block text-cht-gray-150 font-primary text-base">
|
||||
<?php esc_html_e('Country targeting', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center">Target your widget to specific countries. You can create different widgets for different countries</span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div class="chaty-option-box">
|
||||
<div class="chaty-page-options hidden relative">
|
||||
<div class="country-list-box mb-5">
|
||||
<select class="country-list chaty-select">
|
||||
<option value=""><?php esc_html_e('All Countries', 'chaty');?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="chaty-pro-feature">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript:;" class="create-rule border border-solid border-cht-gray-150/60 text-cht-gray-150 text-base px-3 py-1 rounded-lg inline-block hover:text-cht-primary hover:border-cht-primary mr-4" id="add-traffic-rule"><?php esc_html_e('Add Rule', 'chaty');?></a>
|
||||
<a href="javascript:;" class="remove-rules rounded-lg bg-transparent px-3 py-1 border border-red-500 text-red-500 hover:bg-red-500/10 focus:bg-red-500/10 hover:text-red-500 btn-primary hidden"><?php esc_html_e('Remove Rules', 'chaty');?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal__item">
|
||||
<label class="form-horizontal__item-label font-primary text-base text-cht-gray-150 block mb-3"><?php esc_html_e('Custom CSS', 'chaty');?>
|
||||
<span class="header-tooltip">
|
||||
<span class="header-tooltip-text text-center"><?php esc_html_e("Use this option if you wish to modify your widget additionally. This step is optional.", 'chaty');?></span>
|
||||
<span class="ml-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<path d="M8.00004 14.6654C11.6819 14.6654 14.6667 11.6806 14.6667 7.9987C14.6667 4.3168 11.6819 1.33203 8.00004 1.33203C4.31814 1.33203 1.33337 4.3168 1.33337 7.9987C1.33337 11.6806 4.31814 14.6654 8.00004 14.6654Z" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 10.6667V8" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M8 5.33203H8.00667" stroke="#72777c" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
<div class="chaty-option-box">
|
||||
<div class="chaty-page-options relative">
|
||||
<div class="country-list-box pointer-events-none">
|
||||
<textarea class="custom-css"></textarea>
|
||||
</div>
|
||||
<div class="chaty-pro-feature">
|
||||
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>">
|
||||
<?php esc_html_e('Upgrade to Pro', 'chaty');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$chaty_updated_on = get_option("chaty_updated_on");
|
||||
if($chaty_updated_on === false) {
|
||||
add_option("chaty_updated_on" , date("Y-m-d"));
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="chaty_updated_on" value="<?php echo time(); ?>">
|
||||
</section>
|
||||
@@ -0,0 +1,278 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Signup Form
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (defined('ABSPATH') === false) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
body {
|
||||
background: #ffffff !important;
|
||||
}
|
||||
</style>
|
||||
<div class="starts-testimonials-updates-form">
|
||||
<div class="updates-form-form-left">
|
||||
<div class="updates-form-form-left-text">premio</div>
|
||||
<img src="<?php echo CHT_PLUGIN_URL ?>admin/assets/images/wcupdate_email.svg" style="width: 230px;margin: 60px 0px 20px 0px;" />
|
||||
<p><?php esc_html_e('Grow your WordPress or Shopify websites with our plugins', 'chaty'); ?></p>
|
||||
</div>
|
||||
<div class="updates-form-form-right">
|
||||
<div class="update-title"><?php esc_html_e('Be the first to know product updates, tips & discounts', 'chaty'); ?></div>
|
||||
<p><?php esc_html_e('Be among the first to know about our latest features & what we’re working on. Plus insider offer & flash sales', 'chaty'); ?></p>
|
||||
<div class="updates-form">
|
||||
<div class="update-form-input">
|
||||
<div class="mail-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="2" y="4" width="20" height="16">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M22 6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6ZM20 6L12 11L4 6H20ZM12 13L4 8V18H20V8L12 13Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0)">
|
||||
<rect width="24" height="24" fill="#94A3B8"/>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<input id="starts_testimonials_update_email" autocomplete="off" value="<?php echo get_option('admin_email') ?>" placeholder="Email address">
|
||||
<button href="javascript:;" class="button button-primary form-submit-btn yes befirst-btn"><?php esc_html_e('Sign Up', 'chaty'); ?></button>
|
||||
</div>
|
||||
<!--div class="update-form-skip-button">
|
||||
<button href="javascript:;" class="button button-secondary form-cancel-btn no">Skip</button>
|
||||
</div-->
|
||||
</div>
|
||||
<div class="update-notice-latter">
|
||||
<span><a href="javascript:;" class="form-cancel-btn no"><?php esc_html_e('No, I will do it later', 'chaty'); ?></a></span>
|
||||
</div>
|
||||
<div class="update-notice">
|
||||
<?php esc_html_e('You can remove yourself from the list whenever you want, no strings attached', 'chaty'); ?>
|
||||
</div>
|
||||
<input type="hidden" id="sticky_element_update_nonce" value="<?php echo wp_create_nonce("my_sticky_elements_update_nonce") ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div id="mystickyelement-update-email-overlay" class="stickyelement-overlay" style="display:block;" data-id="0" data-from="widget-status"></div>
|
||||
<style>
|
||||
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
src: url('<?php echo CHT_PLUGIN_URL."admin/assets/fonts/Lato-Regular.woff";?>');
|
||||
}
|
||||
|
||||
#wpwrap{
|
||||
background: url('<?php echo CHT_PLUGIN_URL;?>admin/assets/images/update-bg.jpg');
|
||||
background-position: bottom center;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.starts-testimonials-updates-form {
|
||||
width: 768px;
|
||||
padding: 0px 30px 0px 0px;
|
||||
box-shadow: 0px 20px 25px rgb(0 0 0 / 10%), 0px 10px 10px rgb(0 0 0 / 4%);
|
||||
display: flex;
|
||||
margin: 100px auto 0;
|
||||
font-family: Lato, sans-serif;
|
||||
border-radius: 18.42px 0px 0px 18.419px;
|
||||
background:#fff;
|
||||
}
|
||||
.update-title {
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 30px;
|
||||
align-items: center;
|
||||
color: #334155;
|
||||
position: relative;
|
||||
line-height: 36px;
|
||||
font-family:Lato;
|
||||
}
|
||||
|
||||
.update-title:after{
|
||||
content: '';
|
||||
background: #605DEC;
|
||||
width: 19%;
|
||||
height: 2px;
|
||||
position: absolute;
|
||||
bottom: -16px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.updates-form-form-left {
|
||||
padding: 25px 0px 50px 0px;
|
||||
background: linear-gradient(180deg, #3C139A 25.79%, #2A0D76 72.72%);
|
||||
border-radius: 14.42px 0px 0px 14.419px;
|
||||
text-align:center;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.updates-form-form-left p{
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
padding: 0px 36px;
|
||||
font-family:Lato;
|
||||
}
|
||||
|
||||
.updates-form-form-left span{
|
||||
color: #fff;
|
||||
margin-left: 0px;
|
||||
margin-top: 0px;
|
||||
position: absolute;
|
||||
font-size: 20px;
|
||||
line-height: 0.5;
|
||||
font-family:Lato;
|
||||
}
|
||||
|
||||
.updates-form-form-left-text{
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
padding-left: 30px;
|
||||
font-family:Lato;
|
||||
}
|
||||
.updates-form-form-right{
|
||||
margin-left: 16px;
|
||||
padding: 70px 47px 70px 45px;
|
||||
}
|
||||
.updates-form-form-right p {
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 150%;
|
||||
position: relative;
|
||||
color: #475569;
|
||||
margin: 32px 0px 20px 0px;
|
||||
font-family:Lato;
|
||||
|
||||
}
|
||||
/*.updates-form-form-right p:after {
|
||||
content: "";
|
||||
border: 1px solid #3C85F7;
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
left: 0;
|
||||
width: 90px;
|
||||
|
||||
}*/
|
||||
.updates-form {
|
||||
/*display: flex;*/
|
||||
}
|
||||
.update-form-input {
|
||||
position: relative;
|
||||
}
|
||||
.update-form-input input {
|
||||
width: 385px;
|
||||
background: #F4F4F5;
|
||||
border: 1px solid #F4F4F5;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8px;
|
||||
height: 42px;
|
||||
line-height: 40px;
|
||||
padding: 0 50px 0 40px;
|
||||
font-size: 13px;
|
||||
box-sizing: border-box;
|
||||
color: #334155;
|
||||
}
|
||||
.update-form-input .form-submit-btn {
|
||||
background: #5A00F0;
|
||||
border-radius: 8px;
|
||||
border: none;
|
||||
color: #fff;
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
line-height: 150%;
|
||||
height: 36px;
|
||||
padding: 0 10px;
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 3px;
|
||||
width: 100px;
|
||||
font-family:Lato;
|
||||
}
|
||||
.update-form-input #starts_testimonials_update_email:hover{
|
||||
border-bottom: 1px solid #5A00F0;
|
||||
border-radius: 8px 8px 0px 0px;
|
||||
}
|
||||
|
||||
.update-form-input #starts_testimonials_update_email:focus-visible{
|
||||
border :1px solid #5A00F0 !important;
|
||||
outline: 1px !important;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.update-form-input .form-submit-btn:hover{
|
||||
background: #5A00F0;
|
||||
}
|
||||
|
||||
.updates-form .form-cancel-btn.no {
|
||||
margin: 0 0 0 3px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #64748B;
|
||||
font-size: 13px;
|
||||
line-height: 40px;
|
||||
padding: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.updates-form .form-cancel-btn.no:hover {
|
||||
color: #334155;
|
||||
}
|
||||
|
||||
.mail-icon {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
.update-notice {
|
||||
margin: 50px 22px 0 0px;
|
||||
font-size: 16px;
|
||||
line-height: 150%;
|
||||
color: #28375A;
|
||||
text-align:center;
|
||||
font-family:Lato;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.update-notice-latter{
|
||||
margin: 20px 0px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color:#28375A;
|
||||
}
|
||||
|
||||
.update-notice-latter span a{
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
color:#28375A;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
jQuery(document).on("click", ".updates-form button, a.form-cancel-btn", function () {
|
||||
var updateStatus = 0;
|
||||
if (jQuery(this).hasClass("yes")) {
|
||||
updateStatus = 1;
|
||||
}
|
||||
$(".updates-form button").attr("disabled", true);
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: "chaty_update_status",
|
||||
status: updateStatus,
|
||||
nonce: '<?php echo wp_create_nonce("chaty_update_status") ?>',
|
||||
email: jQuery("#starts_testimonials_update_email").val()
|
||||
},
|
||||
type: 'post',
|
||||
cache: false,
|
||||
success: function () {
|
||||
window.location.reload();
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,867 @@
|
||||
<?php
|
||||
/**
|
||||
* Review Class
|
||||
*
|
||||
* @author : Premio <contact@premio.io>
|
||||
* @license : GPL2
|
||||
* */
|
||||
|
||||
if (!defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
$allowedTags = [
|
||||
'a' => [
|
||||
'href' => [],
|
||||
'title' => [],
|
||||
'target' => [],
|
||||
],
|
||||
'abbr' => [ 'title' => [] ],
|
||||
'acronym' => [ 'title' => [] ],
|
||||
'code' => [],
|
||||
'pre' => [],
|
||||
'em' => [],
|
||||
'strong' => [],
|
||||
'ul' => [],
|
||||
'ol' => [],
|
||||
'li' => [],
|
||||
'p' => [],
|
||||
'br' => [],
|
||||
'img' => [
|
||||
'src' => [],
|
||||
'alt' => []
|
||||
]
|
||||
];
|
||||
$proURL = "https://go.premio.io/?edd_action=add_to_cart&download_id=185&edd_options[price_id]=";
|
||||
|
||||
$plans = [
|
||||
'1_website' => [
|
||||
'1_year' => [
|
||||
'price' => 49,
|
||||
'month' => 4.1,
|
||||
'link' => $proURL."37",
|
||||
'title' => esc_html__("1 year", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for 1 year", "chaty"),
|
||||
],
|
||||
'2_years' => [
|
||||
'price' => 69,
|
||||
'month' => 2.9,
|
||||
'link' => $proURL."38",
|
||||
'title' => esc_html__("2 years", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for 2 years", "chaty"),
|
||||
],
|
||||
'lifetime' => [
|
||||
'price' => 149,
|
||||
'month' => 0,
|
||||
'link' => $proURL."39",
|
||||
'title' => esc_html__("Lifetime", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for lifetime", "chaty"),
|
||||
]
|
||||
],
|
||||
'5_websites' => [
|
||||
'1_year' => [
|
||||
'price' => 109,
|
||||
'month' => 9.1,
|
||||
'link' => $proURL."40",
|
||||
'title' => esc_html__("1 year", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for 1 year", "chaty"),
|
||||
],
|
||||
'2_years' => [
|
||||
'price' => 169,
|
||||
'month' => 7.1,
|
||||
'link' => $proURL."41",
|
||||
'title' => esc_html__("2 years", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for 2 years", "chaty"),
|
||||
],
|
||||
'lifetime' => [
|
||||
'price' => 279,
|
||||
'month' => 0,
|
||||
'link' => $proURL."42",
|
||||
'title' => esc_html__("Lifetime", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for lifetime", "chaty")
|
||||
]
|
||||
],
|
||||
'50_websites' => [
|
||||
'1_year' => [
|
||||
'price' => 179,
|
||||
'month' => 15,
|
||||
'link' => $proURL."43",
|
||||
'title' => esc_html__("1 year", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for 1 year", "chaty"),
|
||||
],
|
||||
'2_years' => [
|
||||
'price' => 279,
|
||||
'month' => 11.7,
|
||||
'link' => $proURL."44",
|
||||
'title' => esc_html__("2 years", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for 2 years", "chaty"),
|
||||
],
|
||||
'lifetime' => [
|
||||
'price' => 479,
|
||||
'month' => 0,
|
||||
'link' => $proURL."45",
|
||||
'title' => esc_html__("Lifetime", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for lifetime", "chaty")
|
||||
]
|
||||
],
|
||||
'500_websites' => [
|
||||
'1_year' => [
|
||||
'price' => 349,
|
||||
'month' => 29.1,
|
||||
'link' => $proURL."46",
|
||||
'title' => esc_html__("1 year", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for 1 year", "chaty"),
|
||||
],
|
||||
'2_years' => [
|
||||
'price' => 519,
|
||||
'month' => 21.7,
|
||||
'link' => $proURL."47",
|
||||
'title' => esc_html__("2 years", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for 2 years", "chaty"),
|
||||
],
|
||||
'lifetime' => [
|
||||
'price' => 869,
|
||||
'month' => 0,
|
||||
'link' => $proURL."48",
|
||||
'title' => esc_html__("Lifetime", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for lifetime", "chaty")
|
||||
]
|
||||
],
|
||||
'1000_websites' => [
|
||||
'1_year' => [
|
||||
'price' => 479,
|
||||
'month' => 40,
|
||||
'link' => $proURL."49",
|
||||
'title' => esc_html__("1 year", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for 1 year", "chaty"),
|
||||
],
|
||||
'2_years' => [
|
||||
'price' => 729,
|
||||
'month' => 30.5,
|
||||
'link' => $proURL."50",
|
||||
'title' => esc_html__("2 years", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for 2 years", "chaty"),
|
||||
],
|
||||
'lifetime' => [
|
||||
'price' => 1199,
|
||||
'month' => 0,
|
||||
'link' => $proURL."51",
|
||||
'title' => esc_html__("Lifetime", "chaty"),
|
||||
'mobile_title' => esc_html__("Updated and support for lifetime", "chaty")
|
||||
]
|
||||
]
|
||||
];
|
||||
$features = [
|
||||
[
|
||||
'title' => esc_html__("Unlimited channels", "chaty"),
|
||||
'tooltip' => esc_html__("Show up to 25 channels of your choice","chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Multiple agents", "chaty"),
|
||||
'tooltip' => sprintf(esc_html__("Show multiple agents under a single channel. For example, allow visitors to reach for pre-sales info or support with different channels on WhatsApp. Here are some %s", "chaty"), "<a href='https://premio.io/blog/7-cool-ways-to-use-the-chaty-agents-functionality/?utm_source=inapptooltip' target='_blank'>".esc_html__("interesting ways to use Agents functionality", "chaty")."</a>")."<img src='".CHT_PLUGIN_URL."admin/assets/images/agent-infotip.png' />"
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Widget customization", "chaty"),
|
||||
'tooltip' => esc_html__("Choose a background color, change the size of the widget, choose from 3 different widget designs, select a Font Awesome icon or upload your own", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Dynamic chat pop-up", "chaty"),
|
||||
'tooltip' => esc_html__("Choose between two types of pop-up designs, set pop-up text and color, and use merge tags like the URL and title, or WooCommerce properties like the product name, to customize the behavior of the widget based on visitor interaction.", "chaty")."<img src='".CHT_PLUGIN_URL."admin/assets/images/chaty-chat-view.gif' />"
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Channels customization", "chaty"),
|
||||
'tooltip' => esc_html__("Change each channel's background color, upload your own icon, and change the text on hover", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Multiple widgets", "chaty"),
|
||||
'tooltip' => esc_html__("Create different widgets for different pages. Show different icons based on targeting rules. You can also show different channels for mobile and desktop and based on many other rules.", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Custom location", "chaty"),
|
||||
'tooltip' => esc_html__("Locate the widget exactly where you want by the pixel - X,Y", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Google Analytics", "chaty"),
|
||||
'tooltip' => esc_html__("Automatically track clicks on each of your channels on your Google Analytics account", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Page targeting", "chaty"),
|
||||
'tooltip' => esc_html__("Use this feature to show or hide the widget for specific pages, posts, categories, tags, products, or any URL based on preset rules", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Available days and hours", "chaty"),
|
||||
'tooltip' => esc_html__("Display the widget on specific days and hours based on your opening days and hours", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Country targeting", "chaty"),
|
||||
'tooltip' => esc_html__("Target your widget to specific countries. You can create different widgets for different countries", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Traffic source targeting", "chaty"),
|
||||
'tooltip' => esc_html__("Show the widget only to visitors who come from specific traffic sources including direct traffic, social networks, search engines, Google Ads, or any other traffic source)", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Send leads to email", "chaty"),
|
||||
'tooltip' => esc_html__("You can get the emails from your contact form directly to your emails and change the subject line", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Widget Analytics", "chaty"),
|
||||
'tooltip' => esc_html__("Unlock analytics data about your Chaty widgets usage. Find out how many of your visitors click on your widgets and chat channels.", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("Date scheduling ", "chaty"),
|
||||
'tooltip' => esc_html__("Schedule the specific time and date when your Chaty widget appears. Use this feature to offer time-limited coupons, or to start a promotion from a specific date.", "chaty")
|
||||
],
|
||||
[
|
||||
'title' => esc_html__("And more", "chaty"),
|
||||
'tooltip' => esc_html__("QR code for WeChat, customizable WhatsApp message, customizable email subject.", "chaty")
|
||||
],
|
||||
];
|
||||
?>
|
||||
<div class="pricing-top">
|
||||
<?php if(isset($hasBackButton)) { ?>
|
||||
<div class="back-button-box">
|
||||
<a href="<?php echo admin_url("options-general.php?page=wcp_chaty_settings") ?>" class="go-back-button"><?php esc_html_e("Back", "chaty"); ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="price-container">
|
||||
<div class="plan-details">
|
||||
<div class="unlock-features text-center">
|
||||
<div class="unlock-features-title"><?php esc_html_e("Unlock all features", "chaty"); ?></div>
|
||||
<div class="unlock-features-desc"><?php esc_html_e("(enjoy 30-day money back guarantee on all plans)", "chaty"); ?></div>
|
||||
</div>
|
||||
<div class="plan-details-bottom">
|
||||
<div class="plan-options">
|
||||
<div class="plan-option active" data-id="1_year">
|
||||
<div class="plan-title"><?php esc_html_e("1 year", "chaty"); ?></div>
|
||||
<div class="plan-desc"><?php esc_html_e("Updates & Support", "chaty"); ?></div>
|
||||
</div>
|
||||
<div class="plan-option" data-id="2_years">
|
||||
<div class="plan-title"><?php esc_html_e("2 years ", "chaty"); ?><span>(32% Off
|
||||
<svg width="17" height="18" viewBox="0 0 17 18" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<rect y="0.712891" width="17" height="17" fill="url(#pattern0)"/>
|
||||
<defs>
|
||||
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||
<use xlink:href="#image0_1730_1878" transform="scale(0.0454545)"/>
|
||||
</pattern>
|
||||
<image id="image0_1730_1878" width="22" height="22" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAEsUlEQVRIiZ2VTWxc1RmGn++ce+7M+M54PElmnMTYIdRxUkBJKgQCRCsgLRWghgoptPwkC1Kx4WeBIF20i4mEECAhFrBqF4jQbhJFKt1VakUXkVqpi4QFEVBCsPmbePDYHs9M5s6993wsBps4BBZ80pGOjt7zfK++I70HrlBax1zp/Eq679IG64SKAIjgAbp/ueZGb+RmU7S7UIoAgjZ8PzvTm115W440G6sNpD688y2w1jGrwM6b2w+Rs08XKnaPjDkIZL2dfooUXbf7VuVk9/3F5+RI8/+Xw+XSjvP1arFyXfmvwRa3n5yln+AlEC8oYoZw9YoimFQD56D7aTejw6PFg+ePXQqXS6Ej15ZPRZNuT19NAmJxX4/GrXesiQ43iaYWcUE3odtMnyo9dO7V4wcIHzjBYO1GcmL6rWC6sB+RGENIHiE0YPn2KFKFRNG+IilK7EWXEkT6t8rPZ/8DID/bWbyzEtkn9+4Mf91J1Ac5MdYOQYURS7lsKI9ZynlDrEo/VprzKa2FlCxTrBV8SpZTtYuLyfnT55MTpVFekZ/ujF4s5MyRdk+TH09G7sJSn/mFBGshy74x2el4CnnBBoJzwq6pIp8t9GgtZTgneK8EgRAVDEmq15uTh0deyQc09s6M2JmpSDHK2KilFFnGRodrtGg4+sdx7t8/hrVw096ImalIA2sYG7VEBUMxMllUMBTz+trbZzvvmuq9teK2WlCbbw3M6XMtWW4PbXo/fKCLsWfbZMgDhzdx8OEKxgjtlvC/91uy3EnXab2HPVdpBcDwRad69WZn5j4f0FrKKOTMmtAYiGNlZkcOYs+GimVyi+O9uQ7tznrtas1s5aohGLjzhhGcEy7Gfk2Yemh+mVKrBjz4mwrESmljwMFHNpAkyko3Y5B+A11uezs54bhjd6gA9vHrw8L2naUnqj/KyexcwiBRQKiMBty1r0T9D5uZmM5BX8HDzO48e3flWVxQOr0M78Fa4brpyB99rCKjaee/z/8tPhnQ44teN/vkvttLU/tuinxjJTOBBckbLlxIAFiZT8nlDXglns8YH3c89GCZbVNVVloZgYWJivMuSU1zbuUMQFCrNzvtY9G/6aaHwtD66a2hUBRpLWb8rt5gqZ1xzVRIFA1DbHnZc/aDPvfdXeKFFyaoFS0SK/2LarLZJiz5f6xlRftPW2+NJkqnBhU3HJpD8mUjH3404LU/tzj9bo+VdoYNhA1jlrv2lXjs8EaKRoi7Xkk0zXvvFt758J+bHk9+oYqsZUX72NVvlHYUDvXVJDYwzlslVzIQCB+fi/m8mRGEsG0qZLzm0J5ncNEjGamkBL335hjMtX9Sq3NG6xhRRUTQ4wcIf/mr6r9Gd2y6LbZBCqCiVpyQGxFZzQvt69AlICqZSTXIZhu0P/vy0PgzvLlqdF1sHj9AeM+95TdGJjb/VsYciQoeUi4rYwBP4Po9Fj9oLGQL3Uerv+fv62JzLQovOWy+yP5wS/VZWyreEm00FhdCYCHNIBmQtfu0G0sL2o1fz+LKy7UjzcYVg34NrghHkVXB/EvVHWqaNwcu2C1OCgDpIPuEFf8OWfVUrd7sXG7qe0vrmNX/74fqvgLmDyyIpOFlEAAAAABJRU5ErkJggg=="/>
|
||||
</defs>
|
||||
</svg>
|
||||
)</span>
|
||||
</div>
|
||||
<div class="plan-desc"><?php esc_html_e("Updates & Support", "chaty"); ?></div>
|
||||
</div>
|
||||
<div class="plan-option" data-id="lifetime">
|
||||
<div class="plan-title"><?php esc_html_e("Lifetime ", "chaty"); ?><span>(63% Off
|
||||
<svg width="17" height="18" viewBox="0 0 17 18" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<rect y="0.712891" width="17" height="17" fill="url(#pattern0)"/>
|
||||
<defs>
|
||||
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||
<use xlink:href="#image0_1730_1878" transform="scale(0.0454545)"/>
|
||||
</pattern>
|
||||
<image id="image0_1730_1878" width="22" height="22" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAEsUlEQVRIiZ2VTWxc1RmGn++ce+7M+M54PElmnMTYIdRxUkBJKgQCRCsgLRWghgoptPwkC1Kx4WeBIF20i4mEECAhFrBqF4jQbhJFKt1VakUXkVqpi4QFEVBCsPmbePDYHs9M5s6993wsBps4BBZ80pGOjt7zfK++I70HrlBax1zp/Eq679IG64SKAIjgAbp/ueZGb+RmU7S7UIoAgjZ8PzvTm115W440G6sNpD688y2w1jGrwM6b2w+Rs08XKnaPjDkIZL2dfooUXbf7VuVk9/3F5+RI8/+Xw+XSjvP1arFyXfmvwRa3n5yln+AlEC8oYoZw9YoimFQD56D7aTejw6PFg+ePXQqXS6Ej15ZPRZNuT19NAmJxX4/GrXesiQ43iaYWcUE3odtMnyo9dO7V4wcIHzjBYO1GcmL6rWC6sB+RGENIHiE0YPn2KFKFRNG+IilK7EWXEkT6t8rPZ/8DID/bWbyzEtkn9+4Mf91J1Ac5MdYOQYURS7lsKI9ZynlDrEo/VprzKa2FlCxTrBV8SpZTtYuLyfnT55MTpVFekZ/ujF4s5MyRdk+TH09G7sJSn/mFBGshy74x2el4CnnBBoJzwq6pIp8t9GgtZTgneK8EgRAVDEmq15uTh0deyQc09s6M2JmpSDHK2KilFFnGRodrtGg4+sdx7t8/hrVw096ImalIA2sYG7VEBUMxMllUMBTz+trbZzvvmuq9teK2WlCbbw3M6XMtWW4PbXo/fKCLsWfbZMgDhzdx8OEKxgjtlvC/91uy3EnXab2HPVdpBcDwRad69WZn5j4f0FrKKOTMmtAYiGNlZkcOYs+GimVyi+O9uQ7tznrtas1s5aohGLjzhhGcEy7Gfk2Yemh+mVKrBjz4mwrESmljwMFHNpAkyko3Y5B+A11uezs54bhjd6gA9vHrw8L2naUnqj/KyexcwiBRQKiMBty1r0T9D5uZmM5BX8HDzO48e3flWVxQOr0M78Fa4brpyB99rCKjaee/z/8tPhnQ44teN/vkvttLU/tuinxjJTOBBckbLlxIAFiZT8nlDXglns8YH3c89GCZbVNVVloZgYWJivMuSU1zbuUMQFCrNzvtY9G/6aaHwtD66a2hUBRpLWb8rt5gqZ1xzVRIFA1DbHnZc/aDPvfdXeKFFyaoFS0SK/2LarLZJiz5f6xlRftPW2+NJkqnBhU3HJpD8mUjH3404LU/tzj9bo+VdoYNhA1jlrv2lXjs8EaKRoi7Xkk0zXvvFt758J+bHk9+oYqsZUX72NVvlHYUDvXVJDYwzlslVzIQCB+fi/m8mRGEsG0qZLzm0J5ncNEjGamkBL335hjMtX9Sq3NG6xhRRUTQ4wcIf/mr6r9Gd2y6LbZBCqCiVpyQGxFZzQvt69AlICqZSTXIZhu0P/vy0PgzvLlqdF1sHj9AeM+95TdGJjb/VsYciQoeUi4rYwBP4Po9Fj9oLGQL3Uerv+fv62JzLQovOWy+yP5wS/VZWyreEm00FhdCYCHNIBmQtfu0G0sL2o1fz+LKy7UjzcYVg34NrghHkVXB/EvVHWqaNwcu2C1OCgDpIPuEFf8OWfVUrd7sXG7qe0vrmNX/74fqvgLmDyyIpOFlEAAAAABJRU5ErkJggg=="/>
|
||||
</defs>
|
||||
</svg>
|
||||
)</span>
|
||||
</div>
|
||||
<div class="plan-desc"><?php esc_html_e("Updates & Support", "chaty"); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pricing-bottom">
|
||||
<div class="price-container">
|
||||
<div class="pricing-table">
|
||||
<div class="desktop-table">
|
||||
<div class="pricing-header">
|
||||
<div class="pricing-pointer"></div>
|
||||
<div class="pricing-header-top">
|
||||
<div class="plan-row">
|
||||
<div class="plan-col first-col plan-data">
|
||||
<span class="plan-plugin-name">Chaty</span>
|
||||
<span class="chaty-powered-by">
|
||||
Powered by
|
||||
<a href="https://premio.io" target="_blank">
|
||||
<svg width="132" height="37" viewBox="0 0 132 37" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.1257 7.10321C12.9732 7.10321 14.6467 7.57329 16.1463 8.51344C17.6458 9.42748 18.8239 10.7071 19.6808 12.3524C20.5644 13.9977 21.0062 15.8649 21.0062 17.9541C21.0062 20.0434 20.5778 21.9237 19.7209 23.5951C18.864 25.2403 17.686 26.533 16.1864 27.4732C14.7138 28.3873 13.0803 28.8442 11.2863 28.8442C10.001 28.8442 8.78271 28.5961 7.63132 28.0999C6.5067 27.5776 5.56952 26.9508 4.81978 26.2196V33.8976C4.81978 34.5766 4.59218 35.138 4.13698 35.582C3.68177 36.0521 3.10608 36.2871 2.40989 36.2871C1.7137 36.2871 1.13801 36.0652 0.682802 35.6212C0.2276 35.1772 0 34.6027 0 33.8976V9.8845C0 9.2055 0.2276 8.64402 0.682802 8.20006C1.13801 7.72998 1.7137 7.49495 2.40989 7.49495C3.10608 7.49495 3.68177 7.72998 4.13698 8.20006C4.59218 8.64402 4.81978 9.2055 4.81978 9.8845V10.0412C5.46242 9.25773 6.35944 8.57873 7.51082 8.00419C8.66221 7.40354 9.86716 7.10321 11.1257 7.10321ZM10.5232 24.5352C12.2368 24.5352 13.6426 23.9084 14.7405 22.6549C15.8384 21.4014 16.3873 19.8344 16.3873 17.9541C16.3873 16.0738 15.8384 14.52 14.7405 13.2926C13.6695 12.039 12.2637 11.4122 10.5232 11.4122C8.78271 11.4122 7.36356 12.039 6.26571 13.2926C5.16787 14.52 4.61896 16.0738 4.61896 17.9541C4.61896 19.8344 5.16787 21.4014 6.26571 22.6549C7.36356 23.9084 8.78271 24.5352 10.5232 24.5352ZM36.1903 7.10321C36.9936 7.10321 37.6631 7.32519 38.1986 7.76916C38.7609 8.21312 39.0421 8.73542 39.0421 9.33608C39.0421 10.1456 38.8279 10.7594 38.3994 11.1772C37.971 11.5689 37.4623 11.7648 36.8732 11.7648C36.4715 11.7648 36.0164 11.6734 35.5075 11.4906C35.4272 11.4645 35.2398 11.4122 34.9452 11.3339C34.6775 11.2556 34.3829 11.2164 34.0616 11.2164C33.3655 11.2164 32.696 11.4253 32.0534 11.8431C31.4107 12.261 30.8753 12.9008 30.4468 13.7626C30.0451 14.5984 29.8443 15.6038 29.8443 16.7789V26.063C29.8443 26.742 29.6167 27.3165 29.1615 27.7866C28.7064 28.2306 28.1306 28.4525 27.4344 28.4525C26.7383 28.4525 26.1626 28.2306 25.7073 27.7866C25.2522 27.3165 25.0245 26.742 25.0245 26.063V9.8845C25.0245 9.2055 25.2522 8.64402 25.7073 8.20006C26.1626 7.72998 26.7383 7.49495 27.4344 7.49495C28.1306 7.49495 28.7064 7.72998 29.1615 8.20006C29.6167 8.64402 29.8443 9.2055 29.8443 9.8845V10.3937C30.4602 9.32302 31.3438 8.51344 32.4952 7.96502C33.6467 7.39049 34.8783 7.10321 36.1903 7.10321ZM60.8168 17.4841C60.7901 18.1108 60.5356 18.6201 60.0537 19.0118C59.5717 19.4035 59.0094 19.5994 58.3667 19.5994H45.1123C45.4337 21.1402 46.17 22.3546 47.3214 23.2425C48.4728 24.1043 49.7715 24.5352 51.2174 24.5352C52.3153 24.5352 53.172 24.4438 53.7879 24.261C54.4038 24.052 54.8858 23.8432 55.2339 23.6342C55.6088 23.3992 55.8631 23.2425 55.997 23.1642C56.479 22.9291 56.9342 22.8116 57.3626 22.8116C57.9249 22.8116 58.4069 23.0075 58.8085 23.3992C59.2102 23.7909 59.411 24.2479 59.411 24.7702C59.411 25.4754 59.0361 26.1152 58.2864 26.6897C57.5367 27.2904 56.5326 27.7997 55.274 28.2175C54.0155 28.6353 52.7437 28.8442 51.4584 28.8442C49.2091 28.8442 47.2411 28.3873 45.5541 27.4732C43.894 26.5591 42.6087 25.3056 41.6983 23.7126C40.788 22.0934 40.3327 20.2784 40.3327 18.2675C40.3327 16.0216 40.8147 14.0499 41.7787 12.3524C42.7426 10.6549 44.0145 9.36219 45.5943 8.47427C47.1742 7.56023 48.8611 7.10321 50.6551 7.10321C52.4223 7.10321 54.0825 7.57329 55.6355 8.51344C57.2154 9.4536 58.4738 10.7202 59.411 12.3132C60.3482 13.9062 60.8168 15.6298 60.8168 17.4841ZM50.6551 11.4122C47.549 11.4122 45.7148 12.8356 45.1525 15.6821H55.6757V15.4079C55.5686 14.311 55.0196 13.3709 54.0289 12.5874C53.0382 11.804 51.9136 11.4122 50.6551 11.4122ZM89.6181 7.10321C92.269 7.10321 94.1032 7.89974 95.1207 9.49277C96.1382 11.0597 96.6469 13.2403 96.6469 16.0347V26.063C96.6469 26.742 96.4194 27.3165 95.9641 27.7866C95.509 28.2306 94.9333 28.4525 94.237 28.4525C93.5409 28.4525 92.9652 28.2306 92.5099 27.7866C92.0548 27.3165 91.8271 26.742 91.8271 26.063V16.0347C91.8271 14.5984 91.5327 13.4753 90.9435 12.6658C90.3812 11.8301 89.3771 11.4122 87.9312 11.4122C86.4317 11.4122 85.2535 11.8562 84.3966 12.7441C83.5666 13.6059 83.1515 14.7028 83.1515 16.0347V26.063C83.1515 26.742 82.924 27.3165 82.4687 27.7866C82.0136 28.2306 81.4379 28.4525 80.7416 28.4525C80.0455 28.4525 79.4698 28.2306 79.0145 27.7866C78.5594 27.3165 78.3317 26.742 78.3317 26.063V16.0347C78.3317 14.5984 78.0373 13.4753 77.4481 12.6658C76.8858 11.8301 75.8817 11.4122 74.4358 11.4122C72.9364 11.4122 71.7581 11.8562 70.9013 12.7441C70.0712 13.6059 69.6561 14.7028 69.6561 16.0347V26.063C69.6561 26.742 69.4286 27.3165 68.9734 27.7866C68.5182 28.2306 67.9425 28.4525 67.2463 28.4525C66.5501 28.4525 65.9744 28.2306 65.5192 27.7866C65.064 27.3165 64.8364 26.742 64.8364 26.063V9.8845C64.8364 9.2055 65.064 8.64402 65.5192 8.20006C65.9744 7.72998 66.5501 7.49495 67.2463 7.49495C67.9425 7.49495 68.5182 7.72998 68.9734 8.20006C69.4286 8.64402 69.6561 9.2055 69.6561 9.8845V10.5113C70.3791 9.57111 71.2896 8.77459 72.3874 8.12171C73.512 7.44271 74.7571 7.10321 76.1227 7.10321C79.4965 7.10321 81.6521 8.53955 82.5892 11.4122C83.20
Line truncated
|
||||
</svg>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="plan-col plan-detail plan-info" data-plan="1_website">
|
||||
<span class="plan-name">Basic</span>
|
||||
<span class="plan-price"><span>$<?php echo esc_attr($plans['1_website']['1_year']['price']) ?></span>/year</span>
|
||||
<span class="plan-type">Billed Annually</span>
|
||||
<span class="plan-monthly">Less than $<?php echo esc_attr($plans['1_website']['1_year']['month']) ?>/mo</span>
|
||||
<span class="update-support">Updates & Support for</span>
|
||||
<div class="plan-selector">
|
||||
<select class="multiple-options">
|
||||
<?php foreach($plans['1_website'] as $key=>$plan) { ?>
|
||||
<option value="<?php echo esc_attr($key) ?>"><?php echo esc_attr($plan['title']) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<span class="plan-button"><a class="purchase-link" href="<?php echo esc_url($plans['1_website']['1_year']['link']) ?>" target="_blank">Buy now</a></span>
|
||||
</div>
|
||||
<div class="plan-col plan-detail plus-plans plan-info" data-plan="5_websites">
|
||||
<span class="plan-name">Plus</span>
|
||||
<span class="plan-price"><span>$<?php echo esc_attr($plans['5_websites']['1_year']['price']) ?></span>/year</span>
|
||||
<span class="plan-type">Billed Annually</span>
|
||||
<span class="plan-monthly">Less than $<?php echo esc_attr($plans['5_websites']['1_year']['month']) ?>/mo</span>
|
||||
<span class="update-support">Updates & Support for</span>
|
||||
<div class="plan-selector">
|
||||
<select class="multiple-options">
|
||||
<?php foreach($plans['5_websites'] as $key=>$plan) { ?>
|
||||
<option value="<?php echo esc_attr($key) ?>"><?php echo esc_attr($plan['title']) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<span class="plan-button"><a class="purchase-link" href="<?php echo esc_url($plans['5_websites']['1_year']['link']) ?>" target="_blank">Buy now</a></span>
|
||||
</div>
|
||||
<div class="plan-col agency-plans plan-detail plan-info multiple-plan-info" data-plan="50_websites">
|
||||
<span class="best-value">🎉 Best Value</span>
|
||||
<span class="plan-name">Agency</span>
|
||||
<span class="plan-price"><span>$<?php echo esc_attr($plans['50_websites']['1_year']['price']) ?></span>/year</span>
|
||||
<span class="plan-type">Billed Annually</span>
|
||||
<span class="plan-monthly">Less than $<?php echo esc_attr($plans['50_websites']['1_year']['month']) ?>/mo</span>
|
||||
<span class="update-support">Updates & Support for</span>
|
||||
<div class="plan-selector">
|
||||
<select class="multiple-options">
|
||||
<?php foreach($plans['50_websites'] as $key=>$plan) { ?>
|
||||
<option value="<?php echo esc_attr($key) ?>"><?php echo esc_attr($plan['title']) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<span class="plan-button"><a class="purchase-link" href="<?php echo esc_url($plans['50_websites']['1_year']['link']) ?>" target="_blank">Buy now</a></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plan-row">
|
||||
<div class="plan-col first-row">Websites</div>
|
||||
<div class="plan-col plan-detail">1</div>
|
||||
<div class="plan-col plan-detail">5</div>
|
||||
<div class="plan-col plan-detail">
|
||||
<select class="domain-list">
|
||||
<option value="50">50 Websites</option>
|
||||
<option value="500">500 Websites</option>
|
||||
<option value="1000">1000 Websites</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pricing-body">
|
||||
<?php
|
||||
foreach ($features as $feature) { ?>
|
||||
<div class="plan-row">
|
||||
<div class="plan-col first-row">
|
||||
<?php if(!empty($feature['tooltip'])) { ?>
|
||||
<div class="has-tooltip">
|
||||
<span class="table-text"><?php echo esc_attr($feature['title']); ?></span>
|
||||
<span class="table-tooltip">
|
||||
<span class="table-tooltip-text">
|
||||
<?php echo wp_kses($feature['tooltip'], $allowedTags); ?>
|
||||
</span>
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"> <g opacity="0.5" clip-path="url(#clip0_1771_2646)"> <path d="M8.00016 14.9544C11.6821 14.9544 14.6668 11.9697 14.6668 8.28776C14.6668 4.60586 11.6821 1.62109 8.00016 1.62109C4.31826 1.62109 1.3335 4.60586 1.3335 8.28776C1.3335 11.9697 4.31826 14.9544 8.00016 14.9544Z" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 10.9538V8.28711" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 5.62109H8.00667" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> </g> <defs> <clipPath id="clip0_1771_2646"> <rect width="16" height="16" fill="white" transform="translate(0 0.287109)"/> </clipPath> </defs> </svg>
|
||||
</span>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="no-tooltip">
|
||||
<?php echo esc_attr($feature['title']); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="plan-col plan-detail">
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.3332 4.28711L5.99984 11.6204L2.6665 8.28711" stroke="#15C15D" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="plan-col plan-detail">
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.3332 4.28711L5.99984 11.6204L2.6665 8.28711" stroke="#15C15D" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="plan-col plan-detail">
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.3332 4.28711L5.99984 11.6204L2.6665 8.28711" stroke="#15C15D" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mobile-table">
|
||||
<div class="mobile-plans">
|
||||
<div class="mobile-plan" data-plan="">
|
||||
<div class="mobile-pin"></div>
|
||||
<div class="plan-head mobile-head-plan plan-info" data-plan="1_website">
|
||||
<span class="plan-name">Basic</span>
|
||||
<span class="plan-price"><span>$<?php echo esc_attr($plans['1_website']['1_year']['price']) ?></span>/year</span>
|
||||
<span class="plan-type">Billed Annually</span>
|
||||
<span class="plan-monthly">Less than $<?php echo esc_attr($plans['1_website']['1_year']['month']) ?>/mo</span>
|
||||
<span class="update-support">Updates & Support for</span>
|
||||
<div class="plan-selector">
|
||||
<select class="multiple-options">
|
||||
<?php foreach($plans['1_website'] as $key=>$plan) { ?>
|
||||
<option value="<?php echo esc_attr($key) ?>"><?php echo esc_attr($plan['title']) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<span class="plan-button"><a class="purchase-link" href="<?php echo esc_url($plans['1_website']['1_year']['link']) ?>" target="_blank">Buy now</a></span>
|
||||
</div>
|
||||
<div class="plan-body">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="javascript:;" class="has-tooltip">
|
||||
<span class="table-text">1 website</span>
|
||||
<span class="table-tooltip">
|
||||
<span class="table-tooltip-text">
|
||||
Use Chaty on 1 domain
|
||||
</span>
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"> <g opacity="0.5" clip-path="url(#clip0_1771_2646)"> <path d="M8.00016 14.9544C11.6821 14.9544 14.6668 11.9697 14.6668 8.28776C14.6668 4.60586 11.6821 1.62109 8.00016 1.62109C4.31826 1.62109 1.3335 4.60586 1.3335 8.28776C1.3335 11.9697 4.31826 14.9544 8.00016 14.9544Z" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 10.9538V8.28711" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 5.62109H8.00667" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> </g> <defs> <clipPath id="clip0_1771_2646"> <rect width="16" height="16" fill="white" transform="translate(0 0.287109)"/> </clipPath> </defs> </svg>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
foreach ($features as $feature) { ?>
|
||||
<li>
|
||||
<?php if(!empty($feature['tooltip'])) { ?>
|
||||
<a href="javascript:;" class="has-tooltip">
|
||||
<span class="table-text"><?php echo esc_attr($feature['title']); ?></span>
|
||||
<span class="table-tooltip">
|
||||
<span class="table-tooltip-text">
|
||||
<?php echo wp_kses($feature['tooltip'], $allowedTags); ?>
|
||||
</span>
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"> <g opacity="0.5" clip-path="url(#clip0_1771_2646)"> <path d="M8.00016 14.9544C11.6821 14.9544 14.6668 11.9697 14.6668 8.28776C14.6668 4.60586 11.6821 1.62109 8.00016 1.62109C4.31826 1.62109 1.3335 4.60586 1.3335 8.28776C1.3335 11.9697 4.31826 14.9544 8.00016 14.9544Z" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 10.9538V8.28711" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 5.62109H8.00667" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> </g> <defs> <clipPath id="clip0_1771_2646"> <rect width="16" height="16" fill="white" transform="translate(0 0.287109)"/> </clipPath> </defs> </svg>
|
||||
</span>
|
||||
</a>
|
||||
<?php } else {
|
||||
echo esc_attr($feature['title']);
|
||||
} ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mobile-plan" data-plan="">
|
||||
<div class="mobile-pin"></div>
|
||||
<div class="plan-head mobile-head-plan plus-plans plan-info" data-plan="5_websites">
|
||||
<span class="best-value">🎉 Best Value</span>
|
||||
<span class="plan-name">Plus</span>
|
||||
<span class="plan-price"><span>$<?php echo esc_attr($plans['5_websites']['1_year']['price']) ?></span>/year</span>
|
||||
<span class="plan-type">Billed Annually</span>
|
||||
<span class="plan-monthly">Less than $<?php echo esc_attr($plans['5_websites']['1_year']['month']) ?>/mo</span>
|
||||
<span class="update-support">Updates & Support for</span>
|
||||
<div class="plan-selector">
|
||||
<select class="multiple-options">
|
||||
<?php foreach($plans['5_websites'] as $key=>$plan) { ?>
|
||||
<option value="<?php echo esc_attr($key) ?>"><?php echo esc_attr($plan['title']) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<span class="plan-button"><a class="purchase-link" href="<?php echo esc_url($plans['5_websites']['1_year']['link']) ?>" target="_blank">Buy now</a></span>
|
||||
</div>
|
||||
<div class="plan-body">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="javascript:;" class="has-tooltip">
|
||||
<span class="table-text">1 website</span>
|
||||
<span class="table-tooltip">
|
||||
<span class="table-tooltip-text">
|
||||
Use Chaty on 1 domain
|
||||
</span>
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"> <g opacity="0.5" clip-path="url(#clip0_1771_2646)"> <path d="M8.00016 14.9544C11.6821 14.9544 14.6668 11.9697 14.6668 8.28776C14.6668 4.60586 11.6821 1.62109 8.00016 1.62109C4.31826 1.62109 1.3335 4.60586 1.3335 8.28776C1.3335 11.9697 4.31826 14.9544 8.00016 14.9544Z" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 10.9538V8.28711" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 5.62109H8.00667" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> </g> <defs> <clipPath id="clip0_1771_2646"> <rect width="16" height="16" fill="white" transform="translate(0 0.287109)"/> </clipPath> </defs> </svg>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
foreach ($features as $feature) { ?>
|
||||
<li>
|
||||
<?php if(!empty($feature['tooltip'])) { ?>
|
||||
<a href="javascript:;" class="has-tooltip">
|
||||
<span class="table-text"><?php echo esc_attr($feature['title']); ?></span>
|
||||
<span class="table-tooltip">
|
||||
<span class="table-tooltip-text">
|
||||
<?php echo wp_kses($feature['tooltip'], $allowedTags); ?>
|
||||
</span>
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"> <g opacity="0.5" clip-path="url(#clip0_1771_2646)"> <path d="M8.00016 14.9544C11.6821 14.9544 14.6668 11.9697 14.6668 8.28776C14.6668 4.60586 11.6821 1.62109 8.00016 1.62109C4.31826 1.62109 1.3335 4.60586 1.3335 8.28776C1.3335 11.9697 4.31826 14.9544 8.00016 14.9544Z" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 10.9538V8.28711" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 5.62109H8.00667" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> </g> <defs> <clipPath id="clip0_1771_2646"> <rect width="16" height="16" fill="white" transform="translate(0 0.287109)"/> </clipPath> </defs> </svg>
|
||||
</span>
|
||||
</a>
|
||||
<?php } else {
|
||||
echo esc_attr($feature['title']);
|
||||
} ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mobile-plan" data-plan="">
|
||||
<div class="mobile-pin"></div>
|
||||
<div class="plan-head mobile-head-plan plan-info multiple-plan-info" data-plan="50_websites">
|
||||
<span class="plan-name">Agency</span>
|
||||
<span class="plan-price"><span>$<?php echo esc_attr($plans['50_websites']['1_year']['price']) ?></span>/year</span>
|
||||
<span class="plan-type">Billed Annually</span>
|
||||
<span class="plan-monthly">Less than $<?php echo esc_attr($plans['50_websites']['1_year']['month']) ?>/mo</span>
|
||||
<span class="update-support">Updates & Support for</span>
|
||||
<div class="plan-selector">
|
||||
<select class="multiple-options">
|
||||
<?php foreach($plans['50_websites'] as $key=>$plan) { ?>
|
||||
<option value="<?php echo esc_attr($key) ?>"><?php echo esc_attr($plan['title']) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<span class="plan-button"><a class="purchase-link" href="<?php echo esc_url($plans['50_websites']['1_year']['link']) ?>" target="_blank">Buy now</a></span>
|
||||
</div>
|
||||
<div class="plan-body">
|
||||
<ul>
|
||||
<li>
|
||||
<select class="domain-list">
|
||||
<option value="50" selected>50 Websites</option>
|
||||
<option value="500">500 Websites</option>
|
||||
<option value="1000">1000 Websites</option>
|
||||
</select>
|
||||
<div class="clear"></div>
|
||||
</li>
|
||||
<?php
|
||||
foreach ($features as $feature) { ?>
|
||||
<li>
|
||||
<?php if(!empty($feature['tooltip'])) { ?>
|
||||
<a href="javascript:;" class="has-tooltip">
|
||||
<span class="table-text"><?php echo esc_attr($feature['title']); ?></span>
|
||||
<span class="table-tooltip">
|
||||
<span class="table-tooltip-text">
|
||||
<?php echo wp_kses($feature['tooltip'], $allowedTags); ?>
|
||||
</span>
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"> <g opacity="0.5" clip-path="url(#clip0_1771_2646)"> <path d="M8.00016 14.9544C11.6821 14.9544 14.6668 11.9697 14.6668 8.28776C14.6668 4.60586 11.6821 1.62109 8.00016 1.62109C4.31826 1.62109 1.3335 4.60586 1.3335 8.28776C1.3335 11.9697 4.31826 14.9544 8.00016 14.9544Z" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 10.9538V8.28711" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 5.62109H8.00667" stroke="#747C97" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/> </g> <defs> <clipPath id="clip0_1771_2646"> <rect width="16" height="16" fill="white" transform="translate(0 0.287109)"/> </clipPath> </defs> </svg>
|
||||
</span>
|
||||
</a>
|
||||
<?php } else {
|
||||
echo esc_attr($feature['title']);
|
||||
} ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="money-guaranteed">
|
||||
<p>
|
||||
<span class="dashicons dashicons-yes"></span>
|
||||
<?php esc_html_e("30 days money back guaranteed", 'chaty'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<span class="dashicons dashicons-yes"></span>
|
||||
<?php esc_html_e("The plugin will always keep working even if you don't renew your license", 'chaty'); ?>
|
||||
</p>
|
||||
<div class="payments">
|
||||
<img src="<?php echo esc_url(CHT_PLUGIN_URL."admin/assets/images/payment.png") ?>" alt="Payment" class="payment-img" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="premio-client-section">
|
||||
<div class="price-container">
|
||||
<div class="client-testimonials">
|
||||
<div class="testimonial-list">
|
||||
<?php
|
||||
$reviews = [
|
||||
[
|
||||
'name' => 'Nick Magiera from Molly Dean',
|
||||
'image' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/nick.webp',
|
||||
'image_mobile' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/nick-80x80.webp',
|
||||
'profile' => 'https://wordpress.org/support/topic/amazing-plugin-even-better-support-8/',
|
||||
'comment' => 'I removed the previous paid chat plugin I had for my clients, and replaced it with Chaty and everyone is very happy! Love the simplicity of it. It just works! Amazing support with Premio also!'
|
||||
],
|
||||
[
|
||||
'name' => 'Andrea from Websites San Diego',
|
||||
'image' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/andrea.webp',
|
||||
'image_mobile' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/andrea-80x80.webp',
|
||||
'profile' => 'https://wordpress.org/support/topic/installed-on-all-my-websites-2/',
|
||||
'comment' => 'I manage about 30 local business websites. They want their clients to have quick and easy access to call or text them. This is easy to install, lightweight, and graphically pleasing. Plus, it works!'
|
||||
],
|
||||
[
|
||||
'name' => 'Stanley Mark',
|
||||
'image' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/stanley.webp',
|
||||
'image_mobile' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/stanley-80x80.webp',
|
||||
'profile' => 'https://wordpress.org/support/topic/thank-its-doing-a-great-work-for-me/',
|
||||
'comment' => 'My customers reach me efficiently. Thanks. Its doing a great work for me.'
|
||||
],
|
||||
[
|
||||
'name' => 'Fatih Çakır Gündoğan',
|
||||
'image' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/fatih.webp',
|
||||
'image_mobile' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/fatih-80x80.webp',
|
||||
'profile' => 'https://wordpress.org/support/topic/great-plugin-great-support-1507/',
|
||||
'comment' => 'I really like the plugin. You should do nothing to track analytics data. Fast support in an hour, even in minutes. Thanks…'
|
||||
],
|
||||
[
|
||||
'name' => 'John Serra',
|
||||
'image' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/john.webp',
|
||||
'image_mobile' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/john-80x80.webp',
|
||||
'profile' => 'https://wordpress.org/support/topic/really-helpful-plugin-41/',
|
||||
'comment' => 'It does what it says it will do without any fuss'
|
||||
],
|
||||
[
|
||||
'name' => '@aniruddhapathak',
|
||||
'image' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/aniruddah.webp',
|
||||
'image_mobile' => CHT_PLUGIN_URL . 'admin/assets/images/testimonial/aniruddah-80x80.webp',
|
||||
'profile' => 'https://wordpress.org/support/topic/excellent-plugin-and-support-241/',
|
||||
'comment' => "I'm a user of Chaty's premium version and I absolutely love the experience. The support team is lovely and responsive too. Just the plugin I was looking for."
|
||||
]
|
||||
];
|
||||
foreach($reviews as $review) { ?>
|
||||
<div class="client-testimonial">
|
||||
<div class="client-testimonial-slide">
|
||||
<a href="<?php echo esc_url($review['profile']) ?>" target="_blank">
|
||||
<div class="slide-quote">
|
||||
<svg width="51" height="44" viewBox="0 0 51 44" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.57143 44C0.857143 36.4163 0 29.8341 0 24.2537C0 16.2407 1.85714 10.2309 5.57143 6.22439C9.28571 2.0748 14.7143 0 21.8571 0V8.58537C18.1429 8.58537 15.4286 9.587 13.7143 11.5903C12.1429 13.5935 11.3571 16.5984 11.3571 20.6049V25.5415H22.0714V44H2.57143ZM31.5 44C29.7857 36.4163 28.9286 29.8341 28.9286 24.2537C28.9286 16.2407 30.7857 10.2309 34.5 6.22439C38.2143 2.0748 43.6429 0 50.7857 0V8.58537C47.0714 8.58537 44.3571 9.587 42.6429 11.5903C41.0714 13.5935 40.2857 16.5984 40.2857 20.6049V25.5415H51V44H31.5Z" fill="#EDEAF2"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="client-text">
|
||||
<?php echo esc_attr($review['comment']) ?>
|
||||
</div>
|
||||
<div class="testimonial-bottom">
|
||||
<div class="client-image">
|
||||
<img src="<?php echo esc_url($review['image']) ?>" alt="Client image">
|
||||
</div>
|
||||
<div class="client-details">
|
||||
<div class="client-name"><?php echo esc_attr($review['name']) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div id="slick-slider-options" class="slick-options">
|
||||
<button type="button" class="slick-btn slick-prev-btn ml-5 slick-arrow" style=""><svg width="31" height="31" viewBox="0 0 31 31" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="15.5" cy="15.5" r="15" stroke="#6641E5"/><path d="M18 11L13 16L18 21" stroke="#6641E5" stroke-linecap="round"/></svg></button>
|
||||
<div class="slider-dots product-slider-dots" id="slider-dots"></div>
|
||||
<button type="button" class="slick-btn slick-next-btn ml-5 slick-arrow" style=""><svg width="31" height="31" viewBox="0 0 31 31" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="15.5" cy="15.5" r="15" stroke="#6641E5"/><path d="M18 11L13 16L18 21" stroke="#6641E5" stroke-linecap="round"/></svg></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="premio-customers">
|
||||
<div class="price-container">
|
||||
<div class="customer-title"><?php esc_html_e("TRUSTED BY LEADING COMPANIES WORLDWIDE", "chaty") ?></div>
|
||||
<img src="<?php echo CHT_PLUGIN_URL."admin/assets/images/companies.webp" ?>" alt="premio customers" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="premio-faqs">
|
||||
<div class="price-container">
|
||||
<div class="faq-title"><?php esc_html_e("Frequently Asked Questions", "chaty") ?></div>
|
||||
<div class="faq-lists">
|
||||
<?php
|
||||
$faqs = [
|
||||
[
|
||||
'question' => "How long is my paid Chaty plugin license valid for?",
|
||||
'answer' => "Once you purchase any paid plan of Chaty, you can use it forever. Support and updates are available for 1 year. You can renew your license yearly to get another year of support and updates."
|
||||
],
|
||||
[
|
||||
'question' => "Can I use Chaty plugin on more than 1 domain?",
|
||||
'answer' => "There 2 ways to do it:
|
||||
<ul>
|
||||
<li>You can install the free Chaty plugin on any website you want</li>
|
||||
<li>You can buy the Pro plan that includes licenses for 5 domains, or the Agency plan that includes licenses for 50 domains (bigger plans are also available).</li>
|
||||
</ul>"
|
||||
],
|
||||
[
|
||||
'question' => "Is there a time limit for the free plan?",
|
||||
'answer' => "No. you can use the free plan as long as you want."
|
||||
],
|
||||
[
|
||||
'question' => "Will Chaty stop working if I don’t renew my license?",
|
||||
'answer' => "Of course NOT!<br/>Chaty plugin and all your settings will continue to work as before; however, you will no longer receive plugin updates, including feature additions, improvements, and support."
|
||||
],
|
||||
];
|
||||
foreach($faqs as $key => $faq) { ?>
|
||||
<div class="faq-list">
|
||||
<div class="faq-question">
|
||||
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.5" width="20" height="20" rx="4" fill="#F2EEFF"/>
|
||||
<path d="M9.80425 12.2145C9.72958 12.2145 9.66425 12.1865 9.60825 12.1305C9.55225 12.0745 9.52425 12.0092 9.52425 11.9345C9.52425 11.8692 9.52425 11.8039 9.52425 11.7385C9.52425 11.6732 9.52425 11.6079 9.52425 11.5425C9.57092 11.1972 9.67358 10.8892 9.83225 10.6185C10.0003 10.3385 10.1916 10.0819 10.4062 9.84855C10.6302 9.61521 10.8496 9.40055 11.0642 9.20455C11.2789 8.99921 11.4609 8.79388 11.6102 8.58855C11.7596 8.38321 11.8389 8.17788 11.8483 7.97255C11.8763 7.72988 11.8296 7.52921 11.7083 7.37055C11.5963 7.20255 11.4376 7.07655 11.2323 6.99255C11.0363 6.89921 10.8263 6.85255 10.6023 6.85255C10.1916 6.85255 9.86025 6.95521 9.60825 7.16055C9.36558 7.35655 9.19758 7.65988 9.10425 8.07055C9.06692 8.17321 9.01558 8.25255 8.95025 8.30855C8.88492 8.36455 8.79625 8.39255 8.68425 8.39255H7.22825C7.14425 8.39255 7.06958 8.35988 7.00425 8.29455C6.93892 8.22921 6.90625 8.14521 6.90625 8.04255C6.91558 7.66921 7.00425 7.30521 7.17225 6.95055C7.34025 6.59588 7.58758 6.27855 7.91425 5.99855C8.24092 5.70921 8.63758 5.48055 9.10425 5.31255C9.57092 5.14455 10.1123 5.06055 10.7283 5.06055C11.4002 5.06055 11.9556 5.14455 12.3943 5.31255C12.8423 5.48055 13.1969 5.69988 13.4583 5.97055C13.7289 6.23188 13.9202 6.51655 14.0323 6.82455C14.1442 7.12321 14.1909 7.40788 14.1723 7.67855C14.1629 8.02388 14.0883 8.33655 13.9482 8.61655C13.8176 8.88721 13.6543 9.13921 13.4583 9.37255C13.2716 9.60588 13.0709 9.83455 12.8563 10.0585C12.6509 10.2732 12.4643 10.4925 12.2963 10.7165C12.1376 10.9405 12.0209 11.1739 11.9463 11.4165C11.9276 11.4912 11.9089 11.5659 11.8903 11.6405C11.8809 11.7059 11.8716 11.7759 11.8623 11.8505C11.8156 11.9719 11.7643 12.0652 11.7083 12.1305C11.6523 12.1865 11.5682 12.2145 11.4562 12.2145H9.80425ZM9.80425 15.0005C9.70158 15.0005 9.61758 14.9679 9.55225 14.9025C9.48692 14.8372 9.45425 14.7532 9.45425 14.6505V13.2505C9.45425 13.1572 9.48692 13.0779 9.55225 13.0125C9.61758 12.9379 9.70158 12.9005 9.80425 12.9005H11.3723C11.4656 12.9005 11.5449 12.9379 11.6102 13.0125C11.6849 13.0779 11.7222 13.1572 11.7222 13.2505V14.6505C11.7222 14.7532 11.6849 14.8372 11.6102 14.9025C11.5449 14.9679 11.4656 15.0005 11.3723 15.0005H9.80425Z" fill="#6641E5"/>
|
||||
</svg>
|
||||
<?php echo esc_attr($faq['question']); ?>
|
||||
</div>
|
||||
<div class="faq-answer">
|
||||
<?php echo wp_kses($faq['answer'], $allowedTags); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($key%2 != 0) { ?>
|
||||
<div class="clear-both"></div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<div class="clear-both"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function (factory) {
|
||||
"use strict";
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery'], factory);
|
||||
}
|
||||
else if(typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = factory(require('jquery'));
|
||||
}
|
||||
else {
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($, undefined) {
|
||||
var pluginPlans = <?php echo json_encode($plans) ?>;
|
||||
var selectedId = '1_year';
|
||||
$(document).ready(function(){
|
||||
$(".testimonial-list").slick({
|
||||
autoplay: true,
|
||||
arrows: true,
|
||||
dots: true,
|
||||
appendDots:"#slider-dots",
|
||||
nextArrow: '.slick-next-btn',
|
||||
prevArrow: '.slick-prev-btn',
|
||||
});
|
||||
$(document).on("click", ".plan-options .plan-option", function(){
|
||||
if(!$(this).hasClass("active")) {
|
||||
$(".plan-options .plan-option").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
selectedId = $(this).data("id");
|
||||
if(selectedId != "1_year" && selectedId != "2_years" && selectedId != "lifetime") {
|
||||
selectedId = "1_year";
|
||||
}
|
||||
$(".pricing-table .plan-info").each(function(){
|
||||
var planName = $(this).data("plan");
|
||||
if(typeof pluginPlans[planName] !== "undefined" && typeof pluginPlans[planName][selectedId] !== "undefined") {
|
||||
$("select.multiple-options").val(selectedId).trigger("change");
|
||||
$("select.multiple-options").niceSelect("update");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if($(".multiple-options").length) {
|
||||
$(".multiple-options").niceSelect();
|
||||
}
|
||||
|
||||
if($(".multiple-mobile-options").length) {
|
||||
$(".multiple-mobile-options").niceSelect();
|
||||
}
|
||||
|
||||
if($(".domain-list").length) {
|
||||
$(".domain-list").niceSelect();
|
||||
}
|
||||
|
||||
if($("select.multiple-options").length) {
|
||||
$(document).on("change", "select.multiple-options", function(){
|
||||
selectedId = $(this).val();
|
||||
var planName = $(this).closest(".plan-info").data("plan");
|
||||
$(this).closest(".plan-info").removeClass("1_year").removeClass("2_years").removeClass("lifetime");
|
||||
$(this).closest(".plan-info").addClass(selectedId);
|
||||
if(typeof pluginPlans[planName] !== "undefined" && typeof pluginPlans[planName][selectedId] !== "undefined") {
|
||||
var selectedPlan = pluginPlans[planName][selectedId];
|
||||
var planMonthly = "Lifetime License 🚀";
|
||||
var planType = "For lifetime";
|
||||
var planPrice = "<span>$"+selectedPlan['price']+"</span>/lifetime";
|
||||
if(selectedId == "2_years") {
|
||||
planMonthly = "Less than $"+selectedPlan['month']+"/mo";
|
||||
planType = "Billed Annually";
|
||||
planPrice = "<span>$"+selectedPlan['price']+"</span>/2 years";
|
||||
} else if(selectedId == "1_year") {
|
||||
planMonthly = "Less than $"+selectedPlan['month']+"/mo";
|
||||
planType = "Billed Annually";
|
||||
planPrice = "<span>$"+selectedPlan['price']+"</span>/year"
|
||||
}
|
||||
$(this).closest(".plan-info").find(".plan-monthly").html(planMonthly);
|
||||
$(this).closest(".plan-info").find(".plan-type").html(planType);
|
||||
$(this).closest(".plan-info").find(".plan-price").html(planPrice);
|
||||
$(this).closest(".plan-info").find(".purchase-link").attr("href", selectedPlan['link']);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on("change", "select.domain-list", function(){
|
||||
$("select.domain-list").val($(this).val());
|
||||
$("div.domain-list .current").text($(this).val()+" Websites");
|
||||
$("div.domain-list li.selected").removeClass("selected");
|
||||
$("div.domain-list li[data-value='"+$(this).val()+"']").addClass("selected");
|
||||
$(".multiple-plan-info").data("plan", $(this).val()+"_websites");
|
||||
$(".multiple-plan-info select.multiple-options").each(function(){
|
||||
$(this).trigger("change");
|
||||
})
|
||||
});
|
||||
|
||||
tablePosition();
|
||||
});
|
||||
|
||||
$(window).on("scroll", function(){
|
||||
tablePosition();
|
||||
});
|
||||
|
||||
$(window).on("resize", function(){
|
||||
tablePosition();
|
||||
});
|
||||
|
||||
function tablePosition() {
|
||||
if($(".pricing-pointer").length) {
|
||||
var offsetPos = $(".pricing-pointer").offset().top - $(window).scrollTop();
|
||||
|
||||
if($(".pricing-pointer").offset().top - $(window).scrollTop() <= 40) {
|
||||
$(".desktop-table").addClass("sticky-table-hide-col");
|
||||
} else {
|
||||
$(".desktop-table").removeClass("sticky-table-hide-col");
|
||||
}
|
||||
|
||||
if($(".pricing-pointer").offset().top - $(window).scrollTop() <= 32) {
|
||||
$(".desktop-table").addClass("sticky-table");
|
||||
$(".pricing-header-top").width($(".pricing-header").width() - 2);
|
||||
$(".pricing-header-top").css("left", $(".pricing-header-top").offset().left);
|
||||
|
||||
var insideOffsetPos = $(".pricing-body").offset().top + $(".pricing-body").height() - $(window).scrollTop();
|
||||
if(insideOffsetPos < 522) {
|
||||
$(".pricing-header-top").css("margin-top", (insideOffsetPos - 522)+"px");
|
||||
} else {
|
||||
$(".pricing-header-top").css("margin-top", 0);
|
||||
}
|
||||
} else {
|
||||
$(".desktop-table").removeClass("sticky-table");
|
||||
$(".pricing-header-top").attr("style", "");
|
||||
}
|
||||
}
|
||||
if($(".mobile-pin").length) {
|
||||
if($(window).width() <= 768) {
|
||||
$(".mobile-pin").each(function () {
|
||||
var scrollPos = $(this).offset().top - $(window).scrollTop();
|
||||
console.log(scrollPos);
|
||||
if (scrollPos < 0) {
|
||||
$(this).closest(".mobile-plan").addClass("has-sticky-info");
|
||||
|
||||
scrollPos = $(this).offset().top + $(this).closest(".mobile-plan").height() - $(window).scrollTop();
|
||||
if (parseInt(scrollPos) < 500) {
|
||||
$(this).closest(".mobile-plan").find(".mobile-head-plan").css("margin-top", (parseInt(scrollPos) - 500) + "px");
|
||||
} else {
|
||||
$(this).closest(".mobile-plan").find(".mobile-head-plan").css("margin-top", "0px");
|
||||
}
|
||||
} else {
|
||||
$(this).closest(".mobile-plan").removeClass("has-sticky-info");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(".mobile-head-plan").css("margin-top", "0px");
|
||||
$(".mobile-plan").removeClass("has-sticky-info");
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
/* NICE SELECT LIBRARY*/
|
||||
!function(e){e.fn.niceSelect=function(t){function s(t){t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"></span><ul class="list"></ul>'));var s=t.next(),n=t.find("option"),i=t.find("option:selected");s.find(".current").html(i.data("display")||i.text()),n.each(function(t){var n=e(this),i=n.data("display");s.find("ul").append(e("<li></li>").attr("data-value",n.val()).attr("data-display",i||null).addClass("option"+(n.is(":selected")?" selected":"")+(n.is(":disabled")?" disabled":"")).html(n.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),n=e(this).next(".nice-select"),i=n.hasClass("open");n.length&&(n.remove(),s(t),i&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".nice-select").length&&e(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide(),this.each(function(){var t=e(this);t.next().hasClass("nice-select")||s(t)}),e(document).off(".nice_select"),e(document).on("click.nice_select",".nice-select",function(t){var s=e(this);e(".nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus")):s.focus()}),e(document).on("click.nice_select",function(t){0===e(t.target).closest(".nice-select").length&&e(".nice-select").removeClass("open").find(".option")}),e(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(t){var s=e(this),n=s.closest(".nice-select");n.find(".selected").removeClass("selected"),s.addClass("selected");var i=s.data("display")||s.text();n.find(".current").text(i),n.prev("select").val(s.data("value")).trigger("change")}),e(document).on("keydown.nice_select",".nice-select",function(t){var s=e(this),n=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?n.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var i=n.nextAll(".option:not(.disabled)").first();i.length>0&&(s.find(".focus").removeClass("focus"),i.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var l=n.prevAll(".option:not(.disabled)").first();l.length>0&&(s.find(".focus").removeClass("focus"),l.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1});var n=document.createElement("a").style;return n.cssText="pointer-events:auto","auto"!==n.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery);
|
||||
</script>
|
||||
Reference in new issue
Block a user