WhatsApp me - Version 4.0.4

Version Description

Join.chat rebrand!! Analytics events change from WhatsAppMe to JoinChat and classes, actions and filters change from wame or whatsappme to joinchat.

Download this release

Release Info

Developer creapuntome
Plugin Icon 128x128 WhatsApp me
Version 4.0.4
Comparing to
See all releases

Code changes from version 4.0.3 to 4.0.4

Files changed (4) hide show
  1. README.txt +12 -14
  2. joinchat.php +2 -2
  3. public/class-joinchat-public.php +8 -1
  4. whatsappme.php +3 -1
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.4
7
  Requires PHP: 5.3
8
- Stable tag: 4.0.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -101,15 +101,13 @@ You can change the position of the button so that nothing covers it by adding th
101
 
102
  If you need to move up:
103
 
104
- ```
105
- /* always */
106
  .joinchat { --bottom: 60px; }
107
 
108
  /* mobile only */
109
  @media (max-width: 480px), (max-width: 767px) and (orientation: landscape) {
110
  .joinchat { --bottom: 60px; }
111
- }
112
- ```
113
 
114
  Greater values of z-index are left over, the default value is 400.
115
 
@@ -157,26 +155,22 @@ Join.chat send a custom event if Facebook Pixel is detected when user click to l
157
 
158
  There is a Javascript event that Join.chat triggers automatically before launch WhatsApp, which can be used to add your custom tracking code (or other needs).
159
 
160
- ```
161
- jQuery(document).ready(function($){
162
  $(document).on('joinchat:open', function (event, args, settings) {
163
  // Your staff
164
  // Note: args.link is the link to open, you can change it
165
  // but only wa.me, whastapp.com or current domain are allowed.
166
  });
167
- });
168
- ```
169
 
170
  = WPML/Polylang change Telephone by language =
171
 
172
  Join.chat general text settings can be translated with the strings translation of WPML/Polylang. You only need to save Join.chat settings to register strings and make them ready for translation. But "Telephone" is not translateable by default. If you need different phone numbers for every language add the following php code in your theme functions.php and save Join.chat settings.
173
 
174
- ```
175
- add_filter( 'joinchat_settings_i18n', function( $settings ) {
176
  $settings['telephone'] = 'Telephone';
177
  return $settings;
178
- } );
179
- ```
180
 
181
  == Screenshots ==
182
 
