WP Live Chat Support - Version 8.0.02

Version Description

  • 2018-01-29 =
  • Fixed a PHP warning
  • Modified rest_url filter to no longer use anonymous function
  • Fixed styling conflicts between our settings and other pages in WordPress admin
  • Fixed issues with file uploads (Bleeper core)
  • Fixed hints in settings area
  • Fixed links in chat bubbles not being clearly visible
  • Fixed assets loading on all admin pages when option is disabled
  • Fixed the bug that caused issues if your folder name was not wp-live-chat-support
  • Fixed issue where inactive chat status is not removed when new message from that chat is received
  • Welcome page styling fixed
Download this release

Release Info

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

Code changes from version 8.0.01 to 8.0.02

Files changed (47) hide show
  1. css/admin-chat-box-style.css +0 -0
  2. css/chat-style.css +0 -1
  3. css/remote_dash_styles.css +161 -128
  4. css/support-css.css +0 -0
  5. css/themes/classic.css +0 -0
  6. css/themes/modern.css +0 -0
  7. css/wplc-survey-style.css +5 -0
  8. css/wplcstyle.css +129 -6
  9. functions.php +3 -5
  10. includes/blocks/wplc-chat-box/block.js +1 -1
  11. includes/blocks/wplc-chat-box/index.php +4 -4
  12. includes/blocks/wplc-inline-chat-box/block.js +127 -0
  13. includes/blocks/wplc-inline-chat-box/editor.css +178 -0
  14. includes/blocks/wplc-inline-chat-box/index.php +61 -0
  15. includes/blocks/wplc-inline-chat-box/style.css +1 -0
  16. includes/blocks/wplc-inline-chat-box/wplc_functions.js +39 -0
  17. includes/credits.php +0 -0
  18. includes/feedback-page.php +2 -2
  19. includes/modal_control.php +0 -0
  20. includes/settings_page.php +10 -10
  21. includes/shortcodes.php +29 -0
  22. includes/surveys.php +2 -2
  23. includes/update_control.class.php +0 -0
  24. includes/welcome_page.php +1 -1
  25. js/themes/classic.js +0 -0
  26. js/themes/modern.js +0 -0
  27. js/wplc-admin-modal.js +0 -0
  28. js/wplc-admin-pointers.js +0 -0
  29. js/wplc_offline_messages.js +0 -26
  30. js/wplc_server.js +9 -1
  31. js/wplc_surveys.js +0 -0
  32. js/wplc_tabs.js +1 -0
  33. js/wplc_u.js +2 -2
  34. js/wplc_u_admin.js +23 -0
  35. js/wplc_u_admin_chat.js +0 -0
  36. js/wplc_u_admin_events.js +6 -0
  37. modules/api/wplc-api-functions.php +0 -0
  38. modules/api/wplc-api-routes.php +0 -0
  39. modules/api/wplc-api.php +2 -2
  40. modules/beta_features.php +1 -1
  41. modules/documentation_suggestions.php +1 -1
  42. modules/google_analytics.php +1 -1
  43. modules/module_subscribe.php +3 -3
  44. modules/node_server.php +6 -6
  45. modules/webhooks_manager.php +4 -4
  46. readme.txt +35 -23
  47. wp-live-chat-support.php +101 -91
css/admin-chat-box-style.css CHANGED
File without changes
css/chat-style.css CHANGED
@@ -921,4 +921,3 @@ span.wplc_system_notification {
921
  .wplc_block.lg .wplc_block_icon {
922
  margin-right: 13px;
923
  }
924
-
921
  .wplc_block.lg .wplc_block_icon {
922
  margin-right: 13px;
923
  }
 
css/remote_dash_styles.css CHANGED
@@ -73,6 +73,11 @@
73
  position: absolute;
74
  }
75
 
 
 
 
 
 
76
  .chatArea span.messageBody {
77
  display: block;
78
  clear: both;
@@ -95,6 +100,7 @@
95
  }
96
  div#choose_online {
97
  position: absolute;
 
98
  top: 38px;
99
  right: 0px;
100
  color: #fff;
@@ -241,6 +247,145 @@ span.bleeper-edit-message {
241
  }
242
  }
243
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
  /**
245
  * Page with the list of visitors currently on the site, before opening a chat in the admin dashboard
246
  */
@@ -274,7 +419,7 @@ span.bleeper-edit-message {
274
  }
275
  #nifty_wrapper .visitorListBoxHeader .vcol.visActionCol,
276
  #nifty_wrapper .visitorListBox .visitorList .vcol.visActionCol {
277
- width: 10%;
278
  }
279
 
280
  /* List header */
@@ -433,126 +578,7 @@ span.bleeper-edit-message {
433
 
434
  }
435
 
436
- /**
437
- * Pop Out Dashboard
438
- */
439
- .bleeper-out-dash #nifty_wrapper {
440
- border-radius:15px;
441
- }
442
- #nifty_wrapper .nifty_add_media_button {
443
- position: absolute;
444
- right: 0;
445
- bottom: 0;
446
- width: 60px;
447
- height: 60px;
448
- padding-left: 10px;
449
- padding-right: 10px;
450
- padding-top: 5px;
451
- }
452
- .bleeper-out-dash .wrap {
453
- position: fixed;
454
- right: 35px;
455
- top: 30px;
456
- width: 70%;
457
- min-width:400px;
458
- box-shadow: 20px 20px 20px 20px rgba(0,0,0,.07);
459
- box-shadow: 0 5px 40px rgba(0,0,0,.66)!important;
460
- border-radius: 20px;
461
- padding: 0;
462
- margin: 5px;
463
- background-color: transparent !important;
464
- }
465
- .bleeper-out-dash .floating-right-toolbar i {
466
- position:fixed !important;
467
- top:56%;
468
- right:7px;
469
- }
470
- .bleeper-out-dash .info_chat img {
471
- clear: both;
472
- display: block;
473
- }
474
 
475
- .bleeper-out-dash #user_count {
476
- padding: 6px !important;
477
- padding-bottom: 30px !important;
478
- text-align: center;
479
- }
480
- .bleeper-out-dash #active_count {
481
- font-size: 1em !important;
482
- top: 0px;
483
- }
484
- .bleeper-out-dash #active_count_string {
485
- font-size: 0.8em !important;
486
- }
487
- .bleeper-out-dash #choose_online {
488
- top: 28px !important;
489
- width: 100%;
490
- padding-right: 0;
491
- text-align: center;
492
- }
493
- .bleeper-out-dash .switchery-small {
494
- height: 15px;
495
- width: 24px;
496
- }
497
- .bleeper-out-dash .visActionCol {
498
- float:right !important;
499
- }
500
- .bleeper-out-dash .visChatStatusCol {
501
- width:20% !important;
502
- }
503
- .bleeper-out-dash .visChatDepCol {
504
- display: none !important;
505
- }
506
- .bleeper-out-dash .agents_involved {
507
- display: none !important;
508
- }
509
- .bleeper-out-dash .switchery-small>small {
510
- width: 14px !important;
511
- height: 14px !important;
512
- }
513
- .bleeper-out-dash #user_list {
514
- width: 25%;
515
- }
516
- .bleeper-out-dash .agent_count {
517
- display: none;
518
- }
519
- .bleeper-out-dash .history_link {
520
- width: 100%;
521
- }
522
- .bleeper-out-dash #nifty_wrapper {
523
- background-color:transparent !important;
524
- }
525
- .bleeper-out-dash .userListBox_Wrapper {
526
- background-color: #fff;
527
- top: 86px !important;
528
- }
529
- .bleeper-out-dash .nifty_bg_holder {
530
- position:absolute;
531
- left:180px;
532
- border-top-right-radius: 15px;
533
- border-bottom-right-radius: 15px;
534
- }
535
- #toolbar-item-open-bleeper {
536
- position:fixed;
537
- right:7px;
538
- top:50%;
539
- }
540
-
541
- .bleeper-out-dash .user_header_wrapper_info {
542
- width:60% !important;
543
- }
544
-
545
- .admin_visitor_advanced_info {
546
- border: 1px solid #ccc;
547
- border-radius: 3px;
548
- padding: 15px;
549
- background: #fdfdfd;
550
- font-size:12px;
551
- }
552
- .admin_visitor_advanced_info hr {
553
- margin-top:5px !important;
554
- margin-bottom:5px !important;
555
- }
556
 
557
  .wplc-chat-box-notification--disabled {
558
  padding: 5px;
@@ -1186,8 +1212,8 @@ span.wplc_system_notification {
1186
  }
1187
 
1188
  /* Main containers of the other settings (Surveys, History ...) */
1189
- #wpbody-content #screen-meta + .wrap div,
1190
- #wpbody-content #screen-meta + .wp-list-table {
1191
  display: block;
1192
  position: relative;
1193
  left: 0px;
@@ -1195,10 +1221,11 @@ span.wplc_system_notification {
1195
  margin-top: 5px;
1196
  height:auto;
1197
  }
1198
- #wpbody-content #screen-meta + .wrap div {
1199
  width:98% !important;
1200
  }
1201
- #wpbody-content #screen-meta + .wrap .widefat {
 
1202
  width: 100% !important;
1203
  }
1204
 
@@ -1209,13 +1236,19 @@ span.wplc_system_notification {
1209
  }
1210
 
1211
  /* Live Chat -> Feedback */
1212
- #wpbody-content #screen-meta + .wrap form[name='wplc_feedback'] {
1213
  width: 70%;
1214
  max-width: 70%;
1215
  }
1216
- #wpbody-content #screen-meta + .wrap form[name='wplc_feedback'] .wp-list-table {
1217
  width: 100% !important;
1218
  }
1219
- #wpbody-content #screen-meta + .wrap form[name='wplc_feedback'] .wp-list-table tbody td input {
1220
  width: 100%;
1221
- }
 
 
 
 
 
 
73
  position: absolute;
74
  }
75
 
76
+ .chatArea .messages a{
77
+ color: #ffffff !important;
78
+ text-decoration: underline !important;
79
+ }
80
+
81
  .chatArea span.messageBody {
82
  display: block;
83
  clear: both;
100
  }
101
  div#choose_online {
102
  position: absolute;
103
+ /* width: 100%; */
104
  top: 38px;
105
  right: 0px;
106
  color: #fff;
247
  }
248
  }
249
 
250
+ /**
251
+ * POP OUT DASHBOARD STYLES
252
+ */
253
+ .bleeper-out-dash #nifty_wrapper {
254
+ border-radius:15px;
255
+ }
256
+ #nifty_wrapper .nifty_add_media_button {
257
+ position: absolute;
258
+ right: 0;
259
+ bottom: 0;
260
+ width: 60px;
261
+ height: 60px;
262
+ padding-left: 10px;
263
+ padding-right: 10px;
264
+ padding-top: 5px;
265
+ }
266
+ .bleeper-out-dash .wrap {
267
+ position: fixed;
268
+ right: 35px;
269
+ top: 30px;
270
+ width: 70%;
271
+ min-width:400px;
272
+ box-shadow: 20px 20px 20px 20px rgba(0,0,0,.07);
273
+ box-shadow: 0 5px 40px rgba(0,0,0,.66)!important;
274
+ border-radius: 20px;
275
+ padding: 0;
276
+ margin: 5px;
277
+ background-color: transparent !important;
278
+ }
279
+ .bleeper-out-dash .floating-right-toolbar i {
280
+ position:fixed !important;
281
+ top:56%;
282
+ right:7px;
283
+ }
284
+ .bleeper-out-dash .info_chat img {
285
+ clear: both;
286
+ display: block;
287
+ }
288
+
289
+ .bleeper-out-dash #user_count {
290
+ padding: 6px !important;
291
+ padding-bottom: 30px !important;
292
+ text-align: center;
293
+ }
294
+ .bleeper-out-dash #active_count {
295
+ font-size: 1em !important;
296
+ top: 0px;
297
+ }
298
+ .bleeper-out-dash #active_count_string {
299
+ font-size: 0.8em !important;
300
+ }
301
+ .bleeper-out-dash #choose_online {
302
+ top: 28px !important;
303
+ width: 100%;
304
+ padding-right: 0;
305
+ text-align: center;
306
+ }
307
+ .bleeper-out-dash .switchery-small {
308
+ height: 15px;
309
+ width: 24px;
310
+ }
311
+ .bleeper-out-dash .visActionCol {
312
+ float:right !important;
313
+ }
314
+ .bleeper-out-dash .visChatStatusCol {
315
+ width:20% !important;
316
+ }
317
+ .bleeper-out-dash .visChatDepCol {
318
+ display: none !important;
319
+ }
320
+ .bleeper-out-dash .agents_involved {
321
+ display: none !important;
322
+ }
323
+ .bleeper-out-dash .switchery-small>small {
324
+ width: 14px !important;
325
+ height: 14px !important;
326
+ }
327
+ .bleeper-out-dash #user_list {
328
+
329
+ width: 25%;
330
+ }
331
+ .bleeper-out-dash .agent_count {
332
+ display: none;
333
+ }
334
+ .bleeper-out-dash .history_link {
335
+ width: 100%;
336
+ }
337
+ .bleeper-out-dash #nifty_wrapper {
338
+ background-color:transparent !important;
339
+ }
340
+ .bleeper-out-dash .userListBox_Wrapper {
341
+ background-color: #fff;
342
+ top: 86px !important;
343
+ }
344
+ .bleeper-out-dash .nifty_bg_holder {
345
+ position:absolute;
346
+ left:180px;
347
+ border-top-right-radius: 15px;
348
+ border-bottom-right-radius: 15px;
349
+ }
350
+ #toolbar-item-open-bleeper {
351
+ position:fixed;
352
+ right:7px;
353
+ top:50%;
354
+ }
355
+
356
+ .bleeper-out-dash .user_header_wrapper_info {
357
+ width:60% !important;
358
+ }
359
+
360
+ .admin_visitor_advanced_info {
361
+ border: 1px solid #ccc;
362
+ border-radius: 3px;
363
+ padding: 15px;
364
+ background: #fdfdfd;
365
+ font-size:12px;
366
+ }
367
+
368
+ .admin_visitor_advanced_info hr {
369
+ margin-top:5px !important;
370
+ margin-bottom:5px !important;
371
+ }
372
+
373
+ .wplc-chat-box-notification--disabled {
374
+ padding: 5px;
375
+ padding-left: 15px;
376
+ padding-right: 15px;
377
+ display: block;
378
+ width: fit-content;
379
+ margin-top: 5px;
380
+ margin-left: 2px;
381
+ border-left: 4px solid #d26d6d;
382
+ background-color: #fff;
383
+ font-weight: bold;
384
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
385
+ -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
386
+ -moz-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
387
+ }
388
+
389
  /**
390
  * Page with the list of visitors currently on the site, before opening a chat in the admin dashboard
391
  */
419
  }
420
  #nifty_wrapper .visitorListBoxHeader .vcol.visActionCol,
421
  #nifty_wrapper .visitorListBox .visitorList .vcol.visActionCol {
422
+ width: 20%;
423
  }
424
 
425
  /* List header */
578
 
579
  }
580
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
581
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
582
 
583
  .wplc-chat-box-notification--disabled {
584
  padding: 5px;
1212
  }
1213
 
1214
  /* Main containers of the other settings (Surveys, History ...) */
1215
+ #wpbody-content #screen-meta + .wplc_wrap div,
1216
+ #wpbody-content #screen-meta + .wplc_list_table {
1217
  display: block;
1218
  position: relative;
1219
  left: 0px;
1221
  margin-top: 5px;
1222
  height:auto;
1223
  }
1224
+ #wpbody-content #screen-meta > .wplc_wrap div {
1225
  width:98% !important;
