Version Description
- NEW: styles/scripts minified.
- FIX UX issues.
Download this release
Release Info
Developer | creapuntome |
Plugin | WhatsApp me |
Version | 2.2.2 |
Comparing to | |
See all releases |
Code changes from version 2.2.1 to 2.2.2
- README.txt +6 -2
- admin/class-whatsappme-admin.php +8 -3
- admin/css/whatsappme.min.css +1 -0
- admin/js/whatsappme.min.js +1 -0
- public/class-whatsappme-public.php +14 -7
- public/css/whatsappme.css +35 -10
- public/css/whatsappme.min.css +1 -0
- public/js/whatsappme.min.js +1 -0
- whatsappme.php +3 -3
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: whatsapp, button, chat, support, contact, click to chat, directly message
|
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.1
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 2.2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -13,7 +13,7 @@ Add support to your visitors directly with WhatsApp.
|
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
-
### The perfect plugin to engage and retain customers. Support for
|
17 |
|
18 |
#### Communication with your customers can be very easy
|
19 |
|
@@ -81,6 +81,10 @@ WhatsApp me send an event (if GTM detected) when user click to launch WhatsApp:
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
|
|
84 |
= 2.2.0 =
|
85 |
* **NEW:** Now can change telephone number on every post/page.
|
86 |
* **NEW:** Send Google Tag Manager event on click.
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.1
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 2.2.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
+
### The perfect plugin to engage and retain customers. Support for ecommerce and online stores. Your clients will love it. Analytics integration.
|
17 |
|
18 |
#### Communication with your customers can be very easy
|
19 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 2.2.2 =
|
85 |
+
* **NEW:** styles/scripts minified.
|
86 |
+
* FIX UX issues.
|
87 |
+
|
88 |
= 2.2.0 =
|
89 |
* **NEW:** Now can change telephone number on every post/page.
|
90 |
* **NEW:** Send Google Tag Manager event on click.
|
admin/class-whatsappme-admin.php
CHANGED
@@ -103,12 +103,14 @@ class WhatsAppMe_Admin {
|
|
103 |
* @since 1.2.0
|
104 |
* @since 2.0.0 Added whatsappme-admin styles
|
105 |
* @since 2.2.0 Only register (not enqueue)
|
|
|
106 |
* @param string $hook The name of the page.
|
107 |
* @return void
|
108 |
*/
|
109 |
public function enqueue_styles($hook) {
|
110 |
|
111 |
-
|
|
|
112 |
|
113 |
if ( $this->enhanced_phone ) {
|
114 |
wp_register_style( 'intl-tel-input', 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/15.0.1/css/intlTelInput.css', array(), null, 'all' );
|
@@ -121,16 +123,19 @@ class WhatsAppMe_Admin {
|
|
121 |
*
|
122 |
* @since 1.2.0
|
123 |
* @since 2.2.0 Only register (not enqueue)
|
|
|
124 |
* @param string $hook The id of the page.
|
125 |
* @return void
|
126 |
*/
|
127 |
public function enqueue_scripts($hook) {
|
128 |
|
|
|
|
|
129 |
if ( $this->enhanced_phone ) {
|
130 |
wp_register_script( 'intl-tel-input', 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/15.0.1/js/intlTelInput.min.js', array(), null, true );
|
131 |
-
wp_register_script( 'whatsappme-admin', plugin_dir_url( __FILE__ ) . 'js/
|
132 |
} else {
|
133 |
-
wp_register_script( 'whatsappme-admin', plugin_dir_url( __FILE__ ) . 'js/
|
134 |
}
|
135 |
|
136 |
}
|
103 |
* @since 1.2.0
|
104 |
* @since 2.0.0 Added whatsappme-admin styles
|
105 |
* @since 2.2.0 Only register (not enqueue)
|
106 |
+
* @since 2.2.2 minified
|
107 |
* @param string $hook The name of the page.
|
108 |
* @return void
|
109 |
*/
|
110 |
public function enqueue_styles($hook) {
|
111 |
|
112 |
+
$styles = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? 'whatsappme.css' : 'whatsappme.min.css';
|
113 |
+
wp_register_style( 'whatsappme-admin', plugin_dir_url( __FILE__ ) . 'css/' . $styles, array(), $this->version, 'all' );
|
114 |
|
115 |
if ( $this->enhanced_phone ) {
|
116 |
wp_register_style( 'intl-tel-input', 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/15.0.1/css/intlTelInput.css', array(), null, 'all' );
|
123 |
*
|
124 |
* @since 1.2.0
|
125 |
* @since 2.2.0 Only register (not enqueue)
|
126 |
+
* @since 2.2.2 minified
|
127 |
* @param string $hook The id of the page.
|
128 |
* @return void
|
129 |
*/
|
130 |
public function enqueue_scripts($hook) {
|
131 |
|
132 |
+
$script = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? 'whatsappme.js' : 'whatsappme.min.js';
|
133 |
+
|
134 |
if ( $this->enhanced_phone ) {
|
135 |
wp_register_script( 'intl-tel-input', 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/15.0.1/js/intlTelInput.min.js', array(), null, true );
|
136 |
+
wp_register_script( 'whatsappme-admin', plugin_dir_url( __FILE__ ) . 'js/' . $script, array( 'jquery', 'intl-tel-input' ), $this->version, true );
|
137 |
} else {
|
138 |
+
wp_register_script( 'whatsappme-admin', plugin_dir_url( __FILE__ ) . 'js/' . $script, array( 'jquery' ), $this->version, true );
|
139 |
}
|
140 |
|
141 |
}
|
admin/css/whatsappme.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.tab{display:none}.tab-active{display:block}#tab-advanced tr:hover{background:rgba(0,0,0,.05)}#tab-advanced td,#tab-advanced th{padding:7px 15px}#tab-advanced label{margin-right:15px}#tab-advanced .dashicons{opacity:.5}#tab-advanced input[type=radio]+span{transition:all .2s}#tab-advanced input[type=radio]:checked+span{color:#79ba49;opacity:1}#tab-advanced input[type=radio]:checked+.dashicons-hidden{color:#ca4a1f}
|
admin/js/whatsappme.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){"use strict";e(function(){if("function"==typeof intlTelInput){var t=JSON.parse(localStorage.whatsappme_country_code||"{}"),a=!(!t.code||t.date!=(new Date).toDateString())&&t.code,n=e("#whatsappme_phone"),i=intlTelInput(n.get(0),{hiddenInput:n.data("name")||"whatsappme[telephone]",initialCountry:"auto",preferredCountries:[a||""],geoIpLookup:function(t){a?t(a):e.getJSON("https://ipinfo.io").always(function(e){var a=e&&e.country?e.country:"";localStorage.whatsappme_country_code=JSON.stringify({code:a,date:(new Date).toDateString()}),t(a)})},utilsScript:"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/15.0.1/js/utils.js"});n.on("keyup change",function(){n.css("border-color",""),i.hiddenInput.value=i.getNumber()}),n.on("blur",function(){n.css("border-color",n.val().trim()&&!i.isValidNumber()?"#ff0000":"")})}function o(t,a){if(t=t||"all",a=a||e('input[name="whatsappme[view]['+t+']"]:checked').val(),e(".view_inheritance_"+t).toggleClass("dashicons-visibility","yes"==a).toggleClass("dashicons-hidden","no"==a),"cpts"==t)e("[class*=view_inheritance_cpt_]").toggleClass("dashicons-visibility","yes"==a).toggleClass("dashicons-hidden","no"==a);else if(t in s){var n=e('input[name="whatsappme[view]['+t+']"]:checked').val();n=""===n?a:n,e.each(s[t],function(){o(this,n)})}}if(1===e("#whatsappme_form").length){e(".nav-tab").click(function(t){var a=e(this);t.preventDefault(),e(".nav-tab").removeClass("nav-tab-active"),a.addClass("nav-tab-active").blur(),e(".tab").removeClass("tab-active"),e(a.attr("href")).addClass("tab-active")});var c=e("#tab-advanced"),s={all:["front_page","blog_page","404_page","search","archive","singular","woocommerce","cpts"],archive:["date","author"],singular:["page","post"],woocommerce:["product","cart","checkout","account_page"]};e("input",c).change(function(){o()}),e(".whatsappme_view_reset").click(function(t){t.preventDefault(),e('input[value=""]',c).prop("checked",!0),e(".whatsappme_view_all input",c).first().prop("checked",!0),o()}),o()}})}(jQuery);
|
public/class-whatsappme-public.php
CHANGED
@@ -137,11 +137,13 @@ class WhatsAppMe_Public {
|
|
137 |
* Register the stylesheets for the public-facing side of the site.
|
138 |
*
|
139 |
* @since 1.0.0
|
|
|
140 |
*/
|
141 |
public function enqueue_styles() {
|
142 |
|
143 |
if ( $this->settings['show'] ) {
|
144 |
-
|
|
|
145 |
}
|
146 |
|
147 |
}
|
@@ -150,11 +152,13 @@ class WhatsAppMe_Public {
|
|
150 |
* Register the JavaScript for the public-facing side of the site.
|
151 |
*
|
152 |
* @since 1.0.0
|
|
|
153 |
*/
|
154 |
public function enqueue_scripts() {
|
155 |
|
156 |
if ( $this->settings['show'] ) {
|
157 |
-
|
|
|
158 |
}
|
159 |
|
160 |
}
|
@@ -169,23 +173,26 @@ class WhatsAppMe_Public {
|
|
169 |
// Clean unnecessary settings on front
|
170 |
$data = array_diff_key( $this->settings, array_flip( array( 'show', 'visibility', 'position' ) ) );
|
171 |
|
172 |
-
$copy = apply_filters( 'whatsappme_copy', '
|
173 |
|
174 |
if ( $this->settings['show'] ) {
|
175 |
?>
|
176 |
<div class="whatsappme whatsappme--<?php echo $this->settings['position']; ?>" data-settings="<?php echo esc_attr( json_encode( $data ) ); ?>">
|
177 |
<div class="whatsappme__button">
|
178 |
-
<svg
|
|
|
|
|
|
|
179 |
<?php if ($this->settings['message_badge']): ?><div class="whatsappme__badge">1</div><?php endif; ?>
|
180 |
</div>
|
181 |
<?php if ($this->settings['message_text']): ?>
|
182 |
<div class="whatsappme__box">
|
183 |
<header class="whatsappme__header">
|
184 |
-
<svg
|
185 |
-
<div class="whatsappme__close"
|
186 |
</header>
|
187 |
<div class="whatsappme__message"><?php echo $this->formated_message(); ?></div>
|
188 |
-
<?php if ($copy): ?><div class="whatsappme__copy"><?php echo $copy;
|
189 |
</div>
|
190 |
<?php endif; ?>
|
191 |
</div>
|
137 |
* Register the stylesheets for the public-facing side of the site.
|
138 |
*
|
139 |
* @since 1.0.0
|
140 |
+
* @since 2.2.2 minified
|
141 |
*/
|
142 |
public function enqueue_styles() {
|
143 |
|
144 |
if ( $this->settings['show'] ) {
|
145 |
+
$styles = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? 'whatsappme.css' : 'whatsappme.min.css';
|
146 |
+
wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/' . $styles, array(), $this->version, 'all' );
|
147 |
}
|
148 |
|
149 |
}
|
152 |
* Register the JavaScript for the public-facing side of the site.
|
153 |
*
|
154 |
* @since 1.0.0
|
155 |
+
* @since 2.2.2 minified
|
156 |
*/
|
157 |
public function enqueue_scripts() {
|
158 |
|
159 |
if ( $this->settings['show'] ) {
|
160 |
+
$script = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? 'whatsappme.js' : 'whatsappme.min.js';
|
161 |
+
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/' . $script, array( 'jquery' ), $this->version, true );
|
162 |
}
|
163 |
|
164 |
}
|
173 |
// Clean unnecessary settings on front
|
174 |
$data = array_diff_key( $this->settings, array_flip( array( 'show', 'visibility', 'position' ) ) );
|
175 |
|
176 |
+
$copy = apply_filters( 'whatsappme_copy', __( 'Powered by', 'creame-whatsapp-me' ) );
|
177 |
|
178 |
if ( $this->settings['show'] ) {
|
179 |
?>
|
180 |
<div class="whatsappme whatsappme--<?php echo $this->settings['position']; ?>" data-settings="<?php echo esc_attr( json_encode( $data ) ); ?>">
|
181 |
<div class="whatsappme__button">
|
182 |
+
<svg width="24" height="24" viewBox="0 0 24 24">
|
183 |
+
<path id="wa_ico" fill="currentColor" d="M.057 24l1.687-6.163a11.867 11.867 0 0 1-1.587-5.946C.16 5.335 5.495 0 12.05 0a11.817 11.817 0 0 1 8.413 3.488 11.824 11.824 0 0 1 3.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 0 1-5.688-1.448L.057 24zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z"/>
|
184 |
+
<path id="send_ico" fill="currentColor" d="M1.101 21.757L23.8 12.028 1.101 2.3l.011 7.912 13.623 1.816-13.623 1.817-.011 7.912z"/>
|
185 |
+
</svg>
|
186 |
<?php if ($this->settings['message_badge']): ?><div class="whatsappme__badge">1</div><?php endif; ?>
|
187 |
</div>
|
188 |
<?php if ($this->settings['message_text']): ?>
|
189 |
<div class="whatsappme__box">
|
190 |
<header class="whatsappme__header">
|
191 |
+
<svg width="120" height="28" viewBox="0 0 120 28"><path fill="currentColor" fill-rule="evenodd" d="M117.2 17c0 .4-.2.7-.4 1-.1.3-.4.5-.7.7l-1 .2c-.5 0-.9 0-1.2-.2l-.7-.7a3 3 0 0 1-.4-1 5.4 5.4 0 0 1 0-2.3c0-.4.2-.7.4-1l.7-.7a2 2 0 0 1 1.1-.3 2 2 0 0 1 1.8 1l.4 1a5.3 5.3 0 0 1 0 2.3zm2.5-3c-.1-.7-.4-1.3-.8-1.7a4 4 0 0 0-1.3-1.2c-.6-.3-1.3-.4-2-.4-.6 0-1.2.1-1.7.4a3 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7.1-.4-.2-1.5-.5-2.8-1.7-1-1-1.7-2-2-2.4-.1-.4 0-.5.2-.7l.5-.6.4-.6v-.6L10.4 8c-.3-.6-.6-.5-.8-.6H9c-.2 0-.6.1-.9.5C7.8 8.2 7 9 7 10.7c0 1.7 1.3 3.4 1.4 3.6.2.3 2.5 3.7 6 5.2l1.9.8c.8.2 1.6.2 2.2.1.6-.1 2-.8 2.3-1.6.3-.9.3-1.5.2-1.7l-.7-.4zM14 25.3c-2 0-4-.5-5.8-1.6l-.4-.2-4.4 1.1 1.2-4.2-.3-.5A11.5 11.5 0 0 1 22.1 5.7 11.5 11.5 0 0 1 14 25.3zM14 0A13.8 13.8 0 0 0 2 20.7L0 28l7.3-2A13.8 13.8 0 1 0 14 0z"/></svg>
|
192 |
+
<div class="whatsappme__close"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M24 2.4L21.6 0 12 9.6 2.4 0 0 2.4 9.6 12 0 21.6 2.4 24l9.6-9.6 9.6 9.6 2.4-2.4-9.6-9.6L24 2.4z"/></svg></div>
|
193 |
</header>
|
194 |
<div class="whatsappme__message"><?php echo $this->formated_message(); ?></div>
|
195 |
+
<?php if ($copy): ?><div class="whatsappme__copy"><?php echo $copy; ?> <a href="https://wame.chat" rel="noopener" target="_blank"><svg width="72" height="17" viewBox="0 0 72 17"><path fill="currentColor" fill-rule="evenodd" d="M25.371 10.429l2.122-6.239h.045l2.054 6.239h-4.22zm32.2 2.397c-.439.495-.88.953-1.325 1.375-.797.755-1.332 1.232-1.604 1.43-.622.438-1.156.706-1.604.805-.447.1-.787.13-1.02.09a3.561 3.561 0 0 1-.7-.239c-.66-.318-1.02-.864-1.079-1.64-.058-.774.03-1.619.263-2.533.35-1.987 1.108-4.133 2.274-6.438a73.481 73.481 0 0 0-2.8 3.04c-.816.954-1.7 2.096-2.653 3.428a44.068 44.068 0 0 0-2.77 4.441c-.738 0-1.341-.159-1.808-.477-.427-.278-.748-.695-.962-1.252-.214-.556-.165-1.41.146-2.563l.204-.626c.097-.298.204-.606.32-.924.117-.318.234-.626.35-.924.117-.298.195-.507.234-.626v.06c.272-.756.603-1.56.991-2.415a56.92 56.92 0 0 1 1.4-2.832 62.832 62.832 0 0 0-3.266 3.875 61.101 61.101 0 0 0-2.945 3.995 57.072 57.072 0 0 0-2.886 4.71c-.387 0-.736-.044-1.048-.131l.195.545h-3.72l-1.23-3.786h-6.093L23.158 17h-3.605l6.16-17h3.674l4.357 12.16c.389-1.35.97-2.736 1.74-4.16a41.336 41.336 0 0 0 2.013-4.232.465.465 0 0 0 .058-.18c0-.039.02-.098.058-.178.04-.08.078-.199.117-.358.039-.159.097-.337.175-.536.039-.12.078-.219.117-.298a.465.465 0 0 0 .058-.18c.078-.277.175-.575.292-.893.116-.318.194-.597.233-.835V.25c-.039-.04-.039-.08 0-.119l.233-.12c.117-.039.292.02.525.18.156.08.292.179.408.298.272.199.564.427.875.685.311.259.583.557.816.895a2.9 2.9 0 0 1 .467 1.043c.078.358.039.735-.117 1.133a8.127 8.127 0 0 1-.35.775c0 .08-.038.159-.116.238a2.93 2.93 0 0 1-.175.298 7.05 7.05 0 0 0-.35.656c-.039.04-.058.07-.058.09 0 .02-.02.05-.059.089a61.988 61.988 0 0 1-1.633 2.385c-.544.755-.913 1.35-1.108 1.788a79.39 79.39 0 0 1 3.5-4.233 101.59 101.59 0 0 1 3.12-3.398C45.651 1.82 46.612.986 47.468.43c.739.278 1.341.596 1.808.954.428.318.768.676 1.02 1.073.253.398.244.835-.029 1.312l-1.4 2.325a36.928 36.928 0 0 0-1.749 3.279 53.748 53.748 0 0 1 1.633-1.848 46.815 46.815 0 0 1 4.024-3.875c.7-.597 1.38-1.113 2.041-1.55.739.278 1.341.596 1.808.953.428.318.768.676 1.02 1.073.253.398.243.835-.029 1.312-.155.318-.408.795-.758 1.43a152.853 152.853 0 0 0-2.04 3.846 97.87 97.87 0 0 0-.467.924c-.35.835-.632 1.55-.846 2.146-.214.597-.282.934-.204 1.014a.63.63 0 0 0 .291-.06c.234-.119.564-.348.992-.685.428-.338.875-.736 1.341-1.193.467-.457.914-.914 1.341-1.37.217-.232.409-.45.575-.657a15.4 15.4 0 0 1 .957-2.514c.34-.696.708-1.333 1.108-1.91.399-.576.778-1.044 1.137-1.402a19.553 19.553 0 0 1 1.796-1.7 32.727 32.727 0 0 1 1.497-1.164 8.821 8.821 0 0 1 1.317-.835C66.292.989 66.83.83 67.269.83c.32 0 .649.11.988.328.34.22.649.478.928.776.28.299.519.607.718.925.2.318.3.557.3.716.04.597-.06 1.253-.3 1.97a7.14 7.14 0 0 1-1.107 2.058 8.534 8.534 0 0 1-1.826 1.76 6.522 6.522 0 0 1-2.395 1.074c-.2.08-.36.06-.48-.06a.644.644 0 0 1-.179-.477c0-.358.14-.616.42-.776.837-.318 1.536-.735 2.095-1.253.559-.517.998-1.034 1.317-1.551.4-.597.699-1.213.898-1.85 0-.199-.09-.308-.27-.328a4.173 4.173 0 0 0-.448-.03 4.83 4.83 0 0 0-1.318.597c-.399.239-.848.577-1.347 1.014-.499.438-1.028 1.015-1.586 1.73-.918 1.154-1.587 2.298-2.006 3.432-.42 1.134-.629 1.979-.629 2.536 0 .915.19 1.482.569 1.7.38.22.728.329 1.048.329.638 0 1.347-.15 2.125-.448a16.248 16.248 0 0 0 2.305-1.104 30.05 30.05 0 0 0 2.126-1.342 27.256 27.256 0 0 0 1.646-1.224c.08-.04.18-.1.3-.179l.24-.12a.54.54 0 0 1 .239-.059c.08 0 .16.02.24.06.08.04.119.16.119.358 0 .239-.08.457-.24.656a19.115 19.115 0 0 1-2.245 1.82 35.445 35.445 0 0 1-2.185 1.403c-.759.437-1.497.855-2.215 1.253a8.461 8.461 0 0 1-1.647.387c-.499.06-.968.09-1.407.09-.998 0-1.796-.16-2.395-.477-.599-.319-1.048-.706-1.347-1.164a4.113 4.113 0 0 1-.599-1.372c-.1-.457-.15-.843-.15-1.161zm-42.354-1.111L17.887 0h3.514L17.02 17h-3.56L10.7 5.428h-.046L7.94 17H4.312L0 0h3.582L6.16 11.571h.045L9.035 0h3.354l2.783 11.715h.045z"/></svg></a></div><?php endif; ?>
|
196 |
</div>
|
197 |
<?php endif; ?>
|
198 |
</div>
|
public/css/whatsappme.css
CHANGED
@@ -90,8 +90,14 @@
|
|
90 |
margin: 12px 10px 12px 14px;
|
91 |
}
|
92 |
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
|
97 |
.whatsappme__box {
|
@@ -135,6 +141,7 @@
|
|
135 |
}
|
136 |
|
137 |
.whatsappme__close {
|
|
|
138 |
position: absolute;
|
139 |
top: 18px;
|
140 |
right: 24px;
|
@@ -143,8 +150,6 @@
|
|
143 |
border-radius: 50%;
|
144 |
background: #000;
|
145 |
color: #fff;
|
146 |
-
line-height: 34px;
|
147 |
-
font-size: 25px;
|
148 |
text-align: center;
|
149 |
opacity: .4;
|
150 |
cursor: pointer;
|
@@ -155,6 +160,13 @@
|
|
155 |
opacity: .6;
|
156 |
}
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
.whatsappme__message {
|
159 |
position: relative;
|
160 |
min-height: 80px;
|
@@ -185,17 +197,31 @@
|
|
185 |
color: #2e8c7d;
|
186 |
font-size: 11px;
|
187 |
letter-spacing: 0.2px;
|
|
|
|
|
188 |
}
|
189 |
|
190 |
-
.whatsappme__copy
|
191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
color: inherit;
|
193 |
text-decoration: none;
|
194 |
}
|
195 |
|
196 |
-
.whatsappme__copy
|
197 |
-
|
198 |
-
|
|
|
199 |
}
|
200 |
|
201 |
/* Align left */
|
@@ -239,7 +265,6 @@
|
|
239 |
top: 13px;
|
240 |
width: 28px;
|
241 |
height: 28px;
|
242 |
-
line-height: 28px;
|
243 |
}
|
244 |
|
245 |
.whatsappme__message {
|
90 |
margin: 12px 10px 12px 14px;
|
91 |
}
|
92 |
|
93 |
+
#wa_ico,
|
94 |
+
.whatsappme--dialog #send_ico {
|
95 |
+
display: block;
|
96 |
+
}
|
97 |
+
|
98 |
+
#send_ico,
|
99 |
+
.whatsappme--dialog #wa_ico {
|
100 |
+
display: none;
|
101 |
}
|
102 |
|
103 |
.whatsappme__box {
|
141 |
}
|
142 |
|
143 |
.whatsappme__close {
|
144 |
+
display: flex;
|
145 |
position: absolute;
|
146 |
top: 18px;
|
147 |
right: 24px;
|
150 |
border-radius: 50%;
|
151 |
background: #000;
|
152 |
color: #fff;
|
|
|
|
|
153 |
text-align: center;
|
154 |
opacity: .4;
|
155 |
cursor: pointer;
|
160 |
opacity: .6;
|
161 |
}
|
162 |
|
163 |
+
.whatsappme__close svg {
|
164 |
+
display: block;
|
165 |
+
width: 12px;
|
166 |
+
height: 12px;
|
167 |
+
margin: auto;
|
168 |
+
}
|
169 |
+
|
170 |
.whatsappme__message {
|
171 |
position: relative;
|
172 |
min-height: 80px;
|
197 |
color: #2e8c7d;
|
198 |
font-size: 11px;
|
199 |
letter-spacing: 0.2px;
|
200 |
+
opacity: 0.4;
|
201 |
+
transition: opacity 0.25s;
|
202 |
}
|
203 |
|
204 |
+
.whatsappme--left .whatsappme__copy {
|
205 |
+
left: auto;
|
206 |
+
right: 40px;
|
207 |
+
}
|
208 |
+
|
209 |
+
.whatsappme__copy:hover {
|
210 |
+
opacity: 0.8;
|
211 |
+
transition: opacity 0.5s ease-out 0.5s;
|
212 |
+
}
|
213 |
+
|
214 |
+
.whatsappme__copy a,
|
215 |
+
.whatsappme__copy a:hover,
|
216 |
+
.whatsappme__copy a:active {
|
217 |
color: inherit;
|
218 |
text-decoration: none;
|
219 |
}
|
220 |
|
221 |
+
.whatsappme__copy svg {
|
222 |
+
width: 40px;
|
223 |
+
height: 10px;
|
224 |
+
vertical-align: inherit;
|
225 |
}
|
226 |
|
227 |
/* Align left */
|
265 |
top: 13px;
|
266 |
width: 28px;
|
267 |
height: 28px;
|
|
|
268 |
}
|
269 |
|
270 |
.whatsappme__message {
|
public/css/whatsappme.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.whatsappme{position:fixed;z-index:400;right:20px;bottom:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:16px;line-height:26px;color:#262626;transform:scale3d(0,0,0);transition:transform .3s ease-in-out;user-select:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none}.whatsappme--show{transform:scale3d(1,1,1);transition:transform .5s cubic-bezier(.18,.89,.32,1.28)}.whatsappme__button{position:absolute;z-index:2;bottom:8px;right:8px;height:60px;min-width:60px;max-width:95vw;background-color:#25d366;color:#fff;border-radius:30px;box-shadow:1px 6px 24px 0 rgba(7,94,84,.24);cursor:pointer;transition:background-color .2s linear}.whatsappme__button:hover{background-color:#128c7e;transition:background-color 1.5s linear}.whatsappme--dialog .whatsappme__button{transition:background-color .2s linear}.whatsappme__button:active{background-color:#075e54;transition:none}.whatsappme__button svg{width:36px;height:36px;margin:12px 12px}.whatsappme__badge{position:absolute;top:-4px;right:-4px;width:20px;height:20px;border:none;border-radius:50%;background:#e82c0c;font-size:12px;font-weight:600;line-height:20px;text-align:center;box-shadow:none;opacity:0;pointer-events:none}.whatsappme__badge.whatsappme__badge--in{animation:badge--in .5s cubic-bezier(.27,.9,.41,1.28) 1 both}.whatsappme__badge.whatsappme__badge--out{animation:badge--out .4s cubic-bezier(.215,.61,.355,1) 1 both}.whatsappme--dialog .whatsappme__button{box-shadow:0 1px 2px 0 rgba(0,0,0,.3)}.whatsappme--dialog .whatsappme__button svg{margin:12px 10px 12px 14px}#wa_ico,.whatsappme--dialog #send_ico{display:block}#send_ico,.whatsappme--dialog #wa_ico{display:none}.whatsappme__box{position:absolute;bottom:0;right:0;z-index:1;width:calc(100vw - 40px);max-width:400px;min-height:280px;padding-bottom:60px;border-radius:32px;background:#ede4dd url(../images/background.png) center repeat-y;background-size:100% auto;box-shadow:0 2px 6px 0 rgba(0,0,0,.5);overflow:hidden;transform:scale3d(0,0,0);opacity:0;transition:opacity .4s ease-out,transform 0s linear .3s}.whatsappme--dialog .whatsappme__box{opacity:1;transform:scale3d(1,1,1);transition:opacity .2s ease-out,transform 0s linear}.whatsappme__header{display:block;position:static;width:100%;height:70px;padding:0 26px;margin:0;background-color:#2e8c7d;color:rgba(255,255,255,.5)}.whatsappme__header svg{height:100%}.whatsappme__close{display:flex;position:absolute;top:18px;right:24px;width:34px;height:34px;border-radius:50%;background:#000;color:#fff;text-align:center;opacity:.4;cursor:pointer;transition:opacity .3s ease-out}.whatsappme__close:hover{opacity:.6}.whatsappme__close svg{display:block;width:12px;height:12px;margin:auto}.whatsappme__message{position:relative;min-height:80px;padding:20px 22px;margin:34px 26px;border-radius:32px;background-color:#fff;color:#4a4a4a;box-shadow:0 1px 2px 0 rgba(0,0,0,.3)}.whatsappme__message:before{content:'';display:block;position:absolute;bottom:30px;left:-18px;width:18px;height:18px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA1CAYAAADlE3NNAAAEr0lEQVRo3t2aT0gjVxzHf++9mcn8zWhW6bpELWzcogFNaRar7a4tBNy2WATbHpacpdZ6redeZE+9CL02B1ktXsRD/xwsilhoSwsqag/xYK09hCQlmCiTf28vGRnGmZhE183MFx5vmGQy7zO/P/P7PYLAHUIAQCqDAwDPxMREG3IpHL+zs/MZcgkYAgAMAIwOl8lkYm6xGgYAFgAEAGgZHx9/vVwun7nJJTkAEAGgdW9v73NKKXWLSzIA4AEAGQDazs/P/3ALnNEl1a2trY9oRW6wmu6SEgC0ZrPZn9wCp2dIHgCU1dXVtymlZafDIatEksvlfqYGueG9xgOAcnBw8JSa5GR3vIi1aDTaUSwWj5wOZ3RHPUN6U6nUN9RCTnZHDwDI+/v745TSkpPhrOpHcWlpqbdcLieojZwGpseZMDo66svn87/RKnIaGAsAfCAQ8J6dnX1Pr5DjwABAzmazMVqDHAd2enr6La1RjgGLRCJqLpe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WFzd6CMpnM3y8AJPEkZ9khO4IAAAAASUVORK5CYII=);background-size:100%}.whatsappme__copy{position:absolute;bottom:4px;left:40px;color:#2e8c7d;font-size:11px;letter-spacing:.2px;opacity:.4;transition:opacity .25s}.whatsappme--left .whatsappme__copy{left:auto;right:40px}.whatsappme__copy:hover{opacity:.8;transition:opacity .5s ease-out .5s}.whatsappme__copy a,.whatsappme__copy a:active,.whatsappme__copy a:hover{color:inherit;text-decoration:none}.whatsappme__copy svg{width:40px;height:10px;vertical-align:inherit}.whatsappme--left{right:auto;left:20px}.whatsappme--left .whatsappme__button{right:auto;left:8px}.whatsappme--left .whatsappme__box{right:auto;left:0}@media (max-width:480px){.whatsappme{bottom:6px;right:6px}.whatsappme--left{right:auto;left:6px}.whatsappme__box{width:calc(100vw - 12px);min-height:0}.whatsappme__header{height:55px}.whatsappme__close{top:13px;width:28px;height:28px}.whatsappme__message{padding:14px 20px;margin:15px 21px 20px;line-height:24px}}@keyframes badge--in{from{opacity:0;transform:translateY(50px)}to{opacity:1;transform:translateY(0)}}@keyframes badge--out{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-20px)}}
|
public/js/whatsappme.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){"use strict";e(function(){var t,a=3e3,s=e(".whatsappme"),n=s.find(".whatsappme__badge"),o=s.data("settings");try{localStorage.setItem("test",1),localStorage.removeItem("test"),t=localStorage}catch(e){t={_data:{},setItem:function(e,t){this._data[e]=String(t)},getItem:function(e){return this._data.hasOwnProperty(e)?this._data[e]:null}}}if(void 0===o)try{o=JSON.parse(s.attr("data-settings"))}catch(e){o=void 0}s.length&&o&&o.telephone&&function(){var i,p,m,c,h=!!navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i),l=""!==o.message_text,r=o.whastapp_web&&!h,d=(t.getItem("whatsappme_hashes")||"").split(",").filter(Boolean),u="yes"==t.getItem("whatsappme_visited");l&&(i=function(e){for(var t=0,a=1;t<e.length;t++)a=Math.imul(a+e.charCodeAt(t)|0,2654435761);return(a^a>>>17)>>>0}(o.message_text).toString(),p=d.indexOf(i)>-1);t.setItem("whatsappme_visited","yes"),(!o.mobile_only||h)&&(setTimeout(function(){s.addClass("whatsappme--show")},a),l&&!p&&(o.message_badge?c=setTimeout(function(){n.addClass("whatsappme__badge--in")},a+o.message_delay):u&&(c=setTimeout(function(){s.addClass("whatsappme--dialog")},a+o.message_delay))));l&&!h&&e(".whatsappme__button").mouseenter(function(){m=setTimeout(g,1500)}).mouseleave(function(){clearTimeout(m)});function g(){s.addClass("whatsappme--dialog"),clearTimeout(c),o.message_badge&&n.hasClass("whatsappme__badge--in")&&(n.removeClass("whatsappme__badge--in").addClass("whatsappme__badge--out"),_())}function _(){l&&!p&&(d.push(i),t.setItem("whatsappme_hashes",d.join(",")),p=!0)}e(".whatsappme__button").click(function(){var e=function(e,t,a){return(e?"https://web.whatsapp.com/send":"https://api.whatsapp.com/send")+"?phone="+encodeURIComponent(t)+"&text="+encodeURIComponent(a||"")}(r,o.telephone,o.message_send);l&&!s.hasClass("whatsappme--dialog")?g():(s.removeClass("whatsappme--dialog"),_(),function(e){"object"==typeof dataLayer&&dataLayer.push({event:"WhatsAppMe",eventAction:"click",eventLabel:e});if("function"==typeof gtag)gtag("event","click",{event_category:"WhatsAppMe",event_label:e,transport_type:"beacon"});else if("function"==typeof ga){ga("set","transport","beacon");var t=ga.getAll();t.forEach(function(t){t.send("event","WhatsAppMe","click",e)})}}(e),window.open(e,"whatsappme"))}),e(".whatsappme__close").click(function(){s.removeClass("whatsappme--dialog"),_()})}()}),Math.imul=Math.imul||function(e,t){var a=65535&e,s=65535&t;return a*s+((e>>>16&65535)*s+a*(t>>>16&65535)<<16>>>0)|0}}(jQuery);
|
whatsappme.php
CHANGED
@@ -8,8 +8,8 @@
|
|
8 |
* @wordpress-plugin
|
9 |
* Plugin Name: WhatsApp me
|
10 |
* Plugin URI: https://wame.chat
|
11 |
-
* Description: The perfect plugin to engage and retain customers. Support for
|
12 |
-
* Version: 2.2.
|
13 |
* Author: Creame
|
14 |
* Author URI: https://crea.me
|
15 |
* License: GPL-2.0+
|
@@ -27,7 +27,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
27 |
* Currently plugin version.
|
28 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
29 |
*/
|
30 |
-
define( 'WHATSAPPME_VERSION', '2.2.
|
31 |
|
32 |
/**
|
33 |
* The core plugin class that is used to define internationalization,
|
8 |
* @wordpress-plugin
|
9 |
* Plugin Name: WhatsApp me
|
10 |
* Plugin URI: https://wame.chat
|
11 |
+
* Description: The perfect plugin to engage and retain customers. Support for ecommerce and online stores.
|
12 |
+
* Version: 2.2.2
|
13 |
* Author: Creame
|
14 |
* Author URI: https://crea.me
|
15 |
* License: GPL-2.0+
|
27 |
* Currently plugin version.
|
28 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
29 |
*/
|
30 |
+
define( 'WHATSAPPME_VERSION', '2.2.2' );
|
31 |
|
32 |
/**
|
33 |
* The core plugin class that is used to define internationalization,
|