WP Live Chat Support - Version 6.0.01

Version Description

  • 2016-02-02 - High priority =
  • Crucial bug fix that stopped the live chat from working in some instances
  • New filter to fix the bug with the WP Live Chat Choose When Online bug
Download this release

Release Info

Developer WP-LiveChat
Plugin Icon 128x128 WP Live Chat Support
Version 6.0.01
Comparing to
See all releases

Code changes from version 6.0.00 to 6.0.01

Files changed (2) hide show
  1. readme.txt +5 -1
  2. wp-live-chat-support.php +19 -4
readme.txt CHANGED
@@ -199,7 +199,11 @@ It is highly recommended that you upgrade to WP Live Chat Support version 4.1.4
199
 
200
  == Changelog ==
201
 
202
- = 6.0.00 -2016-01-26 - Freedom of Speech Update - Medium Priority =
 
 
 
 
203
  * New functionality
204
  * Unlimited simultaneous chats now available
205
  * Offline messages are now available
199
 
200
  == Changelog ==
201
 
202
+ = 6.0.01 - 2016-02-02 - High priority =
203
+ * Crucial bug fix that stopped the live chat from working in some instances
204
+ * New filter to fix the bug with the WP Live Chat Choose When Online bug
205
+
206
+ = 6.0.00 - 2016-01-26 - Freedom of Speech Update - Medium Priority =
207
  * New functionality
208
  * Unlimited simultaneous chats now available
209
  * Offline messages are now available
wp-live-chat-support.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Live Chat Support
4
  Plugin URI: http://www.wp-livechat.com
5
  Description: The easiest to use website live chat plugin. Let your visitors chat with you and increase sales conversion rates with WP Live Chat Support. No third party connection required!
6
- Version: 6.0.00
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  Text Domain: wplivechat
@@ -11,6 +11,10 @@
11
  */
12
 
13
  /*
 
 
 
 
14
  * 6.0.00 -2016-01-26 - Freedom of Speech Update - Medium Priority
15
  * New functionality
16
  * Unlimited simultaneous chats now available
@@ -305,7 +309,7 @@ global $wplc_tblname_offline_msgs;
305
  $wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
306
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
307
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
308
- $wplc_version = "6.0.00";
309
 
310
  define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
311
  define('WPLC_BASIC_PLUGIN_URL', plugins_url() . "/wp-live-chat-support/");
@@ -369,6 +373,14 @@ function wplc_version_control() {
369
 
370
  $current_version = get_option("wplc_current_version");
371
  if (!isset($current_version) || $current_version != $wplc_version) {
 
 
 
 
 
 
 
 
372
  $wplc_settings = get_option("WPLC_SETTINGS");
373
 
374
 
@@ -585,7 +597,7 @@ function wplc_load_user_js () {
585
  }
586
  $wplc_detect_device = new Mobile_Detect;
587
  $wplc_is_mobile = $wplc_detect_device->isMobile();
588
- if ($wplc_is_mobile && !isset($wplc_settings['wplc_enabled_on_mobile']) && $wplc_settings['wplc_enabled_on_mobile'] != 1) {
589
  return;
590
  }
591
 
@@ -1357,13 +1369,14 @@ function wplc_output_box_ajax_new() {
1357
  }
1358
 
1359
 
1360
-
1361
  $logged_in_checks = apply_filters("wplc_filter_is_admin_logged_in",array());
1362
  /* if we are logged in ANYWHERE, set this to true */
1363
  foreach($logged_in_checks as $key => $val) {
1364
  if ($val) { $logged_in = true; break; }
1365
  }
1366
 
 
 
1367
  /* admin is using the basic version and is logged in */
1368
  if ($wplc_is_admin_logged_in) { $logged_in = true; }
1369
 
@@ -2110,6 +2123,8 @@ function wplc_activate() {
2110
  }
2111
 
2112
 
 
 
2113
  add_option("WPLC_HIDE_CHAT", "true");
2114
  add_option("WPLC_FIRST_TIME", true);
2115
  }
3
  Plugin Name: WP Live Chat Support
4
  Plugin URI: http://www.wp-livechat.com
5
  Description: The easiest to use website live chat plugin. Let your visitors chat with you and increase sales conversion rates with WP Live Chat Support. No third party connection required!
6
+ Version: 6.0.01
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  Text Domain: wplivechat
11
  */
12
 
13
  /*
14
+ * 6.0.01 - 2016-02-02 - High priority
15
+ * Crucial bug fix that stopped the live chat from working in some instances
16
+ * New filter to fix the bug with the WP Live Chat Choose When Online bug
17
+ *
18
  * 6.0.00 -2016-01-26 - Freedom of Speech Update - Medium Priority
19
  * New functionality
20
  * Unlimited simultaneous chats now available
309
  $wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
310
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
311
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
312
+ $wplc_version = "6.0.01";
313
 
314
  define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
315
  define('WPLC_BASIC_PLUGIN_URL', plugins_url() . "/wp-live-chat-support/");
373
 
374
  $current_version = get_option("wplc_current_version");
375
  if (!isset($current_version) || $current_version != $wplc_version) {
376
+
377
+ $admins = get_role('administrator');
378
+ $admins->add_cap('wplc_ma_agent');
379
+ $uid = get_current_user_id();
380
+ update_user_meta($uid, 'wplc_ma_agent', 1);
381
+ update_user_meta($uid, "wplc_chat_agent_online", time());
382
+
383
+
384
  $wplc_settings = get_option("WPLC_SETTINGS");
385
 
386
 
597
  }
598
  $wplc_detect_device = new Mobile_Detect;
599
  $wplc_is_mobile = $wplc_detect_device->isMobile();
600
+ if ($wplc_is_mobile && isset($wplc_settings['wplc_enabled_on_mobile']) && $wplc_settings['wplc_enabled_on_mobile'] == '0') {
601
  return;
602
  }
603
 
1369
  }
1370
 
1371
 
 
1372
  $logged_in_checks = apply_filters("wplc_filter_is_admin_logged_in",array());
1373
  /* if we are logged in ANYWHERE, set this to true */
1374
  foreach($logged_in_checks as $key => $val) {
1375
  if ($val) { $logged_in = true; break; }
1376
  }
1377
 
1378
+ $logged_in = apply_filters("wplc_final_loggedin_control",$logged_in);
1379
+
1380
  /* admin is using the basic version and is logged in */
1381
  if ($wplc_is_admin_logged_in) { $logged_in = true; }
1382
 
2123
  }
2124
 
2125
 
2126
+
2127
+
2128
  add_option("WPLC_HIDE_CHAT", "true");
2129
  add_option("WPLC_FIRST_TIME", true);
2130
  }