Version Description
- 2017-03-01 - Low priority =
- Fixed broken links in the plugins page
Download this release
Release Info
Developer | WP-LiveChat |
Plugin | WP Live Chat Support |
Version | 7.0.05 |
Comparing to | |
See all releases |
Code changes from version 7.0.03 to 7.0.05
- functions.php +45 -15
- includes/notification_control.php +14 -2
- js/wplc_plugin_row.js +19 -0
- js/wplc_u.js +1 -1
- js/wplc_u_admin_chat.js +8 -4
- modules/module_subscribe.php +14 -4
- readme.txt +10 -2
- wp-live-chat-support.php +41 -5
functions.php
CHANGED
@@ -620,7 +620,8 @@ function wplc_return_user_chat_messages($cid,$wplc_settings = false,$cdata = fal
|
|
620 |
|
621 |
}
|
622 |
|
623 |
-
$from = apply_filters("
|
|
|
624 |
}
|
625 |
else if (intval($result->originates) == 0) {
|
626 |
/*
|
@@ -644,16 +645,27 @@ function wplc_return_user_chat_messages($cid,$wplc_settings = false,$cdata = fal
|
|
644 |
|
645 |
if (!$system_notification) {
|
646 |
/* this is a normal message */
|
647 |
-
|
648 |
if(function_exists('wplc_decrypt_msg')){
|
649 |
$msg = wplc_decrypt_msg($msg);
|
650 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
651 |
|
652 |
$msg = apply_filters("wplc_filter_message_control_out",$msg);
|
|
|
653 |
$msg = stripslashes($msg);
|
|
|
|
|
654 |
|
655 |
if($display_name){
|
656 |
-
$msg_hist[$id] = "<span class='wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4'>$image <strong>$from</strong
|
657 |
} else {
|
658 |
$msg_hist[$id] = "<span class='wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4'>$msg</span><div class='wplc-clear-float-message'></div>";
|
659 |
}
|
@@ -793,12 +805,12 @@ function wplc_return_chat_messages($cid, $transcript = false, $html = true, $wpl
|
|
793 |
$previous_time = "";
|
794 |
$previous_timestamp = 0;
|
795 |
foreach ($results as $result) {
|
796 |
-
|
797 |
$system_notification = false;
|
798 |
|
799 |
$from = $result->msgfrom;
|
800 |
$id = $result->id;
|
801 |
-
$msg =
|
802 |
$timestamp = strtotime($result->timestamp);
|
803 |
|
804 |
$time_diff = $timestamp - $previous_timestamp;
|
@@ -902,14 +914,26 @@ function wplc_return_chat_messages($cid, $transcript = false, $html = true, $wpl
|
|
902 |
|
903 |
if(function_exists('wplc_decrypt_msg')){
|
904 |
$msg = wplc_decrypt_msg($msg);
|
905 |
-
}
|
906 |
|
907 |
$msg = apply_filters("wplc_filter_message_control_out",$msg);
|
908 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
909 |
|
910 |
if($display_name){
|
911 |
if ($html) {
|
912 |
-
$str = "<span class='chat_time wplc-color-4'>$timeshow</span> <span class='$class'>$image <strong>$from</strong
|
913 |
$msg_array[$id] = $str;
|
914 |
$msg_hist .= $str;
|
915 |
|
@@ -924,7 +948,7 @@ function wplc_return_chat_messages($cid, $transcript = false, $html = true, $wpl
|
|
924 |
$msg_array[$id] = $str;
|
925 |
$msg_hist .= $str;
|
926 |
} else {
|
927 |
-
$str = "($timeshow) $
|
928 |
$msg_array[$id] = $str;
|
929 |
$msg_hist .= $str;
|
930 |
}
|
@@ -1051,19 +1075,25 @@ function wplc_return_admin_chat_messages($cid) {
|
|
1051 |
|
1052 |
} else if (intval($result->originates) == 3) {
|
1053 |
$system_notification = true;
|
1054 |
-
}
|
1055 |
-
|
1056 |
if (!$system_notification) {
|
1057 |
-
|
1058 |
if(function_exists('wplc_decrypt_msg')){
|
1059 |
$msg = wplc_decrypt_msg($msg);
|
1060 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1061 |
|
1062 |
-
$msg = apply_filters("wplc_filter_message_control_out",$msg);
|
1063 |
$msg = stripslashes($msg);
|
1064 |
|
|
|
|
|
1065 |
if($display_name){
|
1066 |
-
$msg_hist .= "<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'>".$image."<strong>$from</strong
|
1067 |
} else {
|
1068 |
$msg_hist .= "<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'>$msg</span><br /><div class='wplc-clear-float-message'></div>";
|
1069 |
}
|
620 |
|
621 |
}
|
622 |
|
623 |
+
$from = apply_filters("wplc_filter_admin_name",$from, $cid);
|
624 |
+
|
625 |
}
|
626 |
else if (intval($result->originates) == 0) {
|
627 |
/*
|
645 |
|
646 |
if (!$system_notification) {
|
647 |
/* this is a normal message */
|
648 |
+
// var_dump($msg);
|
649 |
if(function_exists('wplc_decrypt_msg')){
|
650 |
$msg = wplc_decrypt_msg($msg);
|
651 |
}
|
652 |
+
|
653 |
+
$msg_array = maybe_unserialize( $msg );
|
654 |
+
|
655 |
+
if( is_array( $msg_array ) ){
|
656 |
+
$msg = $msg_array['m'];
|
657 |
+
}
|
658 |
+
|
659 |
+
$msg = stripslashes($msg);
|
660 |
|
661 |
$msg = apply_filters("wplc_filter_message_control_out",$msg);
|
662 |
+
|
663 |
$msg = stripslashes($msg);
|
664 |
+
|
665 |
+
|
666 |
|
667 |
if($display_name){
|
668 |
+
$msg_hist[$id] = "<span class='wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4'>$image <strong>$from </strong> $msg</span><br /><div class='wplc-clear-float-message'></div>";
|
669 |
} else {
|
670 |
$msg_hist[$id] = "<span class='wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4'>$msg</span><div class='wplc-clear-float-message'></div>";
|
671 |
}
|
805 |
$previous_time = "";
|
806 |
$previous_timestamp = 0;
|
807 |
foreach ($results as $result) {
|
808 |
+
|
809 |
$system_notification = false;
|
810 |
|
811 |
$from = $result->msgfrom;
|
812 |
$id = $result->id;
|
813 |
+
$msg = $result->msg;
|
814 |
$timestamp = strtotime($result->timestamp);
|
815 |
|
816 |
$time_diff = $timestamp - $previous_timestamp;
|
914 |
|
915 |
if(function_exists('wplc_decrypt_msg')){
|
916 |
$msg = wplc_decrypt_msg($msg);
|
917 |
+
}
|
918 |
|
919 |
$msg = apply_filters("wplc_filter_message_control_out",$msg);
|
920 |
+
|
921 |
+
if( is_serialized( $msg ) ){
|
922 |
+
$msg_array = maybe_unserialize( $msg );
|
923 |
+
|
924 |
+
if( is_array( $msg_array ) ){
|
925 |
+
$msg = $msg_array['m'];
|
926 |
+
} else {
|
927 |
+
$msg = $msg;
|
928 |
+
}
|
929 |
+
|
930 |
+
$msg = stripslashes($msg);
|
931 |
+
}
|
932 |
+
|
933 |
|
934 |
if($display_name){
|
935 |
if ($html) {
|
936 |
+
$str = "<span class='chat_time wplc-color-4'>$timeshow</span> <span class='$class'>$image <strong>$from </strong> $msg</span><br /><div class='wplc-clear-float-message'></div>";
|
937 |
$msg_array[$id] = $str;
|
938 |
$msg_hist .= $str;
|
939 |
|
948 |
$msg_array[$id] = $str;
|
949 |
$msg_hist .= $str;
|
950 |
} else {
|
951 |
+
$str = "($timeshow) $msg\r\n";
|
952 |
$msg_array[$id] = $str;
|
953 |
$msg_hist .= $str;
|
954 |
}
|
1075 |
|
1076 |
} else if (intval($result->originates) == 3) {
|
1077 |
$system_notification = true;
|
1078 |
+
}
|
|
|
1079 |
if (!$system_notification) {
|
1080 |
+
|
1081 |
if(function_exists('wplc_decrypt_msg')){
|
1082 |
$msg = wplc_decrypt_msg($msg);
|
1083 |
+
}
|
1084 |
+
|
1085 |
+
$msg_array = maybe_unserialize( $msg );
|
1086 |
+
|
1087 |
+
if( is_array( $msg_array ) ){
|
1088 |
+
$msg = $msg_array['m'];
|
1089 |
+
}
|
1090 |
|
|
|
1091 |
$msg = stripslashes($msg);
|
1092 |
|
1093 |
+
$msg = apply_filters("wplc_filter_message_control_out",$msg);
|
1094 |
+
|
1095 |
if($display_name){
|
1096 |
+
$msg_hist .= "<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'>".$image."<strong>$from </strong> $msg</span><br /><div class='wplc-clear-float-message'></div>";
|
1097 |
} else {
|
1098 |
$msg_hist .= "<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'>$msg</span><br /><div class='wplc-clear-float-message'></div>";
|
1099 |
}
|
includes/notification_control.php
CHANGED
@@ -97,8 +97,20 @@ function wplc_filter_control_chat_notification_agent_joined($type,$cid,$data) {
|
|
97 |
global $wplc_tblname_msgs;
|
98 |
|
99 |
|
100 |
-
$
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
$msg = $agent . " ". __("has joined the chat.","wplivechat");
|
103 |
|
104 |
$wpdb->insert(
|
97 |
global $wplc_tblname_msgs;
|
98 |
|
99 |
|
100 |
+
$wplc_acbc_data = get_option("WPLC_ACBC_SETTINGS");
|
101 |
+
|
102 |
+
if( isset( $wplc_acbc_data['wplc_use_wp_name'] ) && $wplc_acbc_data['wplc_use_wp_name'] == '1' ){
|
103 |
+
$user_info = get_userdata(intval($data['aid']));
|
104 |
+
$agent = $user_info->display_name;
|
105 |
+
} else {
|
106 |
+
if (!empty($wplc_acbc_data['wplc_chat_name'])) {
|
107 |
+
$agent = $wplc_acbc_data['wplc_chat_name'];
|
108 |
+
} else {
|
109 |
+
$agent = 'Admin';
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
$msg = $agent . " ". __("has joined the chat.","wplivechat");
|
115 |
|
116 |
$wpdb->insert(
|
js/wplc_plugin_row.js
CHANGED
@@ -5,6 +5,7 @@ jQuery(document).ready(function(){
|
|
5 |
var a_email = jQuery("#wplc_signup_newsletter").val();
|
6 |
jQuery("#wplc_signup_newsletter").hide('slow');
|
7 |
jQuery("#wplc_signup_newsletter_btn").hide('slow');
|
|
|
8 |
jQuery("#wplc_subscribe_div").html("Thank you!");
|
9 |
var data = {
|
10 |
action: 'wplc_subscribe',
|
@@ -28,4 +29,22 @@ jQuery(document).ready(function(){
|
|
28 |
|
29 |
|
30 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
});
|
5 |
var a_email = jQuery("#wplc_signup_newsletter").val();
|
6 |
jQuery("#wplc_signup_newsletter").hide('slow');
|
7 |
jQuery("#wplc_signup_newsletter_btn").hide('slow');
|
8 |
+
jQuery("#wplc_signup_newsletter_hide").hide('slow');
|
9 |
jQuery("#wplc_subscribe_div").html("Thank you!");
|
10 |
var data = {
|
11 |
action: 'wplc_subscribe',
|
29 |
|
30 |
|
31 |
});
|
32 |
+
jQuery("body").on("click", "#wplc_signup_newsletter_hide", function() {
|
33 |
+
|
34 |
+
jQuery(".wplc_sub_div").hide("fast");
|
35 |
+
jQuery("#wplc_signup_newsletter").hide('slow');
|
36 |
+
jQuery("#wplc_signup_newsletter_btn").hide('slow');
|
37 |
+
jQuery("#wplc_signup_newsletter_hide").hide('slow');
|
38 |
+
|
39 |
+
var data = {
|
40 |
+
action: 'wplc_subscribe_hide',
|
41 |
+
security: wplc_sub_nonce
|
42 |
+
|
43 |
+
};
|
44 |
+
jQuery.post(ajaxurl, data, function(response) {
|
45 |
+
|
46 |
+
});
|
47 |
+
|
48 |
+
|
49 |
+
});
|
50 |
});
|
js/wplc_u.js
CHANGED
@@ -333,6 +333,7 @@ jQuery(document).ready(function() {
|
|
333 |
message_from = Cookies.get("wplc_name") + ": ";
|
334 |
message_from = "";
|
335 |
message_content = the_message.msg.wplcStripSlashes();
|
|
|
336 |
}
|
337 |
|
338 |
if(message_content !== ""){
|
@@ -470,7 +471,6 @@ jQuery(document).ready(function() {
|
|
470 |
/* we dont have this message */
|
471 |
// console.log("new message!: "+response['data'][index]);
|
472 |
msg_history[index] = true;
|
473 |
-
|
474 |
if(typeof niftyFormatParser !== "undefined"){
|
475 |
jQuery("#wplc_chatbox").append(niftyFormatParser(response['data'][index].wplcStripSlashes()));
|
476 |
} else{
|
333 |
message_from = Cookies.get("wplc_name") + ": ";
|
334 |
message_from = "";
|
335 |
message_content = the_message.msg.wplcStripSlashes();
|
336 |
+
wplc_new_message_sound = false;
|
337 |
}
|
338 |
|
339 |
if(message_content !== ""){
|
471 |
/* we dont have this message */
|
472 |
// console.log("new message!: "+response['data'][index]);
|
473 |
msg_history[index] = true;
|
|
|
474 |
if(typeof niftyFormatParser !== "undefined"){
|
475 |
jQuery("#wplc_chatbox").append(niftyFormatParser(response['data'][index].wplcStripSlashes()));
|
476 |
} else{
|
js/wplc_u_admin_chat.js
CHANGED
@@ -176,7 +176,7 @@ function wplc_loop_response_handler(response){
|
|
176 |
message_class = "wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1";
|
177 |
// message_grav = md5(wplc_email);
|
178 |
message_grav = "<img src='//www.gravatar.com/avatar/" + message_grav + "?s=30' class='wplc-admin-message-avatar' />";
|
179 |
-
message_from = (typeof wplc_chat_name !== "undefined" ? wplc_chat_name : "Unknown")
|
180 |
message_content = the_message.msg;
|
181 |
}
|
182 |
|
@@ -333,9 +333,13 @@ jQuery(document).ready(function () {
|
|
333 |
var wplc_cid = jQuery("#wplc_admin_cid").val();
|
334 |
var wplc_chat = wplc_strip(document.getElementById('wplc_admin_chatmsg').value);
|
335 |
var wplc_name = "a" + "d" + "m" + "i" + "n";
|
336 |
-
|
337 |
if(typeof wplc_name_override !== "undefined"){
|
338 |
wplc_name = "<strong>"+wplc_name_override+": </strong>";
|
|
|
|
|
|
|
|
|
339 |
}
|
340 |
|
341 |
jQuery("#wplc_admin_chatmsg").val('');
|
@@ -351,11 +355,11 @@ jQuery(document).ready(function () {
|
|
351 |
wplc_chat_parsed = niftyFormatParser(wplc_chat_parsed);
|
352 |
}
|
353 |
if( typeof wplc_show_chat_detail !== 'undefined' ){
|
354 |
-
if(
|
355 |
/**
|
356 |
* Show the name
|
357 |
*/
|
358 |
-
var the_name = "<strong>"+
|
359 |
if( typeof wplc_show_chat_detail.avatar !== 'undefined' && wplc_show_chat_detail.avatar != '' ){
|
360 |
/**
|
361 |
* Show the avatar
|
176 |
message_class = "wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1";
|
177 |
// message_grav = md5(wplc_email);
|
178 |
message_grav = "<img src='//www.gravatar.com/avatar/" + message_grav + "?s=30' class='wplc-admin-message-avatar' />";
|
179 |
+
message_from = (typeof wplc_chat_name !== "undefined" ? wplc_chat_name : "Unknown");
|
180 |
message_content = the_message.msg;
|
181 |
}
|
182 |
|
333 |
var wplc_cid = jQuery("#wplc_admin_cid").val();
|
334 |
var wplc_chat = wplc_strip(document.getElementById('wplc_admin_chatmsg').value);
|
335 |
var wplc_name = "a" + "d" + "m" + "i" + "n";
|
336 |
+
|
337 |
if(typeof wplc_name_override !== "undefined"){
|
338 |
wplc_name = "<strong>"+wplc_name_override+": </strong>";
|
339 |
+
} else if( typeof wplc_show_chat_detail.name !== 'undefined' ) {
|
340 |
+
wplc_name = "<strong>"+wplc_show_chat_detail.name+": </strong>";
|
341 |
+
} else {
|
342 |
+
wplc_name = wplc_name;
|
343 |
}
|
344 |
|
345 |
jQuery("#wplc_admin_chatmsg").val('');
|
355 |
wplc_chat_parsed = niftyFormatParser(wplc_chat_parsed);
|
356 |
}
|
357 |
if( typeof wplc_show_chat_detail !== 'undefined' ){
|
358 |
+
if( wplc_name !== ""){
|
359 |
/**
|
360 |
* Show the name
|
361 |
*/
|
362 |
+
var the_name = "<strong>"+wplc_name +"</strong>";
|
363 |
if( typeof wplc_show_chat_detail.avatar !== 'undefined' && wplc_show_chat_detail.avatar != '' ){
|
364 |
/**
|
365 |
* Show the avatar
|
modules/module_subscribe.php
CHANGED
@@ -10,15 +10,16 @@ add_filter( 'plugin_action_links_wp-live-chat-support/wp-live-chat-support.php',
|
|
10 |
function wplc_plugin_action_links( $links ) {
|
11 |
|
12 |
array_unshift( $links,
|
13 |
-
'<a class="edit" href="' . admin_url('
|
14 |
array_unshift( $links,
|
15 |
-
'<a class="" target="_BLANK" href="
|
16 |
|
17 |
|
18 |
return $links;
|
19 |
}
|
20 |
|
21 |
add_action( 'wp_ajax_wplc_subscribe','wplc_ajax_subscribe');
|
|
|
22 |
|
23 |
function wplc_ajax_subscribe() {
|
24 |
$check = check_ajax_referer( 'wplc_subscribe', 'security' );
|
@@ -26,8 +27,16 @@ function wplc_ajax_subscribe() {
|
|
26 |
if ( $_POST['action'] == 'wplc_subscribe' ) {
|
27 |
$uid = get_current_user_id();
|
28 |
update_user_meta( $uid, 'wplc_subscribed', true);
|
|
|
|
|
29 |
|
30 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
}
|
33 |
|
@@ -65,12 +74,13 @@ function wplc_plugin_row( $plugin_meta, $plugin_file, $plugin_data, $status ) {
|
|
65 |
}
|
66 |
|
67 |
if (!$check) {
|
68 |
-
$ret = '<div style="margin-top:10px; color:#333; display:block; white-space:normal;">';
|
69 |
$ret .= '<form>';
|
70 |
$ret .= '<p><label for="wplc_signup_newsletter" style="font-style:italic; margin-bottom:5px;">' . __( 'Sign up to our newsletter and get information on the latest updates, beta versions and specials.', 'wplivechat' ) . '</label></p>';
|
71 |
$ret .= '<span id="wplc_subscribe_div">';
|
72 |
$ret .= '<input type="text" name="wplc_signup_newsletter" id="wplc_signup_newsletter" value="'. $user_email .'"></option>';
|
73 |
-
$ret .= '<input type="button" class="button button-primary" id="wplc_signup_newsletter_btn" name="wplc_signup_newsletter_btn" value="' . __( 'Sign up', 'wplivechat' ) . '" />';
|
|
|
74 |
$ret .= '<span>';
|
75 |
$ret .= '</form>';
|
76 |
$ret .= '</div>';
|
10 |
function wplc_plugin_action_links( $links ) {
|
11 |
|
12 |
array_unshift( $links,
|
13 |
+
'<a class="edit" href="' . admin_url('admin.php?page=wplivechat-menu-settings') . '">' . __( 'Settings', 'wplivechat' ) . '</a>' );
|
14 |
array_unshift( $links,
|
15 |
+
'<a class="" target="_BLANK" href="https://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=pro_settings_link">' . __( 'Pro version', 'wplivechat' ) . '</a>' );
|
16 |
|
17 |
|
18 |
return $links;
|
19 |
}
|
20 |
|
21 |
add_action( 'wp_ajax_wplc_subscribe','wplc_ajax_subscribe');
|
22 |
+
add_action( 'wp_ajax_wplc_subscribe_hide','wplc_ajax_subscribe');
|
23 |
|
24 |
function wplc_ajax_subscribe() {
|
25 |
$check = check_ajax_referer( 'wplc_subscribe', 'security' );
|
27 |
if ( $_POST['action'] == 'wplc_subscribe' ) {
|
28 |
$uid = get_current_user_id();
|
29 |
update_user_meta( $uid, 'wplc_subscribed', true);
|
30 |
+
echo "1";
|
31 |
+
die();
|
32 |
|
33 |
}
|
34 |
+
if ( $_POST['action'] == 'wplc_subscribe_hide' ) {
|
35 |
+
$uid = get_current_user_id();
|
36 |
+
update_user_meta( $uid, 'wplc_subscribed', true);
|
37 |
+
echo "1";
|
38 |
+
die();
|
39 |
+
}
|
40 |
}
|
41 |
}
|
42 |
|
74 |
}
|
75 |
|
76 |
if (!$check) {
|
77 |
+
$ret = '<div class="wplc_sub_div" style="margin-top:10px; color:#333; display:block; white-space:normal;">';
|
78 |
$ret .= '<form>';
|
79 |
$ret .= '<p><label for="wplc_signup_newsletter" style="font-style:italic; margin-bottom:5px;">' . __( 'Sign up to our newsletter and get information on the latest updates, beta versions and specials.', 'wplivechat' ) . '</label></p>';
|
80 |
$ret .= '<span id="wplc_subscribe_div">';
|
81 |
$ret .= '<input type="text" name="wplc_signup_newsletter" id="wplc_signup_newsletter" value="'. $user_email .'"></option>';
|
82 |
+
$ret .= '<input type="button" class="button button-primary" id="wplc_signup_newsletter_btn" name="wplc_signup_newsletter_btn" value="' . __( 'Sign up', 'wplivechat' ) . '" /> ';
|
83 |
+
$ret .= '<input type="button" class="button button-secondary" id="wplc_signup_newsletter_hide" name="wplc_signup_newsletter_hide" value="' . __( 'Hide', 'wplivechat' ) . '" />';
|
84 |
$ret .= '<span>';
|
85 |
$ret .= '</form>';
|
86 |
$ret .= '</div>';
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: WP-LiveChat, NickDuncan, CodeCabin_, Jarryd Long, dylanauty
|
|
3 |
Donate link: http://www.wp-livechat.com
|
4 |
Tags: live chat, live support, chat plugin, live help, wordpress live chat, chat, live chat plugin, live support plugin, live chat support plugin, chat plugin, support plugin, live help
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 4.7
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2
|
9 |
|
@@ -220,7 +220,15 @@ It is highly recommended that you upgrade to WP Live Chat Support version 4.4.0
|
|
220 |
|
221 |
== Changelog ==
|
222 |
|
223 |
-
= 7.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
* Fixed a bug that caused the name of the agent to disappear after refreshing the page
|
225 |
* Fixed a bug that caused the agent name to display twice in the chat window
|
226 |
|
3 |
Donate link: http://www.wp-livechat.com
|
4 |
Tags: live chat, live support, chat plugin, live help, wordpress live chat, chat, live chat plugin, live support plugin, live chat support plugin, chat plugin, support plugin, live help
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.7.3
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2
|
9 |
|
220 |
|
221 |
== Changelog ==
|
222 |
|
223 |
+
= 7.0.05 - 2017-03-01 - Low priority =
|
224 |
+
* Fixed broken links in the plugins page
|
225 |
+
|
226 |
+
= 7.0.04 - 2017-02-15 - Medium priority =
|
227 |
+
* Fixed a bug that caused messages to be returned encoded after refreshing the page
|
228 |
+
* Fixed a bug that caused the incorrect agent name to be used in the chat window
|
229 |
+
* Fixed a bug that caused the 'No Answer' text to not save and show in the chat window
|
230 |
+
|
231 |
+
= 7.0.03 - 2017-02-06 - Medium priority =
|
232 |
* Fixed a bug that caused the name of the agent to disappear after refreshing the page
|
233 |
* Fixed a bug that caused the agent name to display twice in the chat window
|
234 |
|
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.0.
|
7 |
Author: WP-LiveChat
|
8 |
Author URI: http://www.wp-livechat.com
|
9 |
Text Domain: wplivechat
|
@@ -11,7 +11,16 @@
|
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
-
* 7.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
* Fixed a bug that caused the name of the agent to disappear after refreshing the page
|
16 |
* Fixed a bug that caused the agent name to display twice in the chat window
|
17 |
*
|
@@ -477,7 +486,7 @@ global $wplc_tblname_offline_msgs;
|
|
477 |
$wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
|
478 |
$wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
|
479 |
$wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
|
480 |
-
$wplc_version = "7.0.
|
481 |
|
482 |
define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
|
483 |
define('WPLC_BASIC_PLUGIN_URL', plugins_url() . "/wp-live-chat-support/");
|
@@ -1097,7 +1106,31 @@ function wplc_push_js_to_front_basic() {
|
|
1097 |
|
1098 |
wp_localize_script('wplc-user-script', 'wplc_offline_msg', stripslashes($wplc_settings['wplc_pro_offline2']));
|
1099 |
wp_localize_script('wplc-user-script', 'wplc_offline_msg3',stripslashes($wplc_settings['wplc_pro_offline3']));
|
1100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1101 |
|
1102 |
if(isset($wplc_settings['wplc_elem_trigger_id']) && trim($wplc_settings['wplc_elem_trigger_id']) !== "") {
|
1103 |
if(isset($wplc_settings['wplc_elem_trigger_action'])){
|
@@ -2858,7 +2891,7 @@ function wplc_return_admin_chat_javascript($cid) {
|
|
2858 |
$wplc_user_data = get_user_by( 'id', get_current_user_id() );
|
2859 |
|
2860 |
if( isset($wplc_settings['wplc_show_name']) && $wplc_settings['wplc_show_name'] == '1' ){
|
2861 |
-
$wplc_show_name =
|
2862 |
} else {
|
2863 |
$wplc_show_name = false;
|
2864 |
}
|
@@ -2897,6 +2930,7 @@ function wplc_return_admin_chat_javascript($cid) {
|
|
2897 |
}
|
2898 |
$admin_pic = $image;
|
2899 |
wp_localize_script('wplc-admin-chat-js', 'wplc_localized_string_is_typing', __("is typing...","wplivechat"));
|
|
|
2900 |
wp_localize_script('wplc-admin-chat-js', 'wplc_ajax_nonce', $ajax_nonce);
|
2901 |
wp_localize_script('wplc-admin-chat-js', 'admin_pic', $admin_pic);
|
2902 |
$wplc_ding_file = plugins_url('/ding.mp3', __FILE__);
|
@@ -3722,6 +3756,8 @@ function wplc_head_basic() {
|
|
3722 |
if( isset( $_POST['wplc_show_avatar'] ) ){ $wplc_data['wplc_show_avatar'] = '1'; } else { $wplc_data['wplc_show_avatar'] = '0'; }
|
3723 |
$wplc_data = apply_filters("wplc_settings_save_filter_hook", $wplc_data);
|
3724 |
|
|
|
|
|
3725 |
update_option('WPLC_SETTINGS', $wplc_data);
|
3726 |
if (isset($_POST['wplc_hide_chat'])) {
|
3727 |
update_option("WPLC_HIDE_CHAT", true);
|
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.0.05
|
7 |
Author: WP-LiveChat
|
8 |
Author URI: http://www.wp-livechat.com
|
9 |
Text Domain: wplivechat
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
+
* 7.0.05 - 2017-03-01 - Low priority
|
15 |
+
* Fixed broken links on the plugins page
|
16 |
+
*
|
17 |
+
* 7.0.04 - 2017-02-15 - Medium priority
|
18 |
+
* Fixed a bug that caused messages to be returned encoded after refreshing the page
|
19 |
+
* Fixed a bug that caused the incorrect agent name to be used in the chat window
|
20 |
+
* Fixed a bug that caused the 'No Answer' text to not save and show in the chat window
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* 7.0.03 - 2017-02-06 - Medium priority
|
24 |
* Fixed a bug that caused the name of the agent to disappear after refreshing the page
|
25 |
* Fixed a bug that caused the agent name to display twice in the chat window
|
26 |
*
|
486 |
$wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
|
487 |
$wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
|
488 |
$wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
|
489 |
+
$wplc_version = "7.0.05";
|
490 |
|
491 |
define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
|
492 |
define('WPLC_BASIC_PLUGIN_URL', plugins_url() . "/wp-live-chat-support/");
|
1106 |
|
1107 |
wp_localize_script('wplc-user-script', 'wplc_offline_msg', stripslashes($wplc_settings['wplc_pro_offline2']));
|
1108 |
wp_localize_script('wplc-user-script', 'wplc_offline_msg3',stripslashes($wplc_settings['wplc_pro_offline3']));
|
1109 |
+
|
1110 |
+
$wplc_acbc_data = get_option("WPLC_ACBC_SETTINGS");
|
1111 |
+
|
1112 |
+
if( isset( $wplc_acbc_data['wplc_use_wp_name'] ) && $wplc_acbc_data['wplc_use_wp_name'] == '1' ){
|
1113 |
+
|
1114 |
+
if( isset( $_COOKIE['wplc_cid'] ) ){
|
1115 |
+
$chat_data = wplc_get_chat_data( $_COOKIE['wplc_cid'] );
|
1116 |
+
|
1117 |
+
$user_info = get_userdata( intval( $chat_data->agent_id ) );
|
1118 |
+
|
1119 |
+
$agent = $user_info->display_name;
|
1120 |
+
|
1121 |
+
} else {
|
1122 |
+
$agent = 'agent';
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
} else {
|
1126 |
+
if (!empty($wplc_acbc_data['wplc_chat_name'])) {
|
1127 |
+
$agent = $wplc_acbc_data['wplc_chat_name'];
|
1128 |
+
} else {
|
1129 |
+
$agent = 'agent';
|
1130 |
+
}
|
1131 |
+
}
|
1132 |
+
wp_localize_script('wplc-user-script', 'wplc_localized_string_is_typing', $agent . __(" is typing...","wplivechat"));
|
1133 |
+
|
1134 |
|
1135 |
if(isset($wplc_settings['wplc_elem_trigger_id']) && trim($wplc_settings['wplc_elem_trigger_id']) !== "") {
|
1136 |
if(isset($wplc_settings['wplc_elem_trigger_action'])){
|
2891 |
$wplc_user_data = get_user_by( 'id', get_current_user_id() );
|
2892 |
|
2893 |
if( isset($wplc_settings['wplc_show_name']) && $wplc_settings['wplc_show_name'] == '1' ){
|
2894 |
+
$wplc_show_name = apply_filters( 'wplc_filter_admin_name', 'Admin' );
|
2895 |
} else {
|
2896 |
$wplc_show_name = false;
|
2897 |
}
|
2930 |
}
|
2931 |
$admin_pic = $image;
|
2932 |
wp_localize_script('wplc-admin-chat-js', 'wplc_localized_string_is_typing', __("is typing...","wplivechat"));
|
2933 |
+
wp_localize_script('wplc-user-script', 'wplc_localized_string_admin_name', apply_filters( 'wplc_filter_admin_name', 'Admin' ) );
|
2934 |
wp_localize_script('wplc-admin-chat-js', 'wplc_ajax_nonce', $ajax_nonce);
|
2935 |
wp_localize_script('wplc-admin-chat-js', 'admin_pic', $admin_pic);
|
2936 |
$wplc_ding_file = plugins_url('/ding.mp3', __FILE__);
|
3756 |
if( isset( $_POST['wplc_show_avatar'] ) ){ $wplc_data['wplc_show_avatar'] = '1'; } else { $wplc_data['wplc_show_avatar'] = '0'; }
|
3757 |
$wplc_data = apply_filters("wplc_settings_save_filter_hook", $wplc_data);
|
3758 |
|
3759 |
+
if (isset($_POST['wplc_user_no_answer'])) { $wplc_data["wplc_user_no_answer"] = esc_attr($_POST['wplc_user_no_answer']); } else { $wplc_data["wplc_user_no_answer"] = __("There is No Answer. Please Try Again Later.", "wplivechat"); }
|
3760 |
+
|
3761 |
update_option('WPLC_SETTINGS', $wplc_data);
|
3762 |
if (isset($_POST['wplc_hide_chat'])) {
|
3763 |
update_option("WPLC_HIDE_CHAT", true);
|