Version Description
- FIX in landscape or with long CTAs the chat window could be higher than view and can't be closed.
- For developers:
- New metabox filters 'whatsappme_metabox_output' and 'whatsappme_metabox_save'.
- Change filter 'whatsappme_message_replacements' to 'whatsappme_format_replacements'.
- Change filter 'whatsappme_message_send_replacements' to 'whatsappme_variable_replacements'.
Download this release
Release Info
Developer | creapuntome |
Plugin | WhatsApp me |
Version | 3.0.3 |
Comparing to | |
See all releases |
Code changes from version 3.0.2 to 3.0.3
- README.txt +20 -1
- admin/class-whatsappme-admin.php +14 -15
- admin/css/whatsappme.css +49 -0
- admin/css/whatsappme.min.css +1 -1
- admin/js/whatsappme.js +5 -0
- admin/js/whatsappme.min.js +1 -1
- public/class-whatsappme-public.php +36 -16
- public/class-whatsappme-woopublic.php +4 -4
- public/css/whatsappme.css +29 -3
- public/css/whatsappme.min.css +1 -1
- whatsappme.php +2 -2
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: whatsapp business, whatsapp, click to chat, button, whatsapp support chat,
|
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 3.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -121,6 +121,18 @@ WAme send a custom event if Facebook Pixel is detected when user click to launch
|
|
121 |
|
122 |
`fbq('trackCustom', 'WhatsAppMe', { eventAction: 'click', eventLabel: out_url });`
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
== Screenshots ==
|
125 |
|
126 |
1. WAme general settings.
|
@@ -129,6 +141,13 @@ WAme send a custom event if Facebook Pixel is detected when user click to launch
|
|
129 |
|
130 |
== Changelog ==
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
= 3.0.2 =
|
133 |
* **NEW:** Send Facebook Pixel custom event when user launch WhatsApp.
|
134 |
* FIX empty tabs on settings page due to conflicts with other themes or plugins.
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 3.0.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
121 |
|
122 |
`fbq('trackCustom', 'WhatsAppMe', { eventAction: 'click', eventLabel: out_url });`
|
123 |
|
124 |
+
= Other integrations =
|
125 |
+
|
126 |
+
There is a Javascript event that WAme triggers automatically before launch WhatsApp, which can be used to add your custom tracking code (or other needs).
|
127 |
+
|
128 |
+
`jQuery(document).ready(function($){
|
129 |
+
$(document).on('whatsappme:open', function (event, args, settings) {
|
130 |
+
// Your staff
|
131 |
+
// Note: args.link is the link to open, you can change it
|
132 |
+
// but only wa.me, whastapp.com or current domain are allowed.
|
133 |
+
});
|
134 |
+
});`
|
135 |
+
|
136 |
== Screenshots ==
|
137 |
|
138 |
1. WAme general settings.
|
141 |
|
142 |
== Changelog ==
|
143 |
|
144 |
+
= 3.0.3 =
|
145 |
+
* FIX in landscape or with long CTAs the chat window could be higher than view and can't be closed.
|
146 |
+
* For developers:
|
147 |
+
* New metabox filters 'whatsappme_metabox_output' and 'whatsappme_metabox_save'.
|
148 |
+
* Change filter 'whatsappme_message_replacements' to 'whatsappme_format_replacements'.
|
149 |
+
* Change filter 'whatsappme_message_send_replacements' to 'whatsappme_variable_replacements'.
|
150 |
+
|
151 |
= 3.0.2 =
|
152 |
* **NEW:** Send Facebook Pixel custom event when user launch WhatsApp.
|
153 |
* FIX empty tabs on settings page due to conflicts with other themes or plugins.
|
admin/class-whatsappme-admin.php
CHANGED
@@ -707,13 +707,15 @@ class WhatsAppMe_Admin {
|
|
707 |
* @since 1.1.0 (previously named "add_meta_box")
|
708 |
* @since 2.0.0 Now can set as [show, hide, default]
|
709 |
* @since 2.2.0 Enqueue scripts/styles. Added "telephone"
|
|
|
710 |
* @access public
|
711 |
* @return void
|
712 |
*/
|
713 |
public function meta_box( $post ) {
|
714 |
-
|
715 |
// Enqueue assets
|
716 |
wp_enqueue_script( 'whatsappme-admin' );
|
|
|
717 |
|
718 |
if ( $this->enhanced_phone ) {
|
719 |
wp_enqueue_style( 'intl-tel-input' );
|
@@ -738,20 +740,21 @@ class WhatsAppMe_Admin {
|
|
738 |
|
739 |
$metabox_vars = apply_filters( 'whatsappme_metabox_vars', array( 'SITE', 'URL', 'TITLE' ) );
|
740 |
|
741 |
-
|
742 |
?>
|
743 |
<div class="whatsappme-metabox">
|
|
|
744 |
<p>
|
745 |
<label for="whatsappme_phone"><?php _e( 'Telephone', 'creame-whatsapp-me' ); ?></label><br>
|
746 |
<input id="whatsappme_phone" <?php echo $this->enhanced_phone ? 'data-' : ''; ?>name="whatsappme_telephone" value="<?php echo $metadata['telephone']; ?>" type="text">
|
747 |
</p>
|
748 |
<p>
|
749 |
<label for="whatsappme_message"><?php _e( 'Call To Action', 'creame-whatsapp-me' ); ?></label><br>
|
750 |
-
<textarea name="whatsappme_message" rows="2" class="large-text"><?php echo $metadata['message_text']; ?></textarea>
|
751 |
</p>
|
752 |
<p>
|
753 |
<label for="whatsappme_message_send"><?php _e( 'Message', 'creame-whatsapp-me' ); ?></label><br>
|
754 |
-
<textarea name="whatsappme_message_send" rows="2" class="large-text"><?php echo $metadata['message_send']; ?></textarea>
|
755 |
<?php if ( count( $metabox_vars ) ) : ?>
|
756 |
<small><?php _e( 'You can use vars:', 'creame-whatsapp-me' ); ?> <code>{<?php echo join( '}</code> <code>{', $metabox_vars ); ?>}</code></small>
|
757 |
<?php endif; ?>
|
@@ -765,17 +768,10 @@ class WhatsAppMe_Admin {
|
|
765 |
<?php echo __( 'Default visibility', 'creame-whatsapp-me' ); ?></label>
|
766 |
</p>
|
767 |
</div>
|
768 |
-
<style>
|
769 |
-
.whatsappme-metabox code { -webkit-user-select:all; -moz-user-select:all; -ms-user-select:all; user-select:all; padding:2px 1px; font-size:smaller; vertical-align:text-bottom; }
|
770 |
-
.whatsappme-metabox .dashicons { opacity:.5; }
|
771 |
-
.whatsappme-metabox input::placeholder { color:#dedfe0; }
|
772 |
-
.whatsappme-metabox input::-ms-input-placeholder { color:#dedfe0; }
|
773 |
-
.whatsappme-metabox input[type=radio] { margin-right:1px; }
|
774 |
-
.whatsappme-metabox input[type=radio]+span { margin-right:5px; transition:all 200ms; }
|
775 |
-
.whatsappme-metabox input[type=radio]:checked+span { color:#79ba49; opacity:1; }
|
776 |
-
.whatsappme-metabox input[type=radio]:checked+.dashicons-hidden { color:#ca4a1f; }
|
777 |
-
</style>
|
778 |
<?php
|
|
|
|
|
|
|
779 |
}
|
780 |
|
781 |
/**
|
@@ -784,6 +780,7 @@ class WhatsAppMe_Admin {
|
|
784 |
* @since 1.1.0
|
785 |
* @since 2.0.0 Change 'hide' key to 'view' now values can be [yes, no]
|
786 |
* @since 2.2.0 Added "telephone"
|
|
|
787 |
* @access public
|
788 |
* @return void
|
789 |
*/
|
@@ -806,6 +803,8 @@ class WhatsAppMe_Admin {
|
|
806 |
)
|
807 |
);
|
808 |
|
|
|
|
|
809 |
if ( count( $metadata ) ) {
|
810 |
update_post_meta( $post_id, '_whatsappme', $metadata );
|
811 |
} else {
|
@@ -819,7 +818,7 @@ class WhatsAppMe_Admin {
|
|
819 |
* @since 2.0.0
|
820 |
* @access public
|
821 |
* @param mixed $value to clean
|
822 |
-
* @return mixed
|
823 |
*/
|
824 |
public static function clean_input( $value ) {
|
825 |
if ( is_array( $value ) ) {
|
707 |
* @since 1.1.0 (previously named "add_meta_box")
|
708 |
* @since 2.0.0 Now can set as [show, hide, default]
|
709 |
* @since 2.2.0 Enqueue scripts/styles. Added "telephone"
|
710 |
+
* @since 3.0.3 Capture and filter output
|
711 |
* @access public
|
712 |
* @return void
|
713 |
*/
|
714 |
public function meta_box( $post ) {
|
715 |
+
|
716 |
// Enqueue assets
|
717 |
wp_enqueue_script( 'whatsappme-admin' );
|
718 |
+
wp_enqueue_style( 'whatsappme-admin' );
|
719 |
|
720 |
if ( $this->enhanced_phone ) {
|
721 |
wp_enqueue_style( 'intl-tel-input' );
|
740 |
|
741 |
$metabox_vars = apply_filters( 'whatsappme_metabox_vars', array( 'SITE', 'URL', 'TITLE' ) );
|
742 |
|
743 |
+
ob_start();
|
744 |
?>
|
745 |
<div class="whatsappme-metabox">
|
746 |
+
<?php wp_nonce_field( 'whatsappme_data', 'whatsappme_nonce' ); ?>
|
747 |
<p>
|
748 |
<label for="whatsappme_phone"><?php _e( 'Telephone', 'creame-whatsapp-me' ); ?></label><br>
|
749 |
<input id="whatsappme_phone" <?php echo $this->enhanced_phone ? 'data-' : ''; ?>name="whatsappme_telephone" value="<?php echo $metadata['telephone']; ?>" type="text">
|
750 |
</p>
|
751 |
<p>
|
752 |
<label for="whatsappme_message"><?php _e( 'Call To Action', 'creame-whatsapp-me' ); ?></label><br>
|
753 |
+
<textarea id="whatsappme_message" name="whatsappme_message" rows="2" class="large-text"><?php echo $metadata['message_text']; ?></textarea>
|
754 |
</p>
|
755 |
<p>
|
756 |
<label for="whatsappme_message_send"><?php _e( 'Message', 'creame-whatsapp-me' ); ?></label><br>
|
757 |
+
<textarea id="whatsappme_message_send" name="whatsappme_message_send" rows="2" class="large-text"><?php echo $metadata['message_send']; ?></textarea>
|
758 |
<?php if ( count( $metabox_vars ) ) : ?>
|
759 |
<small><?php _e( 'You can use vars:', 'creame-whatsapp-me' ); ?> <code>{<?php echo join( '}</code> <code>{', $metabox_vars ); ?>}</code></small>
|
760 |
<?php endif; ?>
|
768 |
<?php echo __( 'Default visibility', 'creame-whatsapp-me' ); ?></label>
|
769 |
</p>
|
770 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
771 |
<?php
|
772 |
+
$metabox_output = ob_get_clean();
|
773 |
+
|
774 |
+
echo apply_filters( 'whatsappme_metabox_output', $metabox_output, $post, $metadata );
|
775 |
}
|
776 |
|
777 |
/**
|
780 |
* @since 1.1.0
|
781 |
* @since 2.0.0 Change 'hide' key to 'view' now values can be [yes, no]
|
782 |
* @since 2.2.0 Added "telephone"
|
783 |
+
* @since 3.0.3 Filter metadata before save
|
784 |
* @access public
|
785 |
* @return void
|
786 |
*/
|
803 |
)
|
804 |
);
|
805 |
|
806 |
+
$metadata = apply_filters( 'whatsappme_metabox_save', $metadata, $post_id );
|
807 |
+
|
808 |
if ( count( $metadata ) ) {
|
809 |
update_post_meta( $post_id, '_whatsappme', $metadata );
|
810 |
} else {
|
818 |
* @since 2.0.0
|
819 |
* @access public
|
820 |
* @param mixed $value to clean
|
821 |
+
* @return mixed $value cleaned
|
822 |
*/
|
823 |
public static function clean_input( $value ) {
|
824 |
if ( is_array( $value ) ) {
|
admin/css/whatsappme.css
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
.js #whatsappme_form textarea {
|
2 |
overflow: hidden;
|
3 |
min-height: 100px;
|
@@ -78,4 +80,51 @@
|
|
78 |
|
79 |
.iti--allow-dropdown input {
|
80 |
padding-left: 52px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
1 |
+
/* WAme chat settings page */
|
2 |
+
|
3 |
.js #whatsappme_form textarea {
|
4 |
overflow: hidden;
|
5 |
min-height: 100px;
|
80 |
|
81 |
.iti--allow-dropdown input {
|
82 |
padding-left: 52px !important;
|
83 |
+
}
|
84 |
+
|
85 |
+
/* WAme chat metabox */
|
86 |
+
|
87 |
+
.whatsappme-metabox code {
|
88 |
+
-webkit-user-select: all;
|
89 |
+
-moz-user-select: all;
|
90 |
+
-ms-user-select: all;
|
91 |
+
user-select: all;
|
92 |
+
padding: 2px 1px;
|
93 |
+
font-size: smaller;
|
94 |
+
vertical-align: text-bottom;
|
95 |
+
}
|
96 |
+
|
97 |
+
.whatsappme-metabox .dashicons {
|
98 |
+
opacity: .5;
|
99 |
+
}
|
100 |
+
|
101 |
+
.whatsappme-metabox input::placeholder {
|
102 |
+
color: #dedfe0;
|
103 |
+
}
|
104 |
+
|
105 |
+
.whatsappme-metabox input::-ms-input-placeholder {
|
106 |
+
color: #dedfe0;
|
107 |
+
}
|
108 |
+
|
109 |
+
.whatsappme-metabox input[type=radio] {
|
110 |
+
margin-right: 1px;
|
111 |
+
}
|
112 |
+
|
113 |
+
.whatsappme-metabox input[type=radio]+span {
|
114 |
+
margin-right: 5px;
|
115 |
+
transition: all 200ms;
|
116 |
+
}
|
117 |
+
|
118 |
+
.whatsappme-metabox input[type=radio]:checked+span {
|
119 |
+
color: #79ba49;
|
120 |
+
opacity: 1;
|
121 |
+
}
|
122 |
+
|
123 |
+
.whatsappme-metabox input[type=radio]:checked+.dashicons-hidden {
|
124 |
+
color: #ca4a1f;
|
125 |
+
}
|
126 |
+
|
127 |
+
.js .whatsappme-metabox textarea {
|
128 |
+
overflow: hidden;
|
129 |
+
min-height: 3em;
|
130 |
}
|
admin/css/whatsappme.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.js #whatsappme_form textarea{overflow:hidden;min-height:100px}.wametab{display:none}.wametab-active{display:block!important}#whatsappme_tab_advanced tr:hover{background:rgba(0,0,0,.05)}#whatsappme_tab_advanced td,#whatsappme_tab_advanced th{padding:7px 15px}#whatsappme_tab_advanced label{margin-right:15px}#whatsappme_tab_advanced .dashicons{opacity:.5}#whatsappme_tab_advanced input[type=radio]+span{transition:all .2s}#whatsappme_tab_advanced input[type=radio]:checked+span{color:#79ba49;opacity:1}#whatsappme_tab_advanced input[type=radio]:checked+.dashicons-hidden{color:#ca4a1f}.whatsappme-show-help{display:inline-block;width:1.1em;height:1.1em;line-height:1.1em;border-radius:50%;background:#999;color:#fff;font-weight:700;text-decoration:none;text-align:center}.whatsappme-show-help:active,.whatsappme-show-help:focus,.whatsappme-show-help:hover{background:#444;color:#fff}#tab-panel-styles-and-vars span{white-space:nowrap}#tab-panel-styles-and-vars code{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}.form-table td p.whatsappme-addon{font-size:13px}.iti--allow-dropdown input{padding-left:52px!important}
|
1 |
+
.js #whatsappme_form textarea{overflow:hidden;min-height:100px}.wametab{display:none}.wametab-active{display:block!important}#whatsappme_tab_advanced tr:hover{background:rgba(0,0,0,.05)}#whatsappme_tab_advanced td,#whatsappme_tab_advanced th{padding:7px 15px}#whatsappme_tab_advanced label{margin-right:15px}#whatsappme_tab_advanced .dashicons{opacity:.5}#whatsappme_tab_advanced input[type=radio]+span{transition:all .2s}#whatsappme_tab_advanced input[type=radio]:checked+span{color:#79ba49;opacity:1}#whatsappme_tab_advanced input[type=radio]:checked+.dashicons-hidden{color:#ca4a1f}.whatsappme-show-help{display:inline-block;width:1.1em;height:1.1em;line-height:1.1em;border-radius:50%;background:#999;color:#fff;font-weight:700;text-decoration:none;text-align:center}.whatsappme-show-help:active,.whatsappme-show-help:focus,.whatsappme-show-help:hover{background:#444;color:#fff}#tab-panel-styles-and-vars span{white-space:nowrap}#tab-panel-styles-and-vars code{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}.form-table td p.whatsappme-addon{font-size:13px}.iti--allow-dropdown input{padding-left:52px!important}.whatsappme-metabox code{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;padding:2px 1px;font-size:smaller;vertical-align:text-bottom}.whatsappme-metabox .dashicons{opacity:.5}.whatsappme-metabox input::placeholder{color:#dedfe0}.whatsappme-metabox input::-ms-input-placeholder{color:#dedfe0}.whatsappme-metabox input[type=radio]{margin-right:1px}.whatsappme-metabox input[type=radio]+span{margin-right:5px;transition:all .2s}.whatsappme-metabox input[type=radio]:checked+span{color:#79ba49;opacity:1}.whatsappme-metabox input[type=radio]:checked+.dashicons-hidden{color:#ca4a1f}.js .whatsappme-metabox textarea{overflow:hidden;min-height:3em}
|
admin/js/whatsappme.js
CHANGED
@@ -115,5 +115,10 @@
|
|
115 |
|
116 |
propagate_inheritance();
|
117 |
}
|
|
|
|
|
|
|
|
|
|
|
118 |
});
|
119 |
})(jQuery);
|
115 |
|
116 |
propagate_inheritance();
|
117 |
}
|
118 |
+
|
119 |
+
if ($('.whatsappme-metabox').length === 1) {
|
120 |
+
// Texarea auto height
|
121 |
+
$('textarea', '.whatsappme-metabox').on('focus input', textarea_autoheight).each(textarea_autoheight);
|
122 |
+
}
|
123 |
});
|
124 |
})(jQuery);
|
admin/js/whatsappme.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){"use strict";e(function(){if("function"==typeof intlTelInput&&e("#whatsappme_phone").length){var t=JSON.parse(localStorage.whatsappme_country_code||"{}"),a=!(!t.code||t.date!=(new Date).toDateString())&&t.code,
|
1 |
+
!function(e){"use strict";e(function(){if("function"==typeof intlTelInput&&e("#whatsappme_phone").length){var t=JSON.parse(localStorage.whatsappme_country_code||"{}"),a=!(!t.code||t.date!=(new Date).toDateString())&&t.code,n=e("#whatsappme_phone");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/"+intl_tel_input_version+"/js/utils.js"}).hiddenInput.value=n.val(),n.on("input",function(){var t=e(this),a=intlTelInputGlobals.getInstance(this);t.css("color",t.val().trim()&&!a.isValidNumber()?"#ca4a1f":""),a.hiddenInput.value=a.getNumber()}).on("blur",function(){var e=intlTelInputGlobals.getInstance(this);e.setNumber(e.getNumber())})}function i(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 c){var n=e('input[name="whatsappme[view]['+t+']"]:checked').val();n=""===n?a:n,e.each(c[t],function(){i(this,n)})}}function s(){e(this).height(0).height(this.scrollHeight)}if(1===e("#whatsappme_form").length){e(".nav-tab").click(function(t){t.preventDefault();var a=e(this);e(".nav-tab").removeClass("nav-tab-active").attr("aria-selected","false"),a.addClass("nav-tab-active").attr("aria-selected","true").get(0).blur(),e(".wametab").removeClass("wametab-active"),e(a.attr("href")).addClass("wametab-active").find("textarea").each(s)}),e("#whatsappme_mobile_only").change(function(){e("#whatsappme_whatsapp_web").closest("tr").toggleClass("hide-if-js",this.checked)}).change(),e(".whatsappme-show-help").click(function(t){t.preventDefault(),e("#contextual-help-wrap").is(":visible")?e("html, body").animate({scrollTop:0}):e("#contextual-help-link").click(),e("#tab-link-styles-and-vars a").click()}),e("textarea","#whatsappme_form").on("input",s).each(s);var l=e("#whatsappme_tab_advanced"),c=e(".whatsappme_view_all").data("inheritance")||{all:["front_page","blog_page","404_page","search","archive","singular","cpts"],archive:["date","author"],singular:["page","post"]};e("input",l).change(function(){i()}),e(".whatsappme_view_reset").click(function(t){t.preventDefault(),e('input[value=""]',l).prop("checked",!0),e(".whatsappme_view_all input",l).first().prop("checked",!0),i()}),i()}1===e(".whatsappme-metabox").length&&e("textarea",".whatsappme-metabox").on("focus input",s).each(s)})}(jQuery);
|
public/class-whatsappme-public.php
CHANGED
@@ -59,6 +59,7 @@ class WhatsAppMe_Public {
|
|
59 |
* @since 2.3.0 Added button_delay and whatsapp_web settings, message_delay in seconds
|
60 |
* @param string $plugin_name The name of the plugin.
|
61 |
* @param string $version The version of this plugin.
|
|
|
62 |
*/
|
63 |
public function __construct( $plugin_name, $version ) {
|
64 |
|
@@ -141,7 +142,7 @@ class WhatsAppMe_Public {
|
|
141 |
$settings['whatsapp_web'] = 'yes' == $settings['whatsapp_web'];
|
142 |
$settings['message_badge'] = 'yes' == $settings['message_badge'] && '' != $settings['message_text'];
|
143 |
$settings['position'] = 'right' == $settings['position'] ? 'right' : 'left';
|
144 |
-
$settings['message_send'] =
|
145 |
// Set true to link http://web.whatsapp.com instead http://api.whatsapp.com
|
146 |
$settings['whatsapp_web'] = apply_filters( 'whatsappme_whatsapp_web', 'yes' == $settings['whatsapp_web'] );
|
147 |
|
@@ -177,6 +178,7 @@ class WhatsAppMe_Public {
|
|
177 |
*
|
178 |
* @since 1.0.0
|
179 |
* @since 2.2.2 minified
|
|
|
180 |
*/
|
181 |
public function enqueue_styles() {
|
182 |
|
@@ -192,6 +194,7 @@ class WhatsAppMe_Public {
|
|
192 |
*
|
193 |
* @since 1.0.0
|
194 |
* @since 2.2.2 minified
|
|
|
195 |
*/
|
196 |
public function enqueue_scripts() {
|
197 |
|
@@ -206,6 +209,7 @@ class WhatsAppMe_Public {
|
|
206 |
* Outputs WhatsApp button html and his settings on footer
|
207 |
*
|
208 |
* @since 1.0.0
|
|
|
209 |
*/
|
210 |
public function footer_html() {
|
211 |
global $wp;
|
@@ -240,7 +244,7 @@ class WhatsAppMe_Public {
|
|
240 |
<svg viewBox="0 0 120 28"><path fill="#fff" 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 3 0 0 0-1.2 1.1V11H110v13h2.7v-4.5c.4.4.8.8 1.3 1 .5.3 1 .4 1.6.4a4 4 0 0 0 3.2-1.5c.4-.5.7-1 .8-1.6.2-.6.3-1.2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.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>
|
241 |
<div class="whatsappme__close"><svg viewBox="0 0 24 24"><path fill="#fff" 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>
|
242 |
</div>
|
243 |
-
<div class="whatsappme__message"><?php echo $this->
|
244 |
<?php if ( $copy ) : ?>
|
245 |
<div class="whatsappme__copy"><?php echo $copy; ?> <a href="<?php echo $powered_link; ?>" rel="nofollow noopener" target="_blank"><svg viewBox="0 0 72 17"><path fill="#fff" 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>
|
246 |
<?php endif; ?>
|
@@ -259,27 +263,31 @@ class WhatsAppMe_Public {
|
|
259 |
*
|
260 |
* @since 1.3.0
|
261 |
* @since 2.3.0 apply replace_message_variables
|
262 |
-
* @
|
|
|
|
|
263 |
*/
|
264 |
-
public function formated_message() {
|
265 |
|
266 |
$replacements = apply_filters(
|
267 |
-
'
|
268 |
'/_(\S[^_]*\S)_/mu' => '<em>$1</em>',
|
269 |
'/\*(\S[^\*]*\S)\*/mu' => '<strong>$1</strong>',
|
270 |
'/~(\S[^~]*\S)~/mu' => '<del>$1</del>',
|
271 |
)
|
272 |
);
|
273 |
|
274 |
-
$
|
|
|
|
|
275 |
|
276 |
// Split text into lines and apply replacements line by line
|
277 |
-
$lines = explode( "\n", $
|
278 |
foreach ( $lines as $key => $line ) {
|
279 |
-
$lines[ $key ] = preg_replace( $
|
280 |
}
|
281 |
|
282 |
-
return
|
283 |
|
284 |
}
|
285 |
|
@@ -288,19 +296,30 @@ class WhatsAppMe_Public {
|
|
288 |
*
|
289 |
* @since 1.4.0
|
290 |
* @since 2.3.0 renamed from formated_message_send to replace_message_variables
|
291 |
-
* @
|
|
|
|
|
292 |
*/
|
293 |
-
public function
|
294 |
global $wp;
|
295 |
|
296 |
$replacements = apply_filters(
|
297 |
-
'
|
298 |
-
'
|
299 |
-
'
|
300 |
-
'
|
301 |
)
|
302 |
);
|
303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
return preg_replace( array_keys( $replacements ), $replacements, $string );
|
305 |
|
306 |
}
|
@@ -309,9 +328,10 @@ class WhatsAppMe_Public {
|
|
309 |
* Get current page title
|
310 |
*
|
311 |
* @since 1.4.0
|
|
|
312 |
* @return string message formated string
|
313 |
*/
|
314 |
-
public function get_title() {
|
315 |
|
316 |
if ( is_home() || is_singular() ) {
|
317 |
$title = single_post_title( '', false );
|
59 |
* @since 2.3.0 Added button_delay and whatsapp_web settings, message_delay in seconds
|
60 |
* @param string $plugin_name The name of the plugin.
|
61 |
* @param string $version The version of this plugin.
|
62 |
+
* @return void
|
63 |
*/
|
64 |
public function __construct( $plugin_name, $version ) {
|
65 |
|
142 |
$settings['whatsapp_web'] = 'yes' == $settings['whatsapp_web'];
|
143 |
$settings['message_badge'] = 'yes' == $settings['message_badge'] && '' != $settings['message_text'];
|
144 |
$settings['position'] = 'right' == $settings['position'] ? 'right' : 'left';
|
145 |
+
$settings['message_send'] = self::replace_variables( $settings['message_send'] );
|
146 |
// Set true to link http://web.whatsapp.com instead http://api.whatsapp.com
|
147 |
$settings['whatsapp_web'] = apply_filters( 'whatsappme_whatsapp_web', 'yes' == $settings['whatsapp_web'] );
|
148 |
|
178 |
*
|
179 |
* @since 1.0.0
|
180 |
* @since 2.2.2 minified
|
181 |
+
* @return void
|
182 |
*/
|
183 |
public function enqueue_styles() {
|
184 |
|
194 |
*
|
195 |
* @since 1.0.0
|
196 |
* @since 2.2.2 minified
|
197 |
+
* @return void
|
198 |
*/
|
199 |
public function enqueue_scripts() {
|
200 |
|
209 |
* Outputs WhatsApp button html and his settings on footer
|
210 |
*
|
211 |
* @since 1.0.0
|
212 |
+
* @return void
|
213 |
*/
|
214 |
public function footer_html() {
|
215 |
global $wp;
|
244 |
<svg viewBox="0 0 120 28"><path fill="#fff" 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 3 0 0 0-1.2 1.1V11H110v13h2.7v-4.5c.4.4.8.8 1.3 1 .5.3 1 .4 1.6.4a4 4 0 0 0 3.2-1.5c.4-.5.7-1 .8-1.6.2-.6.3-1.2.3-1.9s0-1.3-.3-2zm-13.1 3c0 .4-.2.7-.4 1l-.7.7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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>
|
245 |
<div class="whatsappme__close"><svg viewBox="0 0 24 24"><path fill="#fff" 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>
|
246 |
</div>
|
247 |
+
<div class="whatsappme__message"><div class="whatsappme__message__wrap"><div class="whatsappme__message__content"><?php echo self::formated_message( $this->settings['message_text'] ); ?></div></div></div>
|
248 |
<?php if ( $copy ) : ?>
|
249 |
<div class="whatsappme__copy"><?php echo $copy; ?> <a href="<?php echo $powered_link; ?>" rel="nofollow noopener" target="_blank"><svg viewBox="0 0 72 17"><path fill="#fff" 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>
|
250 |
<?php endif; ?>
|
263 |
*
|
264 |
* @since 1.3.0
|
265 |
* @since 2.3.0 apply replace_message_variables
|
266 |
+
* @since 3.0.3 make static and take $string param
|
267 |
+
* @param string $string string to apply format replacements
|
268 |
+
* @return string string formated
|
269 |
*/
|
270 |
+
public static function formated_message( $string ) {
|
271 |
|
272 |
$replacements = apply_filters(
|
273 |
+
'whatsappme_format_replacements', array(
|
274 |
'/_(\S[^_]*\S)_/mu' => '<em>$1</em>',
|
275 |
'/\*(\S[^\*]*\S)\*/mu' => '<strong>$1</strong>',
|
276 |
'/~(\S[^~]*\S)~/mu' => '<del>$1</del>',
|
277 |
)
|
278 |
);
|
279 |
|
280 |
+
$replacements = apply_filters_deprecated( 'whatsappme_message_replacements', array( $replacements ), '3.0.3', 'whatsappme_format_replacements' );
|
281 |
+
|
282 |
+
$patterns = array_keys( $replacements );
|
283 |
|
284 |
// Split text into lines and apply replacements line by line
|
285 |
+
$lines = explode( "\n", $string );
|
286 |
foreach ( $lines as $key => $line ) {
|
287 |
+
$lines[ $key ] = preg_replace( $patterns, $replacements, esc_html( $line ) );
|
288 |
}
|
289 |
|
290 |
+
return self::replace_variables( implode( '<br>', $lines ) );
|
291 |
|
292 |
}
|
293 |
|
296 |
*
|
297 |
* @since 1.4.0
|
298 |
* @since 2.3.0 renamed from formated_message_send to replace_message_variables
|
299 |
+
* @since 3.0.3 renamed to replace_variables and make static
|
300 |
+
* @param string $string string to apply variable replacements
|
301 |
+
* @return string string with replaced variables
|
302 |
*/
|
303 |
+
public static function replace_variables( $string ) {
|
304 |
global $wp;
|
305 |
|
306 |
$replacements = apply_filters(
|
307 |
+
'whatsappme_variable_replacements', array(
|
308 |
+
'SITE' => get_bloginfo( 'name' ),
|
309 |
+
'URL' => home_url( $wp->request ),
|
310 |
+
'TITLE' => self::get_title(),
|
311 |
)
|
312 |
);
|
313 |
|
314 |
+
// Convert VAR to regex {VAR}
|
315 |
+
$patterns = array_map(
|
316 |
+
function ( $var ) {
|
317 |
+
return "/\{$var\}/i";
|
318 |
+
}, array_keys( $replacements )
|
319 |
+
);
|
320 |
+
|
321 |
+
$replacements = apply_filters_deprecated( 'whatsappme_message_send_replacements', array( array_combine( $patterns, $replacements ) ), '3.0.3', 'whatsappme_variable_replacements' );
|
322 |
+
|
323 |
return preg_replace( array_keys( $replacements ), $replacements, $string );
|
324 |
|
325 |
}
|
328 |
* Get current page title
|
329 |
*
|
330 |
* @since 1.4.0
|
331 |
+
* @since 3.0.3 make static
|
332 |
* @return string message formated string
|
333 |
*/
|
334 |
+
public static function get_title() {
|
335 |
|
336 |
if ( is_home() || is_singular() ) {
|
337 |
$title = single_post_title( '', false );
|
public/class-whatsappme-woopublic.php
CHANGED
@@ -24,7 +24,7 @@ class WhatsAppMe_WooPublic {
|
|
24 |
$loader->add_filter( 'whatsappme_extra_settings', $this, 'woo_settings' );
|
25 |
$loader->add_filter( 'whatsappme_get_settings_site', $this, 'product_settings' );
|
26 |
$loader->add_filter( 'whatsappme_visibility', $this, 'visibility', 10, 2 );
|
27 |
-
$loader->add_filter( '
|
28 |
$loader->add_filter( 'whatsappme_excluded_fields', $this, 'excluded_fields' );
|
29 |
|
30 |
}
|
@@ -128,9 +128,9 @@ class WhatsAppMe_WooPublic {
|
|
128 |
|
129 |
$replacements = array_merge(
|
130 |
$replacements, array(
|
131 |
-
'
|
132 |
-
'
|
133 |
-
'
|
134 |
)
|
135 |
);
|
136 |
}
|
24 |
$loader->add_filter( 'whatsappme_extra_settings', $this, 'woo_settings' );
|
25 |
$loader->add_filter( 'whatsappme_get_settings_site', $this, 'product_settings' );
|
26 |
$loader->add_filter( 'whatsappme_visibility', $this, 'visibility', 10, 2 );
|
27 |
+
$loader->add_filter( 'whatsappme_variable_replacements', $this, 'replacements' );
|
28 |
$loader->add_filter( 'whatsappme_excluded_fields', $this, 'excluded_fields' );
|
29 |
|
30 |
}
|
128 |
|
129 |
$replacements = array_merge(
|
130 |
$replacements, array(
|
131 |
+
'PRODUCT' => $product->get_name(),
|
132 |
+
'SKU' => $product->get_sku(),
|
133 |
+
'PRICE' => strip_tags( wc_price( $product->get_price() ) ),
|
134 |
)
|
135 |
);
|
136 |
}
|
public/css/whatsappme.css
CHANGED
@@ -214,7 +214,7 @@
|
|
214 |
.whatsappme__message {
|
215 |
position: relative;
|
216 |
min-height: 80px;
|
217 |
-
padding: 20px
|
218 |
margin: 34px 26px;
|
219 |
border-radius: 32px;
|
220 |
background-color: #fff;
|
@@ -240,6 +240,26 @@
|
|
240 |
transform: rotateY(180deg);
|
241 |
}
|
242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
.whatsappme__copy {
|
244 |
position: absolute;
|
245 |
bottom: 4px;
|
@@ -291,7 +311,8 @@
|
|
291 |
left: 0;
|
292 |
}
|
293 |
|
294 |
-
@media (max-width: 480px)
|
|
|
295 |
.whatsappme {
|
296 |
bottom: 6px;
|
297 |
right: 6px;
|
@@ -318,10 +339,15 @@
|
|
318 |
}
|
319 |
|
320 |
.whatsappme__message {
|
321 |
-
padding:
|
322 |
margin: 15px 21px 20px;
|
323 |
line-height: 24px;
|
324 |
}
|
|
|
|
|
|
|
|
|
|
|
325 |
}
|
326 |
|
327 |
@keyframes badge--in {
|
214 |
.whatsappme__message {
|
215 |
position: relative;
|
216 |
min-height: 80px;
|
217 |
+
padding: 20px 2px 20px 0;
|
218 |
margin: 34px 26px;
|
219 |
border-radius: 32px;
|
220 |
background-color: #fff;
|
240 |
transform: rotateY(180deg);
|
241 |
}
|
242 |
|
243 |
+
.whatsappme__message__wrap {
|
244 |
+
max-height: calc(100vh - 270px);
|
245 |
+
padding: 0 20px 0 22px;
|
246 |
+
overflow: auto;
|
247 |
+
}
|
248 |
+
|
249 |
+
.whatsappme__message__wrap::-webkit-scrollbar {
|
250 |
+
width: 5px;
|
251 |
+
background: rgba(0, 0, 0, 0);
|
252 |
+
}
|
253 |
+
|
254 |
+
.whatsappme__message__wrap::-webkit-scrollbar-thumb {
|
255 |
+
border-radius: 3px;
|
256 |
+
background: rgba(0, 0, 0, 0);
|
257 |
+
}
|
258 |
+
|
259 |
+
.whatsappme__message__wrap:hover::-webkit-scrollbar-thumb {
|
260 |
+
background: rgba(0, 0, 0, 0.2);
|
261 |
+
}
|
262 |
+
|
263 |
.whatsappme__copy {
|
264 |
position: absolute;
|
265 |
bottom: 4px;
|
311 |
left: 0;
|
312 |
}
|
313 |
|
314 |
+
@media (max-width: 480px),
|
315 |
+
(orientation: landscape) and (max-width: 767px) {
|
316 |
.whatsappme {
|
317 |
bottom: 6px;
|
318 |
right: 6px;
|
339 |
}
|
340 |
|
341 |
.whatsappme__message {
|
342 |
+
padding: 16px 0;
|
343 |
margin: 15px 21px 20px;
|
344 |
line-height: 24px;
|
345 |
}
|
346 |
+
|
347 |
+
.whatsappme__message__wrap {
|
348 |
+
max-height: calc(100vh - 194px);
|
349 |
+
padding: 0 14px;
|
350 |
+
}
|
351 |
}
|
352 |
|
353 |
@keyframes badge--in {
|
public/css/whatsappme.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.whatsappme{position:fixed;z-index:1000;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 svg path{fill:currentColor!important}.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;-webkit-tap-highlight-color:transparent}.whatsappme__button:hover{background-color:#128c7e;transition:background-color 1.5s linear}.whatsappme--dialog .whatsappme__button{background-color:#128c7e;transition:background-color .2s linear}.whatsappme--dialog .whatsappme__button:hover{background-color:#075e54}.whatsappme__button:active{background-color:#075e54;transition:none}@supports (-webkit-overflow-scrolling:touch){.whatsappme--dialog .whatsappme__button{background-color:#34b7f1}.whatsappme--dialog .whatsappme__button:hover,.whatsappme__button:active{background-color:#228bb9}}.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 11px 12px 13px}.whatsappme .whatsappme__button__send path{fill:none!important;stroke:#fff!important;animation:wame_plain 6s 0s ease-in-out infinite}.whatsappme .whatsappme__button__send path.wame_chat{animation-name:wame_chat}.whatsappme--dialog .whatsappme__button__send,.whatsappme__button__open{display:block}.whatsappme--dialog .whatsappme__button__open,.whatsappme__button__send{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.webp) 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}.nowebp .whatsappme__box{background-image:url(../images/background.png)}.whatsappme--dialog .whatsappme__box{opacity:1;transform:scale3d(1,1,1);transition:opacity .2s ease-out,transform 0s linear}.whatsappme__header{float:none;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{width:120px;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;-webkit-tap-highlight-color:transparent}[dir=rtl] .whatsappme__close{right:auto;left:24px}.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
|
1 |
+
.whatsappme{position:fixed;z-index:1000;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 svg path{fill:currentColor!important}.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;-webkit-tap-highlight-color:transparent}.whatsappme__button:hover{background-color:#128c7e;transition:background-color 1.5s linear}.whatsappme--dialog .whatsappme__button{background-color:#128c7e;transition:background-color .2s linear}.whatsappme--dialog .whatsappme__button:hover{background-color:#075e54}.whatsappme__button:active{background-color:#075e54;transition:none}@supports (-webkit-overflow-scrolling:touch){.whatsappme--dialog .whatsappme__button{background-color:#34b7f1}.whatsappme--dialog .whatsappme__button:hover,.whatsappme__button:active{background-color:#228bb9}}.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 11px 12px 13px}.whatsappme .whatsappme__button__send path{fill:none!important;stroke:#fff!important;animation:wame_plain 6s 0s ease-in-out infinite}.whatsappme .whatsappme__button__send path.wame_chat{animation-name:wame_chat}.whatsappme--dialog .whatsappme__button__send,.whatsappme__button__open{display:block}.whatsappme--dialog .whatsappme__button__open,.whatsappme__button__send{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.webp) 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}.nowebp .whatsappme__box{background-image:url(../images/background.png)}.whatsappme--dialog .whatsappme__box{opacity:1;transform:scale3d(1,1,1);transition:opacity .2s ease-out,transform 0s linear}.whatsappme__header{float:none;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{width:120px;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;-webkit-tap-highlight-color:transparent}[dir=rtl] .whatsappme__close{right:auto;left:24px}.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 2px 20px 0;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/RKnIaGAsAfCAQ8J6dnX1Pr5DjwABAzmazMVqDHAd2enr6La1RjgGLRCJqLpeL0TrUjFDGrMgCAD8/P38vn8//QutUs1pLT/fC5ubmQKFQOKANqNmspbuhBwDEZDL5BaX0lDaoZoK62NxZXFzs1DRthV5TrxrKGFue/v5+KZ1Of1kul5P0BtQUUAAgxOPx9wuFwl/0BvWq3O8C6vDw8F1N036gL0G3ZaVLUEdHRxFN036kL1E3DWMHxAEAPzc3dyedTk+XSqUdegu6CRijy5mBPLOzs2oikfhU07RFSmmG3qKuaxkdxuhy/MzMjDeRSHyiadrz2wYyClUBMh9bzRfAu7u7PX6//z1RFB9zHBcBALUZKoRqUMgEgyvHeHt7+353d/cjQRBGWJZ9jBDqaMYKHKpYBAEAXltbawsGg2FFUd7iOO4hIeQhQuiOEzpdOzCSTCaftLS0fEUIGXbiHiBjU5njVCr1sc/nW6wkDcduS1u1HKRUKv2KMR4ABwvbAWKMA+BwYbsasFgs/uMWuEtxd3x8/J3b4C4Ag8Hg83g8/iyfz//n5IRi1eZzla00HgA8oijyDMNwlFJCCGH0axiGQQAAXq+XyLLMeL1eRlEURpZlRpIkhud5oigK297eLvl8Prm1tVVSFEWSJEkWRVESBMGrqupriqLcFQThLsaYu612n6vUip4KMFv5HJssjhooEi5laoZh0NjYWNvw8PC9np6ejkAg8MDv9w+oqnrfxsNqhgNTh2wE1MGYChyyWGA9RYJVFWTM3MhwjMPhsDw9PT0QDocHOjs731RV9Y1rv+cMlb4Oiy3garWW1b2sPMfceZgHmZqa6pycnPywr6/vA47jfPXAWbU0xOCOqE44u2K8Wl9oBUfMa+rq6hIWFhbGBwcHn9pBohogcRWwRiCRTUiACQ6ZYpxY9JAkFAopy8vLM4FAYKyRrgA1GGf1JperLGgEM4cNG4vF3olGo18TQkT9JsRmAdQw66NsGlbn7Ibdd0um2XzOblz6/ZWVlX8JIb8PDQ090gFJDU+e2sBeZ1hBU9NcqvIQzDMFALq+vp7GGP85MjLyBCHE1tPO1LP4eq4FG/hqnlGyeSiwsbHxfygUOu7t7Y00059JUY3ZHFm8k1lT0cGfnJw8c0ojepWFzd6CMpnM3y8AJPEkZ9khO4IAAAAASUVORK5CYII=);background-size:100%}[dir=rtl] .whatsappme__message:before{left:auto;right:-18px;transform:rotateY(180deg)}.whatsappme__message__wrap{max-height:calc(100vh - 270px);padding:0 20px 0 22px;overflow:auto}.whatsappme__message__wrap::-webkit-scrollbar{width:5px;background:rgba(0,0,0,0)}.whatsappme__message__wrap::-webkit-scrollbar-thumb{border-radius:3px;background:rgba(0,0,0,0)}.whatsappme__message__wrap:hover::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2)}.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),(orientation:landscape) and (max-width:767px){.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:16px 0;margin:15px 21px 20px;line-height:24px}.whatsappme__message__wrap{max-height:calc(100vh - 194px);padding:0 14px}}@keyframes badge--in{from{opacity:0;transform:translateY(50px)}to{opacity:1;transform:translateY(0)}}@keyframes badge--out{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}@keyframes wame_plain{5%{stroke-dashoffset:0}45%{stroke-dashoffset:0}50%{stroke-dashoffset:1096.67}100%{stroke-dashoffset:1096.67}}@keyframes wame_chat{50%{stroke-dashoffset:1019.22}55%{stroke-dashoffset:0}95%{stroke-dashoffset:0}}
|
whatsappme.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* Plugin Name: WAme chat
|
10 |
* Plugin URI: https://wame.chat
|
11 |
* Description: Connect a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
|
12 |
-
* Version: 3.0.
|
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', '3.0.
|
31 |
|
32 |
/**
|
33 |
* The core plugin class that is used to define internationalization,
|
9 |
* Plugin Name: WAme chat
|
10 |
* Plugin URI: https://wame.chat
|
11 |
* Description: Connect a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
|
12 |
+
* Version: 3.0.3
|
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', '3.0.3' );
|
31 |
|
32 |
/**
|
33 |
* The core plugin class that is used to define internationalization,
|