@@ -187,6 +181,10 @@ add_filter( 'joinchat_settings_i18n', function( $settings ) {
187
 
188
  == Changelog ==
189
 
 
 
 
 
190
  = 4.0.3 =
191
  * Fix WAme deactivate
192
 
@@ -211,7 +209,7 @@ See [changelog.txt](https://plugins.svn.wordpress.org/creame-whatsapp-me/trunk/c
211
 
212
  == Upgrade Notice ==
213
 
214
- = 4.0.3 =
215
  **Join.chat rebrand!!** Analytics events change from `WhatsAppMe` to `JoinChat` and classes, actions and filters change from `wame` or `whatsappme` to `joinchat`.
216
 
217
  = 2.3.0 =
5
  Requires at least: 3.0.1
6
  Tested up to: 5.4
7
  Requires PHP: 5.3
8
+ Stable tag: 4.0.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
101
 
102
  If you need to move up:
103
 
104
+ `/* always */
 
105
  .joinchat { --bottom: 60px; }
106
 
107
  /* mobile only */
108
  @media (max-width: 480px), (max-width: 767px) and (orientation: landscape) {
109
  .joinchat { --bottom: 60px; }
110
+ }`
 
111
 
112
  Greater values of z-index are left over, the default value is 400.
113
 
155
 
156
  There is a Javascript event that Join.chat triggers automatically before launch WhatsApp, which can be used to add your custom tracking code (or other needs).
157
 
158
+ `jQuery(document).ready(function($){
 
159
  $(document).on('joinchat:open', function (event, args, settings) {
160
  // Your staff
161
  // Note: args.link is the link to open, you can change it
162
  // but only wa.me, whastapp.com or current domain are allowed.
163
  });
164
+ });`
 
165
 
166
  = WPML/Polylang change Telephone by language =
167
 
168
  Join.chat general text settings can be translated with the strings translation of WPML/Polylang. You only need to save Join.chat settings to register strings and make them ready for translation. But "Telephone" is not translateable by default. If you need different phone numbers for every language add the following php code in your theme functions.php and save Join.chat settings.
169
 
170
+ `add_filter( 'joinchat_settings_i18n', function( $settings ) {
 
171
  $settings['telephone'] = 'Telephone';
172
  return $settings;
173
+ } );`
 
174
 
175
  == Screenshots ==
176
 
181
 
182
  == Changelog ==
183
 
184
+ = 4.0.4 =
185
+ * Better public settings JSON output
186
+ * Re-fix WAme deactivate
187
+
188
  = 4.0.3 =
189
  * Fix WAme deactivate
190
 
209
 
210
  == Upgrade Notice ==
211
 
212
+ = 4.0.4 =
213
  **Join.chat rebrand!!** Analytics events change from `WhatsAppMe` to `JoinChat` and classes, actions and filters change from `wame` or `whatsappme` to `joinchat`.
214
 
215
  = 2.3.0 =
joinchat.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: Join.chat
10
  * Plugin URI: https://join.chat
11
  * Description: Connects a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
12
- * Version: 4.0.3
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( 'JOINCHAT_VERSION', '4.0.3' );
31
 
32
  /**
33
  * The core plugin class that is used to define internationalization,
9
  * Plugin Name: Join.chat
10
  * Plugin URI: https://join.chat
11
  * Description: Connects a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
12
+ * Version: 4.0.4
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( 'JOINCHAT_VERSION', '4.0.4' );
31
 
32
  /**
33
  * The core plugin class that is used to define internationalization,
public/class-joinchat-public.php CHANGED
@@ -247,6 +247,13 @@ class JoinChatPublic {
247
 
248
  $data = array_diff_key( $this->settings, array_flip( $excluded_fields ) );
249
 
 
 
 
 
 
 
 
250
  $copy = apply_filters( 'joinchat_copy', 'Powered by' );
251
 
252
  $powered_url = urlencode( home_url( $wp->request ) );
@@ -283,7 +290,7 @@ class JoinChatPublic {
283
 
284
  ob_start();
285
  ?>
286
- <div class="joinchat <?php echo apply_filters( 'joinchat_classes', $joinchat_classes ); ?>" data-settings="<?php echo esc_attr( json_encode( $data ) ); ?>">
287
  <div class="joinchat__button">
288
  <div class="joinchat__button__open"></div>
289
  <?php if ( $image ) : ?>
247
 
248
  $data = array_diff_key( $this->settings, array_flip( $excluded_fields ) );
249
 
250
+ $json_options = apply_filters(
251
+ 'joinchat_json_options',
252
+ defined( 'JSON_UNESCAPED_UNICODE' ) ?
253
+ JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES :
254
+ JSON_HEX_APOS | JSON_HEX_QUOT
255
+ );
256
+
257
  $copy = apply_filters( 'joinchat_copy', 'Powered by' );
258
 
259
  $powered_url = urlencode( home_url( $wp->request ) );
290
 
291
  ob_start();
292
  ?>
293
+ <div class="joinchat <?php echo apply_filters( 'joinchat_classes', $joinchat_classes ); ?>" data-settings='<?php echo json_encode( $data, $json_options ); ?>'>
294
  <div class="joinchat__button">
295
  <div class="joinchat__button__open"></div>
296
  <?php if ( $image ) : ?>
whatsappme.php CHANGED
@@ -10,9 +10,11 @@ if ( ! defined( 'WPINC' ) ) {
10
  }
11
 
12
  function deactivate_wame_activate_joinchat() {
 
 
13
 
14
  // Deactivate old 'creame-whatsapp-me/whatsappme.php'
15
- deactivate_plugins( plugin_basename( __FILE__ ) );
16
 
17
  // Activate new 'creame-whatsapp-me/joinchat.php'
18
  activate_plugins( plugin_dir_path( __FILE__ ) . 'joinchat.php' );
10
  }
11
 
12
  function deactivate_wame_activate_joinchat() {
13
+ // WordPress Plugin Administration API
14
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
15
 
16
  // Deactivate old 'creame-whatsapp-me/whatsappme.php'
17
+ deactivate_plugins( plugin_basename( __FILE__ ), true );
18
 
19
  // Activate new 'creame-whatsapp-me/joinchat.php'
20
  activate_plugins( plugin_dir_path( __FILE__ ) . 'joinchat.php' );