1226
  }
1227
+
1228
+ #wpbody-content #screen-meta + .wplc_wrap .widefat {
1229
  width: 100% !important;
1230
  }
1231
 
1236
  }
1237
 
1238
  /* Live Chat -> Feedback */
1239
+ #wpbody-content #screen-meta + .wplc_wrap form[name='wplc_feedback'] {
1240
  width: 70%;
1241
  max-width: 70%;
1242
  }
1243
+ #wpbody-content #screen-meta + .wplc_wrap form[name='wplc_feedback'] .wplc_list_table {
1244
  width: 100% !important;
1245
  }
1246
+ #wpbody-content #screen-meta + .wplc_wrap form[name='wplc_feedback'] .wplc_list_table tbody td input {
1247
  width: 100%;
1248
+ }
1249
+
1250
+ /* Link override */
1251
+ #nifty_wrapper .messages .messageBody a{
1252
+ color: #fff !important;
1253
+ text-decoration: underline !important;
1254
+ }
css/support-css.css CHANGED
File without changes
css/themes/classic.css CHANGED
File without changes
css/themes/modern.css CHANGED
File without changes
css/wplc-survey-style.css CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  #nimblesquirrel_div { width: auto !important; }
2
  html #nimblesquirrel_main { border-bottom: initial;}
3
 
@@ -6,6 +9,8 @@ html #nimblesquirrel_main { border-bottom: initial;}
6
  border: 0 !important;
7
  }
8
 
 
 
9
  #nimblesquirrel_div {
10
  width: 100% !important;
11
  }
1
+
2
+
3
+
4
  #nimblesquirrel_div { width: auto !important; }
5
  html #nimblesquirrel_main { border-bottom: initial;}
6
 
9
  border: 0 !important;
10
  }
11
 
12
+
13
+
14
  #nimblesquirrel_div {
15
  width: 100% !important;
16
  }
css/wplcstyle.css CHANGED
@@ -27,6 +27,8 @@
27
  line-height: 30px;
28
  }
29
 
 
 
30
  .bleeper-edit-message {
31
  display:none;
32
  cursor: pointer;
@@ -37,11 +39,6 @@
37
  }
38
 
39
 
40
- #wp-live-chat .wpcf_wrapper {
41
- display: block;
42
- position: initial;
43
- padding: 20px;
44
- }
45
 
46
  /**
47
  * Mobile Responsiveness (Jarek)
@@ -106,4 +103,130 @@
106
  /* Gutenberg styles */
107
  #wplc-chat-box.disabled {
108
  display: none;
109
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  line-height: 30px;
28
  }
29
 
30
+
31
+
32
  .bleeper-edit-message {
33
  display:none;
34
  cursor: pointer;
39
  }
40
 
41
 
 
 
 
 
 
42
 
43
  /**
44
  * Mobile Responsiveness (Jarek)
103
  /* Gutenberg styles */
104
  #wplc-chat-box.disabled {
105
  display: none;
