WP Live Chat Support - Version 7.1.02

Version Description

  • 2017-06-29 - Medium priority =
  • Fixed undefined variables when using social profiles, a bio and tag line
  • Fixed a bug that caused some messages to not get recorded
Download this release

Release Info

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

Code changes from version 7.1.01 to 7.1.02

Files changed (4) hide show
  1. functions.php +1 -0
  2. js/themes/modern.js +6 -4
  3. readme.txt +4 -0
  4. wp-live-chat-support.php +10 -5
functions.php CHANGED
@@ -150,6 +150,7 @@ function wplc_record_chat_msg($from,$cid,$msg,$rest_check = false) {
150
 
151
  if ($from == "1") {
152
  $fromname = wplc_return_chat_name(sanitize_text_field($cid));
 
153
  //$fromemail = wplc_return_chat_email($cid);
154
  $orig = '2';
155
  }
150
 
151
  if ($from == "1") {
152
  $fromname = wplc_return_chat_name(sanitize_text_field($cid));
153
+ if (empty($fromname)) { $fromname = 'Guest'; }
154
  //$fromemail = wplc_return_chat_email($cid);
155
  $orig = '2';
156
  }
js/themes/modern.js CHANGED
@@ -70,12 +70,14 @@ jQuery(document).on("wplc_agent_joined", function(e) {
70
  var taid = '';
71
  var ta_tagline = '';
72
  var ta_bio = '';
 
73
 
74
  if (typeof e.ndata.other.email !== "undefined") { temail = e.ndata.other.email; }
75
  if (typeof e.ndata.other.name !== "undefined") { tname = e.ndata.other.name; }
76
  if (typeof e.ndata.other.aid !== "undefined") { taid = e.ndata.other.aid; }
77
  if (typeof e.ndata.other.agent_tagline !== "undefined") { ta_tagline = e.ndata.other.agent_tagline; }
78
  if (typeof e.ndata.other.agent_bio !== "undefined") { ta_bio = e.ndata.other.agent_bio; }
 
79
 
80
 
81
  jQuery(".wplc_no_answer").remove();
@@ -84,23 +86,23 @@ jQuery(document).on("wplc_agent_joined", function(e) {
84
  wplc_node_pair_name = tname;
85
  wplc_agent_name = tname;
86
 
87
- var timageurl = 'http://www.gravatar.com/avatar/'+temail;
88
 
89
  jQuery(".wplc_agent_info").html('');
90
  if ( ! jQuery( '#agent_grav_'+taid ).length ) {
91
  jQuery('<p/>', {
92
  'class': '',
93
  'style': 'text-align:center;',
94
- html: '<img class="img-thumbnail img-circle wplc_thumb32 wplc_agent_involved" style="max-width:inherit;" id="agent_grav_'+taid+'" title="'+tname+'" src="'+timageurl+'?s=40" /><br /><span class="wplc_agent_name wplc-color-2">'+tname+'</span>'+ta_tagline+ta_bio
95
  }).appendTo('.wplc_agent_info');
96
  }
97
- var csst = "url(http://www.gravatar.com/avatar/20a6e5c8b75ce87f4896f46ed6f49832?s=60);";
98
 
99
  jQuery("#wplc_chatbox_header_bg").css('background-image', 'url('+timageurl+'?s=380)');
100
  jQuery("#wplc_chatbox").css("top",
101
  jQuery("#wplc_chatbox_header").height()+18+"px"
102
  );
103
- })
104
 
105
 
106
 
70
  var taid = '';
71
  var ta_tagline = '';
72
  var ta_bio = '';
73
+ var ta_social_links = '';
74
 
75
  if (typeof e.ndata.other.email !== "undefined") { temail = e.ndata.other.email; }
76
  if (typeof e.ndata.other.name !== "undefined") { tname = e.ndata.other.name; }
77
  if (typeof e.ndata.other.aid !== "undefined") { taid = e.ndata.other.aid; }
78
  if (typeof e.ndata.other.agent_tagline !== "undefined") { ta_tagline = e.ndata.other.agent_tagline; }
79
  if (typeof e.ndata.other.agent_bio !== "undefined") { ta_bio = e.ndata.other.agent_bio; }
80
+ if (typeof e.ndata.other.social_links !== "undefined") { ta_social_links = e.ndata.other.social_links; }
81
 
82
 
83
  jQuery(".wplc_no_answer").remove();
86
  wplc_node_pair_name = tname;
87
  wplc_agent_name = tname;
88
 
89
+ var timageurl = 'https://www.gravatar.com/avatar/'+temail;
90
 
91
  jQuery(".wplc_agent_info").html('');
92
  if ( ! jQuery( '#agent_grav_'+taid ).length ) {
93
  jQuery('<p/>', {
94
  'class': '',
95
  'style': 'text-align:center;',
96
+ html: '<img class="img-thumbnail img-circle wplc_thumb32 wplc_agent_involved" style="max-width:inherit;" id="agent_grav_'+taid+'" title="'+tname+'" src="'+timageurl+'?s=40" /><br /><span class="wplc_agent_name wplc-color-2">'+tname+'</span>'+ta_tagline+ta_bio+ta_social_links
97
  }).appendTo('.wplc_agent_info');
98
  }
99
+ var csst = "url(https://www.gravatar.com/avatar/20a6e5c8b75ce87f4896f46ed6f49832?s=60);";
100
 
101
  jQuery("#wplc_chatbox_header_bg").css('background-image', 'url('+timageurl+'?s=380)');
102
  jQuery("#wplc_chatbox").css("top",
103
  jQuery("#wplc_chatbox_header").height()+18+"px"
104
  );
105
+ });
106
 
107
 
108
 
readme.txt CHANGED
@@ -220,6 +220,10 @@ It is highly recommended that you upgrade to WP Live Chat Support version 4.4.0
220
 
221
  == Changelog ==
222
 
 
 
 
 
223
  = 7.1.01 - 2017-06-18 - Low priority =
224
  * Small bug fix for agent profiles
225
 
220
 
221
  == Changelog ==
222
 
223
+ = 7.1.02 - 2017-06-29 - Medium priority =
224
+ * Fixed undefined variables when using social profiles, a bio and tag line
225
+ * Fixed a bug that caused some messages to not get recorded
226
+
227
  = 7.1.01 - 2017-06-18 - Low priority =
228
  * Small bug fix for agent profiles
229
 
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: 7.1.01
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  Text Domain: wplivechat
@@ -11,6 +11,10 @@
11
  */
12
 
13
  /**
 
 
 
 
14
  * 7.1.01 - 2017-06-18 - Low priority
15
  * Small bug fix for agent profiles
16
  *
@@ -549,7 +553,7 @@ global $debug_start;
549
  $wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
550
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
551
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
552
- $wplc_version = "7.1.01";
553
 
554
  define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
555
  define('WPLC_BASIC_PLUGIN_URL', plugins_url() . "/wp-live-chat-support/");
@@ -1967,7 +1971,7 @@ function wplc_filter_control_live_chat_box_above_main_div( $msg, $wplc_settings,
1967
  $agent = 'Admin';
1968
  }
1969
  }
1970
- $cbox_header_bg = "style='background-image:url(http://www.gravatar.com/avatar/".md5($user_info->user_email)."?s=380); no-repeat; cover;'";
1971
 
1972
  $extra = apply_filters( "wplc_filter_further_live_chat_box_above_main_div", '', $wplc_settings, $cid, $chat_data );
1973
 
@@ -2180,10 +2184,9 @@ function wplc_output_box_ajax_new($cid = null) {
2180
 
2181
  if ($cid !== null) {
2182
  $chat_data = wplc_get_chat_data( $cid );
 
2183
  wplc_record_chat_notification('user_loaded',$cid,array('uri' => $_SERVER['HTTP_REFERER'], 'chat_data' => $chat_data ));
2184
 
2185
-
2186
-
2187
  if ( !isset($chat_data) || !$chat_data->agent_id ) {
2188
  $ret_msg['type'] = 'new';
2189
  } else {
@@ -2213,6 +2216,8 @@ function wplc_output_box_ajax_new($cid = null) {
2213
  }
2214
  }
2215
 
 
 
2216
  $agent_tagline = apply_filters( "wplc_filter_agent_data_agent_tagline", $agent_tagline, $cid, $chat_data, $agent, $wplc_acbc_data, $user_info, $data );
2217
  $agent_bio = apply_filters( "wplc_filter_agent_data_agent_bio", $agent_bio, $cid, $chat_data, $agent, $wplc_acbc_data, $user_info, $data );
2218
  $social_links = apply_filters( "wplc_filter_agent_data_social_links", $social_links, $cid, $chat_data, $agent, $wplc_acbc_data, $user_info, $data);
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: 7.1.02
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  Text Domain: wplivechat
11
  */
12
 
13
  /**
14
+ * 7.1.02 - 2017-06-29 - Medium priority
15
+ * Fixed undefined variables when using social profiles, a bio and tag line
16
+ * Fixed a bug that caused some messages to not get recorded
17
+ *
18
  * 7.1.01 - 2017-06-18 - Low priority
19
  * Small bug fix for agent profiles
20
  *
553
  $wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
554
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
555
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
556
+ $wplc_version = "7.1.02";
557
 
558
  define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
559
  define('WPLC_BASIC_PLUGIN_URL', plugins_url() . "/wp-live-chat-support/");
1971
  $agent = 'Admin';
1972
  }
1973
  }
1974
+ $cbox_header_bg = "style='background-image:url(https://www.gravatar.com/avatar/".md5($user_info->user_email)."?s=380); no-repeat; cover;'";
1975
 
1976
  $extra = apply_filters( "wplc_filter_further_live_chat_box_above_main_div", '', $wplc_settings, $cid, $chat_data );
1977
 
2184
 
2185
  if ($cid !== null) {
2186
  $chat_data = wplc_get_chat_data( $cid );
2187
+
2188
  wplc_record_chat_notification('user_loaded',$cid,array('uri' => $_SERVER['HTTP_REFERER'], 'chat_data' => $chat_data ));
2189
 
 
 
2190
  if ( !isset($chat_data) || !$chat_data->agent_id ) {
2191
  $ret_msg['type'] = 'new';
2192
  } else {
2216
  }
2217
  }
2218
 
2219
+ if( !isset( $data ) ){ $data = false; }
2220
+
2221
  $agent_tagline = apply_filters( "wplc_filter_agent_data_agent_tagline", $agent_tagline, $cid, $chat_data, $agent, $wplc_acbc_data, $user_info, $data );
2222
  $agent_bio = apply_filters( "wplc_filter_agent_data_agent_bio", $agent_bio, $cid, $chat_data, $agent, $wplc_acbc_data, $user_info, $data );
2223
  $social_links = apply_filters( "wplc_filter_agent_data_social_links", $social_links, $cid, $chat_data, $agent, $wplc_acbc_data, $user_info, $data);