WhatsApp me - Version 4.5.12

Version Description

  • FIX Unescape help dynamic vars on post/term metabox.
  • CHANGED Better get title for dynamic var {TITLE}.
Download this release

Release Info

Developer pacotole
Plugin Icon 128x128 WhatsApp me
Version 4.5.12
Comparing to
See all releases

Code changes from version 4.5.11 to 4.5.12

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: Chat, Click to Chat, Facebook Messenger, WhatsApp, Telegram, Whatsapp Busi
5
  Requires at least: 4.4.0
6
  Tested up to: 6.1
7
  Requires PHP: 5.5
8
- Stable tag: 4.5.11
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -356,6 +356,10 @@ Joinchat save two localStorage variables for proper operation:
356
 
357
  == Changelog ==
358
 
 
 
 
 
359
  = 4.5.11 =
360
  * CHANGED Better Joinchat script initialization for deferred or async load by optimizers.
361
 
5
  Requires at least: 4.4.0
6
  Tested up to: 6.1
7
  Requires PHP: 5.5
8
+ Stable tag: 4.5.12
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
356
 
357
  == Changelog ==
358
 
359
+ = 4.5.12 =
360
+ * FIX Unescape help dynamic vars on post/term metabox.
361
+ * CHANGED Better get title for dynamic var {TITLE}.
362
+
363
  = 4.5.11 =
364
  * CHANGED Better Joinchat script initialization for deferred or async load by optimizers.
365
 