106
+ }
107
+
108
+ <<<<<<< HEAD
109
+ #wplc_chatbox .wplc-user-message a,
110
+ #wplc_chatbox .wplc-admin-message a {
111
+ color: #ffffff !important;
112
+ text-decoration:underline !important;
113
+ =======
114
+ /* Gutenberg & Shortcode Chat Box styles */
115
+
116
+ .wplc_live_chat_support_shortcode .wp-live-chat-wraper {
117
+ position: relative;
118
+ z-index: 0;
119
+ display: block;
120
+ }
121
+
122
+ .wplc_live_chat_support_shortcode #wp-live-chat-4 {
123
+ position: relative;
124
+ height: 500px;
125
+ z-index: 0;
126
+ bottom: unset;
127
+ right: unset;
128
+ left: 70px;
129
+ top: -80px;
130
+ }
131
+
132
+ .wplc_live_chat_support_shortcode #wplc_hovercard {
133
+ position: absolute;
134
+ top: 0;
135
+ left: 70px;
136
+ bottom: unset;
137
+ z-index: 0;
138
+ }
139
+
140
+ .wplc_live_chat_support_shortcode #wp-live-chat {
141
+ position: relative;
142
+ z-index: 0;
143
+ }
144
+
145
+ .wplc_live_chat_support_shortcode {
146
+ position: relative;
147
+ transition: all .3s ease-in-out;
148
+ z-index: 10;
149
+ }
150
+
151
+ .wplc_live_chat_support_shortcode #wp-live-chat-2 {
152
+ position: relative;
153
+ left: 70px;
154
+ z-index: 5;
155
+ }
156
+
157
+ @media screen and (max-width: 500px) {
158
+ .wplc_live_chat_support_shortcode #wp-live-chat-4 {
159
+ max-width: 280px;
160
+ }
161
+ .wplc_live_chat_support_shortcode #wp-live-chat-2 {
162
+ left: 0px !important;
163
+ }
164
+ .wplc_live_chat_support_shortcode #wplc_hovercard {
165
+ top: 80px !important;
166
+ left: -20px !important;
167
+ }
168
+ }
169
+
170
+ @media screen and (max-width: 400px) {
171
+ .wplc_live_chat_support_shortcode #wp-live-chat-4 {
172
+ max-width: 240px;
173
+ }
174
+ }
175
+
176
+
177
+
178
+ .wplc_live_chat_support_shortcode #wp-live-chat-4 {
179
+ margin-bottom: 65px !important;
180
+ }
181
+ /* WPLC Gutenberg style: Wide */
182
+ .wplc_live_chat_support_shortcode.wplc_wide #wp-live-chat-4 {
183
+ width: 100%;
184
+ left: 0;
185
+ top: 0px;
186
+ }
187
+
188
+ .wplc_live_chat_support_shortcode.wplc_wide #wplc_hovercard {
189
+ top: 0px;
190
+ left: 0;
191
+ margin: 0 auto;
192
+ width: 70%;
193
+ }
194
+
195
+ .wplc_live_chat_support_shortcode.wplc_wide #wp-live-chat-2 {
196
+ top: 0;
197
+ width: 100%;
198
+ left: 0;
199
+ }
200
+
201
+ /* WPLC Gutenberg style: Center */
202
+ .wplc_live_chat_support_shortcode.wplc_center #wp-live-chat-header {
203
+ margin: 0 auto;
204
+ left: 0;
205
+ top: 0px;
206
+ margin-bottom: 10px;
207
+ }
208
+
209
+ .wplc_live_chat_support_shortcode.wplc_center #wp-live-chat-4 {
210
+ margin: 0 auto;
211
+ left: 0;
212
+ top: 0px;
213
+ }
214
+
215
+ .wplc_live_chat_support_shortcode.wplc_center #wplc_hovercard {
216
+ left: 0;
217
+ margin: 0 auto;
218
+ top: 75px;
219
+ }
220
+
221
+ .wplc_live_chat_support_shortcode.wplc_center #wp-live-chat-2 {
222
+ left: 0px;
223
+ margin: 0px auto;
224
+ top: 0px;
225
+ }
226
+
227
+ /* Link override */
228
+ #wplc_chatbox .wplc-user-message a,
229
+ #wplc_chatbox .wplc-admin-message a {
230
+ color: #fff !important;
231
+ text-decoration:underline !important;
232
+ }
functions.php CHANGED
@@ -139,8 +139,6 @@ function wplc_update_user_on_page($cid, $status = 5,$session) {
139
  function wplc_record_chat_msg($from, $cid, $msg, $rest_check = false, $aid = false, $other = false) {
140
  global $wpdb;
141
  global $wplc_tblname_msgs;
142
- var_dump($aid);
143
- var_dump($cid);
144
 
145
 
146
  if( ! filter_var($cid, FILTER_VALIDATE_INT) ) {
@@ -220,7 +218,7 @@ function wplc_record_chat_msg($from, $cid, $msg, $rest_check = false, $aid = fal
220
  }
221
 
222
  $msg_id = '';
223
- var_dump($other);
224
  if ($other !== false) {
225
  if (!empty($other->msgID)) {
226
  $msg_id = $other->msgID;
@@ -236,7 +234,7 @@ function wplc_record_chat_msg($from, $cid, $msg, $rest_check = false, $aid = fal
236
 
237
  if (!$aid) {
238
  $wplc_current_user = get_current_user_id();
239
- var_dump($wplc_current_user);
240
  if( get_user_meta( $wplc_current_user, 'wplc_ma_agent', true ) ){
241
  $other_data = array('aid'=>$wplc_current_user);
242
  } else {
@@ -2050,7 +2048,7 @@ function wplc_admin_display_missed_chats() {
2050
  //Prompt
2051
  echo "<div class='update-nag' style='margin-top: 0px;margin-bottom: 5px;'>
2052
  ".__("Are you sure you would like to delete this chat?", "wplivechat")."<br>
2053
- <a class='button' href='?page=wplivechat-menu-missed-chats&wplc_action=remove_missed_cid&cid=".sanitize_text_field( $_GET['cid'] )."&wplc_confirm=1''>".__("Yes", "wplivechat")."</a> <a class='button' href='?page=wplivechat-menu-missed-chats'>".__("No", "wplivechat")."</a>
2054
  </div>";
2055
  }
2056
  }
139
  function wplc_record_chat_msg($from, $cid, $msg, $rest_check = false, $aid = false, $other = false) {
140
  global $wpdb;
141
  global $wplc_tblname_msgs;
 
 
142
 
143
 
144
  if( ! filter_var($cid, FILTER_VALIDATE_INT) ) {
218
  }
219
 
220
  $msg_id = '';
221
+
222
  if ($other !== false) {
223
  if (!empty($other->msgID)) {
224
  $msg_id = $other->msgID;
234
 
235
  if (!$aid) {
236
  $wplc_current_user = get_current_user_id();
237
+
238
  if( get_user_meta( $wplc_current_user, 'wplc_ma_agent', true ) ){
239
  $other_data = array('aid'=>$wplc_current_user);
240
  } else {
2048
  //Prompt
2049
  echo "<div class='update-nag' style='margin-top: 0px;margin-bottom: 5px;'>
2050
  ".__("Are you sure you would like to delete this chat?", "wplivechat")."<br>
2051
+ <a class='button' href='?page=wplivechat-menu-missed-chats&wplc_action=remove_missed_cid&cid=".$_GET['cid']."&wplc_confirm=1''>".__("Yes", "wplivechat")."</a> <a class='button' href='?page=wplivechat-menu-missed-chats'>".__("No", "wplivechat")."</a>
2052
  </div>";
2053
  }
2054
  }
includes/blocks/wplc-chat-box/block.js CHANGED
@@ -41,7 +41,7 @@
41
  }
42
 
43
  registerBlockType( 'wp-live-chat-support/wplc-chat-box', {
44
- title: __( 'WP Live Chat Box', 'WPLC' ),
45
  icon: 'format-chat',
46
  category: 'common',
47
 
41
  }
42
 
43
  registerBlockType( 'wp-live-chat-support/wplc-chat-box', {
44
+ title: __( 'WP Live Chat Trigger (WP Live Chat Support)', 'WPLC' ),
45
  icon: 'format-chat',
46
  category: 'common',
47
 
includes/blocks/wplc-chat-box/index.php CHANGED
@@ -40,7 +40,7 @@ function wplc_gutenberg_settings_content() {
40
 
41
  <div id="tabs-gutenberg">
42
  <h3><?php _e('Gutenberg Blocks', 'wplivechat') ?></h3>
43
- <table class='form-table wp-list-table widefat fixed striped pages'>
44
 
45
  <tr>
46
  <td width='300' valign='top'><?php _e('Enable Gutenberg Blocks', 'wplivechat') ?>:</td>
@@ -65,8 +65,8 @@ function wplc_gutenberg_settings_content() {
65
  <td width='300' valign='top'><?php _e('Block Logo', 'wplivechat') ?>:</td>
66
 
67
  <td>
68
- <input type="button" id="wplc_gutenberg_upload_logo" class="btn-primary" value="Upload Logo"/>
69
- <input type="button" id="wplc_gutenberg_remove_logo" class="btn-default" value="Reset Logo"/>
70
  <input type="hidden" id="wplc_gutenberg_default_logo" value="<?php echo $gutenberg_defail_logo; ?>" />
71
  <input type="hidden" id="wplc_gutenberg_logo" name="wplc_gutenberg_logo" value="<?php echo $gutenberg_logo; ?>"/>
72
  </td>
@@ -117,7 +117,7 @@ function wplc_gutenberg_settings_content() {
117
  </textarea>
118
 
119
 
120
- <input type="button" id="wplc_gutenberg_reset_html" class="btn-default" value="Reset Default"/>
121
  <select id="wplc_custom_templates">
122
  <option selected value="0">Select a Template</option>
123
  <option value="template_default">Default - Dark</option>
40
 
41
  <div id="tabs-gutenberg">
42
  <h3><?php _e('Gutenberg Blocks', 'wplivechat') ?></h3>
43
+ <table class='form-table wp-list-table wplc_list_table widefat fixed striped pages'>
44
 
45
  <tr>
46
  <td width='300' valign='top'><?php _e('Enable Gutenberg Blocks', 'wplivechat') ?>:</td>
65
  <td width='300' valign='top'><?php _e('Block Logo', 'wplivechat') ?>:</td>
66
 
67
  <td>
68
+ <input type="button" id="wplc_gutenberg_upload_logo" class="button button-primary" value="Upload Logo"/>
69
+ <input type="button" id="wplc_gutenberg_remove_logo" class="button button-default" value="Reset Logo"/>
70
  <input type="hidden" id="wplc_gutenberg_default_logo" value="<?php echo $gutenberg_defail_logo; ?>" />
71
  <input type="hidden" id="wplc_gutenberg_logo" name="wplc_gutenberg_logo" value="<?php echo $gutenberg_logo; ?>"/>
72
  </td>
117
  </textarea>
118
 
119
 
120
+ <input type="button" id="wplc_gutenberg_reset_html" class="button button-default" value="Reset Default"/>
121
  <select id="wplc_custom_templates">
122
  <option selected value="0">Select a Template</option>
123
  <option value="template_default">Default - Dark</option>
includes/blocks/wplc-inline-chat-box/block.js ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* BLOCK: WP Live Chat Support - Inline Chat Box */
2
+
3
+ ( function() {
4
+ var __ = wp.i18n.__;
5
+ var el = wp.element.createElement;
6
+ var Editable = wp.blocks.Editable;
7
+ var children = wp.blocks.source.children;
8
+ var registerBlockType = wp.blocks.registerBlockType;
9
+
10
+ var chat_preview_loader = '<div class="wplc_gutenberg_loader"></div>';
11
+
12
+ registerBlockType( 'wp-live-chat-support/wplc-inline-chat-box', {
13
+ title: __( 'WP Live Chat Box (WP Live Chat Support)', 'WPLC' ),
14
+ icon: 'format-chat',
15
+ category: 'common',
16
+ attributes: {
17
+ content: children( 'p' ),
18
+ },
19
+
20
+ edit: function( props ) {
21
+
22
+ var content = props.attributes.content;
23
+ var focus = props.focus;
24
+
25
+ function onChangeContent( newContent ) {
26
+ props.setAttributes( { content: newContent } );
27
+ }
28
+
29
+ $(document).on('change', '.wplc_select_theme', function(){
30
+ var id = $(this).val();
31
+ onChangeContent( id );
32
+ });
33
+
34
+ theme_classes = 'wplc_' + content;
35
+
36
+ element = el(
37
+ 'h3',
38
+ { },
39
+ 'Live Chat Box (WP Live Chat Support)'
40
+ );
41
+
42
+ select_text = el(
43
+ 'span',
44
+ { },
45
+ 'Select a style: '
46
+ );
47
+
48
+ icon = el(
49
+ 'span',
50
+ { className: "wplc_gutenberg_icon dashicons dashicons-format-chat" }
51
+ );
52
+
53
+ chat_box_preview = el(
54
+ 'div',
55
+ {
56
+ className: 'wplc_gutenberg_preview',
57
+ dangerouslySetInnerHTML: { __html: chat_preview_loader }
58
+ }
59
+ );
60
+
61
+ var option_1 = el(
62
+ 'option',
63
+ { value: 'normal', selected: 'selected' },
64
+ 'Normal'
65
+ );
66
+ var option_2 = el(
67
+ 'option',
68
+ { value: 'center' },
69
+ 'Center'
70
+ );
71
+ var option_3 = el(
72
+ 'option',
73
+ { value: 'wide' },
74
+ 'Wide'
75
+ );
76
+
77
+ var select = el(
78
+ 'select',
79
+ { className: 'wplc_select_theme' },
80
+ option_1,
81
+ option_2,
82
+ option_3
83
+ );
84
+
85
+ var style = {
86
+ display: 'none'
87
+ }
88
+
89
+ var editable_content = el(
90
+ Editable,
91
+ {
92
+ tagName: 'p',
93
+ className: 'wplc_selected_theme',
94
+ value: content,
95
+ onChange: onChangeContent,
96
+ focus: focus,
97
+ onFocus: props.setFocus,
98
+ style: style
99
+ },
100
+ );
101
+
102
+ return el(
103
+ 'div',
104
+ { id: 'wplc-inline-chat-box',
105
+ className: theme_classes
106
+ },
107
+ element,
108
+ select_text,
109
+ select,
110
+ editable_content,
111
+ chat_box_preview
112
+ );
113
+ },
114
+
115
+ save: function( props ) {
116
+ var style_class = props.attributes.content;
117
+ var content = '[wplc_live_chat style="' + style_class + '"]';
118
+
119
+ return el(
120
+ 'div',
121
+ { id: 'wplc-inline-chat-box',
122
+ dangerouslySetInnerHTML: { __html: content }
123
+ }
124
+ );
125
+ },
126
+ } );
127
+ })();
includes/blocks/wplc-inline-chat-box/editor.css ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Gutenberg Chat Box Styles */
2
+ @keyframes wplc_fade_in {
3
+ 0% { opacity: 0; padding-top: 20px; }
4
+ 100% { opacity: 1; }
5
+ }
6
+
7
+ #wplc-inline-chat-box .wplc_gutenberg_icon {
8
+ animation: wplc_fade_in .3s;
9
+ color: #ff4d4d;
10
+ display: block;
11
+ margin: 30px auto;
12
+ font-size: 50px;
13
+ }
14
+
15
+ .wplc_gutenberg_chat_box {
16
+ border: 1px solid #eee;
17
+ height: 500px;
18
+ width: 320px;
19
+ border-radius: 6px;
20
+ position: relative;
21
+ display: inline-block;
22
+ margin-top: 0;
23
+ }
24
+
25
+ .wplc_gutenberg_button {
26
+ width: 60px;
27
+ height: 60px;
28
+ background-size: cover;
29
+ background-repeat: no-repeat;
30
+ border-radius: 50%;
31
+ margin-bottom: 10px;
32
+ margin-right: 10px;
33
+ display: inline-block;
34
+ cursor: pointer;
35
+ }
36
+
37
+ .wplc_gutenberg_header {
38
+ border-radius: 6px 6px 0 0;
39
+ height: 80px;
40
+ width: 100%;
41
+ background: #ddd;
42
+ }
43
+
44
+ .wplc_gutenberg_text_box {
45
+ position: absolute;
46
+ bottom: 0;
47
+ left: 0;
48
+ width: 100%;
49
+ height: 60px;
50
+ background: #fff;
51
+ border-bottom-right-radius: 10px;
52
+ border-bottom-left-radius: 10px;
53
+ box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
54
+ }
55
+
56
+ .wplc_gutenberg_avatar {
57
+ display: inline-block;
58
+ margin: 10px;
59
+ margin-left: 35px;
60
+ }
61
+
62
+ .wplc_gutenberg_avatar img {
63
+ border-radius: 50%;
64
+
65
+ }
66
+
67
+ .wplc_gutenberg_name {
68
+ display: inline-block;
69
+ bottom: 24px;
70
+ font-weight: 600;
71
+ color: #fff;
72
+ position: absolute;
73
+ }
74
+
75
+ .wplc_gutenberg_header {
76
+ position: relative;
77
+ box-shadow: 0 5px 20px -2px rgba(0,0,0,.16);
78
+ }
79
+
80
+ .wplc_gutenberg_chevron {
81
+ position: absolute;
82
+ right: 10px;
83
+ bottom: 10px;
84
+ font-size: 24px;
85
+ color: #fff;
86
+ cursor: pointer;
87
+ }
88
+
89
+ .wplc_gutenberg_overlay_image {
90
+ width: 100%;
91
+ height: 100%;
92
+ position: absolute;
93
+ top: 0;
94
+ left: 0;
95
+ border-radius: 6px 6px 0 0;
96
+ background-size: cover;
97
+ background-repeat; no-repeat;
98
+ opacity: .1;
99
+ }
100
+
101
+ .wplc_gutenberg_text_box {
102
+ line-height: 60px;
103
+ padding-left: 30px;
104
+ color: #2b2b2b;
105
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
106
+ font-weight: normal;
107
+ font-size: 12px;
108
+ }
109
+
110
+ .wplc_gutenberg_body {
111
+ width: 100%;
112
+ height: 100%;
113
+ background-size: cover;
114
+ background-repeat: repeat;
115
+ position: absolute;
116
+ top: 0;
117
+ left: 0;
118
+ z-index: -1;
119
+ }
120
+
121
+ .wplc_gutenberg_loader {
122
+ border: 7px solid #f3f3f3;
123
+ border-top: 7px solid #ED832F;
124
+ border-radius: 50%;
125
+ width: 50px;
126
+ height: 50px;
127
+ animation: wplc_spin 2s linear infinite;
128
+ display: block;
129
+ margin: 0 auto;
130
+ }
131
+
132
+ @keyframes wplc_spin {
133
+ 0% { transform: rotate(0deg); }
134
+ 100% { transform: rotate(360deg); }
135
+ }
136
+
137
+ @keyframes wplc_fade_in {
138
+ 0% { opacity: 0; padding-top:20px; }
139
+ 100% { opacity: 1; }
140
+ }
141
+
142
+ .wplc_gutenberg_preview, .wplc_gutenberg_button, .wplc_gutenberg_chat_box {
143
+ animation: wplc_fade_in .3s;
144
+ }
145
+
146
+ .wplc_gutenberg_button {
147
+ transition: all 0.4s ease-in-out;
148
+ margin-bottom: 0;
149
+ }
150
+
151
+ .wplc_select_theme {
152
+ margin-bottom: 10px;
153
+ width: 150px;
154
+ display: block;
155
+ }
156
+
157
+ /* WPLC Gutenberg Themes/Layouts */
158
+ /* Center */
159
+ .wplc_center .wplc_gutenberg_chat_box {
160
+ margin: 0 auto;
161
+ display: block;
162
+ }
163
+
164
+ .wplc_center .wplc_gutenberg_button {
165
+ margin: 0 auto;
166
+ display: block;
167
+ margin-bottom: 10px;
168
+ }
169
+
170
+ /* Wide */
171
+ .wplc_wide .wplc_gutenberg_chat_box {
172
+ width: 100%;
173
+ margin-top: 0;
174
+ }
175
+
176
+ .wplc_wide .wplc_gutenberg_button {
177
+ margin-bottom: 0;
178
+ }
includes/blocks/wplc-inline-chat-box/index.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * BLOCK: WP Live Chat Support Chat box
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ add_action( 'enqueue_block_editor_assets', 'wplc_inline_chat_box_block_editor_assets' );
11
+
12
+ function wplc_inline_chat_box_block_editor_assets() {
13
+ $agent_data['id'] = get_current_user_id();
14
+ $agent_data['info'] = get_userdata( $agent_data['id'] );
15
+ $agent_data['name'] = $agent_data['info']->display_name;
16
+ $agent_data['email'] = md5($agent_data['info']->user_email);
17
+
18
+ $wplc_settings = get_option("WPLC_SETTINGS");
19
+ $style_settings['settings'] = get_option("WPLC_SETTINGS");
20
+ $style_settings['color_1'] = $wplc_settings['wplc_settings_color1'];
21
+
22
+ $wplc_images['background_image'] = plugins_url( '../../../images/bg/' . $wplc_settings['wplc_settings_bg'], __FILE__ );
23
+ $wplc_images['open_icon'] = plugins_url( '../../../images/iconRetina.png', __FILE__ );
24
+ $wplc_images['close_icon'] = plugins_url( '../../../images/iconCloseRetina.png', __FILE__ );
25
+
26
+ // Scripts
27
+ wp_enqueue_script( 'wplc_inline_chat_box',
28
+ plugins_url( 'block.js', __FILE__ ),
29
+ array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
30
+ filemtime( plugin_dir_path( __FILE__ ) . 'block.js' )
31
+ );
32
+
33
+ wp_localize_script( 'wplc_inline_chat_box', 'wplc_agent_info', $agent_data );
34
+ wp_localize_script( 'wplc_inline_chat_box', 'wplc_styles', $style_settings );
35
+ wp_localize_script( 'wplc_inline_chat_box', 'wplc_images', $wplc_images );
36
+
37
+ wp_enqueue_script( 'wplc_chat_box_functions',
38
+ plugins_url( 'wplc_functions.js', __FILE__ ),
39
+ array( 'wp-blocks', 'wp-i18n', 'wp-element' )
40
+ );
41
+
42
+
43
+ // Styles
44
+ wp_enqueue_style( 'wplc_inline_chat_box-editor',
45
+ plugins_url( 'editor.css', __FILE__ ),
46
+ array( 'wp-edit-blocks' ),
47
+ filemtime( plugin_dir_path( __FILE__ ) . 'editor.css' )
48
+ );
49
+ }
50
+
51
+ add_action( 'enqueue_block_assets', 'wplc_inline_chat_box_block_block_assets' );
52
+
53
+ function wplc_inline_chat_box_block_block_assets() {
54
+
55
+ // Styles for front-end
56
+ wp_enqueue_style( 'wplc_inline_chat_box_front_end',
57
+ plugins_url( 'style.css', __FILE__ ),
58
+ array( 'wp-blocks' ),
59
+ filemtime( plugin_dir_path( __FILE__ ) . 'style.css' )
60
+ );
61
+ }
includes/blocks/wplc-inline-chat-box/style.css ADDED
@@ -0,0 +1 @@
 
1
+ /* WPLC Gutenberg Block: Live Chat Box styles */
includes/blocks/wplc-inline-chat-box/wplc_functions.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready( function($){
2
+
3
+ var chat_box_button = '<div class="wplc_gutenberg_button active" style="background-color: #' + wplc_styles.color_1 + '; background-image: url(' + wplc_images.close_icon + ');"></div>';
4
+ var chatbox_preview_img = '<img class="wplc_gutenberg_avatar_img" style="max-width:inherit;" id="agent_grav_' + wplc_agent_info.id + '" title="' + wplc_agent_info.name + '" src="https://www.gravatar.com/avatar/' + wplc_agent_info.email + '?s=60" />';
5
+ var chatbox_preview_overlay_image = '<div class="wplc_gutenberg_overlay_image" style="background-image: url(\'https://www.gravatar.com/avatar/' + wplc_agent_info.email + '?s=60\');"></div>';
6
+ var chat_box_content = chat_box_button + '<div class="wplc_gutenberg_chat_box"><div class="wplc_gutenberg_header" style="background-color: #' + wplc_styles.color_1 + ' !important;"><span class="wplc_gutenberg_avatar">' + chatbox_preview_img + chatbox_preview_overlay_image + '</span><span class="wplc_gutenberg_name">' + wplc_agent_info.name + '</span><span class="wplc_gutenberg_chevron dashicons dashicons-arrow-up-alt2"></span></div><div class="wplc_gutenberg_body" style="background-image: url(' + wplc_images.background_image + ');"></div><div class="wplc_gutenberg_text_box"><span class="wplc_gutenberg_typing">Type here</span></div></div>';
7
+
8
+ // Update select fields on page load
9
+ $('#wplc-inline-chat-box .wplc_selected_theme').each(function(){
10
+ var id = $(this).html();
11
+ $(this).closest('#wplc-inline-chat-box').find('.wplc_select_theme').val(id);
12
+ });
13
+
14
+ $('.wplc_gutenberg_preview').html(chat_box_content);
15
+
16
+ $('.wplc_gutenberg_button').css('transform', 'rotate(90deg)');
17
+
18
+ $(document).on('click', '.wplc_gutenberg_button', function(){
19
+ $(this).toggleClass('active');
20
+ if ($(this).hasClass('active')) {
21
+ wplc_gutenberg_close_chat_box(this, wplc_images.open_icon )
22
+ } else {
23
+
24
+ wplc_gutenberg_open_chat_box(this, wplc_images.close_icon)
25
+ }
26
+ });
27
+ });
28
+
29
+ function wplc_gutenberg_open_chat_box(button, icon) {
30
+ $(button).css('background-image', 'url(' + icon + ')');
31
+ $(button).css('transform', 'rotate(90deg)');
32
+ $(button).closest('.wplc_gutenberg_preview').find('.wplc_gutenberg_chat_box').show();
33
+ }
34
+
35
+ function wplc_gutenberg_close_chat_box(button, icon) {
36
+ $(button).css('background-image', 'url(' + icon + ')');
37
+ $(button).css('transform', 'rotate(0deg)');
38
+ $(button).closest('.wplc_gutenberg_preview').find('.wplc_gutenberg_chat_box').hide();
39
+ }
includes/credits.php CHANGED
File without changes
includes/feedback-page.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  $current_user = wp_get_current_user();
3
- ?><div class="wrap">
4
 
5
 
6
  <div id="icon-options-general" class="icon32 icon32-posts-post"><br></div><h2><?php _e("WP Live Chat Support Feedback","wplivechat") ?></h2>
7
  <form name="wplc_feedback" action="" method="POST">
8
- <table width='100%' class="wp-list-table widefat fixed striped pages" style='width:50%'>
9
  <tr>
10
  <td width="250px" >
11
  <label><?php _e("Your Name","wplivechat"); ?></label>
1
  <?php
2
  $current_user = wp_get_current_user();
3
+ ?><div class="wrap wplc_wrap">
4
 
5
 
6
  <div id="icon-options-general" class="icon32 icon32-posts-post"><br></div><h2><?php _e("WP Live Chat Support Feedback","wplivechat") ?></h2>
7
  <form name="wplc_feedback" action="" method="POST">
8
+ <table width='100%' class="wp-list-table widefat wplc_list_table fixed striped pages" style='width:50%'>
9
  <tr>
10
  <td width="250px" >
11
  <label><?php _e("Your Name","wplivechat"); ?></label>
includes/modal_control.php CHANGED
File without changes
includes/settings_page.php CHANGED
@@ -53,7 +53,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
53
 
54
  ?>
55
  <img src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/ajax-loader.gif'; ?>' id='wplc_settings_page_loader' style='display: block; margin: 20px auto;' />
56
- <div class="wrap" style='display: none;'>
57
 
58
  <style>
59
  .wplc_light_grey{
@@ -129,7 +129,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
129
  </ul>
130
  <div id="tabs-1">
131
  <h3><?php _e("General Settings",'wplivechat')?></h3>
132
- <table class='wp-list-table widefat fixed striped pages' width='700'>
133
  <tr>
134
  <td width='350' valign='top'><?php _e("Chat enabled","wplivechat")?>: </td>
135
  <td>
@@ -304,7 +304,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
304
  </div>
305
  <div id="tabs-2">
306
  <h3><?php _e("Chat Window Settings",'wplivechat')?></h3>
307
- <table class='wp-list-table widefat fixed striped pages'>
308
  <tr>
309
  <td width='300' valign='top'><?php _e("Chat box alignment","wplivechat")?>:</td>
310
  <td>
@@ -524,7 +524,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
524
 
525
  <h3><?php _e("Social", 'wplivechat') ?></h3>
526
  <hr>
527
- <table class='wp-list-table widefat fixed striped pages' >
528
  <tbody>
529
  <tr>
530
  <td width='300' valign='top'><?php _e("Facebook URL", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Link your Facebook page here. Leave blank to hide", "wplivechat") ?>"></i></td>
@@ -561,7 +561,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
561
  </div>
562
  <div id="tabs-3">
563
  <h3><?php _e("Offline Messages", 'wplivechat') ?></h3>
564
- <table class='form-table wp-list-table widefat fixed striped pages' width='100%'>
565
  <tr>
566
  <td width='300'>
567
  <?php _e("Do not allow users to send offline messages", "wplivechat") ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("The chat window will be hidden when it is offline. Users will not be able to send offline messages to you", "wplivechat") ?>"></i>
@@ -616,7 +616,7 @@ if (isset($wplc_settings['wplc_hide_when_offline']) && $wplc_settings['wplc_hide
616
  <h4><?php _e("Email settings", 'wplivechat') ?></h4>
617
 
618
 
619
- <table class='form-table wp-list-table widefat fixed striped pages'>
620
  <tr>
621
  <td width='300' valign='top'>
622
  <?php _e("Email Address", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Email address where offline messages are delivered to. Use comma separated email addresses to send to more than one email address", "wplivechat") ?>"></i>
@@ -638,7 +638,7 @@ if (isset($wplc_settings['wplc_hide_when_offline']) && $wplc_settings['wplc_hide
638
 
639
  </table>
640
 
641
- <table class='form-table wp-list-table widefat fixed striped pages'>
642
  <tr>
643
  <td width="33%"><?php _e("Sending Method", "wplivechat") ?></td>
644
  <td width="33%" style="text-align: center;"><?php _e("WP Mail", "wplivechat") ?></td>
@@ -655,7 +655,7 @@ if (isset($wplc_settings['wplc_hide_when_offline']) && $wplc_settings['wplc_hide
655
  </tr>
656
  </table>
657
  <hr/>
658
- <table id="wplc_smtp_details" class='form-table wp-list-table widefat fixed striped pages' width='100%'>
659
  <tr>
660
  <td width="300" valign="top">
661
  <?php _e("Host", "wplivechat") ?>:
@@ -758,7 +758,7 @@ if (isset($wplc_settings['wplc_hide_when_offline']) && $wplc_settings['wplc_hide
758
  }
759
  </style>
760
  <h3><?php _e("Styling",'wplivechat')?></h3>
761
- <table class='form-table wp-list-table widefat fixed striped pages'>
762
 
763
 
764
  <tr style='margin-bottom: 10px;'>
@@ -1030,7 +1030,7 @@ if (isset($wplc_settings['wplc_hide_when_offline']) && $wplc_settings['wplc_hide
1030
  </div>
1031
  <div id="tabs-7">
1032
  <h3><?php _e("Blocked Visitors - Based on IP Address", "wplivechat") ?></h3>
1033
- <table class='form-table wp-list-table widefat fixed striped pages' width='100%'>
1034
  <tr>
1035
  <td>
1036
  <textarea name="wplc_ban_users_ip" style="width: 50%; min-height: 200px;" placeholder="<?php _e('Enter each IP Address you would like to block on a new line', 'wplivechat'); ?>" autocomplete="false"><?php
53
 
54
  ?>
55
  <img src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/ajax-loader.gif'; ?>' id='wplc_settings_page_loader' style='display: block; margin: 20px auto;' />
56
+ <div class="wrap wplc_wrap" style='display: none;'>
57
 
58
  <style>
59
  .wplc_light_grey{
129
  </ul>
130
  <div id="tabs-1">
131
  <h3><?php _e("General Settings",'wplivechat')?></h3>
132
+ <table class='wp-list-table wplc_list_table widefat fixed striped pages' width='700'>
133
  <tr>
134
  <td width='350' valign='top'><?php _e("Chat enabled","wplivechat")?>: </td>
135
  <td>
304
  </div>
305
  <div id="tabs-2">
306
  <h3><?php _e("Chat Window Settings",'wplivechat')?></h3>
307
+ <table class='wp-list-table wplc_list_table widefat fixed striped pages'>
308
  <tr>
309
  <td width='300' valign='top'><?php _e("Chat box alignment","wplivechat")?>:</td>
310
  <td>
524
 
525
  <h3><?php _e("Social", 'wplivechat') ?></h3>
526
  <hr>
527
+ <table class='wp-list-table wplc_list_table widefat fixed striped pages' >
528
  <tbody>
529
  <tr>
530
  <td width='300' valign='top'><?php _e("Facebook URL", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Link your Facebook page here. Leave blank to hide", "wplivechat") ?>"></i></td>
561
  </div>
562
  <div id="tabs-3">
563
  <h3><?php _e("Offline Messages", 'wplivechat') ?></h3>
564
+ <table class='form-table wp-list-table wplc_list_table widefat fixed striped pages' width='100%'>
565
  <tr>
566
  <td width='300'>
567
  <?php _e("Do not allow users to send offline messages", "wplivechat") ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("The chat window will be hidden when it is offline. Users will not be able to send offline messages to you", "wplivechat") ?>"></i>
616
  <h4><?php _e("Email settings", 'wplivechat') ?></h4>
617
 
618
 
619
+ <table class='form-table wp-list-table wplc_list_table widefat fixed striped pages'>
620
  <tr>
621
  <td width='300' valign='top'>
622
  <?php _e("Email Address", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Email address where offline messages are delivered to. Use comma separated email addresses to send to more than one email address", "wplivechat") ?>"></i>
638
 
639
  </table>
640
 
641
+ <table class='form-table wp-list-table wplc_list_table widefat fixed striped pages'>
642
  <tr>
643
  <td width="33%"><?php _e("Sending Method", "wplivechat") ?></td>
644
  <td width="33%" style="text-align: center;"><?php _e("WP Mail", "wplivechat") ?></td>
655
  </tr>
656
  </table>
657
  <hr/>
658
+ <table id="wplc_smtp_details" class='form-table wp-list-table wplc_list_table widefat fixed striped pages' width='100%'>
659
  <tr>
660
  <td width="300" valign="top">
661
  <?php _e("Host", "wplivechat") ?>:
758
  }
759
  </style>
760
  <h3><?php _e("Styling",'wplivechat')?></h3>
761
+ <table class='form-table wp-list-table wplc_list_table widefat fixed striped pages'>
762
 
763
 
764
  <tr style='margin-bottom: 10px;'>
1030
  </div>
1031
  <div id="tabs-7">
1032
  <h3><?php _e("Blocked Visitors - Based on IP Address", "wplivechat") ?></h3>
1033
+ <table class='form-table wp-list-table wplc_list_table widefat fixed striped pages' width='100%'>
1034
  <tr>
1035
  <td>
1036
  <textarea name="wplc_ban_users_ip" style="width: 50%; min-height: 200px;" placeholder="<?php _e('Enter each IP Address you would like to block on a new line', 'wplivechat'); ?>" autocomplete="false"><?php
includes/shortcodes.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ add_filter("init","wplc_test",10,4);
4
+
5
+ function wplc_test() {
6
+ add_shortcode('wplc_live_chat', 'wplc_live_chat_box_shortcode');
7
+ }
8
+
9
+ function wplc_live_chat_box_shortcode( $atts, $content = null ) {
10
+ $wplc_settings = get_option("WPLC_SETTINGS");
11
+ $logged_in = apply_filters("wplc_loggedin_filter",false);
12
+ $wplc_using_locale = (isset($wplc_settings['wplc_using_localization_plugin']) && $wplc_settings['wplc_using_localization_plugin'] == 1) ? true : false;
13
+
14
+ $wplc_chat_box_content = wplc_theme_control_function($wplc_settings, $logged_in, $wplc_using_locale, $_COOKIE['wplc_cid']);
15
+
16
+ // get attributes
17
+ $atts = shortcode_atts(
18
+ array(
19
+ 'style' => 'normal'
20
+ ),
21
+ $atts,
22
+ 'wplc_live_chat'
23
+ );
24
+
25
+ $output = '<div class="wplc_live_chat_support_shortcode wplc_' . $atts['style'] . '">';
26
+ $output .= $wplc_chat_box_content;
27
+ $output .= '</div">';
28
+ return $output;
29
+ }
includes/surveys.php CHANGED
@@ -18,7 +18,7 @@ function wplc_survey_hook_control_settings_page_more_tabs() {
18
  ?>
19
  <div id="tabs-survey">
20
  <h3><?php _e("Surveys & Lead Forms", "wplivechat") ?></h3>
21
- <table class='form-table wp-list-table widefat fixed striped pages'>
22
  <tr>
23
  <td width='300' valign='top'><?php _e("Enable Surveys & Lead Forms", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e('Enable surveys and lead forms within your live chat box, either before or after a live chat session.', 'wplivechat'); ?>"></i></td>
24
  <td>
@@ -336,7 +336,7 @@ function wplc_admin_survey_layout() {
336
  update_option("wplc_seen_surveys",true);
337
  $settings = get_option('WPLC_SURVEY_SETTINGS');
338
 
339
- echo"<div class=\"wrap\">";
340
  echo "<h1>" . __("WP Live Chat Surveys & Lead Forms with Nimble Squirrel", "wplivechat") . "</h1>";
341
  echo "<div style='width:100%; display:block; overflow:auto; background-color:#FFF; padding:10px; border-radius:10px;'>";
342
 
18
  ?>
19
  <div id="tabs-survey">
20
  <h3><?php _e("Surveys & Lead Forms", "wplivechat") ?></h3>
21
+ <table class='form-table wp-list-table wplc_list_table widefat fixed striped pages'>
22
  <tr>
23
  <td width='300' valign='top'><?php _e("Enable Surveys & Lead Forms", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e('Enable surveys and lead forms within your live chat box, either before or after a live chat session.', 'wplivechat'); ?>"></i></td>
24
  <td>
336
  update_option("wplc_seen_surveys",true);
337
  $settings = get_option('WPLC_SURVEY_SETTINGS');
338
 
339
+ echo"<div class=\"wrap wplc_wrap\">";
340
  echo "<h1>" . __("WP Live Chat Surveys & Lead Forms with Nimble Squirrel", "wplivechat") . "</h1>";
341
  echo "<div style='width:100%; display:block; overflow:auto; background-color:#FFF; padding:10px; border-radius:10px;'>";
342
 
includes/update_control.class.php CHANGED
File without changes
includes/welcome_page.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php //global $wpgmza_global_array; ?>
2
  <div class="wrap about-wrap">
3
  <p>&nbsp;</p>
4
- <h1 style='margin-right: 0;'><?php _e("Welcome to WP Live Chat Support v8","wplivechat"); ?> <div class="wplc-badge" style=' float: right; display: block; max-width: 20%; margin-left: 15%;'><img src='<?php echo plugins_url( "/wp-live-chat-support/images/wplc-logo.png" ); ?>' /></div></h1>
5
 
6
  <div class="about-text"><?php _e("WP Live Chat Support is the most cost effective, feature rich, amazingly supported and most positively reviewed live chat plugin on WordPress!","wplivechat"); ?></div>
7
 
1
  <?php //global $wpgmza_global_array; ?>
2
  <div class="wrap about-wrap">
3
  <p>&nbsp;</p>
4
+ <h1 style='margin-right: 0;'><?php _e("Welcome to WP Live Chat Support v8","wplivechat"); ?> <div class="wplc-badge" style=' float: right; display: block; max-width: 20%; margin-left: 15%;'><img src='<?php echo WPLC_BASIC_PLUGIN_URL . "images/wplc-logo.png"; ?>' /></div></h1>
5
 
6
  <div class="about-text"><?php _e("WP Live Chat Support is the most cost effective, feature rich, amazingly supported and most positively reviewed live chat plugin on WordPress!","wplivechat"); ?></div>
7
 
js/themes/classic.js CHANGED
File without changes
js/themes/modern.js CHANGED
File without changes
js/wplc-admin-modal.js CHANGED
File without changes
js/wplc-admin-pointers.js CHANGED
File without changes
js/wplc_offline_messages.js DELETED
@@ -1,26 +0,0 @@
1
- jQuery(document).ready(function () {
2
-
3
- jQuery("body").on("click", ".wplc_delete_message", function(e){
4
-
5
- var message_id = jQuery(this).attr('mid');
6
-
7
- var data = {
8
- action: 'delete_offline_message',
9
- security: wplc_ajax_nonce,
10
- mid: message_id
11
- }
12
-
13
- jQuery.post( wplc_ajaxurl, data, function( response ){
14
-
15
- if( response ){
16
-
17
- jQuery('#record_'+message_id).fadeOut(700);
18
-
19
- }
20
-
21
-
22
- });
23
-
24
- });
25
-
26
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wplc_server.js CHANGED
@@ -741,7 +741,15 @@ function wplc_push_message_to_chatbox(the_message, aoru, next) {
741
  }
742
  }
743
  } else {
744
- message_edit_string = "<span class='bleeper-edit-message' style='display:none;'>Edit</span>";
 
 
 
 
 
 
 
 
745
  if (message_aid !== false && typeof wplc_agent_data !== "undefined" && typeof wplc_agent_data[message_aid] !== "undefined") {
746
 
747
  /* we know who the agent was that sent this message (v7.1.00+) */
741
  }
742
  }
743
  } else {
744
+
745
+ if(typeof agent_id !== "undefined" && typeof message_aid !== "undefined"){
746
+ if(parseInt(agent_id) === parseInt(message_aid)){
747
+ //I own this message
748
+ message_edit_string = "<span class='bleeper-edit-message' style='display:none;'>Edit</span>";
749
+
750
+ }
751
+ }
752
+
753
  if (message_aid !== false && typeof wplc_agent_data !== "undefined" && typeof wplc_agent_data[message_aid] !== "undefined") {
754
 
755
  /* we know who the agent was that sent this message (v7.1.00+) */
js/wplc_surveys.js CHANGED
File without changes
js/wplc_tabs.js CHANGED
@@ -263,4 +263,5 @@ jQuery("document").ready(function() {
263
  }
264
  });
265
  });
 
266
  });
263
  }
264
  });
265
  });
266
+
267
  });
js/wplc_u.js CHANGED
@@ -551,7 +551,7 @@ function wplc_loop_response_handler(response, data){
551
  if(wplc_new_message_sound){
552
  wplc_scroll_to_bottom();
553
  if (typeof wplc_enable_ding !== 'undefined' && wplc_enable_ding === "1") {
554
- new Audio(wplc_plugin_url+'/wp-live-chat-support/ding.mp3').play();
555
  }
556
  }
557
  }
@@ -692,7 +692,7 @@ function wplc_loop_response_handler(response, data){
692
  }
693
  wplc_scroll_to_bottom();
694
  if (typeof wplc_enable_ding !== 'undefined' && wplc_enable_ding === "1") {
695
- new Audio(wplc_plugin_url+'/wp-live-chat-support/ding.mp3').play();
696
  }
697
  }
698
  }
551
  if(wplc_new_message_sound){
552
  wplc_scroll_to_bottom();
553
  if (typeof wplc_enable_ding !== 'undefined' && wplc_enable_ding === "1") {
554
+ new Audio(wplc_plugin_url+'ding.mp3').play();
555
  }
556
  }
557
  }
692
  }
693
  wplc_scroll_to_bottom();
694
  if (typeof wplc_enable_ding !== 'undefined' && wplc_enable_ding === "1") {
695
+ new Audio(wplc_plugin_url+'ding.mp3').play();
696
  }
697
  }
698
  }
js/wplc_u_admin.js CHANGED
@@ -467,6 +467,29 @@ jQuery(document).ready(function () {
467
  }
468
 
469
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
470
 
471
  jQuery("body").on("change","#wplc_environment", function() {
472
 
467
  }
468
 
469
 
470
+ jQuery("body").on("click", ".wplc_delete_message", function(e){
471
+
472
+ var message_id = jQuery(this).attr('mid');
473
+
474
+ var data = {
475
+ action: 'delete_offline_message',
476
+ security: wplc_ajax_nonce,
477
+ mid: message_id
478
+ }
479
+
480
+ jQuery.post( wplc_ajaxurl, data, function( response ){
481
+
482
+ if( response ){
483
+
484
+ jQuery('#record_'+message_id).fadeOut(700);
485
+
486
+ }
487
+
488
+
489
+ });
490
+
491
+ });
492
+
493
 
494
  jQuery("body").on("change","#wplc_environment", function() {
495
 
js/wplc_u_admin_chat.js CHANGED
File without changes
js/wplc_u_admin_events.js CHANGED
@@ -173,6 +173,12 @@ jQuery(document).on("bleeper_dom_ready", function(e) {
173
  wplc_repeat_new_chat_notification(1);
174
  });
175
 
 
 
 
 
 
 
176
  jQuery(document).on("bleeper_send_message", function(e) {
177
  var the_message = {}
178
  the_message.originates = 1;
173
  wplc_repeat_new_chat_notification(1);
174
  });
175
 
176
+ jQuery(document).on("bleeper_new_message_for_cid", function(e) {
177
+ if(typeof e.cid !== "undefined"){
178
+ jQuery("#"+e.cid).removeClass('inactive');
179
+ }
180
+ });
181
+
182
  jQuery(document).on("bleeper_send_message", function(e) {
183
  var the_message = {}
184
  the_message.originates = 1;
modules/api/wplc-api-functions.php CHANGED
File without changes
modules/api/wplc-api-routes.php CHANGED
File without changes
modules/api/wplc-api.php CHANGED
@@ -69,7 +69,7 @@ function wplc_api_settings_tab_content() {
69
  $secret_token = get_option("wplc_api_secret_token"); //Checks for token
70
  ?>
71
  <h3><?php _e("REST API", "wplivechat") ?></h3>
72
- <table class=" form-table wp-list-table widefat fixed striped pages">
73
  <tbody>
74
  <tr>
75
  <td width='200'>
@@ -275,7 +275,7 @@ function wplc_api_test_component(){
275
  });
276
 
277
  </script>
278
- <table class="wp-list-table widefat fixed striped pages wplc_rest_consol" style="display:none">
279
  <thead>
280
  <tr>
281
  <th><?php _e("Rest Console ", "wplivechat") ?></th>
69
  $secret_token = get_option("wplc_api_secret_token"); //Checks for token
70
  ?>
71
  <h3><?php _e("REST API", "wplivechat") ?></h3>
72
+ <table class=" form-table wp-list-table wplc_list_table widefat fixed striped pages">
73
  <tbody>
74
  <tr>
75
  <td width='200'>
275
  });
276
 
277
  </script>
278
+ <table class="wp-list-table wplc_list_table widefat fixed striped pages wplc_rest_consol" style="display:none">
279
  <thead>
280
  <tr>
281
  <th><?php _e("Rest Console ", "wplivechat") ?></th>
modules/beta_features.php CHANGED
@@ -45,7 +45,7 @@ function wplc_beta_settings_tab_content() {
45
  /*if (function_exists("wplc_cloud_load_updates")) { echo "<p><span class='update-nag'>".__('The node server cannot be activated while using the Cloud extension as they are not compatible. Please deactivate the cloud extension to make use of the new Node server.','wplivechat')."</span></p>"; } */
46
  do_action("wplc_admin_general_node_compat_check");
47
  ?>
48
- <table class="wp-list-table widefat fixed striped pages">
49
  <tbody>
50
  <tr>
51
  <td width="250" valign="top">
45
  /*if (function_exists("wplc_cloud_load_updates")) { echo "<p><span class='update-nag'>".__('The node server cannot be activated while using the Cloud extension as they are not compatible. Please deactivate the cloud extension to make use of the new Node server.','wplivechat')."</span></p>"; } */
46
  do_action("wplc_admin_general_node_compat_check");
47
  ?>
48
+ <table class="wp-list-table wplc_list_table widefat fixed striped pages">
49
  <tbody>
50
  <tr>
51
  <td width="250" valign="top">
modules/documentation_suggestions.php CHANGED
@@ -21,7 +21,7 @@ function wplc_hook_settings_page_more_doc_suggestions() {
21
  ?>
22
  <div id="tabs-doc-suggest">
23
  <h3><?php _e("Documentation Suggestions", "wplivechat") ?></h3>
24
- <table class="form-table wp-list-table widefat fixed striped pages">
25
  <tbody>
26
  <tr>
27
  <td width="300" valign="top">
21
  ?>
22
  <div id="tabs-doc-suggest">
23
  <h3><?php _e("Documentation Suggestions", "wplivechat") ?></h3>
24
+ <table class="form-table wp-list-table wplc_list_table widefat fixed striped pages">
25
  <tbody>
26
  <tr>
27
  <td width="300" valign="top">
modules/google_analytics.php CHANGED
@@ -10,7 +10,7 @@ function wplc_hook_settings_page_ga_integration() {
10
  $wplc_ga_data = get_option("WPLC_GA_SETTINGS");
11
  ?>
12
  <h4><?php _e("Google Analytics Integration", "wplivechat") ?></h4>
13
- <table class="wp-list-table widefat fixed striped pages">
14
  <tbody>
15
  <tr>
16
  <td width="350" valign="top">
10
  $wplc_ga_data = get_option("WPLC_GA_SETTINGS");
11
  ?>
12
  <h4><?php _e("Google Analytics Integration", "wplivechat") ?></h4>
13
+ <table class="wp-list-table widefat wplc_list_table fixed striped pages">
14
  <tbody>
15
  <tr>
16
  <td width="350" valign="top">
modules/module_subscribe.php CHANGED
@@ -5,8 +5,8 @@
5
  * @param array $links
6
  * @return array
7
  */
8
- add_filter( 'network_admin_plugin_action_links_wp-live-chat-support/wp-live-chat-support.php', 'wplc_plugin_action_links' );
9
- add_filter( 'plugin_action_links_wp-live-chat-support/wp-live-chat-support.php', 'wplc_plugin_action_links' );
10
  function wplc_plugin_action_links( $links ) {
11
 
12
  array_unshift( $links,
@@ -65,7 +65,7 @@ function wplc_plugin_row_js(){
65
  add_filter( 'plugin_row_meta', 'wplc_plugin_row', 4, 10 );
66
  function wplc_plugin_row( $plugin_meta, $plugin_file, $plugin_data, $status ) {
67
 
68
- if ( $plugin_file == "wp-live-chat-support/wp-live-chat-support.php") {
69
  $check = get_user_meta(get_current_user_id(),"wplc_subscribed");
70
 
71
  $wplc_current_user = get_current_user_id();
5
  * @param array $links
6
  * @return array
7
  */
8
+ add_filter( 'network_admin_plugin_action_links_' . WPLC_PLUGIN, 'wplc_plugin_action_links' );
9
+ add_filter( 'plugin_action_links_' . WPLC_PLUGIN, 'wplc_plugin_action_links' );
10
  function wplc_plugin_action_links( $links ) {
11
 
12
  array_unshift( $links,
65
  add_filter( 'plugin_row_meta', 'wplc_plugin_row', 4, 10 );
66
  function wplc_plugin_row( $plugin_meta, $plugin_file, $plugin_data, $status ) {
67
 
68
+ if ( $plugin_file == WPLC_PLUGIN ) {
69
  $check = get_user_meta(get_current_user_id(),"wplc_subscribed");
70
 
71
  $wplc_current_user = get_current_user_id();
modules/node_server.php CHANGED
@@ -1023,18 +1023,18 @@ function wplc_node_set_default_settings($wplc_default_settings_array){
1023
  return $wplc_default_settings_array;
1024
  }
1025
 
 
1026
  /**
1027
  * Changes the REST URL to include the SSL version if we are using SSL
1028
  * See https://core.trac.wordpress.org/ticket/36451
1029
  */
1030
- add_filter( 'rest_url', function( $url ) {
1031
- if ( is_ssl() ) {
1032
- $url = set_url_scheme( $url, 'https' );
1033
- return $url;
1034
  }
1035
-
1036
  return $url;
1037
- });
1038
 
1039
  /**
1040
  * Returns an array of pages/posts available on the site
1023
  return $wplc_default_settings_array;
1024
  }
1025
 
1026
+ add_filter( 'rest_url', 'wplc_node_rest_url_ssl_fix');
1027
  /**
1028
  * Changes the REST URL to include the SSL version if we are using SSL
1029
  * See https://core.trac.wordpress.org/ticket/36451
1030
  */
1031
+ function wplc_node_rest_url_ssl_fix($url){
1032
+ if (is_ssl()){
1033
+ $url = set_url_scheme( $url, 'https' );
1034
+ return $url;
1035
  }
 
1036
  return $url;
1037
+ }
1038
 
1039
  /**
1040
  * Returns an array of pages/posts available on the site
modules/webhooks_manager.php CHANGED
@@ -56,7 +56,7 @@ function wplc_webhooks_page(){
56
 
57
  $add_webhook_btn = isset($_GET["wplc_action"]) && $_GET["wplc_action"] !== "delete_webhook_confirmed" ? "" : "<a href='?page=wplc-webhooks-page&wplc_action=add_webhook' class='button button-secondary'>". __("Add New", 'wp-livechat') ."</a>";
58
 
59
- $content = "<div class='wrap'>";
60
  $content .= "<h2>" . __('WP Live Chat Support - Webhooks', 'wplivechat') . " " . $add_webhook_btn . "</h2>";
61
 
62
  if(isset($_GET['wplc_action']) && $_GET['wplc_action'] === 'add_webhook'){
@@ -221,7 +221,7 @@ function wplc_webhooks_table() {
221
  $content = "";
222
  if($webhooks !== false){
223
 
224
- $content .= "<table id='webhooks' class='wp-list-table widefat' cellspacing='0' width='100%'>";
225
  $content .= "<thead>";
226
  $content .= "<tr>";
227
  $content .= "<th scope='col' id='event' style='width:30%;'><span>".__("Event","wplivechat")."</span></th>";
@@ -277,7 +277,7 @@ function wplc_webhooks_add_form($force_edit = false, $webhook_id = false) {
277
  }
278
 
279
  $content = "<form method='POST' action='?page=wplc-webhooks-page'>";
280
- $content .= "<table class='wp-list-table widefat striped'>";
281
  $content .= "<tr>";
282
  $content .= "<td>" . __("Event", "wplivechat") . "</td>";
283
  $content .= "<td>" . wplc_webhook_render_event_selection_dropdown("add_webhook_event", $event_value, 'width:200px') . "</td>";
@@ -320,7 +320,7 @@ function wplc_webhooks_add_form($force_edit = false, $webhook_id = false) {
320
  }
321
 
322
  function wplc_webhooks_confirm_delete_prompt(){
323
- $content = "<table class='wp-list-table widefat striped' style='max-width:350px'>";
324
 
325
  $content .= "<tr>";
326
  $content .= "<td><strong>" . __("Are you sure you want to delete this webhook?", "wplivechat") . "</strong></td>";
56
 
57
  $add_webhook_btn = isset($_GET["wplc_action"]) && $_GET["wplc_action"] !== "delete_webhook_confirmed" ? "" : "<a href='?page=wplc-webhooks-page&wplc_action=add_webhook' class='button button-secondary'>". __("Add New", 'wp-livechat') ."</a>";
58
 
59
+ $content = "<div class='wrap wplc_wrap'>";
60
  $content .= "<h2>" . __('WP Live Chat Support - Webhooks', 'wplivechat') . " " . $add_webhook_btn . "</h2>";
61
 
62
  if(isset($_GET['wplc_action']) && $_GET['wplc_action'] === 'add_webhook'){
221
  $content = "";
222
  if($webhooks !== false){
223
 
224
+ $content .= "<table id='webhooks' class='wp-list-table wplc_list_table widefat' cellspacing='0' width='100%'>";
225
  $content .= "<thead>";
226
  $content .= "<tr>";
227
  $content .= "<th scope='col' id='event' style='width:30%;'><span>".__("Event","wplivechat")."</span></th>";
277
  }
278
 
279
  $content = "<form method='POST' action='?page=wplc-webhooks-page'>";
280
+ $content .= "<table class='wp-list-table wplc_list_table widefat striped'>";
281
  $content .= "<tr>";
282
  $content .= "<td>" . __("Event", "wplivechat") . "</td>";
283
  $content .= "<td>" . wplc_webhook_render_event_selection_dropdown("add_webhook_event", $event_value, 'width:200px') . "</td>";
320
  }
321
 
322
  function wplc_webhooks_confirm_delete_prompt(){
323
+ $content = "<table class='wp-list-table wplc_list_table widefat striped' style='max-width:350px'>";
324
 
325
  $content .= "<tr>";
326
  $content .= "<td><strong>" . __("Are you sure you want to delete this webhook?", "wplivechat") . "</strong></td>";
readme.txt CHANGED
@@ -207,6 +207,41 @@ If the live chat box still does not appear on your website, please go through th
207
 
208
  == Upgrade Notice ==
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  = 8.0.01 =
211
  * Massive improvements to the performance of the plugin
212
  * New, modern dashboard
@@ -235,29 +270,6 @@ If the live chat box still does not appear on your website, please go through th
235
  = 8.0.00 =
236
  * Beta release
237
 
238
- = 7.1.07 =
239
- It is highly recommended that you upgrade to WP Live Chat Support version 7.1.07 for security reasons.
240
-
241
- = 7.1.05 =
242
- It is highly recommended that you upgrade to WP Live Chat Support version 7.1.05 for security reasons.
243
-
244
- = 7.1.03 =
245
- It is highly recommended that you upgrade to WP Live Chat Support version 7.1.04 for security reasons.
246
-
247
- = 7.0.02 =
248
- We have patched the PHPMailer vulnerability. Please update to version 7.0.02.
249
-
250
- = 6.2.04 =
251
- It is highly recommended that you upgrade to WP Live Chat Support version 6.0.04 for security reasons.
252
-
253
- = 6.2.02 =
254
- It is highly recommended that you upgrade to WP Live Chat Support version 6.0.02 for security reasons.
255
-
256
- = 4.4.1 =
257
- It is highly recommended that you upgrade to WP Live Chat Support version 4.4.0 for security reasons.
258
-
259
- == Changelog ==
260
-
261
  = 7.1.08 - 2018-01-04 - Low priority =
262
  * PHP 7 compatibility
263
 
207
 
208
  == Upgrade Notice ==
209
 
210
+ = 7.1.07 =
211
+ It is highly recommended that you upgrade to WP Live Chat Support version 7.1.07 for security reasons.
212
+
213
+ = 7.1.05 =
214
+ It is highly recommended that you upgrade to WP Live Chat Support version 7.1.05 for security reasons.
215
+
216
+ = 7.1.03 =
217
+ It is highly recommended that you upgrade to WP Live Chat Support version 7.1.04 for security reasons.
218
+
219
+ = 7.0.02 =
220
+ We have patched the PHPMailer vulnerability. Please update to version 7.0.02.
221
+
222
+ = 6.2.04 =
223
+ It is highly recommended that you upgrade to WP Live Chat Support version 6.0.04 for security reasons.
224
+
225
+ = 6.2.02 =
226
+ It is highly recommended that you upgrade to WP Live Chat Support version 6.0.02 for security reasons.
227
+
228
+ = 4.4.1 =
229
+ It is highly recommended that you upgrade to WP Live Chat Support version 4.4.0 for security reasons.
230
+
231
+ == Changelog ==
232
+
233
+ = 8.0.02 - 2018-01-29 =
234
+ * Fixed a PHP warning
235
+ * Modified rest_url filter to no longer use anonymous function
236
+ * Fixed styling conflicts between our settings and other pages in WordPress admin
237
+ * Fixed issues with file uploads (Bleeper core)
238
+ * Fixed hints in settings area
239
+ * Fixed links in chat bubbles not being clearly visible
240
+ * Fixed assets loading on all admin pages when option is disabled
241
+ * Fixed the bug that caused issues if your folder name was not wp-live-chat-support
242
+ * Fixed issue where inactive chat status is not removed when new message from that chat is received
243
+ * Welcome page styling fixed
244
+
245
  = 8.0.01 =
246
  * Massive improvements to the performance of the plugin
247
  * New, modern dashboard
270
  = 8.0.00 =
271
  * Beta release
272
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
  = 7.1.08 - 2018-01-04 - Low priority =
274
  * PHP 7 compatibility
275
 
wp-live-chat-support.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Live Chat Support
4
  Plugin URI: http://www.wp-livechat.com
5
  Description: The easiest to use website live chat plugin. Let your visitors chat with you and increase sales conversion rates with WP Live Chat Support. No third party connection required!
6
- Version: 8.0.01
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  Text Domain: wplivechat
@@ -11,7 +11,19 @@
11
  */
12
 
13
  /**
14
- *
 
 
 
 
 
 
 
 
 
 
 
 
15
  * 8.0.01 - 2018-01-24 - High priority
16
  * Massive improvements to the performance of the plugin
17
  * New, modern dashboard
@@ -33,12 +45,7 @@
33
  * Store messages using sessionStorage to avoid unnecessary DB calls
34
  * Better polling system for visitor tracking
35
  * Better history UI
36
- * Support for the new iOS app
37
- * Support for the new Android App
38
- * Support for the new Desktop App
39
  *
40
- * 8.0.00
41
- * Beta version - lots of testing!
42
  *
43
  * 7.1.02 - 2017-06-21 - Low priority
44
  * Fixed a compat issue between pro and basic with regards to the agent social profiles
@@ -583,10 +590,11 @@ global $debug_start;
583
  $wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
584
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
585
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
586
- $wplc_version = "8.0.01";
587
 
588
  define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
589
  define('WPLC_BASIC_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
 
590
  global $wplc_basic_plugin_url;
591
  $wplc_basic_plugin_url = WPLC_BASIC_PLUGIN_URL;
592
 
@@ -610,11 +618,15 @@ require_once (plugin_dir_path(__FILE__) . "modules/api/wplc-api.php");
610
  require_once (plugin_dir_path(__FILE__) . "modules/beta_features.php");
611
  require_once (plugin_dir_path(__FILE__) . "modules/node_server.php");
612
  require_once (plugin_dir_path(__FILE__) . "modules/module_subscribe.php");
613
- require_once (plugin_dir_path(__FILE__) . 'includes/update_control.class.php');
614
  require_once (plugin_dir_path(__FILE__) . "modules/webhooks_manager.php");
615
 
616
- // Gutenberg Block
617
- include "includes/blocks/wplc-chat-box/index.php";
 
 
 
 
618
 
619
  add_action( 'wp_ajax_wplc_admin_set_transient', 'wplc_action_callback' );
620
  add_action( 'wp_ajax_wplc_admin_remove_transient', 'wplc_action_callback' );
@@ -666,6 +678,7 @@ function wplc_init() {
666
  * @return void
667
  */
668
  function wplc_redirect_on_activate( $plugin ) {
 
669
  if( $plugin == plugin_basename( __FILE__ ) ) {
670
  if (get_option("WPLC_V8_FIRST_TIME") == true) {
671
  update_option("WPLC_V8_FIRST_TIME",false);
@@ -678,7 +691,10 @@ function wplc_redirect_on_activate( $plugin ) {
678
  }
679
  }
680
 
681
- add_action( "admin_init", "wplc_redirect_on_activate" );
 
 
 
682
 
683
  function wplc_version_control() {
684
 
@@ -699,7 +715,9 @@ function wplc_version_control() {
699
  if ( $main_ver < 8 ) {
700
  if ( $wplc_settings ) {
701
  $wplc_settings['wplc_use_node_server'] = 1;
 
702
  update_option( "WPLC_V8_FIRST_TIME", true );
 
703
  }
704
  }
705
 
@@ -1168,12 +1186,14 @@ function wplc_push_js_to_front_basic() {
1168
 
1169
 
1170
  //Emoji Libs
1171
- if(empty($wplc_settings['wplc_disable_emojis']))
1172
- {
1173
- wp_register_script('wplc-user-js-emoji', "https://bleeper.io/app/assets/wdt-emoji/emoji.min.js", array("wplc-server-script", "wplc-server-script"), $wplc_version, false);
1174
- wp_enqueue_script('wplc-user-js-emoji');
1175
- wp_register_script('wplc-user-js-emoji-bundle', "https://bleeper.io/app/assets/wdt-emoji/wdt-emoji-bundle.min.js", array("wplc-server-script", "wplc-server-script", "wplc-user-js-emoji"), $wplc_version, false);
1176
- wp_enqueue_script('wplc-user-js-emoji-bundle');
 
 
1177
 
1178
  wp_register_style( 'wplc-admin-style-emoji', "https://bleeper.io/app/assets/wdt-emoji/wdt-emoji-bundle.css", false, $wplc_version );
1179
  wp_enqueue_style( 'wplc-admin-style-emoji' );
@@ -1256,7 +1276,7 @@ function wplc_push_js_to_front_basic() {
1256
  wp_localize_script('wplc-user-script', 'wplc_ajaxurl', $wplc_ajax_url);
1257
  wp_localize_script('wplc-user-script', 'wplc_ajaxurl_site', admin_url('admin-ajax.php'));
1258
  wp_localize_script('wplc-user-script', 'wplc_nonce', $ajax_nonce);
1259
- wp_localize_script('wplc-user-script', 'wplc_plugin_url', plugins_url());
1260
 
1261
  $wplc_display = false;
1262
 
@@ -1375,11 +1395,9 @@ function wplc_push_js_to_front_basic() {
1375
 
1376
  if ($wplc_user_gravatar != "") { $wplc_grav_image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=30' class='wplc-user-message-avatar' />";} else { $wplc_grav_image = "";}
1377
 
1378
- if ( ! empty($wpcl_grav_image ) ) {
1379
- wp_localize_script( 'wplc-user-script', 'wplc_gravatar_image', $wplc_grav_image );
1380
- } else {
1381
- wp_localize_script( 'wplc-user-script', 'wplc_gravatar_image', ' ' );
1382
- }
1383
 
1384
  $wplc_hide_chat = "";
1385
  if (get_option('WPLC_HIDE_CHAT') == TRUE) { $wplc_hide_chat = "yes"; } else { $wplc_hide_chat = null; }
@@ -2359,7 +2377,7 @@ function wplc_output_box_ajax_new($cid = null) {
2359
  //This is using node, we shouldn't generate the header data as part of the chat box.
2360
  //We will do this dynamically on the front end
2361
 
2362
-
2363
 
2364
  } else {
2365
  /* build the AGENT DATA array */
@@ -2711,14 +2729,17 @@ function wplc_superadmin_javascript() {
2711
  if(isset($wplc_settings['wplc_use_node_server']) && $wplc_settings['wplc_use_node_server'] == 1 && (!isset($_GET['action']) || $_GET['action'] !== "history") ){
2712
 
2713
  //Using node, remote scripts please
2714
- //if ( isset( $_GET['page'] ) && $_GET['page'] == "wplivechat-menu" ) {
2715
- /**
2716
- * Load the relevant scripts for the Node server
2717
- */
2718
-
2719
- wplc_admin_remote_dashboard_scripts($wplc_settings);
2720
-
2721
- //}
 
 
 
2722
 
2723
  if( isset( $_GET['page'] ) && $_GET['page'] === "wplivechat-menu-offline-messages"){
2724
  wplc_admin_output_js();
@@ -2734,9 +2755,9 @@ function wplc_superadmin_javascript() {
2734
 
2735
  /** set the global chat data here so we dont need to keep getting it from the DB or Cloud server */
2736
  global $admin_chat_data;
2737
- $admin_chat_data = wplc_get_chat_data( sanitize_text_field( $_GET['cid'] ), __LINE__ );
2738
 
2739
- wplc_return_admin_chat_javascript( sanitize_text_field( $_GET['cid'] ) );
2740
 
2741
 
2742
  }
@@ -2797,9 +2818,9 @@ function old_wplc_superadmin_javascript() {
2797
 
2798
  /** set the global chat data here so we dont need to keep getting it from the DB or Cloud server */
2799
  global $admin_chat_data;
2800
- $admin_chat_data = wplc_get_chat_data( sanitize_text_field( $_GET['cid'] ), __LINE__);
2801
 
2802
- wplc_return_admin_chat_javascript( sanitize_text_field( $_GET['cid'] ) );
2803
 
2804
 
2805
  }
@@ -3165,18 +3186,18 @@ function wplc_admin_menu_layout_display() {
3165
  <?php
3166
  } else {
3167
  if (isset($_GET['aid'])) { $aid = $_GET['aid']; } else { $aid = null; }
3168
- do_action("wplc_hook_admin_menu_layout_display_1",$_GET['action'],sanitize_text_field( $_GET['cid'] ),$aid);
3169
 
3170
  if (!is_null($aid)) {
3171
- do_action("wplc_hook_update_agent_id",intval( sanitize_text_field( $_GET['cid'] ) ),$aid);
3172
  }
3173
 
3174
- do_action("wplc_hook_admin_menu_layout_display_1",$_GET['action'],sanitize_text_field( $_GET['cid'] ),$aid);
3175
 
3176
  if ($_GET['action'] == 'ac') {
3177
  do_action('wplc_hook_accept_chat',$_GET,$aid);
3178
  }
3179
- do_action("wplc_hook_admin_menu_layout_display",$_GET['action'],sanitize_text_field( $_GET['cid'] ),$aid);
3180
  }
3181
  } else {
3182
  ?>
@@ -3551,11 +3572,11 @@ function wplc_return_admin_chat_javascript($cid) {
3551
  * Get the CURRENT agent's data
3552
  */
3553
  if(isset($_GET['aid'])){
3554
- $agent_data = get_user_by('ID', intval( sanitize_text_field( $_GET['aid'] ) ) );
3555
  wp_localize_script('wplc-admin-chat-server', 'wplc_admin_agent_name', $agent_data->display_name);
3556
  wp_localize_script('wplc-admin-chat-server', 'wplc_admin_agent_email', md5($agent_data->user_email));
3557
  } else {
3558
- $agent_data = get_user_by('ID', intval( get_current_user_id() ) );
3559
  wp_localize_script('wplc-admin-chat-server', 'wplc_admin_agent_name', $agent_data->display_name);
3560
  wp_localize_script('wplc-admin-chat-server', 'wplc_admin_agent_email', md5($agent_data->user_email));
3561
  }
@@ -3789,7 +3810,6 @@ function wplc_activate() {
3789
  update_user_meta($uid, "wplc_chat_agent_online", time());
3790
 
3791
  add_option("WPLC_HIDE_CHAT", "true");
3792
- add_option("WPLC_V8_FIRST_TIME", true);
3793
 
3794
 
3795
  do_action("wplc_activate_hook");
@@ -4096,7 +4116,16 @@ function wplc_add_admin_stylesheet() {
4096
  if(isset($wplc_settings['wplc_use_node_server']) && $wplc_settings['wplc_use_node_server'] == 1 && (!isset($_GET['action']) || $_GET['action'] !== "history") ){
4097
  //if(isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu'){
4098
  //Using node, remote styles please
4099
- wplc_admin_remote_dashboard_styles();
 
 
 
 
 
 
 
 
 
4100
 
4101
  wp_register_style( 'wplc-admin-remote-addition-styles', plugins_url( '/css/remote_dash_styles.css', __FILE__ ), array(), $wplc_version );
4102
  wp_enqueue_style( 'wplc-admin-remote-addition-styles' );
@@ -4128,7 +4157,6 @@ function wplc_add_admin_stylesheet() {
4128
  wp_register_style( 'wplc-gutenberg-template-styles', plugins_url( '/includes/blocks/wplc-chat-box/wplc_gutenberg_template_styles.css', __FILE__ ) );
4129
  wp_enqueue_style( 'wplc-gutenberg-template-styles' );
4130
 
4131
-
4132
  wp_register_style( 'wplc-admin-styles', plugins_url( '/css/admin_styles.css', __FILE__ ), false, $wplc_version );
4133
  wp_enqueue_style( 'wplc-admin-styles' );
4134
 
@@ -4159,13 +4187,12 @@ function wplc_add_admin_stylesheet() {
4159
  wp_enqueue_style('wplc-support-page-css');
4160
  }
4161
 
4162
-
4163
  if(isset($_GET['immersive_mode'])){
4164
  wp_add_inline_style( 'wplc-admin-style', "#wpcontent { margin-left: 0px !important;} #wpadminbar, #wpfooter, #adminmenumain {display: none !important;}" );
4165
  }
4166
  }
4167
 
4168
- if ( isset($_GET['page']) && ( $_GET['page'] == 'wplivechat-menu-settings' || $_GET['page'] === 'wplivechat-menu-offline-messages' ) ) {
4169
  add_action('admin_print_scripts', 'wplc_admin_scripts_basic');
4170
  }
4171
 
@@ -4175,10 +4202,6 @@ if ( isset($_GET['page']) && ( $_GET['page'] == 'wplivechat-menu-settings' || $_
4175
  */
4176
  function wplc_admin_scripts_basic() {
4177
 
4178
- global $wplc_version;
4179
- $ajax_nonce = wp_create_nonce("wplc");
4180
- $ajaxurl = admin_url('admin-ajax.php');
4181
-
4182
  $gutenberg_default_html = '<!-- Default HTML -->
4183
  <div class="wplc_block">
4184
  <span class="wplc_block_logo">{wplc_logo}</span>
@@ -4202,13 +4225,6 @@ $gutenberg_default_html = '<!-- Default HTML -->
4202
  wp_enqueue_script('wplc-gutenberg');
4203
  wp_localize_script( 'wplc-gutenberg', 'default_html', $gutenberg_default_html );
4204
  }
4205
- if ( isset( $_GET['page'] ) && $_GET['page'] === 'wplivechat-menu-offline-messages' ) {
4206
- wp_register_script('wplc-admin-offline-js', plugins_url('js/wplc_offline_messages.js', __FILE__), false, $wplc_version, false);
4207
- wp_enqueue_script('wplc-admin-offline-js');
4208
- wp_localize_script('wplc-admin-offline-js', 'wplc_ajax_nonce', $ajax_nonce);
4209
- wp_localize_script('wplc-admin-offline-js', 'wplc_ajaxurl', $ajaxurl);
4210
-
4211
- }
4212
  }
4213
 
4214
  /**
@@ -4255,17 +4271,14 @@ add_action( 'wplc_hook_admin_menu_layout_display' , 'wplc_hook_control_history_g
4255
  */
4256
  function wplc_hook_control_history_get_control($action,$cid,$aid) {
4257
 
4258
- if(!is_user_logged_in() || !get_user_meta(get_current_user_id(), 'wplc_ma_agent', true) ){
4259
- return;
4260
- }
4261
- if ($action == 'history') {
4262
- wplc_admin_view_chat_history(sanitize_text_field($cid));
4263
- } else if ($action == 'download_history'){
4264
-
4265
- //Moved into the init hook as of version 6.0.01 due to different functionality
4266
-
4267
- //wplc_admin_download_history(sanitize_text_field($_GET['type']), sanitize_text_field($cid));
4268
- }
4269
 
4270
 
4271
  }
@@ -4327,7 +4340,7 @@ function wplc_hook_control_chat_history() {
4327
  <input type=\"submit\" value=\"".__('Delete History', 'wplivechat')."\" class='button' name=\"wplc-delete-chat-history\" /><br /><br />
4328
  </form>
4329
 
4330
- <table class=\"wp-list-table widefat fixed \" cellspacing=\"0\">
4331
  <thead>
4332
  <tr>
4333
  <th scope='col' id='wplc_id_colum' class='manage-column column-id sortable desc' style=''><span>" . __("Date", "wplivechat") . "</span></th>
@@ -4377,7 +4390,7 @@ function wplc_hook_control_chat_history() {
4377
  */
4378
  function wplc_admin_history_layout() {
4379
  wplc_stats("history");
4380
- echo"<div class=\"wrap\"><div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br></div><h2>" . __("WP Live Chat History", "wplivechat") . "</h2>";
4381
 
4382
 
4383
  if(function_exists("wplc_ce_activate")){
@@ -4405,7 +4418,7 @@ function wplc_hook_control_missed_chats() {
4405
  */
4406
  function wplc_admin_missed_chats() {
4407
  wplc_stats("missed");
4408
- echo "<div class=\"wrap\"><div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br></div><h2>" . __("WP Live Chat Missed Chats", "wplivechat") . "</h2>";
4409
  do_action("wplc_hook_chat_missed");
4410
  }
4411
 
@@ -4435,7 +4448,7 @@ function wplc_hook_control_offline_messages_display() {
4435
  */
4436
  function wplc_admin_offline_messages() {
4437
  wplc_stats("offline_messages");
4438
- echo"<div class=\"wrap\"><div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br></div><h2>" . __("WP Live Chat Offline Messages", "wplivechat") . "</h2>";
4439
  do_action("wplc_hook_offline_messages_display");
4440
  }
4441
 
@@ -4449,7 +4462,7 @@ function wplc_admin_display_offline_messages_new() {
4449
  global $wplc_tblname_offline_msgs;
4450
 
4451
  echo "
4452
- <table class=\"wp-list-table widefat \" cellspacing=\"0\">
4453
  <thead>
4454
  <tr>
4455
  <th class='manage-column column-id'><span>" . __("Date", "wplivechat") . "</span></th>
@@ -4566,9 +4579,6 @@ function wplc_filter_control_chat_header_extra_attr($wplc_extra_attr) {
4566
  * @return string
4567
  */
4568
  function wplc_head_basic() {
4569
- if(!is_user_logged_in() || !get_user_meta(get_current_user_id(), 'wplc_ma_agent', true) ){
4570
- return;
4571
- }
4572
  global $wpdb;
4573
 
4574
  do_action("wplc_hook_head");
@@ -4727,7 +4737,7 @@ function wplc_head_basic() {
4727
  curl_close($ch);
4728
  }
4729
  echo "<div class=\"updated\"><p>" . __("Thank You for your feedback!", "wplivechat") . "</p></div>";
4730
- wp_redirect( admin_url("/admin.php?page=wplivechat-menu&override=1") );
4731
  }
4732
  if( isset( $_GET['override'] ) && $_GET['override'] == '1' ){
4733
  update_option( "WPLC_V8_FIRST_TIME", false);
@@ -4968,7 +4978,7 @@ function wplc_support_menu() {
4968
  <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>
4969
  <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>
4970
  <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>
4971
- <li><a href='https://wp-livechat.com/documentation/can-i-use-this-plugin-on-my-multi-site/' 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>
4972
  <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>
4973
  <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>
4974
  <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>
@@ -5821,12 +5831,12 @@ function wplc_hook_control_admin_settings_chat_box_settings_after() {
5821
 
5822
  ?>
5823
  <h4><?php _e("Advanced settings", "wplivechat") ?></h4>
5824
- <table class='wp-list-table widefat fixed striped pages' width='700'>
5825
 
5826
  <?php do_action("wplc_advanced_settings_above_performance", $wplc_settings); ?>
5827
  </table>
5828
  <p>&nbsp;</p>
5829
- <table class='wp-list-table widefat fixed striped pages' width='700'>
5830
 
5831
  <tr>
5832
  <td colspan='2'>
@@ -5882,9 +5892,9 @@ function wplc_hook_control_admin_settings_chat_box_settings_after() {
5882
  */
5883
  function wplc_basic_reporting_page(){
5884
 
5885
- $content = "<div class='wrap'>";
5886
  $content .= "<h2>".__('WP Live Chat Support Reporting', 'wp-livechat')." (beta) </h2>";
5887
- $content .= "<table class=\"wp-list-table widefat fixed form-table\" cellspacing=\"0\" style='width:98%'>";
5888
  $content .= "<tr>";
5889
  $content .= "<td style='width:35%; vertical-align:top;'>";
5890
  $content .= "<img class='reporting_img_main' style='width:99%; height:auto; padding:2px; border:1px lightgray solid;box-shadow: 3px 3px 2px -2px #999;-webkit-box-shadow: 3px 3px 2px -2px #999;-moz-box-shadow: 3px 3px 2px -2px #999;-o-box-shadow: 3px 3px 2px -2px #999;' src='".plugins_url('/images/reporting_sample.jpg', __FILE__)."'>";
@@ -5924,7 +5934,7 @@ function wplc_basic_reporting_page(){
5924
  * @return string
5925
  */
5926
  function wplc_basic_triggers_page(){
5927
- $content = "<div class='wrap'>";
5928
  $content .= "<h2>".__('WP Live Chat Support Triggers', 'wp-livechat')." (beta) </h2>";
5929
  $content .= "<script>
5930
  var isOn = true;
@@ -5948,7 +5958,7 @@ function wplc_basic_triggers_page(){
5948
  });
5949
  </script>";
5950
 
5951
- $content .= "<table class=\"wp-list-table widefat fixed form-table\" cellspacing=\"0\" style='width:98%'>";
5952
  $content .= "<tr>";
5953
  $content .= "<td style='width:35%; vertical-align:top;'>";
5954
  $content .= "<img class='trigger_img_main' style='width:99%; height:auto; padding:2px; border:1px lightgray solid;box-shadow: 3px 3px 2px -2px #999;-webkit-box-shadow: 3px 3px 2px -2px #999;-moz-box-shadow: 3px 3px 2px -2px #999;-o-box-shadow: 3px 3px 2px -2px #999;' src='".plugins_url('/images/trigger_sample.jpg', __FILE__)."'>";
@@ -5989,9 +5999,9 @@ function wplc_basic_triggers_page(){
5989
  * @return string
5990
  */
5991
  function wplc_basic_custom_fields_page(){
5992
- $content = "<div class='wrap'>";
5993
  $content .= "<h2>".__('WP Live Chat Support Custom Fields', 'wplivechat')."</h2>";
5994
- $content .= "<table class=\"wp-list-table widefat fixed form-table\" cellspacing=\"0\" style='width:98%'>";
5995
  $content .= "<tr>";
5996
  $content .= "<td style='width:35%; vertical-align:top;'>";
5997
  $content .= "<img class='trigger_img_main' style='width:99%; height:auto; padding:2px; border:1px lightgray solid;box-shadow: 3px 3px 2px -2px #999;-webkit-box-shadow: 3px 3px 2px -2px #999;-moz-box-shadow: 3px 3px 2px -2px #999;-o-box-shadow: 3px 3px 2px -2px #999;' src='".plugins_url('/images/trigger_sample.jpg', __FILE__)."'>";
@@ -6030,7 +6040,7 @@ add_action('wplc_hook_admin_settings_main_settings_after','wplc_powered_by_link_
6030
  function wplc_powered_by_link_settings_page() {
6031
  $wplc_powered_by = get_option("WPLC_POWERED_BY");
6032
  ?>
6033
- <table class='form-table wp-list-table widefat fixed striped pages' width='700'>
6034
  <tr>
6035
  <td width='350' valign='top'>
6036
  <?php _e("Display a 'Powered by' link in the chat box", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Checking this will display a 'Powered by WP Live Chat Support' caption at the bottom of your chatbox.", 'wplivechat'); ?>"></i>
@@ -6220,13 +6230,13 @@ function wplc_change_offline_message( $subject ){
6220
  }
6221
 
6222
  function wplc_basic_version_departments(){
6223
- echo "<div class='wrap'>";
6224
  echo sprintf( "<div class='error'><p>".__("WP Live Chat Support requires WP Live Chat Support Pro Version 7.0.0 or greater in order for departments to function as expected. Please update WP Live Chat Support %s", "wplivechat")."</p></div>", "<a href='".admin_url('update-core.php')."'>".__("here", "wplivechat")."</a>" );
6225
  echo "</div>";
6226
 
6227
  $content = "";
6228
 
6229
- $content .= "<table class=\"wp-list-table widefat fixed \" cellspacing=\"0\" style='width:98%'>";
6230
  $content .= "<thead>";
6231
  $content .= "<tr>";
6232
  $content .= "<th scope='col'><span>" . __("ID", "wplivechat") . "</span></th>";
3
  Plugin Name: WP Live Chat Support
4
  Plugin URI: http://www.wp-livechat.com
5
  Description: The easiest to use website live chat plugin. Let your visitors chat with you and increase sales conversion rates with WP Live Chat Support. No third party connection required!
6
+ Version: 8.0.02
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  Text Domain: wplivechat
11
  */
12
 
13
  /**
14
+ *
15
+ * 8.0.02 - 2018-01-29 - Medium priority
16
+ * Fixed a PHP warning
17
+ * Modified rest_url filter to no longer use anonymous function
18
+ * Fixed styling conflicts between our settings and other pages in WordPress admin
19
+ * Fixed issues with file uploads (Bleeper core)
20
+ * Fixed hints in settings area
21
+ * Fixed links in chat bubbles not being clearly visible
22
+ * Fixed assets loading on all admin pages when option is disabled
23
+ * Fixed the bug that caused issues if your folder name was not wp-live-chat-support
24
+ * Fixed issue where inactive chat status is not removed when new message from that chat is received
25
+ * Welcome page styling fixed
26
+ *
27
  * 8.0.01 - 2018-01-24 - High priority
28
  * Massive improvements to the performance of the plugin
29
  * New, modern dashboard
45
  * Store messages using sessionStorage to avoid unnecessary DB calls
46
  * Better polling system for visitor tracking
47
  * Better history UI
 
 
 
48
  *
 
 
49
  *
50
  * 7.1.02 - 2017-06-21 - Low priority
51
  * Fixed a compat issue between pro and basic with regards to the agent social profiles
590
  $wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
591
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
592
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
593
+ $wplc_version = "8.0.02";
594
 
595
  define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
596
  define('WPLC_BASIC_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
597
+ define('WPLC_PLUGIN', plugin_basename( __FILE__ ) );
598
  global $wplc_basic_plugin_url;
599
  $wplc_basic_plugin_url = WPLC_BASIC_PLUGIN_URL;
600
 
618
  require_once (plugin_dir_path(__FILE__) . "modules/beta_features.php");
619
  require_once (plugin_dir_path(__FILE__) . "modules/node_server.php");
620
  require_once (plugin_dir_path(__FILE__) . "modules/module_subscribe.php");
621
+ require_once (plugin_dir_path(__FILE__) . "includes/update_control.class.php");
622
  require_once (plugin_dir_path(__FILE__) . "modules/webhooks_manager.php");
623
 
624
+ // Gutenberg Blocks
625
+ require_once (plugin_dir_path(__FILE__) . "includes/blocks/wplc-chat-box/index.php");
626
+ require_once (plugin_dir_path(__FILE__) . "includes/blocks/wplc-inline-chat-box/index.php");
627
+
628
+ // Shortcodes
629
+ require_once (plugin_dir_path(__FILE__) . "includes/shortcodes.php");
630
 
631
  add_action( 'wp_ajax_wplc_admin_set_transient', 'wplc_action_callback' );
632
  add_action( 'wp_ajax_wplc_admin_remove_transient', 'wplc_action_callback' );
678
  * @return void
679
  */
680
  function wplc_redirect_on_activate( $plugin ) {
681
+
682
  if( $plugin == plugin_basename( __FILE__ ) ) {
683
  if (get_option("WPLC_V8_FIRST_TIME") == true) {
684
  update_option("WPLC_V8_FIRST_TIME",false);
691
  }
692
  }
693
 
694
+
695
+ add_action( 'admin_init', 'wplc_redirect_on_activate' );
696
+
697
+
698
 
699
  function wplc_version_control() {
700
 
715
  if ( $main_ver < 8 ) {
716
  if ( $wplc_settings ) {
717
  $wplc_settings['wplc_use_node_server'] = 1;
718
+
719
  update_option( "WPLC_V8_FIRST_TIME", true );
720
+
721
  }
722
  }
723
 
1186
 
1187
 
1188
  //Emoji Libs
1189
+ if(empty($wplc_settings['wplc_disable_emojis'])) {
1190
+ //wp_register_script('wplc-user-js-emoji', "https://bleeper.io/app/assets/wdt-emoji/emoji.min.js", array("wplc-server-script", "wplc-server-script"), $wplc_version, false);
1191
+ //wp_enqueue_script('wplc-user-js-emoji');
1192
+ //wp_register_script('wplc-user-js-emoji-bundle', "https://bleeper.io/app/assets/wdt-emoji/wdt-emoji-bundle.min.js", array("wplc-server-script", "wplc-server-script", "wplc-user-js-emoji"), $wplc_version, false);
1193
+ //wp_enqueue_script('wplc-user-js-emoji-bundle');
1194
+
1195
+ wp_register_script('wplc-user-js-emoji-concat', "https://bleeper.io/app/assets/wdt-emoji/wdt-emoji-concat.min.js", array("wplc-server-script", "wplc-server-script"), $wplc_version, false);
1196
+ wp_enqueue_script('wplc-user-js-emoji-concat');
1197
 
1198
  wp_register_style( 'wplc-admin-style-emoji', "https://bleeper.io/app/assets/wdt-emoji/wdt-emoji-bundle.css", false, $wplc_version );
1199
  wp_enqueue_style( 'wplc-admin-style-emoji' );
1276
  wp_localize_script('wplc-user-script', 'wplc_ajaxurl', $wplc_ajax_url);
1277
  wp_localize_script('wplc-user-script', 'wplc_ajaxurl_site', admin_url('admin-ajax.php'));
1278
  wp_localize_script('wplc-user-script', 'wplc_nonce', $ajax_nonce);
1279
+ wp_localize_script('wplc-user-script', 'wplc_plugin_url', WPLC_BASIC_PLUGIN_URL);
1280
 
1281
  $wplc_display = false;
1282
 
1395
 
1396
  if ($wplc_user_gravatar != "") { $wplc_grav_image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=30' class='wplc-user-message-avatar' />";} else { $wplc_grav_image = "";}
1397
 
1398
+ if ( ! empty( $wplc_grav_image ) ) {
1399
+ wp_localize_script('wplc-user-script', 'wplc_gravatar_image', $wplc_grav_image);
1400
+ }
 
 
1401
 
1402
  $wplc_hide_chat = "";
1403
  if (get_option('WPLC_HIDE_CHAT') == TRUE) { $wplc_hide_chat = "yes"; } else { $wplc_hide_chat = null; }
2377
  //This is using node, we shouldn't generate the header data as part of the chat box.
2378
  //We will do this dynamically on the front end
2379
 
2380
+ //var_dump("NOPEEE");
2381
 
2382
  } else {
2383
  /* build the AGENT DATA array */
2729
  if(isset($wplc_settings['wplc_use_node_server']) && $wplc_settings['wplc_use_node_server'] == 1 && (!isset($_GET['action']) || $_GET['action'] !== "history") ){
2730
 
2731
  //Using node, remote scripts please
2732
+ if ( isset( $wplc_settings['wplc_enable_all_admin_pages'] ) && $wplc_settings['wplc_enable_all_admin_pages'] === '1' ) {
2733
+ /* Run admin JS on all admin pages */
2734
+ if ( isset( $_GET['action'] ) && $_GET['action'] == "history" ) { }else {
2735
+ wplc_admin_remote_dashboard_scripts($wplc_settings);
2736
+ }
2737
+ } else {
2738
+ /* Only run admin JS on the chat dashboard page */
2739
+ if ( isset( $_GET['page'] ) && $_GET['page'] === 'wplivechat-menu' && !isset( $_GET['action'] ) ) {
2740
+ wplc_admin_remote_dashboard_scripts($wplc_settings);
2741
+ }
2742
+ }
2743
 
2744
  if( isset( $_GET['page'] ) && $_GET['page'] === "wplivechat-menu-offline-messages"){
2745
  wplc_admin_output_js();
2755
 
2756
  /** set the global chat data here so we dont need to keep getting it from the DB or Cloud server */
2757
  global $admin_chat_data;
2758
+ $admin_chat_data = wplc_get_chat_data($_GET['cid'], __LINE__);
2759
 
2760
+ wplc_return_admin_chat_javascript(sanitize_text_field($_GET['cid']));
2761
 
2762
 
2763
  }
2818
 
2819
  /** set the global chat data here so we dont need to keep getting it from the DB or Cloud server */
2820
  global $admin_chat_data;
2821
+ $admin_chat_data = wplc_get_chat_data($_GET['cid'], __LINE__);
2822
 
2823
+ wplc_return_admin_chat_javascript(sanitize_text_field($_GET['cid']));
2824
 
2825
 
2826
  }
3186
  <?php
3187
  } else {
3188
  if (isset($_GET['aid'])) { $aid = $_GET['aid']; } else { $aid = null; }
3189
+ do_action("wplc_hook_admin_menu_layout_display_1",$_GET['action'],$_GET['cid'],$aid);
3190
 
3191
  if (!is_null($aid)) {
3192
+ do_action("wplc_hook_update_agent_id",$_GET['cid'],$aid);
3193
  }
3194
 
3195
+ do_action("wplc_hook_admin_menu_layout_display_1",$_GET['action'],$_GET['cid'],$aid);
3196
 
3197
  if ($_GET['action'] == 'ac') {
3198
  do_action('wplc_hook_accept_chat',$_GET,$aid);
3199
  }
3200
+ do_action("wplc_hook_admin_menu_layout_display",$_GET['action'],$_GET['cid'],$aid);
3201
  }
3202
  } else {
3203
  ?>
3572
  * Get the CURRENT agent's data
3573
  */
3574
  if(isset($_GET['aid'])){
3575
+ $agent_data = get_user_by('ID', intval($_GET['aid']));
3576
  wp_localize_script('wplc-admin-chat-server', 'wplc_admin_agent_name', $agent_data->display_name);
3577
  wp_localize_script('wplc-admin-chat-server', 'wplc_admin_agent_email', md5($agent_data->user_email));
3578
  } else {
3579
+ $agent_data = get_user_by('ID', intval(get_current_user_id()));
3580
  wp_localize_script('wplc-admin-chat-server', 'wplc_admin_agent_name', $agent_data->display_name);
3581
  wp_localize_script('wplc-admin-chat-server', 'wplc_admin_agent_email', md5($agent_data->user_email));
3582
  }
3810
  update_user_meta($uid, "wplc_chat_agent_online", time());
3811
 
3812
  add_option("WPLC_HIDE_CHAT", "true");
 
3813
 
3814
 
3815
  do_action("wplc_activate_hook");
4116
  if(isset($wplc_settings['wplc_use_node_server']) && $wplc_settings['wplc_use_node_server'] == 1 && (!isset($_GET['action']) || $_GET['action'] !== "history") ){
4117
  //if(isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu'){
4118
  //Using node, remote styles please
4119
+ //Using node, remote scripts please
4120
+ if ( isset( $wplc_settings['wplc_enable_all_admin_pages'] ) && $wplc_settings['wplc_enable_all_admin_pages'] === '1' ) {
4121
+ /* Run admin JS on all admin pages */
4122
+ wplc_admin_remote_dashboard_styles();
4123
+ } else {
4124
+ /* Only run admin JS on the chat dashboard page */
4125
+ if ( isset( $_GET['page'] ) && $_GET['page'] === 'wplivechat-menu' && !isset( $_GET['action'] ) ) {
4126
+ wplc_admin_remote_dashboard_styles();
4127
+ }
4128
+ }
4129
 
4130
  wp_register_style( 'wplc-admin-remote-addition-styles', plugins_url( '/css/remote_dash_styles.css', __FILE__ ), array(), $wplc_version );
4131
  wp_enqueue_style( 'wplc-admin-remote-addition-styles' );
4157
  wp_register_style( 'wplc-gutenberg-template-styles', plugins_url( '/includes/blocks/wplc-chat-box/wplc_gutenberg_template_styles.css', __FILE__ ) );
4158
  wp_enqueue_style( 'wplc-gutenberg-template-styles' );
4159
 
 
4160
  wp_register_style( 'wplc-admin-styles', plugins_url( '/css/admin_styles.css', __FILE__ ), false, $wplc_version );
4161
  wp_enqueue_style( 'wplc-admin-styles' );
4162
 
4187
  wp_enqueue_style('wplc-support-page-css');
4188
  }
4189
 
 
4190
  if(isset($_GET['immersive_mode'])){
4191
  wp_add_inline_style( 'wplc-admin-style', "#wpcontent { margin-left: 0px !important;} #wpadminbar, #wpfooter, #adminmenumain {display: none !important;}" );
4192
  }
4193
  }
4194
 
4195
+ if (isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu-settings') {
4196
  add_action('admin_print_scripts', 'wplc_admin_scripts_basic');
4197
  }
4198
 
4202
  */
4203
  function wplc_admin_scripts_basic() {
4204
 
 
 
 
 
4205
  $gutenberg_default_html = '<!-- Default HTML -->
4206
  <div class="wplc_block">
4207
  <span class="wplc_block_logo">{wplc_logo}</span>
4225
  wp_enqueue_script('wplc-gutenberg');
4226
  wp_localize_script( 'wplc-gutenberg', 'default_html', $gutenberg_default_html );
4227
  }
 
 
 
 
 
 
 
4228
  }
4229
 
4230
  /**
4271
  */
4272
  function wplc_hook_control_history_get_control($action,$cid,$aid) {
4273
 
4274
+ if ($action == 'history') {
4275
+ wplc_admin_view_chat_history(sanitize_text_field($cid));
4276
+ } else if ($action == 'download_history'){
4277
+
4278
+ //Moved into the init hook as of version 6.0.01 due to different functionality
4279
+
4280
+ //wplc_admin_download_history(sanitize_text_field($_GET['type']), sanitize_text_field($cid));
4281
+ }
 
 
 
4282
 
4283
 
4284
  }
4340
  <input type=\"submit\" value=\"".__('Delete History', 'wplivechat')."\" class='button' name=\"wplc-delete-chat-history\" /><br /><br />
4341
  </form>
4342
 
4343
+ <table class=\"wp-list-table wplc_list_table widefat fixed \" cellspacing=\"0\">
4344
  <thead>
4345
  <tr>
4346
  <th scope='col' id='wplc_id_colum' class='manage-column column-id sortable desc' style=''><span>" . __("Date", "wplivechat") . "</span></th>
4390
  */
4391
  function wplc_admin_history_layout() {
4392
  wplc_stats("history");
4393
+ echo"<div class=\"wrap wplc_wrap\"><div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br></div><h2>" . __("WP Live Chat History", "wplivechat") . "</h2>";
4394
 
4395
 
4396
  if(function_exists("wplc_ce_activate")){
4418
  */
4419
  function wplc_admin_missed_chats() {
4420
  wplc_stats("missed");
4421
+ echo "<div class=\"wrap wplc_wrap\"><div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br></div><h2>" . __("WP Live Chat Missed Chats", "wplivechat") . "</h2>";
4422
  do_action("wplc_hook_chat_missed");
4423
  }
4424
 
4448
  */
4449
  function wplc_admin_offline_messages() {
4450
  wplc_stats("offline_messages");
4451
+ echo"<div class=\"wrap wplc_wrap\"><div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br></div><h2>" . __("WP Live Chat Offline Messages", "wplivechat") . "</h2>";
4452
  do_action("wplc_hook_offline_messages_display");
4453
  }
4454
 
4462
  global $wplc_tblname_offline_msgs;
4463
 
4464
  echo "
4465
+ <table class=\"wp-list-table wplc_list_table widefat \" cellspacing=\"0\">
4466
  <thead>
4467
  <tr>
4468
  <th class='manage-column column-id'><span>" . __("Date", "wplivechat") . "</span></th>
4579
  * @return string
4580
  */
4581
  function wplc_head_basic() {
 
 
 
4582
  global $wpdb;
4583
 
4584
  do_action("wplc_hook_head");
4737
  curl_close($ch);
4738
  }
4739
  echo "<div class=\"updated\"><p>" . __("Thank You for your feedback!", "wplivechat") . "</p></div>";
4740
+ @wp_redirect( admin_url("/admin.php?page=wplivechat-menu&override=1") );
4741
  }
4742
  if( isset( $_GET['override'] ) && $_GET['override'] == '1' ){
4743
  update_option( "WPLC_V8_FIRST_TIME", false);
4978
  <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>
4979
  <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>
4980
  <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>
4981
+ <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>
4982
  <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>
4983
  <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>
4984
  <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>
5831
 
5832
  ?>
5833
  <h4><?php _e("Advanced settings", "wplivechat") ?></h4>
5834
+ <table class='wp-list-table wplc_list_table widefat fixed striped pages' width='700'>
5835
 
5836
  <?php do_action("wplc_advanced_settings_above_performance", $wplc_settings); ?>
5837
  </table>
5838
  <p>&nbsp;</p>
5839
+ <table class='wp-list-table wplc_list_table widefat fixed striped pages' width='700'>
5840
 
5841
  <tr>
5842
  <td colspan='2'>
5892
  */
5893
  function wplc_basic_reporting_page(){
5894
 
5895
+ $content = "<div class='wrap wplc_wrap'>";
5896
  $content .= "<h2>".__('WP Live Chat Support Reporting', 'wp-livechat')." (beta) </h2>";
5897
+ $content .= "<table class=\"wp-list-table wplc_list_table widefat fixed form-table\" cellspacing=\"0\" style='width:98%'>";
5898
  $content .= "<tr>";
5899
  $content .= "<td style='width:35%; vertical-align:top;'>";
5900
  $content .= "<img class='reporting_img_main' style='width:99%; height:auto; padding:2px; border:1px lightgray solid;box-shadow: 3px 3px 2px -2px #999;-webkit-box-shadow: 3px 3px 2px -2px #999;-moz-box-shadow: 3px 3px 2px -2px #999;-o-box-shadow: 3px 3px 2px -2px #999;' src='".plugins_url('/images/reporting_sample.jpg', __FILE__)."'>";
5934
  * @return string
5935
  */
5936
  function wplc_basic_triggers_page(){
5937
+ $content = "<div class='wrap wplc_wrap'>";
5938
  $content .= "<h2>".__('WP Live Chat Support Triggers', 'wp-livechat')." (beta) </h2>";
5939
  $content .= "<script>
5940
  var isOn = true;
5958
  });
5959
  </script>";
5960
 
5961
+ $content .= "<table class=\"wp-list-table wplc_list_table widefat fixed form-table\" cellspacing=\"0\" style='width:98%'>";
5962
  $content .= "<tr>";
5963
  $content .= "<td style='width:35%; vertical-align:top;'>";
5964
  $content .= "<img class='trigger_img_main' style='width:99%; height:auto; padding:2px; border:1px lightgray solid;box-shadow: 3px 3px 2px -2px #999;-webkit-box-shadow: 3px 3px 2px -2px #999;-moz-box-shadow: 3px 3px 2px -2px #999;-o-box-shadow: 3px 3px 2px -2px #999;' src='".plugins_url('/images/trigger_sample.jpg', __FILE__)."'>";
5999
  * @return string
6000
  */
6001
  function wplc_basic_custom_fields_page(){
6002
+ $content = "<div class='wrap wplc_wrap'>";
6003
  $content .= "<h2>".__('WP Live Chat Support Custom Fields', 'wplivechat')."</h2>";
6004
+ $content .= "<table class=\"wp-list-table wplc_list_table widefat fixed form-table\" cellspacing=\"0\" style='width:98%'>";
6005
  $content .= "<tr>";
6006
  $content .= "<td style='width:35%; vertical-align:top;'>";
6007
  $content .= "<img class='trigger_img_main' style='width:99%; height:auto; padding:2px; border:1px lightgray solid;box-shadow: 3px 3px 2px -2px #999;-webkit-box-shadow: 3px 3px 2px -2px #999;-moz-box-shadow: 3px 3px 2px -2px #999;-o-box-shadow: 3px 3px 2px -2px #999;' src='".plugins_url('/images/trigger_sample.jpg', __FILE__)."'>";
6040
  function wplc_powered_by_link_settings_page() {
6041
  $wplc_powered_by = get_option("WPLC_POWERED_BY");
6042
  ?>
6043
+ <table class='form-table wp-list-table wplc_list_table widefat fixed striped pages' width='700'>
6044
  <tr>
6045
  <td width='350' valign='top'>
6046
  <?php _e("Display a 'Powered by' link in the chat box", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Checking this will display a 'Powered by WP Live Chat Support' caption at the bottom of your chatbox.", 'wplivechat'); ?>"></i>
6230
  }
6231
 
6232
  function wplc_basic_version_departments(){
6233
+ echo "<div class='wrap wplc_wrap'>";
6234
  echo sprintf( "<div class='error'><p>".__("WP Live Chat Support requires WP Live Chat Support Pro Version 7.0.0 or greater in order for departments to function as expected. Please update WP Live Chat Support %s", "wplivechat")."</p></div>", "<a href='".admin_url('update-core.php')."'>".__("here", "wplivechat")."</a>" );
6235
  echo "</div>";
6236
 
6237
  $content = "";
6238
 
6239
+ $content .= "<table class=\"wp-list-table wplc_list_table widefat fixed \" cellspacing=\"0\" style='width:98%'>";
6240
  $content .= "<thead>";
6241
  $content .= "<tr>";
6242
  $content .= "<th scope='col'><span>" . __("ID", "wplivechat") . "</span></th>";