WP Live Chat Support - Version 8.0.26

Version Description

It is highly recommended that you upgrade to WP Live Chat Support version 8.0.26 for performance reasons.

Download this release

Release Info

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

Code changes from version 8.0.25 to 8.0.26

config.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ define( 'WLPC_UPDATE_SERVER', 'https://update.wp-livechat.com' );
3
+ ?>
css/font-awesome.min.css CHANGED
File without changes
css/node_history_styles.css CHANGED
File without changes
css/remote_dash_styles.css CHANGED
File without changes
fonts/FontAwesome.otf CHANGED
File without changes
fonts/fontawesome-webfont.eot CHANGED
File without changes
fonts/fontawesome-webfont.svg CHANGED
File without changes
fonts/fontawesome-webfont.ttf CHANGED
File without changes
fonts/fontawesome-webfont.woff CHANGED
File without changes
images/48px.png CHANGED
File without changes
images/48px_n.png CHANGED
File without changes
includes/blocks/wplc-chat-box/block.js CHANGED
@@ -11,7 +11,7 @@
11
  return this.replace(/\\(.)/mg, "$1");
12
  }
13
 
14
- var wplc_logo = ( wplc_settings.wplc_logo ) ? wplc_settings.wplc_logo : 'https://update.wp-livechat.com/remote_files/assets/images/wplc_loading.png';
15
  var wplc_text = ( wplc_settings.wplc_text ) ? wplc_settings.wplc_text : 'Live Chat';
16
  var wplc_icon = ( wplc_settings.wplc_icon ) ? wplc_settings.wplc_icon : 'fa-commenting-o';
17
  var classes = ( wplc_settings.wplc_enabled == 0 ) ? ' disabled' : '';
11
  return this.replace(/\\(.)/mg, "$1");
12
  }
13
 
14
+ var wplc_logo = ( wplc_settings.wplc_logo ) ? wplc_settings.wplc_logo : wplc_api_server + '/remote_files/assets/images/wplc_loading.png';
15
  var wplc_text = ( wplc_settings.wplc_text ) ? wplc_settings.wplc_text : 'Live Chat';
16
  var wplc_icon = ( wplc_settings.wplc_icon ) ? wplc_settings.wplc_icon : 'fa-commenting-o';
17
  var classes = ( wplc_settings.wplc_enabled == 0 ) ? ' disabled' : '';