admin/class-joinchat-admin.php CHANGED
@@ -401,7 +401,7 @@ class JoinChatAdmin {
401
  'joinchat_cache_plugins',
402
  array(
403
  'autoptimizeCache::clearall_actionless', // Autoptimize https://wordpress.org/plugins/autoptimize/.
404
- 'ce_clear_cache', // Cache Enabler https://wordpress.org/plugins/cache-enabler/.
405
  'cachify_flush_cache', // Cachify https://wordpress.org/plugins/cachify/.
406
  'LiteSpeed_Cache_API::purge_all', // LiteSpeed Cache https://wordpress.org/plugins/litespeed-cache/.
407
  'sg_cachepress_purge_cache', // SG Optimizer https://es.wordpress.org/plugins/sg-cachepress/.
401
  'joinchat_cache_plugins',
402
  array(
403
  'autoptimizeCache::clearall_actionless', // Autoptimize https://wordpress.org/plugins/autoptimize/.
404
+ 'cache_enabler_clear_complete_cache', // Cache Enabler https://wordpress.org/plugins/cache-enabler/.
405
  'cachify_flush_cache', // Cachify https://wordpress.org/plugins/cachify/.
406
  'LiteSpeed_Cache_API::purge_all', // LiteSpeed Cache https://wordpress.org/plugins/litespeed-cache/.
407
  'sg_cachepress_purge_cache', // SG Optimizer https://es.wordpress.org/plugins/sg-cachepress/.
admin/partials/post-meta-box.php CHANGED
@@ -25,7 +25,7 @@ defined( 'WPINC' ) || exit;
25
  <label for="joinchat_message_send"><?php esc_html_e( 'Message', 'creame-whatsapp-me' ); ?></label><br>
26
  <textarea id="joinchat_message_send" name="joinchat_message_send" rows="2" placeholder="<?php echo esc_attr( $placeholders['message_send'] ); ?>" class="large-text"><?php echo esc_textarea( $metadata['message_send'] ); ?></textarea>
27
  <?php if ( count( $metabox_vars ) ) : ?>
28
- <small><?php esc_html_e( 'Can use vars', 'creame-whatsapp-me' ); ?> <code>{<?php echo esc_html( join( '}</code> <code>{', $metabox_vars ) ); ?>}</code></small>
29
  <?php endif; ?>
30
  <small><?php esc_html_e( 'to leave it blank use', 'creame-whatsapp-me' ); ?> <code>{}</code></small>
31
  </p>
25
  <label for="joinchat_message_send"><?php esc_html_e( 'Message', 'creame-whatsapp-me' ); ?></label><br>
26
  <textarea id="joinchat_message_send" name="joinchat_message_send" rows="2" placeholder="<?php echo esc_attr( $placeholders['message_send'] ); ?>" class="large-text"><?php echo esc_textarea( $metadata['message_send'] ); ?></textarea>
27
  <?php if ( count( $metabox_vars ) ) : ?>
28
+ <small><?php esc_html_e( 'Can use vars', 'creame-whatsapp-me' ); ?> <code>{<?php echo join( '}</code> <code>{', $metabox_vars ); ?>}</code></small>
29
  <?php endif; ?>
30
  <small><?php esc_html_e( 'to leave it blank use', 'creame-whatsapp-me' ); ?> <code>{}</code></small>
31
  </p>
admin/partials/term-meta-box.php CHANGED
@@ -29,7 +29,7 @@ defined( 'WPINC' ) || exit;
29
  <textarea id="joinchat_message_send" name="joinchat_message_send" rows="2" placeholder="<?php echo esc_attr( $placeholders['message_send'] ); ?>" class="large-text"><?php echo esc_textarea( $metadata['message_send'] ); ?></textarea>
30
  <p class="description">
31
  <?php if ( count( $metabox_vars ) ) : ?>
32
- <?php esc_html_e( 'Can use vars', 'creame-whatsapp-me' ); ?> <code>{<?php echo esc_html( join( '}</code> <code>{', $metabox_vars ) ); ?>}</code>
33
  <?php endif; ?>
34
  <?php esc_html_e( 'to leave it blank use', 'creame-whatsapp-me' ); ?> <code>{}</code>
35
  </p>
29
  <textarea id="joinchat_message_send" name="joinchat_message_send" rows="2" placeholder="<?php echo esc_attr( $placeholders['message_send'] ); ?>" class="large-text"><?php echo esc_textarea( $metadata['message_send'] ); ?></textarea>
30
  <p class="description">
31
  <?php if ( count( $metabox_vars ) ) : ?>
32
+ <?php esc_html_e( 'Can use vars', 'creame-whatsapp-me' ); ?> <code>{<?php echo join( '}</code> <code>{', $metabox_vars ); ?>}</code>
33
  <?php endif; ?>
34
  <?php esc_html_e( 'to leave it blank use', 'creame-whatsapp-me' ); ?> <code>{}</code>
35
  </p>
includes/class-joinchat-util.php CHANGED
@@ -259,23 +259,29 @@ class JoinChatUtil {
259
  */
260
  public static function get_title() {
261
 
262
- if ( is_home() || is_singular() ) {
263
- $title = single_post_title( '', false );
264
- } elseif ( is_category() || is_tag() || is_tax() ) {
265
- $title = single_term_title( '', false );
266
- } else {
267
- $title = wp_get_document_title();
268
 
269
- // Try to remove sitename from $title for cleaner title.
270
- $sep = apply_filters( 'document_title_separator', '-' );
271
- $site = get_bloginfo( 'name', 'display' );
272
- $title = str_replace( esc_html( convert_chars( wptexturize( " $sep " . $site ) ) ), '', $title );
273
- }
274
 
275
  return apply_filters( 'joinchat_get_title', $title );
276
 
277
  }
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  /**
280
  * Encode JSON with filtered options
281
  *
259
  */
260
  public static function get_title() {
261
 
262
+ add_filter( 'document_title_parts', 'JoinChatUtil::only_title_part' );
 
 
 
 
 
263
 
264
+ $title = wp_get_document_title();
265
+
266
+ remove_filter( 'document_title_parts', 'JoinChatUtil::only_title_part' );
 
 
267
 
268
  return apply_filters( 'joinchat_get_title', $title );
269
 
270
  }
271
 
272
+ /**
273
+ * Get only 'title' of title parts
274
+ *
275
+ * @since 4.5.12
276
+ * @param array $parts title parts
277
+ * @return array
278
+ */
279
+ public static function only_title_part( $parts ) {
280
+
281
+ return array( 'title' => $parts['title'] );
282
+
283
+ }
284
+
285
  /**
286
  * Encode JSON with filtered options
287
  *
joinchat.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: Joinchat
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.5.11
13
  * Author: Creame
14
  * Author URI: https://crea.me
15
  * License: GPL-2.0+
@@ -26,7 +26,7 @@ if ( ! defined( 'WPINC' ) ) {
26
  /**
27
  * Define constants.
28
  */
29
- define( 'JOINCHAT_VERSION', '4.5.11' );
30
  define( 'JOINCHAT_FILE', __FILE__ );
31
  define( 'JOINCHAT_DIR', plugin_dir_path( JOINCHAT_FILE ) );
32
  define( 'JOINCHAT_BASENAME', plugin_basename( JOINCHAT_FILE ) );
9
  * Plugin Name: Joinchat
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.5.12
13
  * Author: Creame
14
  * Author URI: https://crea.me
15
  * License: GPL-2.0+
26
  /**
27
  * Define constants.
28
  */
29
+ define( 'JOINCHAT_VERSION', '4.5.12' );
30
  define( 'JOINCHAT_FILE', __FILE__ );
31
  define( 'JOINCHAT_DIR', plugin_dir_path( JOINCHAT_FILE ) );
32
  define( 'JOINCHAT_BASENAME', plugin_basename( JOINCHAT_FILE ) );