includes/blocks/wplc-chat-box/index.php CHANGED
@@ -29,7 +29,7 @@ function wplc_gutenberg_settings_content() {
29
  $gutenberg_enable = ( $gutenberg_settings['wplc_gutenberg_enable'] !== null ) ? $gutenberg_settings['wplc_gutenberg_enable'] : 1;
30
  $checked = ( @$gutenberg_enable == 1 ? 'checked' : '' );
31
  $gutenberg_size = ( $gutenberg_settings['wplc_gutenberg_size'] ) ? $gutenberg_settings['wplc_gutenberg_size'] : 2;
32
- $gutenberg_defail_logo = 'https://update.wp-livechat.com/remote_files/assets/images/wplc_loading.png';
33
  $gutenberg_logo = ( $gutenberg_settings['wplc_gutenberg_logo'] == '' ) ? $gutenberg_defail_logo : $gutenberg_settings['wplc_gutenberg_logo'];
34
  $gutenberg_text = ( $gutenberg_settings['wplc_gutenberg_text'] ) ? $gutenberg_settings['wplc_gutenberg_text'] : 'Live Chat';
35
  $gutenberg_icon = ( $gutenberg_settings['wplc_gutenberg_icon'] ) ? $gutenberg_settings['wplc_gutenberg_icon'] : 'fa-commenting-o';
@@ -152,7 +152,7 @@ function wplc_gutenberg_save_settings() {
152
  if (isset($_POST['wplc_gutenberg_logo']) && $_POST['wplc_gutenberg_logo'] !== '0') {
153
  $wplc_gutenberg_data['wplc_gutenberg_logo'] = esc_attr($_POST['wplc_gutenberg_logo']);
154
  } else {
155
- $wplc_gutenberg_data['wplc_gutenberg_logo'] = 'https://update.wp-livechat.com/remote_files/assets/images/wplc_loading.png';
156
  }
157
 
158
  if (isset($_POST['wplc_gutenberg_size']) && $_POST['wplc_gutenberg_size'] !== '0') {
29
  $gutenberg_enable = ( $gutenberg_settings['wplc_gutenberg_enable'] !== null ) ? $gutenberg_settings['wplc_gutenberg_enable'] : 1;
30
  $checked = ( @$gutenberg_enable == 1 ? 'checked' : '' );
31
  $gutenberg_size = ( $gutenberg_settings['wplc_gutenberg_size'] ) ? $gutenberg_settings['wplc_gutenberg_size'] : 2;
32
+ $gutenberg_defail_logo = WLPC_UPDATE_SERVER.'/remote_files/assets/images/wplc_loading.png';
33
  $gutenberg_logo = ( $gutenberg_settings['wplc_gutenberg_logo'] == '' ) ? $gutenberg_defail_logo : $gutenberg_settings['wplc_gutenberg_logo'];
34
  $gutenberg_text = ( $gutenberg_settings['wplc_gutenberg_text'] ) ? $gutenberg_settings['wplc_gutenberg_text'] : 'Live Chat';
35
  $gutenberg_icon = ( $gutenberg_settings['wplc_gutenberg_icon'] ) ? $gutenberg_settings['wplc_gutenberg_icon'] : 'fa-commenting-o';
152
  if (isset($_POST['wplc_gutenberg_logo']) && $_POST['wplc_gutenberg_logo'] !== '0') {
153
  $wplc_gutenberg_data['wplc_gutenberg_logo'] = esc_attr($_POST['wplc_gutenberg_logo']);
154
  } else {
155
+ $wplc_gutenberg_data['wplc_gutenberg_logo'] = WLPC_UPDATE_SERVER.'/remote_files/assets/images/wplc_loading.png';
156
  }
157
 
158
  if (isset($_POST['wplc_gutenberg_size']) && $_POST['wplc_gutenberg_size'] !== '0') {
includes/dashboard_page.php CHANGED
@@ -83,7 +83,7 @@
83
 
84
 
85
  <div class="resp-container">
86
- <iframe onload="resizeIframe(this)" id="idIframe" class="resp-iframe" width="100%" height="1300" src="https://update.wp-livechat.com/remote_files/external-dashboard.php"></iframe>
87
  </div>
88
 
89
  </div>
83
 
84
 
85
  <div class="resp-container">
86
+ <iframe style="overflow:hidden" scrolling="no" onload="resizeIframe(this)" id="idIframe" class="resp-iframe" width="100%" height="600" src="<?php echo WLPC_UPDATE_SERVER;?>/remote_files/external-dashboard.php"></iframe>
87
  </div>
88
 
89
  </div>
includes/notification_control.php CHANGED
@@ -3,15 +3,12 @@
3
 
4
 
5
  function wplc_record_chat_notification($type,$cid,$data) {
6
- if ($cid) {
7
- do_action("wplc_hook_chat_notification",$type,$cid,$data);
8
- }
9
- return true;
10
-
11
-
12
  }
13
 
14
-
15
  add_action("wplc_hook_chat_notification","wplc_filter_control_chat_notification_user_loaded",10,3);
16
  function wplc_filter_control_chat_notification_user_loaded($type,$cid,$data) {
17
  if ($type == "user_loaded") {
3
 
4
 
5
  function wplc_record_chat_notification($type,$cid,$data) {
6
+ if ($cid) {
7
+ do_action("wplc_hook_chat_notification",$type,$cid,$data);
8
+ }
9
+ return true;
 
 
10
  }
11
 
 
12
  add_action("wplc_hook_chat_notification","wplc_filter_control_chat_notification_user_loaded",10,3);
13
  function wplc_filter_control_chat_notification_user_loaded($type,$cid,$data) {
14
  if ($type == "user_loaded") {
includes/settings_page.php CHANGED
@@ -272,7 +272,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
272
  <small>
273
  <i>
274
  <?php _e("available in the","wplivechat")?>
275
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=include_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
276
  <?php _e("only","wplivechat")?>
277
  </i>
278
  </small>
@@ -287,7 +287,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
287
  <small>
288
  <i>
289
  <?php _e("available in the","wplivechat")?>
290
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=exclude_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
291
  <?php _e("only","wplivechat")?>
292
  </i>
293
  </small>
@@ -303,7 +303,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
303
  <small>
304
  <i>
305
  <?php _e("available in the","wplivechat")?>
306
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=exclude_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
307
  <?php _e("only","wplivechat")?>
308
  </i>
309
  </small>
@@ -352,7 +352,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
352
  <small>
353
  <i>
354
  <?php _e("available in the","wplivechat")?>
355
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=typing" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
356
  <?php _e("only","wplivechat")?>
357
  </i>
358
  </small>
@@ -369,7 +369,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
369
  <small>
370
  <i>
371
  <?php _e("available in the","wplivechat")?>
372
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=name" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
373
  <?php _e("only","wplivechat")?>
374
  </i>
375
  </small>
@@ -396,7 +396,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
396
  <small>
397
  <i>
398
  <?php _e("available in the","wplivechat")?>
399
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
400
  <?php _e("only","wplivechat")?>
401
  </i>
402
  </small>
@@ -412,7 +412,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
412
  <small>
413
  <i>
414
  <?php _e("available in the","wplivechat")?>
415
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
416
  <?php _e("only","wplivechat")?>
417
  </i>
418
  </small>
@@ -428,7 +428,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
428
  <small>
429
  <i>
430
  <?php _e("available in the","wplivechat")?>
431
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
432
  <?php _e("only","wplivechat")?>
433
  </i>
434
  </small>
@@ -444,7 +444,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
444
  <small>
445
  <i>
446
  <?php _e("available in the","wplivechat")?>
447
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=delay" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
448
  <?php _e("only","wplivechat")?>
449
  </i>
450
  </small>
@@ -461,7 +461,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
461
  <small>
462
  <i>
463
  <?php _e("available in the", "wplivechat") ?>
464
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=alert" title="<?php _e("Pro Add-on", "wplivechat") ?>" target="_BLANK"><?php _e("Pro Add-on", "wplivechat") ?></a>
465
  <?php _e("only", "wplivechat") ?>
466
  </i>
467
  </small>
@@ -558,7 +558,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
558
  <small>
559
  <i>
560
  <?php _e("available in the","wplivechat")?>
561
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=social_media" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
562
  <?php _e("only","wplivechat")?>
563
  </i>
564
  </small>
@@ -571,7 +571,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
571
  <small>
572
  <i>
573
  <?php _e("available in the","wplivechat")?>
574
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=social_media" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
575
  <?php _e("only","wplivechat")?>
576
  </i>
577
  </small>
@@ -933,7 +933,7 @@ if (isset($wplc_settings['wplc_hide_when_offline']) && $wplc_settings['wplc_hide
933
  <td width="200" valign="top"><?php _e("I'm using a localization plugin", "wplivechat") ?></td>
934
  <td>
935
  <input type="checkbox" name="wplc_using_localization_plugin" id="wplc_using_localization_plugin" value="1" <?php if (isset($wplc_settings['wplc_using_localization_plugin']) && $wplc_settings['wplc_using_localization_plugin'] == 1) { echo 'checked'; } ?>/>
936
- <br/><small><?php echo sprintf( __("Enable this if you are using a localization plugin. Should you wish to change the below strings with this option enabled, please visit the documentation %s", "wplivechat"), "<a href='https://wp-livechat.com/documentation/changing-strings-in-the-chat-window-when-using-a-localization-plugin/' target='_BLANK'>".__("here", "wplivechat") ); ?></small>
937
  </td>
938
  </tr>
939
 
272
  <small>
273
  <i>
274
  <?php _e("available in the","wplivechat")?>
275
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=include_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
276
  <?php _e("only","wplivechat")?>
277
  </i>
278
  </small>
287
  <small>
288
  <i>
289
  <?php _e("available in the","wplivechat")?>
290
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=exclude_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
291
  <?php _e("only","wplivechat")?>
292
  </i>
293
  </small>
303
  <small>
304
  <i>
305
  <?php _e("available in the","wplivechat")?>
306
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=exclude_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
307
  <?php _e("only","wplivechat")?>
308
  </i>
309
  </small>
352
  <small>
353
  <i>
354
  <?php _e("available in the","wplivechat")?>
355
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=typing" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
356
  <?php _e("only","wplivechat")?>
357
  </i>
358
  </small>
369
  <small>
370
  <i>
371
  <?php _e("available in the","wplivechat")?>
372
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=name" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
373
  <?php _e("only","wplivechat")?>
374
  </i>
375
  </small>
396
  <small>
397
  <i>
398
  <?php _e("available in the","wplivechat")?>
399
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
400
  <?php _e("only","wplivechat")?>
401
  </i>
402
  </small>
412
  <small>
413
  <i>
414
  <?php _e("available in the","wplivechat")?>
415
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
416
  <?php _e("only","wplivechat")?>
417
  </i>
418
  </small>
428
  <small>
429
  <i>
430
  <?php _e("available in the","wplivechat")?>
431
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
432
  <?php _e("only","wplivechat")?>
433
  </i>
434
  </small>
444
  <small>
445
  <i>
446
  <?php _e("available in the","wplivechat")?>
447
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=delay" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
448
  <?php _e("only","wplivechat")?>
449
  </i>
450
  </small>
461
  <small>
462
  <i>
463
  <?php _e("available in the", "wplivechat") ?>
464
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=alert" title="<?php _e("Pro Add-on", "wplivechat") ?>" target="_BLANK"><?php _e("Pro Add-on", "wplivechat") ?></a>
465
  <?php _e("only", "wplivechat") ?>
466
  </i>
467
  </small>
558
  <small>
559
  <i>
560
  <?php _e("available in the","wplivechat")?>
561
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=social_media" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
562
  <?php _e("only","wplivechat")?>
563
  </i>
564
  </small>
571
  <small>
572
  <i>
573
  <?php _e("available in the","wplivechat")?>
574
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=social_media" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
575
  <?php _e("only","wplivechat")?>
576
  </i>
577
  </small>
933
  <td width="200" valign="top"><?php _e("I'm using a localization plugin", "wplivechat") ?></td>
934
  <td>
935
  <input type="checkbox" name="wplc_using_localization_plugin" id="wplc_using_localization_plugin" value="1" <?php if (isset($wplc_settings['wplc_using_localization_plugin']) && $wplc_settings['wplc_using_localization_plugin'] == 1) { echo 'checked'; } ?>/>
936
+ <br/><small><?php echo sprintf( __("Enable this if you are using a localization plugin. Should you wish to change the below strings with this option enabled, please visit the documentation %s", "wplivechat"), "<a href='https://wp-livechat.com/docs/features/quickview/plugin-features/localization/' target='_BLANK'>".__("here", "wplivechat") ); ?></small>
937
  </td>
938
  </tr>
939
 
includes/surveys.php CHANGED
@@ -352,7 +352,6 @@ function wplc_admin_survey_layout() {
352
  echo "<p>".__("To view your responses, click the button below and log in to your NimbleSquirrel account.","wplivechat")."</p>";
353
  echo "<a href='http://app.nimblesquirrel.com/?utm_source=wplc&utm_medium=click&utm_campaign=view_responses' target='_BLANK' class='button button-primary'>View your responses</a>";
354
  echo "<p>&nbsp;</p>";
355
- echo "<p>".__("Need help? <a href='https://wp-livechat.com/contact-us/' target='_BLANK'>Contact us</a> and we'll get back to you as soon as possible!","wplivechat")."</p>";
356
  echo "";
357
  echo "";
358
  echo "";
352
  echo "<p>".__("To view your responses, click the button below and log in to your NimbleSquirrel account.","wplivechat")."</p>";
353
  echo "<a href='http://app.nimblesquirrel.com/?utm_source=wplc&utm_medium=click&utm_campaign=view_responses' target='_BLANK' class='button button-primary'>View your responses</a>";
354
  echo "<p>&nbsp;</p>";
 
355
  echo "";
356
  echo "";
357
  echo "";
includes/update_control.class.php CHANGED
@@ -48,9 +48,8 @@ final class wplc_update_control {
48
 
49
  public function activate() {
50
  $this->wplc_extension_string = $this->wplc_title;
51
- $this->wplc_api_url = 'https://update.wp-livechat.com/auth_api/api-control/';
52
 
53
-
54
  add_filter('pre_set_site_transient_update_plugins', array( $this, 'wplc_check_for_plugin_update' ));
55
  add_filter('plugins_api', array( $this, 'wplc_plugin_api_call' ), 10, 3);
56
  add_filter("wplc_filter_api_page",array( $this, "wplc_filter_control_api_page" ),10,1);
48
 
49
  public function activate() {
50
  $this->wplc_extension_string = $this->wplc_title;
51
+ $this->wplc_api_url = WLPC_UPDATE_SERVER.'/auth_api/api-control/';
52
 
 
53
  add_filter('pre_set_site_transient_update_plugins', array( $this, 'wplc_check_for_plugin_update' ));
54
  add_filter('plugins_api', array( $this, 'wplc_plugin_api_call' ), 10, 3);
55
  add_filter("wplc_filter_api_page",array( $this, "wplc_filter_control_api_page" ),10,1);
includes/welcome_page.php CHANGED
@@ -139,11 +139,6 @@
139
  </div>
140
  <div class='col'>
141
  <h4><?php _e("Help me!","wplivechat"); ?></h4>
142
- <p><?php _e("Visit our","wplivechat"); ?> <a title='Support Desk' target='_blank' href='https://wp-livechat.com/contact-us/'><?php _e("Support Desk","wplivechat"); ?></a> <?php _e("for quick and friendly help. We'll answer your request within 24hours.","wplivechat"); ?></p>
143
- </div>
144
- <div class='col'>
145
- <h4><?php _e("Feedback","wp-google-maps"); ?></h4>
146
- <p><?php _e("We need you to help us make this plugin better.","wplivechat"); ?> <a href='https://wp-livechat.com/contact-us/' title='Feedback' target='_BLANK'><?php _e("Send us your feedback","wplivechat"); ?></a> <?php _e("and we'll act on it as soon as humanly possible.","wplivechat"); ?></p>
147
  </div>
148
  </div>
149
 
139
  </div>
140
  <div class='col'>
141
  <h4><?php _e("Help me!","wplivechat"); ?></h4>
 
 
 
 
 
142
  </div>
143
  </div>
144
 
js/wplc_config.js.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ include('../config.php');
3
+ header('Content-Type: text/javascript');
4
+ ?>
5
+ var wplc_api_server = '<?php echo WLPC_UPDATE_SERVER; ?>';
js/wplc_dashboard.js CHANGED
@@ -1,18 +1,12 @@
1
  var wplcApiUrls = {
2
  blogFeedUrl: 'https://wp-livechat.com/wp-json/wp/v2/posts',
3
- statusPageComponentsURL: 'https://bleeper.statuspage.io/api/v2/components.json',
4
- statusPageIncidentsURL: 'https://bleeper.statuspage.io/api/v2/incidents.json',
5
- visitorURL: 'https://bleeper-eu-1.eu-4.evennode.com/api/v1/total-visitors-online?api_key='+nifty_api_key
6
  }
7
 
8
  function getTotalVisitors() {
9
  jQuery.getJSON( wplcApiUrls.visitorURL, function( data ) {
10
-
11
-
12
-
13
  jQuery('#totalVisitors').html( data );
14
  });
15
-
16
  }
17
 
18
  function getBlogPosts() {
@@ -42,50 +36,7 @@ function getBlogPosts() {
42
  });
43
  }
44
 
45
- function getStatusComponents() {
46
- jQuery.getJSON( wplcApiUrls.statusPageComponentsURL, function( data ) {
47
-
48
- let output = '';
49
-
50
- if(typeof data.components !== 'undefined'){
51
- for(let i in data.components){
52
- const component = data.components[i];
53
- const html = `<div class='wplc_module'>${component.name}: <strong class='wplc_module_value'>${component.status}</strong></div>`;
54
- output += html;
55
- }
56
- }
57
-
58
- jQuery('#wplc_status_modules').html( output );
59
- });
60
- }
61
-
62
-
63
- function getStatusIncidents() {
64
- jQuery.getJSON( wplcApiUrls.statusPageIncidentsURL, function( data ) {
65
-
66
- let output = '';
67
-
68
- if(typeof data.incidents !== 'undefined'){
69
- for(let i in data.incidents){
70
- const incident = data.incidents[i];
71
-
72
- const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
73
- const date = new Date(incident.created_at);
74
-
75
- const last_report = typeof incident.incident_updates !== 'undefined' && typeof incident.incident_updates[0] !== 'undefined' && incident.incident_updates[0].body !== 'undefined' ? incident.incident_updates[0].body : incident.name;
76
-
77
- const html = `<div class='wplc_incident'>${date.getDate()} ${months[date.getMonth()]} ${date.getFullYear()}: <strong class='wplc_incident_value'>${incident.status}</strong><div class='wplc_incident_info'>${last_report}</div></div>`;
78
- output += html;
79
- }
80
- }
81
-
82
- jQuery('#wplc_status_incidents').html( output );
83
- });
84
- }
85
-
86
  jQuery(document).ready(function($){
87
  getBlogPosts();
88
- getStatusComponents();
89
- getStatusIncidents();
90
  getTotalVisitors();
91
  });
1
  var wplcApiUrls = {
2
  blogFeedUrl: 'https://wp-livechat.com/wp-json/wp/v2/posts',
3
+ visitorURL: wplc_get_random_server() + '/api/v1/total-visitors-online?api_key='+nifty_api_key
 
 
4
  }
5
 
6
  function getTotalVisitors() {
7
  jQuery.getJSON( wplcApiUrls.visitorURL, function( data ) {
 
 
 
8
  jQuery('#totalVisitors').html( data );
9
  });
 
10
  }
11
 
12
  function getBlogPosts() {
36
  });
37
  }
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  jQuery(document).ready(function($){
40
  getBlogPosts();
 
 
41
  getTotalVisitors();
42
  });
js/wplc_heartbeat.js CHANGED
File without changes
js/wplc_server.js CHANGED
@@ -132,129 +132,6 @@ function WPLCServer(){
132
  }
133
 
134
  WPLCServer.Socket = {
135
- /*
136
- init : function(callback, messageHandler, failOver, restartHandler, clientEventLog){
137
- wplc_node_message_receiver = (typeof messageHandler !== "undefined" && typeof messageHandler === "function") ? messageHandler : false;
138
- wplc_node_message_restart_handler = (typeof restartHandler !== "undefined" && typeof restartHandler === "function") ? restartHandler : false;
139
- wplc_node_client_event_logger = (typeof clientEventLog !== "undefined" && typeof clientEventLog === "function") ? clientEventLog : false;
140
-
141
- wplc_server_log("Socket Init");
142
- //wplc_node_socket = new WebSocket('wss://wp-livechat.us-2.evennode.com');
143
-
144
-
145
- if(wplc_node_async_cookie_check_complete !== true){
146
- //Check if there are any messages we forgot to send via async
147
- if(typeof Cookies !== "undefined" && typeof Cookies === "function"){
148
- var wplc_node_async_cookie_data = Cookies.getJSON("wplc_server_async_storage");
149
- if(typeof wplc_node_async_cookie_data !== "undefined" && wplc_node_async_cookie_data !== "undefined" && wplc_node_async_cookie_data !== undefined && wplc_node_async_cookie_data !== null){
150
- wplc_server_log("Async Cookies Found -> Sync...");
151
- wplc_node_parse_async_from_object(wplc_node_async_cookie_data, function(){
152
- wplc_node_async_cookie_check_complete = true;
153
- });
154
- }
155
- }
156
- }
157
-
158
- wplc_node_socket.onerror = function(event){
159
- wplc_server_error("Could not connect to server. Changing transport method.");
160
- if(typeof failOver === "function" && wplc_node_sockets_ready !== true){
161
- failOver();
162
- wplc_node_switch_ajax_complete = true;
163
- if(typeof wplc_node_client_event_logger !== "undefined" && typeof wplc_node_client_event_logger === "function"){
164
- wplc_node_client_event_logger("Connection Error - Switching methods");
165
- }
166
- }
167
- }
168
-
169
- wplc_node_socket.onopen = function(event) {
170
- wplc_server_log("This socket is open");
171
- wplc_node_sockets_ready = true; //Sockets are available and ready for use
172
- if(typeof callback === "function"){
173
- callback();
174
- }
175
- }
176
-
177
- wplc_node_socket.onmessage = function(event){
178
- if(typeof wplc_node_message_receiver === "function" && wplc_node_message_receiver !== false && wplc_node_message_receiver !== null){
179
- //Delegate to handler
180
- if(wplc_node_port_open){
181
- wplc_node_message_receiver(event.data);
182
- wplc_node_global_message_receiver(event.data);
183
- }
184
- }
185
-
186
- }
187
-
188
- wplc_node_socket.onclose = function(event) {
189
- wplc_server_log("This socket is closed");
190
- if (typeof wplc_node_message_restart_handler === "function") {
191
- if (wplc_node_retry_count < 5 && wplc_node_switch_ajax_complete !== true) {
192
- setTimeout(function(){
193
- wplc_node_message_restart_handler(event.data);
194
- wplc_node_retry_count++;
195
- if(typeof wplc_node_client_event_logger !== "undefined" && typeof wplc_node_client_event_logger === "function"){
196
- wplc_node_client_event_logger("Connection Error - Retrying in 5 seconds...");
197
- }
198
- }, 5000);
199
- } else {
200
- if(wplc_node_retry_count >= 5){
201
- if(typeof wplc_node_client_event_logger !== "undefined" && typeof wplc_node_client_event_logger === "function"){
202
- wplc_node_client_event_logger("Connection Error - Please refresh your browser");
203
- }
204
- }
205
- }
206
- }
207
- }
208
-
209
-
210
- },
211
- send : function (wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback){
212
- wplc_origin_url = wplc_send_url.replace("/wp-admin/admin-ajax.php", "");
213
- wplc_send_data.origin_url = wplc_origin_url;
214
- wplc_socket_send(wplc_send_data, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback);
215
-
216
- if(wplc_node_async_cookie_check_complete){
217
- //Now lets update the sync quick
218
- wplc_socket_async_storage_handler(wplc_send_url, wplc_send_data, wplc_send_timeout);
219
- wplc_node_async_cookie_check_complete = false; //Stop infinite loop
220
- }
221
- },
222
- isInSocketMode : function (){
223
- return wplc_node_sockets_ready;
224
- },
225
- isPreparingSocketMode : function(){
226
- var preparing = false;
227
- if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
228
- if(window.WebSocket){
229
- preparing = true;
230
- }
231
- }
232
-
233
- return preparing;
234
- },
235
- transportPrepared : function(){
236
- return wplc_transport_prepared;
237
- },
238
- asyncStorage : function(wplc_send_url, wplc_send_data, wplc_send_timeout){
239
- wplc_node_async_array.push(wplc_send_data.msg);
240
-
241
- if(typeof Cookies !== "undefined" && typeof Cookies === "function"){
242
- Cookies.set('wplc_server_async_storage', JSON.stringify(wplc_node_async_array), { expires: 1, path: '/' });
243
- }
244
-
245
- if(wplc_node_async_array.length >= wplc_node_async_send_rate){
246
- wplc_socket_async_storage_handler(wplc_send_url, wplc_send_data, wplc_send_timeout);
247
- }
248
- },
249
- forceClosePort : function(){
250
- wplc_node_port_open = false;
251
- },
252
- sendMessage : function(wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback){
253
- wplc_origin_url = wplc_send_url.replace("/wp-admin/admin-ajax.php", "");
254
- wplc_send_data.origin_url = wplc_origin_url;
255
- wplc_socket_add_to_queue(wplc_send_data, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback);
256
- } */
257
-
258
  };
259
 
260
  WPLCServer.Ajax = {
132
  }
133
 
134
  WPLCServer.Socket = {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  };
136
 
137
  WPLCServer.Ajax = {
js/wplc_u.js CHANGED
@@ -183,15 +183,18 @@ jQuery(function() {
183
 
184
  if(wplc_server.browserIsSocketReady()){
185
  data.socket = true;
186
-
187
- /* load node relay code */
188
  var nc = document.createElement("script");
189
  nc.type = "text/javascript";
190
  nc.async = true;
191
- nc.src = "https://update.wp-livechat.com/remote_files/assets/js/wplc_node.js";
192
-
 
 
 
 
 
193
  document.getElementsByTagName("head")[0].appendChild(nc);
194
-
195
  }
196
 
197
  initial_data = data;
183
 
184
  if(wplc_server.browserIsSocketReady()){
185
  data.socket = true;
186
+ /* load node relay common code */
 
187
  var nc = document.createElement("script");
188
  nc.type = "text/javascript";
189
  nc.async = true;
190
+ nc.src = wplc_api_server + "/remote_files/assets/js/wplc_common_node.js";
191
+ document.getElementsByTagName("head")[0].appendChild(nc);
192
+ /* load node relay code */
193
+ nc = document.createElement("script");
194
+ nc.type = "text/javascript";
195
+ nc.async = true;
196
+ nc.src = wplc_api_server + "/remote_files/assets/js/wplc_node.js";
197
  document.getElementsByTagName("head")[0].appendChild(nc);
 
198
  }
199
 
200
  initial_data = data;
js/wplc_u_admin_events.js CHANGED
@@ -35,26 +35,21 @@ jQuery(function(){
35
  jQuery(response).insertAfter("#bleeper_content_wrapper");
36
 
37
  /* find closest server */
38
- bleeper_ping_servers(function(lowest_ping_index) {
39
-
40
- if(typeof wplc_end_point_override !== "undefined"){
41
- /* use the override if we have set it */
42
- node_uri = wplc_end_point_override; //Override
43
- } else {
44
- if (typeof bleeper_server_location !== "undefined") {
45
- // use this as the user selected the server in the settings
46
- node_uri = bleeper_server_list[parseInt(bleeper_server_location)];
47
- } else {
48
- // use the fastest server instead
49
- node_uri = bleeper_server_list[lowest_ping_index];
50
- }
51
- }
52
- if (window.console) { console.log("[WPLC] Connecting to "+node_uri); }
53
- jQuery.event.trigger({type: "bleeper_dom_ready"});
54
-
55
  });
56
 
57
-
58
  if ( typeof bleeper_in_dashboard !== "undefined" && bleeper_in_dashboard === "0") {
59
 
60
  jQuery(".nifty_top_wrapper").hide();
@@ -86,7 +81,6 @@ jQuery(document).on("click", "#toolbar-item-open-bleeper", function() {
86
  }
87
  });
88
 
89
-
90
  jQuery(document).on("bleeper_connect", function(e) {
91
  if(typeof wplc_disabled !== "undefined" && wplc_disabled === "true"){
92
  var wplc_disabled_content = (typeof wplc_disabled_html !== "undefined" ? wplc_disabled_html : "Chat has been disabled in the settings area.");
@@ -109,6 +103,7 @@ jQuery(document).on("bleeper_connect", function(e) {
109
  }
110
  }
111
  });
 
112
  jQuery(document).on("bleeper_limited", function(e){
113
  if(typeof e.ndata !== "undefined" && e.ndata.limited !== "undefined"){
114
  var is_limited = e.ndata.limited;
@@ -119,6 +114,7 @@ jQuery(document).on("bleeper_limited", function(e){
119
  }
120
  }
121
  });
 
122
  jQuery(document).on("bleeper_invalid_agent", function(e){
123
  //disable life
124
  jQuery("#nifty_wrapper").remove();
@@ -384,7 +380,7 @@ jQuery(document).on("bleeper_dom_ready", function(e) {
384
  };
385
 
386
  wplc_rest_api('get_messages', data, 12000, function(message_history) {
387
- if (typeof message_history !== "undefined" && typeof message_history.data !== "undefined" && typeof message_history.data.messages !== "undefined" && typeof message_history.data.messages === "object") {
388
  message_history = message_history.data.messages;
389
  for (var key in message_history) {
390
  var wplc_push_to_chatbox = true;
35
  jQuery(response).insertAfter("#bleeper_content_wrapper");
36
 
37
  /* find closest server */
38
+ if (typeof wplc_end_point_override !== "undefined") {
39
+ if (Array.isArray(wplc_end_point_override)) {
40
+ /* use the override if we have set it */
41
+ node_uri = wplc_end_point_override[0];
42
+ } else {
43
+ node_uri = wplc_end_point_override;
44
+ }
45
+ }
46
+
47
+ wplc_ping_all_servers(wplc_server_list, node_uri, function(best_server_host,best_server_ping){
48
+ node_uri = best_server_host;
49
+ if (window.console) { console.log("[WPLC] Connecting to "+node_uri); }
50
+ jQuery.event.trigger({type: "bleeper_dom_ready"});
 
 
 
 
51
  });
52
 
 
53
  if ( typeof bleeper_in_dashboard !== "undefined" && bleeper_in_dashboard === "0") {
54
 
55
  jQuery(".nifty_top_wrapper").hide();
81
  }
82
  });
83
 
 
84
  jQuery(document).on("bleeper_connect", function(e) {
85
  if(typeof wplc_disabled !== "undefined" && wplc_disabled === "true"){
86
  var wplc_disabled_content = (typeof wplc_disabled_html !== "undefined" ? wplc_disabled_html : "Chat has been disabled in the settings area.");
103
  }
104
  }
105
  });
106
+
107
  jQuery(document).on("bleeper_limited", function(e){
108
  if(typeof e.ndata !== "undefined" && e.ndata.limited !== "undefined"){
109
  var is_limited = e.ndata.limited;
114
  }
115
  }
116
  });
117
+
118
  jQuery(document).on("bleeper_invalid_agent", function(e){
119
  //disable life
120
  jQuery("#nifty_wrapper").remove();
380
  };
381
 
382
  wplc_rest_api('get_messages', data, 12000, function(message_history) {
383
+ if (typeof message_history !== "undefined" && message_history && typeof message_history.data !== "undefined" && typeof message_history.data.messages !== "undefined" && typeof message_history.data.messages === "object") {
384
  message_history = message_history.data.messages;
385
  for (var key in message_history) {
386
  var wplc_push_to_chatbox = true;
js/wplc_u_events.js CHANGED
File without changes
js/wplc_u_node_events.js CHANGED
@@ -88,7 +88,7 @@ jQuery(function() {
88
  wplc_extra_data:wplc_extra_data
89
  };
90
  wplc_rest_api('get_messages', data, 12000, function(message_history) {
91
- if (typeof message_history.data !== "undefined" && typeof message_history.data.messages !== "undefined" && typeof message_history.data.messages === "object") {
92
  message_history = message_history.data.messages;
93
  for (var key in message_history) {
94
  var the_message = message_history[key];
88
  wplc_extra_data:wplc_extra_data
89
  };
90
  wplc_rest_api('get_messages', data, 12000, function(message_history) {
91
+ if (typeof message_history !== "undefined" && message_history && typeof message_history.data !== "undefined" && typeof message_history.data.messages !== "undefined" && typeof message_history.data.messages === "object") {
92
  message_history = message_history.data.messages;
93
  for (var key in message_history) {
94
  var the_message = message_history[key];
modules/beta_features.php CHANGED
@@ -62,24 +62,6 @@ function wplc_beta_settings_tab_content() {
62
  <small><em><?php _e("Disabling this will revert the chat dashboard back to the legacy version.", "wplivechat"); ?></em></small>
63
  </td>
64
  </tr>
65
- <tr>
66
- <td width="250" valign="top">
67
- <label for="wplc_server_location"><?php _e("Server location","wplivechat"); ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e('Select a server location that is near to you.', 'wplivechat'); ?>"></i></label>
68
- </td>
69
- <td valign="top">
70
- <select name='wplc_server_location'>
71
- <?php if($wplc_us_servers_enabled === true || $wplc_us_servers_enabled === 'true') { ?>
72
- <option value='auto' <?php if (isset($wplc_server_location) && $wplc_server_location === "auto") { echo "selected"; } ?>><?php _e("Automatic (suggested)"); ?></option>
73
- <option value='us1' <?php if (isset($wplc_server_location) && $wplc_server_location === "us1") { echo "selected"; } ?>><?php echo sprintf(__("United States - %s","wplivechat"), "#1"); ?></option>
74
- <option value='us2' <?php if (isset($wplc_server_location) && $wplc_server_location === "us2") { echo "selected"; } ?>><?php echo sprintf(__("United States - %s","wplivechat"), "#2"); ?></option>
75
- <?php } ?>
76
-
77
- <option value='eu1' <?php if (isset($wplc_server_location) && $wplc_server_location === "eu1") { echo "selected"; } ?>><?php echo sprintf(__("Europe - %s","wplivechat"), "#1"); ?></option>
78
- <option value='eu2' <?php if (isset($wplc_server_location) && $wplc_server_location === "eu2") { echo "selected"; } ?>><?php echo sprintf(__("Europe - %s","wplivechat"), "#2"); ?></option>
79
- </select>
80
- <?php do_action('wplc_node_server_selection_notices', $wplc_settings); ?>
81
- </td>
82
- </tr>
83
  <tr>
84
  <td width="250" valign="top">
85
  <label for="wplc_use_node_server"><?php _e("Chat server token","wplivechat"); ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e('Security token for accessing chats on the node server. Changing this will remove current chats', 'wplivechat'); ?>"></i></label>
62
  <small><em><?php _e("Disabling this will revert the chat dashboard back to the legacy version.", "wplivechat"); ?></em></small>
63
  </td>
64
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  <tr>
66
  <td width="250" valign="top">
67
  <label for="wplc_use_node_server"><?php _e("Chat server token","wplivechat"); ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e('Security token for accessing chats on the node server. Changing this will remove current chats', 'wplivechat'); ?>"></i></label>
modules/documentation_suggestions.php CHANGED
@@ -33,7 +33,7 @@ function wplc_hook_settings_page_more_doc_suggestions() {
33
  </tr>
34
  <tr>
35
  <td valign="top">
36
- <p class='description'><?php echo sprintf(__("Upgrade to the <a href='%s' taget='_BLANK'>pro version</a> to automatically suggest relevant documentation pages on your own site while users are waiting for the agent to join the chat. As soon as the user sends a message, the system will locate relevant documents on your website and provide links to the user.","wplivechat"),"https://wp-livechat.com/purchase-pro/"); ?></p>
37
  </td>
38
  <td valign="top">
39
 
33
  </tr>
34
  <tr>
35
  <td valign="top">
36
+ <p class='description'><?php echo sprintf(__("Upgrade to the <a href='%s' taget='_BLANK'>pro version</a> to automatically suggest relevant documentation pages on your own site while users are waiting for the agent to join the chat. As soon as the user sends a message, the system will locate relevant documents on your website and provide links to the user.","wplivechat"),"https://wp-livechat.com/features/"); ?></p>
37
  </td>
38
  <td valign="top">
39
 
modules/gdpr.php CHANGED
@@ -66,21 +66,6 @@ function wplc_gdpr_settings_content($wplc_settings = false){
66
  </td>
67
  </tr>
68
 
69
- <tr>
70
- <td width="250" valign="top">
71
- <label><?php _e("Next Check", "wplivechat"); ?>
72
- <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e('When the next cron will run to check for data which is older than our retention period.', 'wplivechat'); ?>"></i>
73
- </label>
74
- </td>
75
- <td>
76
- <span>
77
- <?php
78
- echo date('d-m-Y H:i:s', wp_next_scheduled('wplc_gdpr_cron_hook'));
79
- ?>
80
- </span>
81
- </td>
82
- </tr>
83
-
84
  <tr>
85
  <td width="250" valign="top">
86
  <label><?php _e("GDPR Notice", "wplivechat"); ?>
@@ -726,12 +711,11 @@ add_filter( 'wplc_node_server_default_selection_override', 'wplc_gdpr_node_serve
726
  function wplc_gdpr_node_server_eu_default_override($selected, $wplc_settings = false){
727
  if($wplc_settings === false){ $wplc_settings = get_option("WPLC_SETTINGS"); }
728
  if(isset($wplc_settings['wplc_gdpr_enabled']) && $wplc_settings['wplc_gdpr_enabled'] == '1'){
729
- if($selected === 'auto' || $selected === 'us1' || $selected === 'us2'){
730
  //This is not allowed in the GDPR
731
- $selected = 'eu1';
732
  }
733
  }
734
-
735
  return $selected;
736
  }
737
 
66
  </td>
67
  </tr>
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  <tr>
70
  <td width="250" valign="top">
71
  <label><?php _e("GDPR Notice", "wplivechat"); ?>
711
  function wplc_gdpr_node_server_eu_default_override($selected, $wplc_settings = false){
712
  if($wplc_settings === false){ $wplc_settings = get_option("WPLC_SETTINGS"); }
713
  if(isset($wplc_settings['wplc_gdpr_enabled']) && $wplc_settings['wplc_gdpr_enabled'] == '1'){
714
+ if($selected === 'auto' || substr($selected,0,2) == 'us') {
715
  //This is not allowed in the GDPR
716
+ $selected = 'eu'.rand(1,10);
717
  }
718
  }
 
719
  return $selected;
720
  }
721
 
modules/node_server.php CHANGED
@@ -3,9 +3,8 @@
3
  * Node Code -> Insert pun here
4
  */
5
 
6
- define("BLEEPER_API_URL", "https://update.wp-livechat.com/remote_files/");
7
  define("BLEEPER_REMOTE_DASH_ROUTE", "remote_dashboard.php");
8
-
9
  define("BLEEPER_NODE_SERVER_URL", "https://bleeper.us-3.evennode.com");
10
 
11
  //define("BLEEPER_NODE_SERVER_URL", "http://localhost:3000");
@@ -15,6 +14,7 @@ define("BLEEPER_NODE_END_POINT_TOKEN", "zf6fe1399sdfgsdfg02ad09ab6a8cb7345s");
15
 
16
  add_action("wplc_activate_hook", "wplc_node_server_token_check", 10);
17
  add_action("wplc_update_hook", "wplc_node_server_token_check", 10);
 
18
  /**
19
  * Checks if a secret key has been created.
20
  * If not create one for use in the API
@@ -34,8 +34,7 @@ add_action("wplc_admin_remote_dashboard_below", "wplc_admin_remote_dashboard_tha
34
  */
35
  function wplc_admin_remote_dashboard_thank_you_footer(){
36
  echo "<p id='wplc_footer_message' style='display:none;'>";
37
- echo __("Thank you for using WP Live Chat Support - Need assistance? Please get in touch here: ", "wplivechat");
38
- echo "<a href='https://wp-livechat.com/contact-us/' rel='nofollow' target='_blank'>" . __("Contact us", "wplivechat") . "</a><span class='bleeper_stats'></span><span class='bleeper_instance'></span>";
39
  echo "</p>";
40
  }
41
 
@@ -137,8 +136,9 @@ function wplc_filter_notification_hook_node($type,$cid,$data){
137
  $form_data = array(
138
  'chat_id' => $cid,
139
  'notification_text' => $msg,
140
- );
141
-
 
142
  $user_request = wplc_node_server_post("user_chat_notification", $form_data);
143
 
144
  if($user_request === false){
@@ -370,7 +370,7 @@ add_action("wplc_hook_chat_dashboard_bottom","wplc_hook_control_dashboard_bottom
370
  function wplc_hook_control_dashboard_bottom_loading_logo() {
371
  $wplc_settings = get_option("WPLC_SETTINGS");
372
  if(isset($wplc_settings['wplc_use_node_server']) && $wplc_settings['wplc_use_node_server'] == 1){
373
- echo "<div id='wplc_footer_loading_icon'><img src='https://update.wp-livechat.com/remote_files/assets/images/wplc_loading.png' width='50' /><br />Connecting...</div>";
374
  }
375
  }
376
 
@@ -475,30 +475,22 @@ function wplc_admin_remote_dashboard_scripts($wplc_settings){
475
 
476
 
477
  $wplc_end_point_override = get_option("wplc_end_point_override");
478
- if($wplc_end_point_override !== false && $wplc_end_point_override !== ""){
479
- $bleeper_url = $wplc_end_point_override; //Use the override URL
480
- } else {
481
- $bleeper_url = BLEEPER_NODE_SERVER_URL;
482
- }
483
-
484
-
485
-
486
-
487
- wp_register_script('wplc-admin-js-sockets', "https://update.wp-livechat.com/remote_files/assets/js/vendor/socket.io/socket.io.slim.js", false, $wplc_version, false);
488
- //wp_register_script('wplc-admin-js-sockets', trailingslashit( $bleeper_url ) . "socket.io/socket.io.js", false, $wplc_version, false);
489
- //wp_register_script('wplc-admin-js-sockets', "http://localhost:3000/socket.io/socket.io.js", false, $wplc_version, false);
490
  wp_enqueue_script('wplc-admin-js-sockets');
491
 
492
- wp_register_script('wplc-admin-js-bootstrap', "https://update.wp-livechat.com/remote_files/assets/js/vendor/bootstrap/dist/js/bootstrap.js", array("wplc-admin-js-sockets"), $wplc_version, false);
493
- wp_enqueue_script('wplc-admin-js-bootstrap');
 
 
 
494
 
495
  // NB: This causes Failed to initVars ReferenceError: wplc_show_date is not defined when uncommented and enabled
496
  if(empty($wplc_settings['wplc_disable_emojis']))
497
  {
498
- wp_register_script('wplc-admin-js-emoji', "https://update.wp-livechat.com/remote_files/assets/wdt-emoji/emoji.min.js", array("wplc-admin-js-sockets"), $wplc_version, false);
499
  wp_enqueue_script('wplc-admin-js-emoji');
500
 
501
- wp_register_script('wplc-admin-js-emoji-bundle', "https://update.wp-livechat.com/remote_files/assets/wdt-emoji/wdt-emoji-bundle.min.js", array("wplc-admin-js-emoji"), $wplc_version, false);
502
  wp_enqueue_script('wplc-admin-js-emoji-bundle');
503
  }
504
 
@@ -508,7 +500,7 @@ function wplc_admin_remote_dashboard_scripts($wplc_settings){
508
  $dependencies = array();
509
  if(empty($wplc_settings['wplc_disable_emojis']))
510
  $dependencies[] = "wplc-admin-js-emoji-bundle";
511
- wp_register_script('wplc-admin-js-agent', "https://update.wp-livechat.com/remote_files/assets/js/wplc_agent_node.js", $dependencies, $wplc_version, false);
512
 
513
  wp_localize_script('wplc-admin-js-agent', 'bleeper_remote_enabled', "true");
514
 
@@ -535,7 +527,7 @@ function wplc_admin_remote_dashboard_scripts($wplc_settings){
535
  'string_title' => __( "Sending Transcript", "wplivechat" ),
536
  'string_close' => __( "Close", "wplivechat" ),
537
  'string_chat_emailed' => __( "The chat transcript has been emailed.", "wplivechat" ),
538
- 'string_error1' => sprintf( __( "There was a problem emailing the chat. Please <a target='_BLANK' href='%s'>contact support</a>.", "wplivechat" ), "http://wp-livechat.com/contact-us/?utm_source=plugin&utm_medium=link&utm_campaign=error_emailing_chat" )
539
  );
540
  wp_localize_script( 'wplc_transcript_admin', 'wplc_transcript_nonce', $wplc_transcript_localizations );
541
  wp_enqueue_script( 'wplc_transcript_admin' );
@@ -662,20 +654,11 @@ function wplc_admin_remote_dashboard_scripts($wplc_settings){
662
 
663
  $wplc_server_location = get_option( "wplc_server_location" );
664
  $wplc_server_location = apply_filters('wplc_node_server_default_selection_override', $wplc_server_location, $wplc_settings);
665
-
666
- if( $wplc_server_location !== false && $wplc_server_location !== "" && $wplc_server_location !== "auto" ){
667
- if ( $wplc_server_location === "us1") { $wplc_server_location = "0"; }
668
- else if ( $wplc_server_location === "us2") { $wplc_server_location = "3"; }
669
- else if ( $wplc_server_location === "eu1") { $wplc_server_location = "1"; }
670
- else if ( $wplc_server_location === "eu2") { $wplc_server_location = "2"; }
671
- else { $wplc_server_location = "0"; }
672
- wp_localize_script( 'wplc-admin-js-agent', 'bleeper_server_location', $wplc_server_location );
673
- }
674
 
675
  /* use the end point override as the final decision for identifying the actual end point override variable */
676
  $wplc_end_point_override = get_option("wplc_end_point_override");
677
  if($wplc_end_point_override !== false && $wplc_end_point_override !== ""){
678
- wp_localize_script( 'wplc-admin-js-agent', 'wplc_end_point_override', $wplc_end_point_override );
679
  }
680
 
681
  wp_localize_script( 'wplc-admin-js-agent', 'bleeper_new_chat_notification_title', __('New chat received', 'wplivechat') );
@@ -694,7 +677,7 @@ function wplc_admin_remote_dashboard_scripts($wplc_settings){
694
  wp_localize_script( 'wplc-admin-chat-server', 'wplc_datetime_format', array(
695
  'date_format' => get_option( 'date_format' ),
696
  'time_format' => get_option( 'time_format' ),
697
- ) );
698
 
699
  wp_register_script('wplc-admin-chat-events', plugins_url( '../js/wplc_u_admin_events.js', __FILE__ ), array("wplc-admin-js-agent", "wplc-admin-js-sockets", "wplc-admin-chat-server"), $wplc_version, false); //Added this for async storage calls
700
  wp_enqueue_script('wplc-admin-chat-events');
@@ -733,28 +716,28 @@ function wplc_admin_remote_dashboard_localize_upselling_tips(){
733
  $tips_header = __("Did you know?", "wplivechat");
734
 
735
  $tips_array = array(
736
- "0" => "<p><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents_tip' title='".__("Add unlimited agents", "wplivechat")."' target=\"_BLANK\">".__("Add unlimited agents", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." "."<a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents_tip2' target='_BLANK'>".__("(once off payment).","wplivechat")."</a></p>",
737
- "1" => "<p>".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat")." <a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate_tip' title='".__("see who's online and initiate chats", "wplivechat")."' target=\"_BLANK\">".__("initiate chats", "wplivechat")."</a> ".__("with your online visitors with the click of a button.", "wplivechat")." <br /><br /><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate_tip2' title='".__("Buy the Pro add-on now (once off payment).", "wplivechat")."' target=\"_BLANK\"><strong>".__("Buy the Pro add-on now (once off payment).", "wplivechat")."</strong></a></p>",
738
- "2" => "<p><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=transfer_tip' title='".__("Transfer Chats", "wplivechat")."' target=\"_BLANK\">".__("Transfer Chats", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." "."<a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=transfer_tip2' target='_BLANK'>".__("(once off payment).","wplivechat")."</a></p>"
739
  );
740
 
741
  $tips_array = apply_filters("wplc_admin_remote_dashboard_localize_tips_array", $tips_array);
742
 
743
- wp_localize_script( 'wplc-admin-js-agent', 'agent_to_agent_chat_upsell', sprintf(__('Chat to other agents with the <a href="%s" target="_BLANK">Pro version</a>.' ,'wplivechat'),'https://wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=a2achat'));
744
 
745
  $initiate_upsell = "<i class='fa fa-horn'></i> ".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat");
746
- $initiate_upsell .= ' <a href="https://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate1" title="'.__("see who's online and initiate chats", "wplivechat").'" target=\"_BLANK\">';
747
  $initiate_upsell .= __("initiate chats", "wplivechat");
748
  $initiate_upsell .= '</a> '.__("with your online visitors with the click of a button.", "wplivechat");
749
- $initiate_upsell .= ' <a href="https://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate2" title="'.__("Buy the Pro add-on now.", "wplivechat").'" target=\"_BLANK\">';
750
- $initiate_upsell .= '<strong>'.__("Buy the Pro add-on now.", "wplivechat").'</strong></a>';
751
 
752
 
753
 
754
  wp_localize_script( 'wplc-admin-js-agent', 'initiate_chat_upsell', $initiate_upsell);
755
 
756
 
757
- wp_localize_script( 'wplc-admin-js-agent', 'wplc_event_upsell', sprintf( __( 'Get detailed visitor events with the <a target="_BLANK" href="%s">Pro version</a>.', 'wplivechat'), 'https://wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=pro_events' ) );
758
 
759
  wp_localize_script( 'wplc-admin-js-agent', 'wplc_tip_header', $tips_header );
760
  wp_localize_script( 'wplc-admin-js-agent', 'wplc_tip_array', $tips_array );
@@ -782,7 +765,7 @@ function wplc_admin_remote_dashboard_styles(){
782
 
783
  $wplc_settings = get_option("WPLC_SETTINGS");
784
 
785
- wp_register_style( 'wplc-admin-style', "https://update.wp-livechat.com/remote_files/assets/css/chat_dashboard/admin_style.css", false, $wplc_version );
786
  wp_enqueue_style( 'wplc-admin-style' );
787
 
788
  if (!isset($wplc_settings['wplc_show_avatar']) || (isset($wplc_settings['wplc_show_avatar']) && intval($wplc_settings['wplc_show_avatar']) == 0) ) {
@@ -849,12 +832,12 @@ function wplc_admin_remote_dashboard_styles(){
849
  wp_add_inline_style( 'wplc-admin-style', $inline_identity_css );
850
  }
851
 
852
- wp_register_style( 'wplc-admin-style-bootstrap', "https://update.wp-livechat.com/remote_files/assets/css/bootstrap.css", false, $wplc_version );
853
  wp_enqueue_style( 'wplc-admin-style-bootstrap' );
854
 
855
  if(empty($wplc_settings['wplc_disable_emojis']))
856
  {
857
- wp_register_style( 'wplc-admin-style-emoji', "https://update.wp-livechat.com/remote_files/assets/wdt-emoji/wdt-emoji-bundle.css", false, $wplc_version );
858
  wp_enqueue_style( 'wplc-admin-style-emoji' );
859
  }
860
 
@@ -915,7 +898,7 @@ function wplc_node_compat_version_check(){
915
  ?>
916
  <div class="<?php echo ($is_dashboard ? "" : "update-nag"); ?>" id="wplc_offline_mode_prompt_container" style='margin-top:5px;margin-bottom:5px;<?php echo ($is_dashboard ? "display:none; " : ""); ?>'>
917
  <div style="display: inline-block; width: 80px; position: absolute; padding-top: 1em;">
918
- <img src="https://update.wp-livechat.com/remote_files/assets/images/wplc_loading.png" />
919
  </div>
920
  <div style="display: inline-block; margin-left: 80px;">
921
  <p style="display: none;"><strong id="wplc_offline_mode_prompt"><?php _e("WP Live Chat Support - Offline Mode", "wplivechat") ?></strong></p>
@@ -969,7 +952,7 @@ function wplc_node_compat_pro_update_nag_content(){
969
  * Returns true or false
970
  */
971
  function wplc_node_compat_pro_api_key_is_valid_post(){
972
- $wplc_pro_validation_url = "https://update.wp-livechat.com/auth_api/api-control/";
973
  $wplc_pro_option_key = "wp-live-chat-support-pro_key";
974
  $wplc_pro_slug = "wp-live-chat-support-pro";
975
  $is_valid = false; //By default it is false
3
  * Node Code -> Insert pun here
4
  */
5
 
6
+ define("BLEEPER_API_URL", WLPC_UPDATE_SERVER.'/remote_files/');
7
  define("BLEEPER_REMOTE_DASH_ROUTE", "remote_dashboard.php");
 
8
  define("BLEEPER_NODE_SERVER_URL", "https://bleeper.us-3.evennode.com");
9
 
10
  //define("BLEEPER_NODE_SERVER_URL", "http://localhost:3000");
14
 
15
  add_action("wplc_activate_hook", "wplc_node_server_token_check", 10);
16
  add_action("wplc_update_hook", "wplc_node_server_token_check", 10);
17
+
18
  /**
19
  * Checks if a secret key has been created.
20
  * If not create one for use in the API
34
  */
35
  function wplc_admin_remote_dashboard_thank_you_footer(){
36
  echo "<p id='wplc_footer_message' style='display:none;'>";
37
+ echo __("Thank you for using WP Live Chat Support.", "wplivechat");
 
38
  echo "</p>";
39
  }
40
 
136
  $form_data = array(
137
  'chat_id' => $cid,
138
  'notification_text' => $msg,
139
+ );
140
+
141
+ error_log("Using deprecated wplc_node_server_post() for user_chat_notification");
142
  $user_request = wplc_node_server_post("user_chat_notification", $form_data);
143
 
144
  if($user_request === false){
370
  function wplc_hook_control_dashboard_bottom_loading_logo() {
371
  $wplc_settings = get_option("WPLC_SETTINGS");
372
  if(isset($wplc_settings['wplc_use_node_server']) && $wplc_settings['wplc_use_node_server'] == 1){
373
+ echo "<div id='wplc_footer_loading_icon'><img src='".WLPC_UPDATE_SERVER."/remote_files/assets/images/wplc_loading.png' width='50' /><br />Connecting...</div>";
374
  }
375
  }
376
 
475
 
476
 
477
  $wplc_end_point_override = get_option("wplc_end_point_override");
478
+ wp_register_script('wplc-admin-js-sockets', WLPC_UPDATE_SERVER."/remote_files/assets/js/vendor/socket.io/socket.io.slim.js", false, $wplc_version, false);
 
 
 
 
 
 
 
 
 
 
 
479
  wp_enqueue_script('wplc-admin-js-sockets');
480
 
481
+ wp_register_script('wplc-admin-js-bootstrap', WLPC_UPDATE_SERVER."/remote_files/assets/js/vendor/bootstrap/dist/js/bootstrap.js", array("wplc-admin-js-sockets"), $wplc_version, false);
482
+ wp_enqueue_script('wplc-admin-js-bootstrap');
483
+
484
+ wp_register_script('wplc-admin-js-agent-common', WLPC_UPDATE_SERVER."/remote_files/assets/js/wplc_common_node.js", null, $wplc_version, false);
485
+ wp_enqueue_script('wplc-admin-js-agent-common');
486
 
487
  // NB: This causes Failed to initVars ReferenceError: wplc_show_date is not defined when uncommented and enabled
488
  if(empty($wplc_settings['wplc_disable_emojis']))
489
  {
490
+ wp_register_script('wplc-admin-js-emoji', WLPC_UPDATE_SERVER."/remote_files/assets/wdt-emoji/emoji.min.js", array("wplc-admin-js-sockets"), $wplc_version, false);
491
  wp_enqueue_script('wplc-admin-js-emoji');
492
 
493
+ wp_register_script('wplc-admin-js-emoji-bundle', WLPC_UPDATE_SERVER."/remote_files/assets/wdt-emoji/wdt-emoji-bundle.min.js", array("wplc-admin-js-emoji"), $wplc_version, false);
494
  wp_enqueue_script('wplc-admin-js-emoji-bundle');
495
  }
496
 
500
  $dependencies = array();
501
  if(empty($wplc_settings['wplc_disable_emojis']))
502
  $dependencies[] = "wplc-admin-js-emoji-bundle";
503
+ wp_register_script('wplc-admin-js-agent', WLPC_UPDATE_SERVER."/remote_files/assets/js/wplc_agent_node.js", $dependencies, $wplc_version, false);
504
 
505
  wp_localize_script('wplc-admin-js-agent', 'bleeper_remote_enabled', "true");
506
 
527
  'string_title' => __( "Sending Transcript", "wplivechat" ),
528
  'string_close' => __( "Close", "wplivechat" ),
529
  'string_chat_emailed' => __( "The chat transcript has been emailed.", "wplivechat" ),
530
+ 'string_error1' => __( "There was a problem emailing the chat.", "wplivechat" )
531
  );
532
  wp_localize_script( 'wplc_transcript_admin', 'wplc_transcript_nonce', $wplc_transcript_localizations );
533
  wp_enqueue_script( 'wplc_transcript_admin' );
654
 
655
  $wplc_server_location = get_option( "wplc_server_location" );
656
  $wplc_server_location = apply_filters('wplc_node_server_default_selection_override', $wplc_server_location, $wplc_settings);
 
 
 
 
 
 
 
 
 
657
 
658
  /* use the end point override as the final decision for identifying the actual end point override variable */
659
  $wplc_end_point_override = get_option("wplc_end_point_override");
660
  if($wplc_end_point_override !== false && $wplc_end_point_override !== ""){
661
+ wp_localize_script( 'wplc-admin-js-agent', 'wplc_end_point_override', array($wplc_end_point_override) );
662
  }
663
 
664
  wp_localize_script( 'wplc-admin-js-agent', 'bleeper_new_chat_notification_title', __('New chat received', 'wplivechat') );
677
  wp_localize_script( 'wplc-admin-chat-server', 'wplc_datetime_format', array(
678
  'date_format' => get_option( 'date_format' ),
679
  'time_format' => get_option( 'time_format' ),
680
+ ) );
681
 
682
  wp_register_script('wplc-admin-chat-events', plugins_url( '../js/wplc_u_admin_events.js', __FILE__ ), array("wplc-admin-js-agent", "wplc-admin-js-sockets", "wplc-admin-chat-server"), $wplc_version, false); //Added this for async storage calls
683
  wp_enqueue_script('wplc-admin-chat-events');
716
  $tips_header = __("Did you know?", "wplivechat");
717
 
718
  $tips_array = array(
719
+ "0" => "<p><a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents_tip' title='".__("Add unlimited agents", "wplivechat")."' target=\"_BLANK\">".__("Add unlimited agents", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." "."<a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents_tip2' target='_BLANK'></a></p>",
720
+ "1" => "<p>".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat")." <a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=initiate_tip' title='".__("see who's online and initiate chats", "wplivechat")."' target=\"_BLANK\">".__("initiate chats", "wplivechat")."</a> ".__("with your online visitors with the click of a button.", "wplivechat")." <br /><br /><a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=initiate_tip2' title='".__("Get the Pro add-on now completely FREE!", "wplivechat")."' target=\"_BLANK\"><strong>".__("Get the Pro add-on now completely FREE!", "wplivechat")."</strong></a></p>",
721
+ "2" => "<p><a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=transfer_tip' title='".__("Transfer Chats", "wplivechat")."' target=\"_BLANK\">".__("Transfer Chats", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." "."<a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=transfer_tip2' target='_BLANK'></a></p>"
722
  );
723
 
724
  $tips_array = apply_filters("wplc_admin_remote_dashboard_localize_tips_array", $tips_array);
725
 
726
+ wp_localize_script( 'wplc-admin-js-agent', 'agent_to_agent_chat_upsell', sprintf(__('Chat to other agents with the <a href="%s" target="_BLANK">Pro version</a>.' ,'wplivechat'),'https://wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=a2achat'));
727
 
728
  $initiate_upsell = "<i class='fa fa-horn'></i> ".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat");
729
+ $initiate_upsell .= ' <a href="https://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=initiate1" title="'.__("see who's online and initiate chats", "wplivechat").'" target=\"_BLANK\">';
730
  $initiate_upsell .= __("initiate chats", "wplivechat");
731
  $initiate_upsell .= '</a> '.__("with your online visitors with the click of a button.", "wplivechat");
732
+ $initiate_upsell .= ' <a href="https://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=initiate2" title="'.__("Get the Pro add-on now completely FREE!", "wplivechat").'" target=\"_BLANK\">';
733
+ $initiate_upsell .= '<strong>'.__("Get the Pro add-on now completely FREE!", "wplivechat").'</strong></a>';
734
 
735
 
736
 
737
  wp_localize_script( 'wplc-admin-js-agent', 'initiate_chat_upsell', $initiate_upsell);
738
 
739
 
740
+ wp_localize_script( 'wplc-admin-js-agent', 'wplc_event_upsell', sprintf( __( 'Get detailed visitor events with the <a target="_BLANK" href="%s">Pro version</a>.', 'wplivechat'), 'https://wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=pro_events' ) );
741
 
742
  wp_localize_script( 'wplc-admin-js-agent', 'wplc_tip_header', $tips_header );
743
  wp_localize_script( 'wplc-admin-js-agent', 'wplc_tip_array', $tips_array );
765
 
766
  $wplc_settings = get_option("WPLC_SETTINGS");
767
 
768
+ wp_register_style( 'wplc-admin-style', WLPC_UPDATE_SERVER."/remote_files/assets/css/chat_dashboard/admin_style.css", false, $wplc_version );
769
  wp_enqueue_style( 'wplc-admin-style' );
770
 
771
  if (!isset($wplc_settings['wplc_show_avatar']) || (isset($wplc_settings['wplc_show_avatar']) && intval($wplc_settings['wplc_show_avatar']) == 0) ) {
832
  wp_add_inline_style( 'wplc-admin-style', $inline_identity_css );
833
  }
834
 
835
+ wp_register_style( 'wplc-admin-style-bootstrap', WLPC_UPDATE_SERVER."/remote_files/assets/css/bootstrap.css", false, $wplc_version );
836
  wp_enqueue_style( 'wplc-admin-style-bootstrap' );
837
 
838
  if(empty($wplc_settings['wplc_disable_emojis']))
839
  {
840
+ wp_register_style( 'wplc-admin-style-emoji', WLPC_UPDATE_SERVER."/remote_files/assets/wdt-emoji/wdt-emoji-bundle.css", false, $wplc_version );
841
  wp_enqueue_style( 'wplc-admin-style-emoji' );
842
  }
843
 
898
  ?>
899
  <div class="<?php echo ($is_dashboard ? "" : "update-nag"); ?>" id="wplc_offline_mode_prompt_container" style='margin-top:5px;margin-bottom:5px;<?php echo ($is_dashboard ? "display:none; " : ""); ?>'>
900
  <div style="display: inline-block; width: 80px; position: absolute; padding-top: 1em;">
901
+ <img src="<?php echo WLPC_UPDATE_SERVER;?>/remote_files/assets/images/wplc_loading.png" />
902
  </div>
903
  <div style="display: inline-block; margin-left: 80px;">
904
  <p style="display: none;"><strong id="wplc_offline_mode_prompt"><?php _e("WP Live Chat Support - Offline Mode", "wplivechat") ?></strong></p>
952
  * Returns true or false
953
  */
954
  function wplc_node_compat_pro_api_key_is_valid_post(){
955
+ $wplc_pro_validation_url = WLPC_UPDATE_SERVER."/auth_api/api-control/";
956
  $wplc_pro_option_key = "wp-live-chat-support-pro_key";
957
  $wplc_pro_slug = "wp-live-chat-support-pro";
958
  $is_valid = false; //By default it is false
modules/node_server_deprecated.php CHANGED
@@ -6,52 +6,6 @@
6
 
7
  //FUNCTIONS BELOW - REPLACED
8
 
9
- /**
10
- * Post to the NODE server - LEGACY - DEPRECATED
11
- *
12
- * @param string $route Route you would like to use for the node server
13
- * @param string $form_data data to send
14
- * @return string (or false on fail)
15
- */
16
-
17
- function old_wplc_node_server_post($route, $form_data){
18
- $url = "https://wp-livechat.us-2.evennode.com" . "/" . $route;
19
- //$url = "http://" . "34.193.164.98:6086" . "/" . $route;
20
- if(!isset($form_data['server_token'])){
21
- $wplc_node_token = get_option("wplc_node_server_secret_token");
22
- if(!$wplc_node_token){
23
- if(function_exists("wplc_node_server_token_regenerate")){
24
- wplc_node_server_token_regenerate();
25
- $wplc_node_token = get_option("wplc_node_server_secret_token");
26
- }
27
- }
28
-
29
- $form_data['server_token'] = $wplc_node_token; //Add the security token
30
- }
31
-
32
- if(!isset($form_data['origin_url'])){
33
- $ajax_url = admin_url('admin-ajax.php');
34
- $origin_url = str_replace("/wp-admin/admin-ajax.php", "", $ajax_url);
35
- $form_data['origin_url'] = $origin_url; //Add the security token
36
- }
37
-
38
- $options = array(
39
- 'http' => array(
40
- 'header' => "Content-type: application/x-www-form-urlencoded\r\n",
41
- 'method' => 'POST',
42
- 'content' => http_build_query($form_data)
43
- )
44
- );
45
- $context = @stream_context_create($options);
46
- $result = @file_get_contents($url, false, $context);
47
-
48
- if ($result === FALSE) {
49
- return false;
50
- } else {
51
- return $result;
52
- }
53
- }
54
-
55
  /**
56
  * Legacy Node Server Function - LEGACY - DEPRECATED
57
  * @return void
6
 
7
  //FUNCTIONS BELOW - REPLACED
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  /**
10
  * Legacy Node Server Function - LEGACY - DEPRECATED
11
  * @return void
modules/webhooks_manager.php CHANGED
File without changes
readme.txt CHANGED
@@ -45,13 +45,11 @@ The most cost effective Live Chat plugin. Chat with your visitors for free! WP L
45
  * View any live chats you may have missed
46
  * Set the starting position of your chat box
47
  * Comprehensive list of live chat options
48
- * Enable/Disable the chat box on mobile devices
49
  * Enable/Disable the sound when a new live chat message is received
50
  * Ban visitors from chatting to you based on IP Address
51
  * Allow the live chat box to automatically pop up
52
  * Limit the live chat box to only show to registered users
53
  * Select whether Name and Email is required when users initiate a chat
54
- * Enable/Disable the chat box on mobile devices
55
  * Enable/Disable the sound when a new live chat message is received
56
 
57
  = Extend the functionality of WP Live Chat Support with the WP Live Chat Support Pro =
@@ -79,26 +77,8 @@ The most cost effective Live Chat plugin. Chat with your visitors for free! WP L
79
  * Include/exclude the live chat from appearing on certain pages
80
  * Fully customizable live chat experience
81
  * Choose when to accept chats
82
- * World-class support
83
 
84
- Get the [WP Live Chat Support Pro Add-on](http://wp-livechat.com/purchase-pro/?utm_source=readme&utm_medium=wordpress&utm_campaign=buy) for a once off payment!
85
-
86
- = Extend the functionality of WP Live Chat Support with the WP Live Chat Support Mobile/Desktop App Extension =
87
-
88
- * Accept chats from anywhere with our Android and iOS apps
89
- * Push notifications for new chats and messages
90
- * Manage devices directly from within the WordPress admin area
91
- * Effortless installation by simply scanning a QR code with your mobile device
92
- * Windows app also included
93
- * Mac app coming soon!
94
- * World-class support
95
-
96
- Get the [WP Live Chat Support Mobile/Desktop App Extension](https://wp-livechat.com/extensions/mobile-desktop-app-extension/?utm_source=readme&utm_medium=wordpress&utm_campaign=buy_app) now!
97
-
98
- = Coming soon =
99
- * Front end performance improvements
100
- * Message read receipts
101
- * Customer Insights
102
 
103
  = 30 second live chat installation =
104
 
@@ -181,9 +161,6 @@ Desktop notifications are notifications that will appear on the bottom right of
181
  = Can my visitors start a live chat without entering their name and email address? =
182
  Yes. This option is available on the live chat settings page.
183
 
184
- = Can I disable the live chat window on mobile devices? =
185
- Yes. You can show or hide the live chat window on mobile devices. This includes mobile phones and tablets.
186
-
187
  = How does WP Live Chat Support notify me of an incoming live chat? =
188
  You will be notificed of a new live chat by means of email, audio and desktop notifications.
189
 
@@ -220,6 +197,9 @@ If the live chat box still does not appear on your website, please go through th
220
 
221
  == Upgrade Notice ==
222
 
 
 
 
223
  = 8.0.25 =
224
  It is highly recommended that you upgrade to WP Live Chat Support version 8.0.25 for stability reasons.
225
 
@@ -261,6 +241,12 @@ We have patched the PHPMailer vulnerability. Please update to version 7.0.02.
261
 
262
 
263
  == Changelog ==
 
 
 
 
 
 
264
  = 8.0.25 - 2019-03-19 - Medium priority =
265
  * Modified server integration code
266
  * Modified remote file sources
@@ -281,19 +267,19 @@ We have patched the PHPMailer vulnerability. Please update to version 7.0.02.
281
  * Updated Bulgarian translation file. Thanks to Pavel Valkov.
282
  * Tested on WordPress 5.1.0
283
 
284
- = 8.0.23 - 2019-02-05 - Low priority =
285
 
286
  * Fixed access to new dashboard for non admin agents
287
  * Fixed documentation suggestions not working (Pro)
288
 
289
-
290
- = 8.0.22 - 2019-02-04 - Low priority =
291
 
292
  * Introduced a new dashboard that showcases latest blog posts, the latest podcast episode and the system status
293
-
294
  * Moved GDPR warnings for first time users to the settings page only
295
-
296
- * Moved the warning regarding desktop notifications to the settings page only
297
 
298
 
299
  = 8.0.21 - 2018-12-18 - Low priority =
@@ -453,9 +439,6 @@ We have patched the PHPMailer vulnerability. Please update to version 7.0.02.
453
  * Store messages using sessionStorage to avoid unnecessary DB calls
454
  * Better polling system for visitor tracking
455
  * Better history UI
456
- * Support for the new iOS app
457
- * Support for the new Android App
458
- * Support for the new Desktop App
459
 
460
  = 8.0.00 =
461
  * Beta release
45
  * View any live chats you may have missed
46
  * Set the starting position of your chat box
47
  * Comprehensive list of live chat options
 
48
  * Enable/Disable the sound when a new live chat message is received
49
  * Ban visitors from chatting to you based on IP Address
50
  * Allow the live chat box to automatically pop up
51
  * Limit the live chat box to only show to registered users
52
  * Select whether Name and Email is required when users initiate a chat
 
53
  * Enable/Disable the sound when a new live chat message is received
54
 
55
  = Extend the functionality of WP Live Chat Support with the WP Live Chat Support Pro =
77
  * Include/exclude the live chat from appearing on certain pages
78
  * Fully customizable live chat experience
79
  * Choose when to accept chats
 
80
 
81
+ Get the [WP Live Chat Support Pro Add-on](http://wp-livechat.com/features/?utm_source=readme&utm_medium=wordpress&utm_campaign=buy) for free!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
  = 30 second live chat installation =
84
 
161
  = Can my visitors start a live chat without entering their name and email address? =
162
  Yes. This option is available on the live chat settings page.
163
 
 
 
 
164
  = How does WP Live Chat Support notify me of an incoming live chat? =
165
  You will be notificed of a new live chat by means of email, audio and desktop notifications.
166
 
197
 
198
  == Upgrade Notice ==
199
 
200
+ = 8.0.26 =
201
+ It is highly recommended that you upgrade to WP Live Chat Support version 8.0.26 for performance reasons.
202
+
203
  = 8.0.25 =
204
  It is highly recommended that you upgrade to WP Live Chat Support version 8.0.25 for stability reasons.
205
 
241
 
242
 
243
  == Changelog ==
244
+ = 8.0.26 - 2019-04-04 - Medium priority =
245
+ * Added 16 more servers
246
+ * Improved server selection code
247
+ * Minor fixes to administration console
248
+ * Deprecation of mobile and desktop apps
249
+
250
  = 8.0.25 - 2019-03-19 - Medium priority =
251
  * Modified server integration code
252
  * Modified remote file sources
267
  * Updated Bulgarian translation file. Thanks to Pavel Valkov.
268
  * Tested on WordPress 5.1.0
269
 
270
+ = 8.0.23 - 2019-02-05 - Low priority =
271
 
272
  * Fixed access to new dashboard for non admin agents
273
  * Fixed documentation suggestions not working (Pro)
274
 
275
+
276
+ = 8.0.22 - 2019-02-04 - Low priority =
277
 
278
  * Introduced a new dashboard that showcases latest blog posts, the latest podcast episode and the system status
279
+
280
  * Moved GDPR warnings for first time users to the settings page only
281
+
282
+ * Moved the warning regarding desktop notifications to the settings page only
283
 
284
 
285
  = 8.0.21 - 2018-12-18 - Low priority =
439
  * Store messages using sessionStorage to avoid unnecessary DB calls
440
  * Better polling system for visitor tracking
441
  * Better history UI
 
 
 
442
 
443
  = 8.0.00 =
444
  * Beta release
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.
6
- Version: 8.0.25
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  Text Domain: wplivechat
@@ -11,6 +11,12 @@
11
  */
12
 
13
  /**
 
 
 
 
 
 
14
  * 8.0.25 - 2019-03-19 - Medium priority
15
  * Modified server integration code
16
  * Modified remote file sources
@@ -142,7 +148,7 @@ global $debug_start;
142
  $wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
143
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
144
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
145
- $wplc_version = "8.0.25";
146
 
147
  define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
148
  define('WPLC_BASIC_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
@@ -158,6 +164,7 @@ if (function_exists("wplc_pro_version_control") && $checker < 6000) { } else {
158
  require_once (plugin_dir_path(__FILE__) . "ajax_new.php");
159
  }
160
 
 
161
  require_once (plugin_dir_path(__FILE__) . "functions.php");
162
  require_once (plugin_dir_path(__FILE__) . "includes/deprecated.php");
163
  require_once (plugin_dir_path(__FILE__) . "includes/surveys.php");
@@ -212,7 +219,6 @@ if (function_exists('wplc_admin_menu_pro')) {
212
  add_action('admin_head', 'wplc_superadmin_javascript');
213
  register_activation_hook(__FILE__, 'wplc_activate');
214
 
215
-
216
  function wplc_basic_check() {
217
  // check if basic exists if pro is installed
218
  }
@@ -573,7 +579,6 @@ function wplc_admin_menu() {
573
 
574
 
575
  add_submenu_page('wplivechat-menu', __('Support', 'wplivechat'), __('Support', 'wplivechat'), 'manage_options', 'wplivechat-menu-support-page', 'wplc_support_menu');
576
- add_submenu_page('wplivechat-menu', __('Extensions', 'wplivechat'), __('Extensions', 'wplivechat'), 'manage_options', 'wplivechat-menu-extensions-page', 'wplc_extensions_menu');
577
  }
578
  do_action("wplc_hook_menu");
579
  }
@@ -663,11 +668,6 @@ function wplc_load_user_js () {
663
  }
664
  }
665
  }
666
-
667
-
668
-
669
-
670
-
671
  }
672
 
673
  function wplc_push_js_to_front_basic() {
@@ -734,16 +734,7 @@ function wplc_push_js_to_front_basic() {
734
 
735
 
736
  $wplc_end_point_override = get_option("wplc_end_point_override");
737
- if($wplc_end_point_override !== false && $wplc_end_point_override !== ""){
738
- $bleeper_url = $wplc_end_point_override; //Use the override URL
739
- } else {
740
- $bleeper_url = BLEEPER_NODE_SERVER_URL;
741
- }
742
- //wp_register_script('wplc-node-server-script', trailingslashit( $bleeper_url ) . "socket.io/socket.io.js", array('jquery'), $wplc_version);
743
- wp_register_script('wplc-node-server-script', "https://update.wp-livechat.com/remote_files/assets/js/vendor/socket.io/socket.io.slim.js", array('jquery'), $wplc_version);
744
-
745
-
746
- //wp_register_script('wplc-node-server-script', 'http://localhost:3000/socket.io/socket.io.js', array('jquery'), $wplc_version);
747
  wp_enqueue_script('wplc-node-server-script');
748
  wp_register_script('wplc-user-events-script', plugins_url('/js/wplc_u_node_events.js', __FILE__),array('jquery', 'wplc-server-script'),$wplc_version);
749
 
@@ -762,40 +753,28 @@ function wplc_push_js_to_front_basic() {
762
  $wplc_server_location = get_option( "wplc_server_location" );
763
  $wplc_server_location = apply_filters('wplc_node_server_default_selection_override', $wplc_server_location, $wplc_settings);
764
 
765
- if( $wplc_server_location !== false && $wplc_server_location !== "" && $wplc_server_location !== "auto" ){
766
- if ( $wplc_server_location === "us1") { $wplc_server_location = "0"; }
767
- else if ( $wplc_server_location === "us2") { $wplc_server_location = "3"; }
768
- else if ( $wplc_server_location === "eu1") { $wplc_server_location = "1"; }
769
- else if ( $wplc_server_location === "eu2") { $wplc_server_location = "2"; }
770
- else { $wplc_server_location = "0"; }
771
- wp_localize_script( 'wplc-server-script', 'bleeper_server_location', $wplc_server_location );
772
- }
773
-
774
-
775
- $wplc_end_point_override = get_option("wplc_end_point_override");
776
- if($wplc_end_point_override !== false && $wplc_end_point_override !== ""){
777
- wp_localize_script( 'wplc-server-script', 'wplc_end_point_override', $wplc_end_point_override );
778
- }
779
- //For node verification
780
- if(function_exists("wplc_pro_activate")){
781
- wp_localize_script('wplc-server-script', 'wplc_pro_auth', get_option('wp-live-chat-support-pro_key', "false"));
782
- } else {
783
- wp_localize_script('wplc-server-script', 'wplc_pro_auth', 'false');
784
- }
785
-
786
-
787
 
788
  //Emoji Libs
789
  if(empty($wplc_settings['wplc_disable_emojis'])) {
790
- //wp_register_script('wplc-user-js-emoji', "https://update.wp-livechat.com/remote_files/assets/wdt-emoji/emoji.min.js", array("wplc-server-script", "wplc-server-script"), $wplc_version, false);
791
  //wp_enqueue_script('wplc-user-js-emoji');
792
- //wp_register_script('wplc-user-js-emoji-bundle', "https://update.wp-livechat.com/remote_files/assets/wdt-emoji/wdt-emoji-bundle.min.js", array("wplc-server-script", "wplc-server-script", "wplc-user-js-emoji"), $wplc_version, false);
793
  //wp_enqueue_script('wplc-user-js-emoji-bundle');
794
 
795
- wp_register_script('wplc-user-js-emoji-concat', "https://update.wp-livechat.com/remote_files/assets/wdt-emoji/wdt-emoji-concat.min.js", array("wplc-server-script", "wplc-server-script"), $wplc_version, false);
796
  wp_enqueue_script('wplc-user-js-emoji-concat');
797
 
798
- wp_register_style( 'wplc-admin-style-emoji', "https://update.wp-livechat.com/remote_files/assets/wdt-emoji/wdt-emoji-bundle.css", false, $wplc_version );
799
  wp_enqueue_style( 'wplc-admin-style-emoji' );
800
  }
801
 
@@ -2716,12 +2695,12 @@ function wplc_hook_control_chat_dashboard_bottom() {
2716
  echo "<p id='wplc_footer_message' style='display:none;'>";
2717
  ?>
2718
  <?php _e("With the Pro add-on of WP Live Chat Support, you can", "wplivechat"); ?>
2719
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate1" title="<?php _e("see who's online and initiate chats", "wplivechat"); ?>" target=\"_BLANK\">
2720
  <?php _e("initiate chats", "wplivechat"); ?>
2721
  </a> <?php _e("with your online visitors with the click of a button.", "wplivechat"); ?>
2722
- <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate2" title="<?php _e("Buy the Pro add-on now.", "wplivechat"); ?>" target=\"_BLANK\">
2723
  <strong>
2724
- <?php _e("Buy the Pro add-on now.", "wplivechat"); ?>
2725
  </strong>
2726
  </a>
2727
  <?php
@@ -2785,7 +2764,6 @@ function wplc_admin_menu_layout_display() {
2785
  echo "<hr />";
2786
  echo "<center>";
2787
  echo "<h1>".$continue."</h1>";
2788
- echo "<p>".sprintf( __( 'Need help? <a href="%s" target="_BLANK">contact us</a>.', 'wplivechat'),'https://wp-livechat.com/contact-us/')."</p>";
2789
  echo "</center>";
2790
 
2791
 
@@ -3142,7 +3120,7 @@ add_action("wplc_hook_admin_below_chat_box","wplc_hook_control_admin_below_chat_
3142
  function wplc_hook_control_admin_below_chat_box() {
3143
  echo "<div class='admin_chat_quick_controls'>";
3144
  echo " <p style=\"text-align:left; font-size:11px;\">" . __('Press ENTER to send your message', 'wplivechat') . "</p>";
3145
- echo " " . __("Assign Quick Response", "wplivechat") . " <select name='wplc_macros_select' class='wplc_macros_select' disabled><option>" . __('Select', 'wplivechat') . "</option></select> <a href='https://wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=quick_resposnes' title='" . __('Add Quick Responses to your Live Chat', 'wplivechat') . "' target='_BLANK'>" . __("Pro version only", "wplivechat") . "</a>";
3146
  echo " </div>";
3147
  echo "</div>";
3148
 
@@ -3558,7 +3536,11 @@ function wplc_handle_db() {
3558
  }
3559
 
3560
  function wplc_add_user_stylesheet() {
3561
- global $wplc_version;
 
 
 
 
3562
  if(function_exists('wplc_display_chat_contents')){
3563
  $show_chat_contents = wplc_display_chat_contents();
3564
  } else {
@@ -3764,14 +3746,17 @@ function wplc_heartbeat_receive( $response, $data ) {
3764
  * @return void
3765
  */
3766
  function wplc_add_admin_stylesheet() {
3767
- global $wplc_version;
3768
 
 
 
 
3769
  wp_register_style( 'wplc-ace-styles', plugins_url( '/css/ace.css', __FILE__ ) );
3770
  wp_enqueue_style( 'wplc-ace-styles' );
3771
 
3772
  wp_register_style( 'wplc-fontawesome-iconpicker', plugins_url( '/css/fontawesome-iconpicker.css', __FILE__ ) );
3773
  wp_enqueue_style( 'wplc-fontawesome-iconpicker' );
3774
-
3775
  $wplc_settings = get_option("WPLC_SETTINGS");
3776
  if(isset($wplc_settings['wplc_use_node_server']) && $wplc_settings['wplc_use_node_server'] == 1 && (!isset($_GET['action']) || $_GET['action'] !== "history") ){
3777
  //if(isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu'){
@@ -3871,7 +3856,7 @@ $gutenberg_default_html = '<!-- Default HTML -->
3871
  <span class="wplc_block_text">{wplc_text}</span>
3872
  <span class="wplc_block_icon">{wplc_icon}</span>
3873
  </div>';
3874
-
3875
  if (isset($_GET['page']) && $_GET['page'] == "wplivechat-menu-settings") {
3876
  wp_enqueue_script('jquery');
3877
  wp_enqueue_script('jquery-ui-core');
@@ -4141,7 +4126,7 @@ function wplc_hook_control_offline_messages_display() {
4141
  echo "<div class='updated'><p>" . __('Please update to the latest version of WP Live Chat Support Pro to start recording any offline messages.', 'wplivechat') . "</p></div>";
4142
  }
4143
  } else {
4144
- echo "<br /><br >" . _('This option is only available in the ', 'wplivechat') . "<a href=\"http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=history1\" title=\"" . __("Pro Add-on", "wplivechat") . "\" target=\"_BLANK\">" . __('Pro Add-on', 'wplivechat') . "</a> of WP Live Chat. <a href=\"http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=missed_chats2\" title=\"" . __("Pro Add-on", "wplivechat") . "\" target=\"_BLANK\"></a>";
4145
  }
4146
  }
4147
 
@@ -4547,146 +4532,6 @@ if(isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu-settings'){
4547
  }
4548
  }
4549
 
4550
- /**
4551
- * Loads the contents of the extensions menu item
4552
- * @return string
4553
- */
4554
- function wplc_extensions_menu() {
4555
-
4556
- if (isset($_GET['type']) && $_GET['type'] == "additional") {
4557
- $additional = "nav-tab-active";
4558
- $normal = "";
4559
- } else {
4560
- $normal = "nav-tab-active";
4561
- $additional = "";
4562
- }
4563
-
4564
- ?>
4565
- <h2 class="nav-tab-wrapper">
4566
- <a href="admin.php?page=wplivechat-menu-extensions-page" title="<?php _e("Add-ons","wplivechat"); ?>" class="nav-tab <?php echo $normal; ?>"><?php _e("Add-ons","wplivechat"); ?></a><a href="admin.php?page=wplivechat-menu-extensions-page&type=additional" title="<?php _e("Suggested Plugins","wplivechat"); ?>" class="nav-tab <?php echo $additional; ?>"><?php _e("Suggested Plugins","wplivechat"); ?></a>
4567
- <span style='float: right; bottom:-5px; position: relative;'></span>
4568
- </h2>
4569
- <div id="tab_container">
4570
-
4571
-
4572
- <?php
4573
- if (isset($_GET['type']) && $_GET['type'] == "additional") {
4574
- ?>
4575
-
4576
- <div class="wplc-extension wplc-plugin">
4577
- <h3 class="wplc-extension-title"><?php _e("Sola Support Tickets","wplivechat"); ?></h3>
4578
- <a href="https://wordpress.org/plugins/sola-support-tickets/" title="<?php _e("Sola Support Tickets","wplivechat"); ?>" target="_BLANK">
4579
- <img width="320" src="<?php echo plugins_url('/images/plugin2.jpg', __FILE__); ?>" class="attachment-showcase wp-post-image" alt="<?php _e("Sola Support Tickets","wplivechat"); ?>" title="<?php _e("Sola Support Tickets","wplivechat"); ?>">
4580
- </a>
4581
- <p></p>
4582
- <p><?php _e("The easiest to use Help Desk & Support Ticket plugin. Create a support help desk quickly and easily with Sola Support Tickets.","wplivechat"); ?></p>
4583
- <p></p>
4584
- <a href="https://wordpress.org/plugins/sola-support-tickets/" title="<?php _e("Sola Support Tickets","wplivechat"); ?>" class="button-secondary" target="_BLANK"><?php _e("Get this Plugin","wplivechat"); ?></a>
4585
- </div>
4586
-
4587
- <div class="wplc-extension wplc-plugin">
4588
- <h3 class="wplc-extension-title"><?php _e("Nifty Newsletters","wplivechat"); ?></h3>
4589
- <a href="https://wordpress.org/plugins/sola-newsletters/" title="<?php _e("Nifty Newsletters","wplivechat"); ?>" target="_BLANK">
4590
- <img width="320" src="<?php echo plugins_url('/images/plugin1.jpg', __FILE__); ?>" class="attachment-showcase wp-post-image" alt="<?php _e("Nifty Newsletters","wplivechat"); ?>" title="<?php _e("Nifty Newsletters","wplivechat"); ?>">
4591
- </a>
4592
- <p></p>
4593
- <p><?php _e("Create and send newsletters, automatic post notifications and autoresponders that are modern and beautiful with Nifty Newsletters.","wplivechat"); ?></p>
4594
- <p></p>
4595
- <a href="https://wordpress.org/plugins/sola-newsletters/" title="<?php _e("Nifty Newsletters","wplivechat"); ?>" class="button-secondary" target="_BLANK"><?php _e("Get this Plugin","wplivechat"); ?></a>
4596
- </div>
4597
-
4598
-
4599
- <?php } else {
4600
- $filter1 = "all";
4601
- $filter2 = "all";
4602
-
4603
- if (isset($_GET['filter1'])) { $filter1 = $_GET['filter1']; }
4604
- if (isset($_GET['filter2'])) { $filter2 = $_GET['filter2']; }
4605
-
4606
- $style_strong = 'style="font-weight:bold;"';
4607
- $style_normal = 'style="font-weight:normal;"';
4608
-
4609
- $filter1_all_style = $style_normal;
4610
- $filter1_free_style = $style_normal;
4611
- $filter1_paid_style = $style_normal;
4612
- $filter2_both_style = $style_normal;
4613
- $filter2_free_style = $style_normal;
4614
- $filter2_pro_style = $style_normal;
4615
-
4616
- if ($filter1 == "all") { $filter1_all_style = $style_strong; }
4617
- else if ($filter1 == "free") { $filter1_free_style = $style_strong; }
4618
- else if ($filter1 == "paid") { $filter1_paid_style = $style_strong; }
4619
- else { $filter1_all_style = $style_strong; }
4620
- if ($filter2 == "all") { $filter2_both_style = $style_strong; }
4621
- else if ($filter2 == "free") { $filter2_free_style = $style_strong; }
4622
- else if ($filter2 == "pro") { $filter2_pro_style = $style_strong; }
4623
- else { $filter2_both_style = $style_strong; }
4624
-
4625
-
4626
- echo "<p><div style='display:block; overflow:auto; clear:both;'>";
4627
- echo "<strong>".__("Price:","wplivechat")."</strong> ";
4628
- echo "<a href='admin.php?page=wplivechat-menu-extensions-page&filter1=all&filter2=".$filter2."' $filter1_all_style>".__("All","wplivechat")."</a> |";
4629
- echo "<a href='admin.php?page=wplivechat-menu-extensions-page&filter1=free&filter2=".$filter2."' $filter1_free_style>".__("Free","wplivechat")."</a> |";
4630
- echo "<a href='admin.php?page=wplivechat-menu-extensions-page&filter1=paid&filter2=".$filter2."' $filter1_paid_style>".__("Paid","wplivechat")."</a>";
4631
- echo "</div></p>";
4632
- echo "<p><div style='display:block; overflow:auto; clear:both;'>";
4633
- echo "<strong>".__("For:","wplivechat")."</strong> ";
4634
- echo "<a href='admin.php?page=wplivechat-menu-extensions-page&filter2=all&filter1=".$filter1."' $filter2_both_style>".__("Both","wplivechat")."</a> |";
4635
- echo "<a href='admin.php?page=wplivechat-menu-extensions-page&filter2=free&filter1=".$filter1."' $filter2_free_style>".__("Free version","wplivechat")."</a> |";
4636
- echo "<a href='admin.php?page=wplivechat-menu-extensions-page&filter2=pro&filter1=".$filter1."' $filter2_pro_style>".__("Pro version","wplivechat")."</a>";
4637
- echo "</div></p>";
4638
-
4639
-
4640
- $response = wp_remote_post( "https://update.wp-livechat.com/auth_api/api-wplc-extensions", array(
4641
- 'method' => 'POST',
4642
- 'body' => array(
4643
- 'action' => 'extensions',
4644
- 'filter1' => $filter1,
4645
- 'filter2' => $filter2
4646
- )
4647
- )
4648
- );
4649
- if(is_array($response) && isset($response['body'])){
4650
- $data = json_decode($response['body']);
4651
- global $wplc_version;
4652
- $wplc_version = str_replace(",","",$wplc_version);
4653
- if ($data) {
4654
- $output = "";
4655
- foreach ($data as $extension) {
4656
- if (!isset($extension->fromversion)) { $extension->fromversion = 0; }
4657
- if (intval($wplc_version) >= intval($extension->fromversion)) {
4658
- $output .= '<div class="wplc-extension">';
4659
- $output .= '<h3 class="wplc-extension-title">'.$extension->title.'</h3>';
4660
- $output .= '<a href="'.$extension->link.'" title="'.$extension->title.'" target="_BLANK">';
4661
- $output .= '<img width="320" height="200" src="'.$extension->image.'" class="attachment-showcase wp-post-image" alt="'.$extension->title.'" title="'.$extension->title.'">';
4662
- $output .= '</a>';
4663
- $output .= '<p></p>';
4664
- $output .= '<p><div class="wplc-extension-label-box">';
4665
- $output .= '</div></p>';
4666
- $output .= '<p>'.$extension->description.'</p>';
4667
- if ($extension->slug != false && is_plugin_active($extension->slug."/".$extension->slug.".php")) {
4668
- $button = '<a href="javascriot:void(0);" title="" disabled class="button-secondary">'.__("Already installed","wplivechat").'</a>';
4669
- } else {
4670
- $button = '<a href="'.$extension->link.'" title="'.$extension->title.'" class="button-secondary" target="_BLANK">'.$extension->button_text.'</a>';
4671
- }
4672
- $output .= $button;
4673
- $output .= '</div>';
4674
- }
4675
- }
4676
- echo $output;
4677
- }
4678
-
4679
- }
4680
- ?>
4681
-
4682
-
4683
-
4684
- <?php } ?>
4685
-
4686
- </div>
4687
- <?php
4688
- }
4689
-
4690
  /**
4691
  * Loads the contents of the support menu item
4692
  * @return string
@@ -4696,32 +4541,14 @@ function wplc_support_menu() {
4696
  ?>
4697
  <h1><?php _e("WP Live Chat Support","wplivechat"); ?></h1>
4698
  <div class="wplc_row">
4699
- <div class='wplc_row_col' style='background-color:#FFF;'>
4700
- <h2><i class="fa fa-book fa-2x"></i> <?php _e("Documentation","wplivechat"); ?></h2>
4701
- <hr />
4702
- <p><?php _e("Getting started? Read through some of these articles to help you along your way.","wplivechat"); ?></p>
4703
- <p><strong><?php _e("Documentation:","wplivechat"); ?></strong></p>
4704
- <ul>
4705
- <li><a href='https://wp-livechat.com/documentation/minimum-system-requirements/' target='_BLANK' title='<?php _e("Minimum System Requirements","wplivechat"); ?>'><?php _e("Minimum System Requirements","wplivechat"); ?></a></li>
4706
- <li><a href='https://wp-livechat.com/documentation/do-i-have-to-be-logged-into-the-dashboard-to-chat-with-visitors/' target='_BLANK' title='<?php _e("Do I have to be logged into the dashboard to chat with visitors?","wplivechat"); ?>'><?php _e("Do I have to be logged into the dashboard to chat with visitors?","wplivechat"); ?></a></li>
4707
- <li><a href='https://wp-livechat.com/documentation/what-are-quick-responses/' target='_BLANK' title='<?php _e("What are Quick Responses?","wplivechat"); ?>'><?php _e("What are Quick Responses?","wplivechat"); ?></a></li>
4708
- <li><a href='https://wp-livechat.com/documentation/troubleshooting/is-this-plugin-multi-site-friendly/' target='_BLANK' title='<?php _e("Can I use this plugin on my multi-site?","wplivechat"); ?>'><?php _e("Can I use this plugin on my multi-site?","wplivechat"); ?></a></li>
4709
- <li><a href='https://wp-livechat.com/documentation/how-do-i-disable-apc-object-cache/' target='_BLANK' title='<?php _e("How do I disable APC Object Cache?","wplivechat"); ?>'><?php _e("How do I disable APC Object Cache?","wplivechat"); ?></a></li>
4710
- <li><a href='https://wp-livechat.com/documentation/do-you-have-a-mobile-app/' target='_BLANK' title='<?php _e("Do you have a mobile app?","wplivechat"); ?>'><?php _e("Do you have a mobile app?","wplivechat"); ?></a></li>
4711
- <li><a href='https://wp-livechat.com/documentation/how-do-i-check-for-javascript-errors-on-my-site/' target='_BLANK' title='<?php _e("How do I check for JavaScript errors on my site?","wplivechat"); ?>'><?php _e("How do I check for JavaScript errors on my site?","wplivechat"); ?></a></li>
4712
- </ul>
4713
- </div>
4714
  <div class='wplc_row_col' style='background-color:#FFF;'>
4715
  <h2><i class="fa fa-exclamation-circle fa-2x"></i> <?php _e("Troubleshooting","wplivechat"); ?></h2>
4716
  <hr />
4717
  <p><?php _e("WP Live Chat Support has a diverse and wide range of features which may, from time to time, run into conflicts with the thousands of themes and other plugins on the market.", "wplivechat"); ?></p>
4718
  <p><strong><?php _e("Common issues:","wplivechat"); ?></strong></p>
4719
  <ul>
4720
- <li><a href='https://wp-livechat.com/documentation/troubleshooting/the-chat-box-doesnt-show-up/' target='_BLANK' title='<?php _e("The chat box doesnt show up","wplivechat"); ?>'><?php _e("The chat box doesnt show up","wplivechat"); ?></a></li>
4721
- <li><a href='https://wp-livechat.com/documentation/the-chat-window-disappears-when-i-logout-or-go-offline/' target='_BLANK' title='<?php _e("The chat window disappears when I logout or go offline","wplivechat"); ?>'><?php _e("The chat window disappears when I logout or go offline","wplivechat"); ?></a></li>
4722
  <li><a href='https://wp-livechat.com/this-chat-has-already-been-answered-please-close-the-chat-window/' target='_BLANK' title='<?php _e("This chat has already been answered. Please close the chat window","wplivechat"); ?>'><?php _e("This chat has already been answered. Please close the chat window","wplivechat"); ?></a></li>
4723
  <li><a href='https://wp-livechat.com/messages-only-show-when-i-refresh-the-chat-window/' target='_BLANK' title='<?php _e("Messages only show when I refresh the chat window","wplivechat"); ?>'><?php _e("Messages only show when I refresh the chat window","wplivechat"); ?></a></li>
4724
- <li><a href='https://wp-livechat.com/documentation/im-not-getting-any-notifications-of-a-new-chat/' target='_BLANK' title='<?php _e("I'm not getting any notifications of a new chat","wplivechat"); ?>'><?php _e("I'm not getting any notifications of a new chat","wplivechat"); ?></a></li>
4725
  <li><a href='https://wp-livechat.com/the-chat-window-never-goes-offline/' target='_BLANK' title='<?php _e("The chat window never goes offline","wplivechat"); ?>'><?php _e("The chat window never goes offline","wplivechat"); ?></a></li>
4726
  </ul>
4727
  </div>
@@ -4731,7 +4558,6 @@ function wplc_support_menu() {
4731
  <p><?php _e("Still need help? Use one of these links below.","wplivechat"); ?></p>
4732
  <ul>
4733
  <li><a href='https://wp-livechat.com/support/' target='_BLANK' title='<?php _e("Support desk","wplivechat"); ?>'><?php _e("Support desk","wplivechat"); ?></a></li>
4734
- <li><a href='https://wp-livechat.com/contact-us/' target='_BLANK' title='<?php _e("Contact us","wplivechat"); ?>'><?php _e("Contact us","wplivechat"); ?></a></li>
4735
  </ul>
4736
  </div>
4737
  </div>
@@ -4767,11 +4593,11 @@ function wp_button_pointers_load_scripts($hook) {
4767
 
4768
 
4769
  $pointer_localize_strings = array(
4770
- "initiate" => "<h3>".__("Initiate Chats","wplivechat")."</h3><p>".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat")." <a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate1_pointer' title='".__("see who's online and initiate chats", "wplivechat")."' target=\"_BLANK\">".__("initiate chats", "wplivechat")."</a> ".__("with your online visitors with the click of a button.", "wplivechat")." <br /><br /><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate2_pointer' title='".__("Buy the Pro add-on now (once off payment).", "wplivechat")."' target=\"_BLANK\"><strong>".__("Buy the Pro add-on now (once off payment).", "wplivechat")."</strong></a></p>",
4771
- "chats" => "<h3>".__("Multiple Chats","wplivechat")."</h3><p>".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat")." <a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=morechats1_pointer' title='".__("accept and handle multiple chats.", "wplivechat")."' target=\"_BLANK\">".__("accept and handle multiple chats.", "wplivechat")."</a><br /><br /><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=morechats2_pointer' title='".__("Buy the Pro add-on now (once off payment).", "wplivechat")."' target=\"_BLANK\"><strong>".__("Buy the Pro add-on now (once off payment).", "wplivechat")."</strong></a></p>",
4772
- "agent_info" => "<h3>".__("Add unlimited agents","wplivechat")."</h3><p><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents1_pointer' title='".__("Add unlimited agents", "wplivechat")."' target=\"_BLANK\">".__("Add unlimited agents", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." "."<a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents2_pointer' target='_BLANK'>".__("(once off payment).","wplivechat")."</a></p>",
4773
- "transfer" => "<h3>".__("Transfer Chats","wplivechat")."</h3><p><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=transfer1_pointer' title='".__("Transfer Chats", "wplivechat")."' target=\"_BLANK\">".__("Transfer Chats", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." "."<a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=transfer2_pointer' target='_BLANK'>".__("(once off payment).","wplivechat")."</a></p>",
4774
- "direct_to_page" => "<h3>".__("Direct User To Page","wplivechat")."</h3><p><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=direct_to_page_1' title='".__("Transfer Chats", "wplivechat")."' target=\"_BLANK\">".__("Direct User To Page", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." "."<a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=direct_to_page_2' target='_BLANK'>".__("(once off payment).","wplivechat")."</a></p>"
4775
  );
4776
 
4777
 
@@ -4918,7 +4744,7 @@ function wplc_hook_control_agents_settings() {
4918
  <p><i class='fa fa-plus-circle fa-4x' style='color:#ccc;' ></i></p>
4919
  <h3><?php _e("Add New Agent","wplivechat"); ?></h3>
4920
  <p><button class='button button-secondary' id='wplc_add_agent' disabled style=><?php _e("Add Agent","wplivechat"); ?></button></p>
4921
- <p style='font-size:0.8em'><?php _e("Add as many agents as you need with the ","wplivechat") ?> <a href="https://wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=multipleAgents" target="_BLANK"><?php _e("Pro version.", "wplivechat") ?></a></p>
4922
  </li>
4923
  </ul>
4924
  <?php
@@ -5033,44 +4859,44 @@ function wplc_get_chat_messages($cid, $only_read_messages = false, $wplc_setting
5033
  */
5034
  function wplc_build_api_check($page_content, $data) {
5035
  $link = "#";
5036
- $image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/add-on0.jpg";
5037
  if ($data['string'] == "Multiple Agents") {
5038
  $link = "";
5039
- $image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/Agents-Small.jpg";
5040
  }
5041
  if ($data['string'] == "Cloud Server") {
5042
  $link = "";
5043
- $image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/Cloud-Small.jpg";
5044
  }
5045
  if ($data['string'] == "Advanced Chat Box Control") {
5046
  $link = "https://wp-livechat.com/extensions/advanced-chat-control/";
5047
- $image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/AdvancedChatBox-Small.jpg";
5048
  }
5049
  if ($data['string'] == "Choose When Online") {
5050
  $link = "";
5051
- $image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/ChooseOnline-Small.jpg";
5052
  }
5053
  if ($data['string'] == "Encryption") {
5054
  $link = "";
5055
- $image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/Encryption-Small.jpg";
5056
  }
5057
  if ($data['string'] == "Mobile and Desktop App") {
5058
  $link = "";
5059
- $image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/MobileDesktop-Small.jpg";
5060
  }
5061
  if ($data['string'] == "Initiate Chats") {
5062
  $link = "";
5063
- $image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/InitiateChat-Small.jpg";
5064
  }
5065
  if ($data['string'] == "Include Exclude Pages") {
5066
  $link = "";
5067
- $image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/IncludeAndExclude-Small.jpg";
5068
  }
5069
 
5070
 
5071
  if ($data['string'] == "WP Live Chat Support Pro") {
5072
  $link = "";
5073
- $image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/add-on0.jpg";
5074
  }
5075
 
5076
 
@@ -5127,8 +4953,8 @@ function wplc_filter_control_relevant_extensions_main_proe($text) {
5127
  if (function_exists("wplc_hook_control_intiate_check")) { return $text; }
5128
 
5129
  $rel_name = __("Pro Add-on","wplivechat");
5130
- $rel_image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/add-on0.jpg";
5131
- $rel_link = "http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=relevant_pro";
5132
  $text .= '<div class="wplc-extension relevant_extension">';
5133
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
5134
  $text .= '<img src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" >';
@@ -5153,19 +4979,21 @@ add_filter("wplc_filter_relevant_extensions_main","wplc_filter_control_relevant_
5153
  function wplc_filter_control_relevant_extensions_main_mobile($text) {
5154
  if (function_exists("wplc_mobile_check_if_logged_in")) { return $text; }
5155
 
 
5156
  $rel_name = __("Mobile & Desktop App","wplivechat");
5157
- $rel_image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/MobileDesktop-Icon.jpg";
5158
  $rel_link = "https://wp-livechat.com/extensions/mobile-desktop-app-extension/?utm_source=plugin&amp;utm_medium=link&amp;utm_campaign=relevant_mobile";
5159
  $text .= '<div class="wplc-extension relevant_extension">';
5160
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
5161
  $text .= '<img src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" >';
5162
- $text .= '</a>';
5163
  $text .= '<div class="float:left; padding-left:10px;">';
5164
  $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
5165
  $text .= '<p>'.__("Answer chats directly from your mobile phone or desktop with our mobile app and desktop client","wplivechat").'</p>';
5166
  $text .= '</div>';
5167
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" class="button-secondary" target="_BLANK">'.__("Get this extension","wplivechat").'</a>';
5168
  $text .= '</div>';
 
5169
 
5170
  return $text;
5171
  }
@@ -5181,8 +5009,8 @@ function wplc_filter_control_relevant_extensions_chatbox_proe($text) {
5181
  if (function_exists("wplc_hook_control_intiate_check")) { return $text; }
5182
 
5183
  $rel_name = __("Pro Add-on","wplivechat");
5184
- $rel_image = "https://update.wp-livechat.com/auth_api/api-wplc-extensions/images/add-on0.jpg";
5185
- $rel_link = "http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=relevant_pro_chatbox";
5186
  $text .= '<div class="wplc-extension relevant_extension">';
5187
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
5188
  $text .= '<img src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" >';
@@ -5507,7 +5335,7 @@ function nifty_text_edit_upsell($msg){
5507
  $msg .= "<i class='nifty_tedit_icon fa fa-subscript' id='nifty_tedit_sub'></i>";
5508
  $msg .= "<i class='nifty_tedit_icon fa fa-superscript' id='nifty_tedit_sup'></i>";
5509
  $msg .= "<i class='nifty_tedit_icon fa fa-link' id='nifty_tedit_link'></i>";
5510
- $msg .= "<i class='nifty_tedit_icon'><a target='_BLANK' href='https://wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=text_editor'>Pro version only</a></i>";
5511
  $msg .= "</div>";
5512
  }
5513
  return $msg;
@@ -5525,7 +5353,7 @@ function nifty_rating_advanced_info_upsell($msg, $cid, $name, $chat_data){
5525
  if(!function_exists("nifty_rating_advanced_info_control") && is_admin() && !function_exists("wplc_pro_activate")){
5526
  $msg .= "<div class='admin_visitor_advanced_info admin_agent_rating wplc_faded_upsell'>
5527
  <strong>" . __("Experience Rating", "wplivechat") . "</strong>
5528
- <div class='rating'><a target='_BLANK' href='https://wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=experience_ratings'>Pro only</a></div>
5529
  </div>";
5530
  }
5531
  return $msg;
@@ -5646,8 +5474,8 @@ function wplc_basic_reporting_page(){
5646
  $content .= "<br><a title='Update Now' href='./update-core.php' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary'>".__("Update now" ,"wplivechat")."</a>";
5647
  }
5648
  } else {
5649
- $content .= "<p>".__('Get all this and more in the ', 'wp-livechat')."<a href='https://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=reporting' target='_BLANK'>".__("Pro add-on", "wplivechat")."</a></p>";
5650
- $content .= "<br><a title='Upgrade Now' href='https://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=reporting' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary' target='_BLANK'>".__("Upgrade Now" ,"wplivechat")."</a>";
5651
  }
5652
  $content .= "</td>";
5653
  $content .= "</tr>";
@@ -5711,8 +5539,8 @@ function wplc_basic_triggers_page(){
5711
  $content .= "<br><a title='Update Now' href='./update-core.php' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary'>".__("Update now" ,"wplivechat")."</a>";
5712
  }
5713
  } else {
5714
- $content .= "<p>".__('Get all this and more in the ', 'wp-livechat')."<a href='https://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=data_triggers' target='_BLANK'>".__("Pro add-on", "wplivechat")."</a></p>";
5715
- $content .= "<br><a title='Upgrade Now' href='https://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=data_triggers' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary' target='_BLANK'>".__("Upgrade Now" ,"wplivechat")."</a>";
5716
  }
5717
  $content .= "</td>";
5718
  $content .= "</tr>";
@@ -5749,8 +5577,8 @@ function wplc_basic_custom_fields_page(){
5749
  $content .= "<br><a title='Update Now' href='./update-core.php' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary'>".__("Update now" ,"wplivechat")."</a>";
5750
  }
5751
  } else {
5752
- $content .= "<p>".__('Get all this and more in the ', 'wp-livechat')."<a href='https://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=custom_fields' target='_BLANK'>".__("Pro add-on", "wplivechat")."</a></p>";
5753
- $content .= "<br><a title='Upgrade Now' href='https://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=custom_fields' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary' target='_BLANK'>".__("Upgrade Now" ,"wplivechat")."</a>";
5754
  }
5755
  $content .= "</td>";
5756
  $content .= "</tr>";
@@ -5830,11 +5658,14 @@ add_action( "admin_enqueue_scripts", "wplc_custom_scripts_scripts" );
5830
  * @return void
5831
  */
5832
  function wplc_custom_scripts_scripts(){
 
5833
 
5834
  if ( isset( $_GET['page'] ) ) {
5835
  if ( $_GET['page'] == 'wplivechat-menu-settings' ) {
5836
  wp_enqueue_script( "wplc-custom-script-tab-ace",'//cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ace.js', array('jquery') );
5837
  } else if ( $_GET['page'] == 'wplivechat-menu-dashboard' ) {
 
 
5838
  wp_enqueue_script( 'wplc-custom-script-dashboard', plugins_url( '/js/wplc_dashboard.js', __FILE__ ), array('jquery'), null, true );
5839
  }
5840
 
@@ -6198,7 +6029,7 @@ function wplc_transcript_admin_javascript() {
6198
  'string_title' => __( "Sending Transcript", "wplivechat" ),
6199
  'string_close' => __( "Close", "wplivechat" ),
6200
  'string_chat_emailed' => __( "The chat transcript has been emailed.", "wplivechat" ),
6201
- 'string_error1' => sprintf( __( "There was a problem emailing the chat. Please <a target='_BLANK' href='%s'>contact support</a>.", "wplivechat" ), "http://wp-livechat.com/contact-us/?utm_source=plugin&utm_medium=link&utm_campaign=error_emailing_chat" )
6202
  );
6203
  wp_localize_script( 'wplc_transcript_admin', 'wplc_transcript_nonce', $wplc_transcript_localizations );
6204
  wp_enqueue_script( 'wplc_transcript_admin' );
@@ -6444,7 +6275,7 @@ function wplc_hook_admin_transcript_settings() {
6444
  echo " <td>";
6445
  echo " <textarea cols='85' rows='15' name=\"wplc_et_email_body\">";
6446
  if ( isset( $wplc_et_settings['wplc_et_email_body'] ) ) {
6447
- echo html_entity_decode( stripslashes( $wplc_et_settings['wplc_et_email_body'] ) );
6448
  }
6449
  echo " </textarea>";
6450
  echo " </td>";
@@ -6456,7 +6287,7 @@ function wplc_hook_admin_transcript_settings() {
6456
  echo " <td>";
6457
  echo " <textarea cols='85' rows='5' name=\"wplc_et_email_header\">";
6458
  if ( isset( $wplc_et_settings['wplc_et_email_header'] ) ) {
6459
- echo stripslashes( $wplc_et_settings['wplc_et_email_header'] );
6460
  }
6461
  echo " </textarea>";
6462
  echo " </td>";
@@ -6467,7 +6298,7 @@ function wplc_hook_admin_transcript_settings() {
6467
  echo " <td>";
6468
  echo " <textarea cols='85' rows='5' name=\"wplc_et_email_footer\">";
6469
  if ( isset( $wplc_et_settings['wplc_et_email_footer'] ) ) {
6470
- echo stripslashes( $wplc_et_settings['wplc_et_email_footer'] );
6471
  }
6472
  echo " </textarea>";
6473
  echo " </td>";
@@ -6525,4 +6356,4 @@ function wplc_transcript_get_header_text() {
6525
  } else {
6526
  return "";
6527
  }
6528
- }
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.
6
+ Version: 8.0.26
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  Text Domain: wplivechat
11
  */
12
 
13
  /**
14
+ * 8.0.26 - 2019-04-04 - Medium priority
15
+ * Added 16 more servers
16
+ * Improved server selection code
17
+ * Minor fixes to administration console
18
+ * Deprecation of mobile and desktop apps
19
+ *
20
  * 8.0.25 - 2019-03-19 - Medium priority
21
  * Modified server integration code
22
  * Modified remote file sources
148
  $wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
149
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
150
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
151
+ $wplc_version = "8.0.26";
152
 
153
  define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
154
  define('WPLC_BASIC_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
164
  require_once (plugin_dir_path(__FILE__) . "ajax_new.php");
165
  }
166
 
167
+ require_once (plugin_dir_path(__FILE__) . "config.php");
168
  require_once (plugin_dir_path(__FILE__) . "functions.php");
169
  require_once (plugin_dir_path(__FILE__) . "includes/deprecated.php");
170
  require_once (plugin_dir_path(__FILE__) . "includes/surveys.php");
219
  add_action('admin_head', 'wplc_superadmin_javascript');
220
  register_activation_hook(__FILE__, 'wplc_activate');
221
 
 
222
  function wplc_basic_check() {
223
  // check if basic exists if pro is installed
224
  }
579
 
580
 
581
  add_submenu_page('wplivechat-menu', __('Support', 'wplivechat'), __('Support', 'wplivechat'), 'manage_options', 'wplivechat-menu-support-page', 'wplc_support_menu');
 
582
  }
583
  do_action("wplc_hook_menu");
584
  }
668
  }
669
  }
670
  }
 
 
 
 
 
671
  }
672
 
673
  function wplc_push_js_to_front_basic() {
734
 
735
 
736
  $wplc_end_point_override = get_option("wplc_end_point_override");
737
+ wp_register_script('wplc-node-server-script', WLPC_UPDATE_SERVER."/remote_files/assets/js/vendor/socket.io/socket.io.slim.js", array('jquery'), $wplc_version);
 
 
 
 
 
 
 
 
 
738
  wp_enqueue_script('wplc-node-server-script');
739
  wp_register_script('wplc-user-events-script', plugins_url('/js/wplc_u_node_events.js', __FILE__),array('jquery', 'wplc-server-script'),$wplc_version);
740
 
753
  $wplc_server_location = get_option( "wplc_server_location" );
754
  $wplc_server_location = apply_filters('wplc_node_server_default_selection_override', $wplc_server_location, $wplc_settings);
755
 
756
+ $wplc_end_point_override = get_option("wplc_end_point_override");
757
+ if($wplc_end_point_override !== false && $wplc_end_point_override !== ""){
758
+ wp_localize_script( 'wplc-server-script', 'wplc_end_point_override', array($wplc_end_point_override) );
759
+ }
760
+ //For node verification
761
+ if(function_exists("wplc_pro_activate")){
762
+ wp_localize_script('wplc-server-script', 'wplc_pro_auth', get_option('wp-live-chat-support-pro_key', "false"));
763
+ } else {
764
+ wp_localize_script('wplc-server-script', 'wplc_pro_auth', 'false');
765
+ }
 
 
 
 
 
 
 
 
 
 
 
 
766
 
767
  //Emoji Libs
768
  if(empty($wplc_settings['wplc_disable_emojis'])) {
769
+ //wp_register_script('wplc-user-js-emoji', WLPC_UPDATE_SERVER."/remote_files/assets/wdt-emoji/emoji.min.js", array("wplc-server-script", "wplc-server-script"), $wplc_version, false);
770
  //wp_enqueue_script('wplc-user-js-emoji');
771
+ //wp_register_script('wplc-user-js-emoji-bundle', WLPC_UPDATE_SERVER."/remote_files/assets/wdt-emoji/wdt-emoji-bundle.min.js", array("wplc-server-script", "wplc-server-script", "wplc-user-js-emoji"), $wplc_version, false);
772
  //wp_enqueue_script('wplc-user-js-emoji-bundle');
773
 
774
+ wp_register_script('wplc-user-js-emoji-concat', WLPC_UPDATE_SERVER."/remote_files/assets/wdt-emoji/wdt-emoji-concat.min.js", array("wplc-server-script", "wplc-server-script"), $wplc_version, false);
775
  wp_enqueue_script('wplc-user-js-emoji-concat');
776
 
777
+ wp_register_style( 'wplc-admin-style-emoji', WLPC_UPDATE_SERVER."/remote_files/assets/wdt-emoji/wdt-emoji-bundle.css", false, $wplc_version );
778
  wp_enqueue_style( 'wplc-admin-style-emoji' );
779
  }
780
 
2695
  echo "<p id='wplc_footer_message' style='display:none;'>";
2696
  ?>
2697
  <?php _e("With the Pro add-on of WP Live Chat Support, you can", "wplivechat"); ?>
2698
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=initiate1" title="<?php _e("see who's online and initiate chats", "wplivechat"); ?>" target=\"_BLANK\">
2699
  <?php _e("initiate chats", "wplivechat"); ?>
2700
  </a> <?php _e("with your online visitors with the click of a button.", "wplivechat"); ?>
2701
+ <a href="http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=initiate2" title="<?php _e("Get the Pro add-on now completely FREE!", "wplivechat"); ?>" target=\"_BLANK\">
2702
  <strong>
2703
+ <?php _e("Get the Pro add-on now completely FREE!", "wplivechat"); ?>
2704
  </strong>
2705
  </a>
2706
  <?php
2764
  echo "<hr />";
2765
  echo "<center>";
2766
  echo "<h1>".$continue."</h1>";
 
2767
  echo "</center>";
2768
 
2769
 
3120
  function wplc_hook_control_admin_below_chat_box() {
3121
  echo "<div class='admin_chat_quick_controls'>";
3122
  echo " <p style=\"text-align:left; font-size:11px;\">" . __('Press ENTER to send your message', 'wplivechat') . "</p>";
3123
+ echo " " . __("Assign Quick Response", "wplivechat") . " <select name='wplc_macros_select' class='wplc_macros_select' disabled><option>" . __('Select', 'wplivechat') . "</option></select> <a href='https://wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=quick_resposnes' title='" . __('Add Quick Responses to your Live Chat', 'wplivechat') . "' target='_BLANK'>" . __("Pro version only", "wplivechat") . "</a>";
3124
  echo " </div>";
3125
  echo "</div>";
3126
 
3536
  }
3537
 
3538
  function wplc_add_user_stylesheet() {
3539
+ global $wplc_version;
3540
+
3541
+ wp_register_script('wplc-config', plugins_url('js/wplc_config.js.php', __FILE__));
3542
+ wp_enqueue_script('wplc-config');
3543
+
3544
  if(function_exists('wplc_display_chat_contents')){
3545
  $show_chat_contents = wplc_display_chat_contents();
3546
  } else {
3746
  * @return void
3747
  */
3748
  function wplc_add_admin_stylesheet() {
3749
+ global $wplc_version;
3750
 
3751
+ wp_register_script('wplc-config', plugins_url('js/wplc_config.js.php', __FILE__));
3752
+ wp_enqueue_script('wplc-config');
3753
+
3754
  wp_register_style( 'wplc-ace-styles', plugins_url( '/css/ace.css', __FILE__ ) );
3755
  wp_enqueue_style( 'wplc-ace-styles' );
3756
 
3757
  wp_register_style( 'wplc-fontawesome-iconpicker', plugins_url( '/css/fontawesome-iconpicker.css', __FILE__ ) );
3758
  wp_enqueue_style( 'wplc-fontawesome-iconpicker' );
3759
+
3760
  $wplc_settings = get_option("WPLC_SETTINGS");
3761
  if(isset($wplc_settings['wplc_use_node_server']) && $wplc_settings['wplc_use_node_server'] == 1 && (!isset($_GET['action']) || $_GET['action'] !== "history") ){
3762
  //if(isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu'){
3856
  <span class="wplc_block_text">{wplc_text}</span>
3857
  <span class="wplc_block_icon">{wplc_icon}</span>
3858
  </div>';
3859
+
3860
  if (isset($_GET['page']) && $_GET['page'] == "wplivechat-menu-settings") {
3861
  wp_enqueue_script('jquery');
3862
  wp_enqueue_script('jquery-ui-core');
4126
  echo "<div class='updated'><p>" . __('Please update to the latest version of WP Live Chat Support Pro to start recording any offline messages.', 'wplivechat') . "</p></div>";
4127
  }
4128
  } else {
4129
+ echo "<br /><br >" . _('This option is only available in the ', 'wplivechat') . "<a href=\"http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=history1\" title=\"" . __("Pro Add-on", "wplivechat") . "\" target=\"_BLANK\">" . __('Pro Add-on', 'wplivechat') . "</a> of WP Live Chat. <a href=\"http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=missed_chats2\" title=\"" . __("Pro Add-on", "wplivechat") . "\" target=\"_BLANK\"></a>";
4130
  }
4131
  }
4132
 
4532
  }
4533
  }
4534
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4535
  /**
4536
  * Loads the contents of the support menu item
4537
  * @return string
4541
  ?>
4542
  <h1><?php _e("WP Live Chat Support","wplivechat"); ?></h1>
4543
  <div class="wplc_row">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4544
  <div class='wplc_row_col' style='background-color:#FFF;'>
4545
  <h2><i class="fa fa-exclamation-circle fa-2x"></i> <?php _e("Troubleshooting","wplivechat"); ?></h2>
4546
  <hr />
4547
  <p><?php _e("WP Live Chat Support has a diverse and wide range of features which may, from time to time, run into conflicts with the thousands of themes and other plugins on the market.", "wplivechat"); ?></p>
4548
  <p><strong><?php _e("Common issues:","wplivechat"); ?></strong></p>
4549
  <ul>
 
 
4550
  <li><a href='https://wp-livechat.com/this-chat-has-already-been-answered-please-close-the-chat-window/' target='_BLANK' title='<?php _e("This chat has already been answered. Please close the chat window","wplivechat"); ?>'><?php _e("This chat has already been answered. Please close the chat window","wplivechat"); ?></a></li>
4551
  <li><a href='https://wp-livechat.com/messages-only-show-when-i-refresh-the-chat-window/' target='_BLANK' title='<?php _e("Messages only show when I refresh the chat window","wplivechat"); ?>'><?php _e("Messages only show when I refresh the chat window","wplivechat"); ?></a></li>
 
4552
  <li><a href='https://wp-livechat.com/the-chat-window-never-goes-offline/' target='_BLANK' title='<?php _e("The chat window never goes offline","wplivechat"); ?>'><?php _e("The chat window never goes offline","wplivechat"); ?></a></li>
4553
  </ul>
4554
  </div>
4558
  <p><?php _e("Still need help? Use one of these links below.","wplivechat"); ?></p>
4559
  <ul>
4560
  <li><a href='https://wp-livechat.com/support/' target='_BLANK' title='<?php _e("Support desk","wplivechat"); ?>'><?php _e("Support desk","wplivechat"); ?></a></li>
 
4561
  </ul>
4562
  </div>
4563
  </div>
4593
 
4594
 
4595
  $pointer_localize_strings = array(
4596
+ "initiate" => "<h3>".__("Initiate Chats","wplivechat")."</h3><p>".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat")." <a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=initiate1_pointer' title='".__("see who's online and initiate chats", "wplivechat")."' target=\"_BLANK\">".__("initiate chats", "wplivechat")."</a> ".__("with your online visitors with the click of a button.", "wplivechat")." <br /><br /><a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=initiate2_pointer' title='".__("Get the Pro add-on now completely FREE!", "wplivechat")."' target=\"_BLANK\"><strong>".__("Get the Pro add-on now completely FREE!", "wplivechat")."</strong></a></p>",
4597
+ "chats" => "<h3>".__("Multiple Chats","wplivechat")."</h3><p>".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat")." <a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=morechats1_pointer' title='".__("accept and handle multiple chats.", "wplivechat")."' target=\"_BLANK\">".__("accept and handle multiple chats.", "wplivechat")."</a><br /><br /><a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=morechats2_pointer' title='".__("Get the Pro add-on now completely FREE!", "wplivechat")."' target=\"_BLANK\"><strong>".__("Get the Pro add-on now completely FREE!", "wplivechat")."</strong></a></p>",
4598
+ "agent_info" => "<h3>".__("Add unlimited agents","wplivechat")."</h3><p><a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents1_pointer' title='".__("Add unlimited agents", "wplivechat")."' target=\"_BLANK\">".__("Add unlimited agents", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." </p>",
4599
+ "transfer" => "<h3>".__("Transfer Chats","wplivechat")."</h3><p><a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=transfer1_pointer' title='".__("Transfer Chats", "wplivechat")."' target=\"_BLANK\">".__("Transfer Chats", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." </p>",
4600
+ "direct_to_page" => "<h3>".__("Direct User To Page","wplivechat")."</h3><p><a href='http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=direct_to_page_1' title='".__("Transfer Chats", "wplivechat")."' target=\"_BLANK\">".__("Direct User To Page", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." </p>"
4601
  );
4602
 
4603
 
4744
  <p><i class='fa fa-plus-circle fa-4x' style='color:#ccc;' ></i></p>
4745
  <h3><?php _e("Add New Agent","wplivechat"); ?></h3>
4746
  <p><button class='button button-secondary' id='wplc_add_agent' disabled style=><?php _e("Add Agent","wplivechat"); ?></button></p>
4747
+ <p style='font-size:0.8em'><?php _e("Add as many agents as you need with the ","wplivechat") ?> <a href="https://wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=multipleAgents" target="_BLANK"><?php _e("Pro version.", "wplivechat") ?></a></p>
4748
  </li>
4749
  </ul>
4750
  <?php
4859
  */
4860
  function wplc_build_api_check($page_content, $data) {
4861
  $link = "#";
4862
+ $image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/add-on0.jpg";
4863
  if ($data['string'] == "Multiple Agents") {
4864
  $link = "";
4865
+ $image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/Agents-Small.jpg";
4866
  }
4867
  if ($data['string'] == "Cloud Server") {
4868
  $link = "";
4869
+ $image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/Cloud-Small.jpg";
4870
  }
4871
  if ($data['string'] == "Advanced Chat Box Control") {
4872
  $link = "https://wp-livechat.com/extensions/advanced-chat-control/";
4873
+ $image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/AdvancedChatBox-Small.jpg";
4874
  }
4875
  if ($data['string'] == "Choose When Online") {
4876
  $link = "";
4877
+ $image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/ChooseOnline-Small.jpg";
4878
  }
4879
  if ($data['string'] == "Encryption") {
4880
  $link = "";
4881
+ $image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/Encryption-Small.jpg";
4882
  }
4883
  if ($data['string'] == "Mobile and Desktop App") {
4884
  $link = "";
4885
+ $image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/MobileDesktop-Small.jpg";
4886
  }
4887
  if ($data['string'] == "Initiate Chats") {
4888
  $link = "";
4889
+ $image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/InitiateChat-Small.jpg";
4890
  }
4891
  if ($data['string'] == "Include Exclude Pages") {
4892
  $link = "";
4893
+ $image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/IncludeAndExclude-Small.jpg";
4894
  }
4895
 
4896
 
4897
  if ($data['string'] == "WP Live Chat Support Pro") {
4898
  $link = "";
4899
+ $image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/add-on0.jpg";
4900
  }
4901
 
4902
 
4953
  if (function_exists("wplc_hook_control_intiate_check")) { return $text; }
4954
 
4955
  $rel_name = __("Pro Add-on","wplivechat");
4956
+ $rel_image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/add-on0.jpg";
4957
+ $rel_link = "http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=relevant_pro";
4958
  $text .= '<div class="wplc-extension relevant_extension">';
4959
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
4960
  $text .= '<img src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" >';
4979
  function wplc_filter_control_relevant_extensions_main_mobile($text) {
4980
  if (function_exists("wplc_mobile_check_if_logged_in")) { return $text; }
4981
 
4982
+ /*
4983
  $rel_name = __("Mobile & Desktop App","wplivechat");
4984
+ $rel_image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/MobileDesktop-Icon.jpg";
4985
  $rel_link = "https://wp-livechat.com/extensions/mobile-desktop-app-extension/?utm_source=plugin&amp;utm_medium=link&amp;utm_campaign=relevant_mobile";
4986
  $text .= '<div class="wplc-extension relevant_extension">';
4987
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
4988
  $text .= '<img src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" >';
4989
+ $text .= '</a></div>';
4990
  $text .= '<div class="float:left; padding-left:10px;">';
4991
  $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
4992
  $text .= '<p>'.__("Answer chats directly from your mobile phone or desktop with our mobile app and desktop client","wplivechat").'</p>';
4993
  $text .= '</div>';
4994
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" class="button-secondary" target="_BLANK">'.__("Get this extension","wplivechat").'</a>';
4995
  $text .= '</div>';
4996
+ */
4997
 
4998
  return $text;
4999
  }
5009
  if (function_exists("wplc_hook_control_intiate_check")) { return $text; }
5010
 
5011
  $rel_name = __("Pro Add-on","wplivechat");
5012
+ $rel_image = WLPC_UPDATE_SERVER."/auth_api/api-wplc-extensions/images/add-on0.jpg";
5013
+ $rel_link = "http://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=relevant_pro_chatbox";
5014
  $text .= '<div class="wplc-extension relevant_extension">';
5015
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
5016
  $text .= '<img src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" >';
5335
  $msg .= "<i class='nifty_tedit_icon fa fa-subscript' id='nifty_tedit_sub'></i>";
5336
  $msg .= "<i class='nifty_tedit_icon fa fa-superscript' id='nifty_tedit_sup'></i>";
5337
  $msg .= "<i class='nifty_tedit_icon fa fa-link' id='nifty_tedit_link'></i>";
5338
+ $msg .= "<i class='nifty_tedit_icon'><a target='_BLANK' href='https://wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=text_editor'>Pro version only</a></i>";
5339
  $msg .= "</div>";
5340
  }
5341
  return $msg;
5353
  if(!function_exists("nifty_rating_advanced_info_control") && is_admin() && !function_exists("wplc_pro_activate")){
5354
  $msg .= "<div class='admin_visitor_advanced_info admin_agent_rating wplc_faded_upsell'>
5355
  <strong>" . __("Experience Rating", "wplivechat") . "</strong>
5356
+ <div class='rating'><a target='_BLANK' href='https://wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=experience_ratings'>Pro only</a></div>
5357
  </div>";
5358
  }
5359
  return $msg;
5474
  $content .= "<br><a title='Update Now' href='./update-core.php' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary'>".__("Update now" ,"wplivechat")."</a>";
5475
  }
5476
  } else {
5477
+ $content .= "<p>".__('Get all this and more in the ', 'wp-livechat')."<a href='https://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=reporting' target='_BLANK'>".__("Pro add-on", "wplivechat")."</a></p>";
5478
+ $content .= "<br><a title='Upgrade Now' href='https://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=reporting' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary' target='_BLANK'>".__("Upgrade Now" ,"wplivechat")."</a>";
5479
  }
5480
  $content .= "</td>";
5481
  $content .= "</tr>";
5539
  $content .= "<br><a title='Update Now' href='./update-core.php' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary'>".__("Update now" ,"wplivechat")."</a>";
5540
  }
5541
  } else {
5542
+ $content .= "<p>".__('Get all this and more in the ', 'wp-livechat')."<a href='https://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=data_triggers' target='_BLANK'>".__("Pro add-on", "wplivechat")."</a></p>";
5543
+ $content .= "<br><a title='Upgrade Now' href='https://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=data_triggers' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary' target='_BLANK'>".__("Upgrade Now" ,"wplivechat")."</a>";
5544
  }
5545
  $content .= "</td>";
5546
  $content .= "</tr>";
5577
  $content .= "<br><a title='Update Now' href='./update-core.php' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary'>".__("Update now" ,"wplivechat")."</a>";
5578
  }
5579
  } else {
5580
+ $content .= "<p>".__('Get all this and more in the ', 'wp-livechat')."<a href='https://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=custom_fields' target='_BLANK'>".__("Pro add-on", "wplivechat")."</a></p>";
5581
+ $content .= "<br><a title='Upgrade Now' href='https://www.wp-livechat.com/features/?utm_source=plugin&utm_medium=link&utm_campaign=custom_fields' style='width: 200px;height: 58px;text-align: center;line-height: 56px;font-size: 18px;' class='button button-primary' target='_BLANK'>".__("Upgrade Now" ,"wplivechat")."</a>";
5582
  }
5583
  $content .= "</td>";
5584
  $content .= "</tr>";
5658
  * @return void
5659
  */
5660
  function wplc_custom_scripts_scripts(){
5661
+ global $wplc_version;
5662
 
5663
  if ( isset( $_GET['page'] ) ) {
5664
  if ( $_GET['page'] == 'wplivechat-menu-settings' ) {
5665
  wp_enqueue_script( "wplc-custom-script-tab-ace",'//cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ace.js', array('jquery') );
5666
  } else if ( $_GET['page'] == 'wplivechat-menu-dashboard' ) {
5667
+ wp_register_script('wplc-admin-js-agent-common', WLPC_UPDATE_SERVER."/remote_files/assets/js/wplc_common_node.js", null, $wplc_version, false);
5668
+ wp_enqueue_script('wplc-admin-js-agent-common');
5669
  wp_enqueue_script( 'wplc-custom-script-dashboard', plugins_url( '/js/wplc_dashboard.js', __FILE__ ), array('jquery'), null, true );
5670
  }
5671
 
6029
  'string_title' => __( "Sending Transcript", "wplivechat" ),
6030
  'string_close' => __( "Close", "wplivechat" ),
6031
  'string_chat_emailed' => __( "The chat transcript has been emailed.", "wplivechat" ),
6032
+ 'string_error1' => __( "There was a problem emailing the chat.", "wplivechat" )
6033
  );
6034
  wp_localize_script( 'wplc_transcript_admin', 'wplc_transcript_nonce', $wplc_transcript_localizations );
6035
  wp_enqueue_script( 'wplc_transcript_admin' );
6275
  echo " <td>";
6276
  echo " <textarea cols='85' rows='15' name=\"wplc_et_email_body\">";
6277
  if ( isset( $wplc_et_settings['wplc_et_email_body'] ) ) {
6278
+ echo trim(html_entity_decode( stripslashes( $wplc_et_settings['wplc_et_email_body'] ) ));
6279
  }
6280
  echo " </textarea>";
6281
  echo " </td>";
6287
  echo " <td>";
6288
  echo " <textarea cols='85' rows='5' name=\"wplc_et_email_header\">";
6289
  if ( isset( $wplc_et_settings['wplc_et_email_header'] ) ) {
6290
+ echo trim(stripslashes( $wplc_et_settings['wplc_et_email_header'] ));
6291
  }
6292
  echo " </textarea>";
6293
  echo " </td>";
6298
  echo " <td>";
6299
  echo " <textarea cols='85' rows='5' name=\"wplc_et_email_footer\">";
6300
  if ( isset( $wplc_et_settings['wplc_et_email_footer'] ) ) {
6301
+ echo trim(stripslashes( $wplc_et_settings['wplc_et_email_footer'] ));
6302
  }
6303
  echo " </textarea>";
6304
  echo " </td>";
6356
  } else {
6357
  return "";
6358
  }
6359
+ }