WP Chat App - Version 2.6

Version Description

Download this release

Release Info

Developer ninjateam
Plugin Icon wp plugin WP Chat App
Version 2.6
Comparing to
See all releases

Version 2.6

Files changed (52) hide show
  1. assets/css/reset.css +35 -0
  2. assets/css/style-rtl.css +915 -0
  3. assets/css/style.css +915 -0
  4. assets/img/whatsapp_logo.svg +36 -0
  5. assets/img/whatsapp_logo_gray.svg +36 -0
  6. assets/img/whatsapp_logo_gray_sm.svg +36 -0
  7. assets/img/whatsapp_logo_green.svg +36 -0
  8. assets/img/whatsapp_logo_green_sm.svg +36 -0
  9. assets/img/x_icon.svg +3 -0
  10. assets/js/main.js +142 -0
  11. dist/assets/css/reset.css +35 -0
  12. dist/assets/css/style.css +859 -0
  13. dist/assets/img/whatsapp_logo.svg +36 -0
  14. dist/assets/img/whatsapp_logo_gray.svg +36 -0
  15. dist/assets/img/whatsapp_logo_gray_sm.svg +36 -0
  16. dist/assets/img/whatsapp_logo_green.svg +36 -0
  17. dist/assets/img/whatsapp_logo_green_sm.svg +36 -0
  18. dist/assets/img/x_icon.svg +3 -0
  19. dist/blocks.build.js +1 -0
  20. dist/blocks.editor.build.css +1 -0
  21. gutenberg/init.php +176 -0
  22. images/bar-sortable.svg +8 -0
  23. images/whatsapp-menu.svg +38 -0
  24. images/whatsapp.svg +46 -0
  25. includes/Helper.php +123 -0
  26. includes/nta-whatsapp-ads.php +101 -0
  27. includes/nta-whatsapp-class.php +40 -0
  28. includes/nta-whatsapp-popup.php +259 -0
  29. includes/nta-whatsapp-post-type.php +253 -0
  30. includes/nta-whatsapp-setting.php +487 -0
  31. includes/nta-whatsapp-shortcode.php +224 -0
  32. includes/nta-whatsapp-woocommerce.php +186 -0
  33. includes/nta-whatsapp-wpml.php +40 -0
  34. index.php +2 -0
  35. languages/en_US.mo +0 -0
  36. languages/en_US.po +359 -0
  37. languages/ninjateam-whatsapp.pot +400 -0
  38. readme.txt +196 -0
  39. scripts/css/style.css +356 -0
  40. scripts/js/admin-scripts.js +389 -0
  41. scripts/js/jquery.validate.min.js +4 -0
  42. views/nta-whatsapp-display-settings.php +163 -0
  43. views/nta-whatsapp-ga.php +18 -0
  44. views/nta-whatsapp-meta-accounts.php +101 -0
  45. views/nta-whatsapp-meta-button-style.php +35 -0
  46. views/nta-whatsapp-selected-accounts.php +38 -0
  47. views/nta-whatsapp-settings.php +46 -0
  48. views/nta-whatsapp-widget-content.php +70 -0
  49. views/nta-whatsapp-widget-view.php +74 -0
  50. views/nta-whatsapp-woocommerce-button.php +74 -0
  51. whatsapp.php +103 -0
  52. wpml-config.xml +21 -0
assets/css/reset.css ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .njt-pricing-table-redesign-wrapper a, .njt-pricing-table-redesign-wrapper abbr, .njt-pricing-table-redesign-wrapper acronym, .njt-pricing-table-redesign-wrapper address, .njt-pricing-table-redesign-wrapper applet, .njt-pricing-table-redesign-wrapper article, .njt-pricing-table-redesign-wrapper aside, .njt-pricing-table-redesign-wrapper audio, .njt-pricing-table-redesign-wrapper b, .njt-pricing-table-redesign-wrapper blockquote, .njt-pricing-table-redesign-wrapper big, .njt-pricing-table-redesign-wrapper body, .njt-pricing-table-redesign-wrapper center, .njt-pricing-table-redesign-wrapper canvas, .njt-pricing-table-redesign-wrapper caption, .njt-pricing-table-redesign-wrapper cite, .njt-pricing-table-redesign-wrapper code, .njt-pricing-table-redesign-wrapper command, .njt-pricing-table-redesign-wrapper datalist, .njt-pricing-table-redesign-wrapper dd, .njt-pricing-table-redesign-wrapper del, .njt-pricing-table-redesign-wrapper details, .njt-pricing-table-redesign-wrapper dfn, .njt-pricing-table-redesign-wrapper dl, .njt-pricing-table-redesign-wrapper div, .njt-pricing-table-redesign-wrapper dt, .njt-pricing-table-redesign-wrapper em, .njt-pricing-table-redesign-wrapper embed, .njt-pricing-table-redesign-wrapper fieldset, .njt-pricing-table-redesign-wrapper figcaption, .njt-pricing-table-redesign-wrapper figure, .njt-pricing-table-redesign-wrapper font, .njt-pricing-table-redesign-wrapper footer, .njt-pricing-table-redesign-wrapper form, .njt-pricing-table-redesign-wrapper h1, .njt-pricing-table-redesign-wrapper h2, .njt-pricing-table-redesign-wrapper h3, .njt-pricing-table-redesign-wrapper h4, .njt-pricing-table-redesign-wrapper h5, .njt-pricing-table-redesign-wrapper h6, .njt-pricing-table-redesign-wrapper header, .njt-pricing-table-redesign-wrapper hgroup, .njt-pricing-table-redesign-wrapper html, .njt-pricing-table-redesign-wrapper i, .njt-pricing-table-redesign-wrapper iframe, .njt-pricing-table-redesign-wrapper img, .njt-pricing-table-redesign-wrapper ins, .njt-pricing-table-redesign-wrapper kbd, .njt-pricing-table-redesign-wrapper keygen, .njt-pricing-table-redesign-wrapper label, .njt-pricing-table-redesign-wrapper legend, .njt-pricing-table-redesign-wrapper li, .njt-pricing-table-redesign-wrapper meter, .njt-pricing-table-redesign-wrapper nav, .njt-pricing-table-redesign-wrapper object, .njt-pricing-table-redesign-wrapper ol, .njt-pricing-table-redesign-wrapper output, .njt-pricing-table-redesign-wrapper p, .njt-pricing-table-redesign-wrapper pre, .njt-pricing-table-redesign-wrapper progress, .njt-pricing-table-redesign-wrapper q, .njt-pricing-table-redesign-wrapper s, .njt-pricing-table-redesign-wrapper samp, .njt-pricing-table-redesign-wrapper section, .njt-pricing-table-redesign-wrapper small, .njt-pricing-table-redesign-wrapper span, .njt-pricing-table-redesign-wrapper source, .njt-pricing-table-redesign-wrapper strike, .njt-pricing-table-redesign-wrapper strong, .njt-pricing-table-redesign-wrapper sub, .njt-pricing-table-redesign-wrapper sup, .njt-pricing-table-redesign-wrapper table, .njt-pricing-table-redesign-wrapper tbody, .njt-pricing-table-redesign-wrapper tfoot, .njt-pricing-table-redesign-wrapper thead, .njt-pricing-table-redesign-wrapper th, .njt-pricing-table-redesign-wrapper tr, .njt-pricing-table-redesign-wrapper tdvideo, .njt-pricing-table-redesign-wrapper tt, .njt-pricing-table-redesign-wrapper u, .njt-pricing-table-redesign-wrapper ul, .njt-pricing-table-redesign-wrapper var {
2
+ background: transparent;
3
+ border: 0 none;
4
+ font-size: 100%;
5
+ margin: 0;
6
+ padding: 0;
7
+ border: 0;
8
+ outline: 0;
9
+ vertical-align: top;
10
+ box-shadow: none;
11
+ -moz-box-shadow: none;
12
+ -webkit-box-shadow: none; }
13
+
14
+ .njt-pricing-table-redesign-wrapper ol, .njt-pricing-table-redesign-wrapper ul {
15
+ list-style: none; }
16
+
17
+ .njt-pricing-table-redesign-wrapper blockquote, .njt-pricing-table-redesign-wrapper q {
18
+ quotes: none; }
19
+
20
+ .njt-pricing-table-redesign-wrapper table, .njt-pricing-table-redesign-wrapper table td {
21
+ padding: 0;
22
+ border: none;
23
+ border-collapse: collapse; }
24
+
25
+ .njt-pricing-table-redesign-wrapper img {
26
+ vertical-align: top; }
27
+
28
+ .njt-pricing-table-redesign-wrapper embed {
29
+ vertical-align: top; }
30
+
31
+ .njt-pricing-table-redesign-wrapper article, .njt-pricing-table-redesign-wrapper aside, .njt-pricing-table-redesign-wrapper audio, .njt-pricing-table-redesign-wrapper canvas, .njt-pricing-table-redesign-wrapper command, .njt-pricing-table-redesign-wrapper datalist, .njt-pricing-table-redesign-wrapper details, .njt-pricing-table-redesign-wrapper embed, .njt-pricing-table-redesign-wrapper figcaption, .njt-pricing-table-redesign-wrapper figure, .njt-pricing-table-redesign-wrapper footer, .njt-pricing-table-redesign-wrapper header, .njt-pricing-table-redesign-wrapper hgroup, .njt-pricing-table-redesign-wrapper keygen, .njt-pricing-table-redesign-wrapper meter, .njt-pricing-table-redesign-wrapper nav, .njt-pricing-table-redesign-wrapper output, .njt-pricing-table-redesign-wrapper progress, .njt-pricing-table-redesign-wrapper section, .njt-pricing-table-redesign-wrapper source, .njt-pricing-table-redesign-wrapper video {
32
+ display: block; }
33
+
34
+ .njt-pricing-table-redesign-wrapper mark, .njt-pricing-table-redesign-wrapper rp, .njt-pricing-table-redesign-wrapper rt, .njt-pricing-table-redesign-wrapper ruby, .njt-pricing-table-redesign-wrapper summary, .njt-pricing-table-redesign-wrapper time {
35
+ display: inline; }
assets/css/style-rtl.css ADDED
@@ -0,0 +1,915 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #nta-wa-gdpr{
2
+ vertical-align: text-top !important;
3
+ padding: 0 !important;
4
+ margin: 0 !important;
5
+ }
6
+
7
+ .nta-wa-gdpr{
8
+ font-size: 11px;
9
+ padding: 5px;
10
+ margin-right: -5px;
11
+ margin-left: -5px;
12
+ border-radius: 4px;
13
+ }
14
+
15
+ .nta-wa-gdpr a{
16
+ text-decoration: underline;
17
+ color: inherit;
18
+ }
19
+
20
+ .nta-wa-gdpr label{
21
+ color: inherit;
22
+ font-size: inherit;
23
+ }
24
+
25
+ .pointer-disable{
26
+ pointer-events: none;
27
+ }
28
+
29
+ .nta-woo-products-button:before, .nta-woo-products-button:after{
30
+ content: '';
31
+ display: block;
32
+ clear: both;
33
+ }
34
+
35
+ .wa__button{
36
+ border-bottom: none !important;
37
+ }
38
+
39
+ .wa__btn_w_img:hover{
40
+ text-decoration: none;
41
+ }
42
+
43
+ .wa__button,
44
+ .wa__btn_popup,
45
+ .wa__button *,
46
+ .wa__btn_popup *,
47
+ .wa__btn_popup :before,
48
+ .wa__button :before,
49
+ .wa__button :after,
50
+ .wa__btn_popup :after,
51
+ .wa__popup_chat_box,
52
+ .wa__popup_chat_box *,
53
+ .wa__popup_chat_box :before,
54
+ .wa__popup_chat_box :after{
55
+ box-sizing: border-box;
56
+ -webkit-box-sizing: border-box;
57
+ -moz-box-sizing: border-box;
58
+ }
59
+
60
+ /* VVV--button--VVV */
61
+ .wa__button{
62
+ position: relative;
63
+ width: 300px;
64
+ min-height: 64px;
65
+ display: block;
66
+ font-family: Arial,Helvetica,sans-serif;
67
+ text-decoration: none;
68
+ color: #fff;
69
+ box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.09);
70
+ -webkit-box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.09);
71
+ -moz-box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.09);
72
+ }
73
+ .wa__btn_txt{
74
+ display: inline-block;
75
+ font-size: 12px;
76
+ line-height: 1.33em;
77
+ }
78
+
79
+ .wa__btn_w_icon .wa__btn_txt{
80
+ padding: 16px 71px 15px 20px;
81
+ }
82
+
83
+ .wa__button_text_only .wa__btn_txt,
84
+ .wa__r_button.wa__btn_w_img.wa__button_text_only .wa__btn_txt,
85
+ .wa__sq_button.wa__btn_w_img.wa__button_text_only .wa__btn_txt{
86
+ padding-top: 25px;
87
+ padding-bottom: 24px;
88
+ }
89
+
90
+
91
+
92
+ .wa__btn_w_icon .wa__btn_txt .wa__btn_title{
93
+ font-weight: 600;
94
+ padding-right: 2px;
95
+ font-size: 14px;
96
+ }
97
+
98
+ .wa__cs_info{
99
+ margin-bottom: 2px
100
+ }
101
+
102
+ .wa__btn_status{
103
+ color: #F5A623;
104
+ font-size: 9px;
105
+ padding: 2px 0 0;
106
+ font-weight: 700;
107
+ }
108
+
109
+ .wa__cs_info .wa__cs_name,
110
+ .wa__cs_info .wa__cs_status{
111
+ display: inline-block;
112
+ }
113
+
114
+ .wa__cs_info .wa__cs_name{
115
+ font-weight: 400;
116
+ font-size: 12px;
117
+ line-height: 1.36em;
118
+ }
119
+
120
+ .wa__stt_online .wa__cs_info .wa__cs_name{
121
+ color: #d5f0d9
122
+ }
123
+
124
+ .wa__stt_offline .wa__cs_info .wa__cs_name{
125
+ color: #76787d;
126
+ }
127
+
128
+ .wa__cs_info .wa__cs_status{
129
+ width: 36px;
130
+ height: 14px;
131
+ margin-right: 3px;
132
+ padding: 1px;
133
+ font-size: 9px;
134
+ line-height: 1.34em;
135
+ border-radius: 5px;
136
+ color: rgba(255,255,255,0.98);
137
+ position: relative;
138
+ top: -1px;
139
+ right: 0px;
140
+ text-align: center;
141
+ }
142
+
143
+ .wa__stt_online .wa__cs_info .wa__cs_status{
144
+ background: #62c971;
145
+ }
146
+
147
+ .wa__stt_offline .wa__cs_info .wa__cs_status{
148
+ background: #b9bbbe;
149
+ }
150
+
151
+
152
+ .wa__stt_online{
153
+ background: #2DB742;
154
+ cursor: pointer;
155
+ transition: 0.4s ease all;
156
+ -webkit-transition: 0.4s ease all;
157
+ -moz-transition: 0.4s ease all;
158
+ backface-visibility: hidden;
159
+ will-change: transform;
160
+ }
161
+ .wa__stt_online .wa__btn_txt{
162
+ position: relative;
163
+ z-index: 4;
164
+ }
165
+ .wa__r_button.wa__stt_online:before{
166
+ border-radius: 50vh;
167
+ }
168
+ .wa__sq_button.wa__stt_online:before{
169
+ border-radius: 5px;
170
+ }
171
+ .wa__stt_online:before{
172
+ content: '';
173
+ transition: 0.4s ease all;
174
+ -webkit-transition: 0.4s ease all;
175
+ -moz-transition: 0.4s ease all;
176
+ background: rgba(0,0,0,0.2);
177
+ position: absolute;
178
+ right: 0;
179
+ top: 0;
180
+ z-index: -1;
181
+ width: 100%;
182
+ height: 100%;
183
+ opacity: 0;
184
+ will-change: opacity;
185
+ }
186
+ .wa__button.wa__stt_online:focus,
187
+ .wa__button.wa__stt_online:active,
188
+ .wa__button.wa__stt_online:hover{
189
+ box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.19);
190
+ transform: translate(0,-3px);
191
+ -webkit-transform: translate(0,-3px);
192
+ -moz-transform: translate(0,-3px);
193
+ -ms-transform: translate(0,-3px);
194
+ }
195
+ .wa__button.wa__stt_online:focus:before,
196
+ .wa__button.wa__stt_online:active:before,
197
+ .wa__button.wa__stt_online:hover:before{
198
+ opacity: 1;
199
+ }
200
+ .wa__stt_online.wa__btn_w_icon .wa__btn_icon img{
201
+ transform: scale(1);
202
+ -webkit-transform: scale(1);
203
+ -moz-transform: scale(1);
204
+ -ms-transform: scale(1);
205
+ transition: 0.2s ease all;
206
+ -webkit-transition: 0.2s ease all;
207
+ -moz-transition: 0.2s ease all;
208
+ }
209
+
210
+ .wa__stt_offline{
211
+ background: #EBEDF0;
212
+ color: #595B60;
213
+ box-shadow: none;
214
+ cursor: initial;
215
+ }
216
+
217
+ .wa__stt_offline.wa__btn_w_icon .wa__btn_txt {
218
+ padding: 8px 71px 6px 20px;
219
+ }
220
+
221
+ .wa__stt_offline.wa__r_button.wa__btn_w_img .wa__btn_txt{
222
+ padding: 8px 100px 8px 20px
223
+ }
224
+
225
+ .wa__stt_offline.wa__sq_button.wa__btn_w_img .wa__btn_txt {
226
+ padding: 8px 70px 8px 20px;
227
+ }
228
+
229
+ .wa__btn_w_icon .wa__btn_icon{
230
+ position: absolute;
231
+ top: 50%;
232
+ right: 16px;
233
+ transform: translate(0,-50%);
234
+ -moz-transform: translate(0,-50%);
235
+ -webkit-transform: translate(0,-50%);
236
+ }
237
+
238
+ .wa__btn_w_icon .wa__btn_icon img{
239
+ width: 41px;
240
+ height: 69px;
241
+ }
242
+
243
+ .wa__btn_w_img{
244
+ position: relative;
245
+ width: 300px;
246
+ margin: 20px 0 20px;
247
+ }
248
+
249
+ .wa__btn_w_img .wa__cs_img{
250
+ position: absolute;
251
+ top: 50%;
252
+ right: 0px;
253
+ text-align: center;
254
+ transform: translate(0,-50%);
255
+ -webkit-transform: translate(0,-50%);
256
+ -moz-transform: translate(0,-50%);
257
+ }
258
+ .wa__btn_w_img .wa__cs_img_wrap{
259
+ width: 79px;
260
+ height: 79px;
261
+ border-radius: 50%;
262
+ -webkit-border-radius: 50%;
263
+ -moz-border-radius: 50%;
264
+ border: 3px solid #ffffff;
265
+ position: relative;
266
+ overflow: hidden;
267
+ }
268
+ .wa__btn_w_img .wa__cs_img img{
269
+ max-width: 100%;
270
+ height: auto;
271
+ transition: 0.2s ease transform;
272
+ -webkit-transition: 0.2s ease transform;
273
+ -moz-transition: 0.2s ease transform;
274
+ }
275
+ .wa__btn_w_img .wa__cs_img:after{
276
+ content: '';
277
+ background: #ffffff url('../img/whatsapp_logo_green.svg') center center no-repeat;
278
+ background-size: 21px;
279
+ display: block;
280
+ width: 27px;
281
+ height: 27px;
282
+ position: absolute;
283
+ top: 20px;
284
+ left: -14px;
285
+ border-radius: 50%;
286
+ -webkit-border-radius: 50%;
287
+ -moz-border-radius: 50%;
288
+ box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
289
+ -webkit-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
290
+ -moz-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
291
+ }
292
+
293
+ .wa__stt_offline.wa__btn_w_img .wa__cs_img:after{
294
+ content: '';
295
+ background: #ffffff url('../img/whatsapp_logo_gray.svg') center center no-repeat;
296
+ background-size: 21px;
297
+ display: block;
298
+ width: 27px;
299
+ height: 27px;
300
+ position: absolute;
301
+ top: 20px;
302
+ left: -14px;
303
+ border-radius: 50%;
304
+ -webkit-border-radius: 50%;
305
+ -moz-border-radius: 50%;
306
+ box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
307
+ -webkit-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
308
+ -moz-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
309
+ }
310
+
311
+
312
+ .wa__btn_w_img .wa__btn_txt{
313
+ padding:14px 103px 12px 20px;
314
+ }
315
+
316
+ .wa__r_button{
317
+ border-radius: 50vh;
318
+ }
319
+
320
+ .wa__sq_button{
321
+ border-radius: 5px;
322
+ }
323
+
324
+ .wa__sq_button.wa__btn_w_img{
325
+ width: 270px;
326
+ margin-right: 30px;
327
+ }
328
+
329
+ .wa__r_button.wa__btn_w_img .wa__cs_img{
330
+ right: -5px;
331
+ }
332
+
333
+ .wa__sq_button.wa__btn_w_img .wa__cs_img{
334
+ right: -35px;
335
+ }
336
+
337
+ .wa__sq_button.wa__btn_w_img .wa__btn_txt{
338
+ padding: 10px 70px 10px 20px;
339
+ display: table-cell;
340
+ vertical-align: middle;
341
+ height: 66px;
342
+ }
343
+
344
+ .wa__btn_txt .wa__btn_title{
345
+ font-weight: 600;
346
+ }
347
+
348
+ .wa__r_button.wa__btn_w_img .wa__btn_txt{
349
+ padding: 8px 100px 8px 20px;
350
+ display: table-cell;
351
+ vertical-align: middle;
352
+ height: 66px;
353
+ }
354
+
355
+ .wa__r_button.wa__btn_w_img .wa__cs_info .wa__cs_status{
356
+ margin-right: 3px;
357
+ }
358
+ /* ^^^--button--^^^ */
359
+
360
+ /* VVV--popup--VVV */
361
+
362
+ .wa__popup_chat_box{
363
+ font-family: Arial,Helvetica,sans-serif;
364
+ width: 351px;
365
+ border-radius: 5px 5px 8px 8px;
366
+ -webkit-border-radius: 5px 5px 8px 8px;
367
+ -moz-border-radius: 5px 5px 8px 8px;
368
+ position: fixed;
369
+ overflow: hidden;
370
+ box-shadow: 0px 10px 10px 4px rgba(0,0,0,0.04);
371
+ -webkit-box-shadow: 0px 10px 10px 4px rgba(0,0,0,0.04);
372
+ -moz-box-shadow: 0px 10px 10px 4px rgba(0,0,0,0.04);
373
+ bottom: 102px;
374
+ left: 25px;
375
+ z-index: 999999998;
376
+ opacity: 0;
377
+ visibility: hidden;
378
+ -ms-transform: translate(0,50px);
379
+ transform: translate(0,50px);
380
+ -webkit-transform: translate(0,50px);
381
+ -moz-transform: translate(0,50px);
382
+ transition: 0.4s ease all;
383
+ -webkit-transition: 0.4s ease all;
384
+ -moz-transition: 0.4s ease all;
385
+ will-change: transform,visibility,opacity;
386
+ max-width: calc(100% - 50px);
387
+ }
388
+ .wa__popup_chat_box:hover,
389
+ .wa__popup_chat_box:focus,
390
+ .wa__popup_chat_box:active{
391
+ box-shadow: 0px 10px 10px 4px rgba(32,32,37,0.23);
392
+ -webkit-box-shadow: 0px 10px 10px 4px rgba(32,32,37,0.23);
393
+ -moz-box-shadow: 0px 10px 10px 4px rgba(32,32,37,0.23);
394
+ }
395
+ .wa__popup_chat_box.wa__active{
396
+ -ms-transform: translate(0,0);
397
+ transform: translate(0,0);
398
+ -webkit-transform: translate(0,0);
399
+ -moz-transform: translate(0,0);
400
+ visibility: visible;
401
+ opacity: 1;
402
+ }
403
+ .wa__popup_chat_box .wa__popup_heading{
404
+ position: relative;
405
+ padding: 15px 74px 17px 43px;
406
+ color: #d9ebc6;
407
+ background: #2db742;
408
+ }
409
+ .wa__popup_chat_box .wa__popup_heading_sm{
410
+ padding: 12px 74px 17px 15px;
411
+ }
412
+ .wa__popup_chat_box .wa__popup_heading:before{
413
+ content: '';
414
+ background: url('../img/whatsapp_logo.svg') center top no-repeat;
415
+ background-size: 33px;
416
+ display: block;
417
+ width: 55px;
418
+ height: 33px;
419
+ position: absolute;
420
+ top: 20px;
421
+ right: 12px;
422
+ }
423
+ .wa__popup_chat_box .wa__popup_heading_sm:before{
424
+ top: 19px;
425
+ right: 11px;
426
+ }
427
+
428
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_title{
429
+ padding-top: 2px;
430
+ padding-bottom: 3;
431
+ color: #ffffff;
432
+ font-size: 18px;
433
+ line-height: 24px;
434
+ }
435
+
436
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro{
437
+ padding-top: 4px;
438
+ font-size: 12px;
439
+ line-height: 20px;
440
+ }
441
+ .wa__popup_chat_box .wa__popup_heading_sm .wa__popup_intro{
442
+ padding-top: 0px;
443
+ }
444
+
445
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a{
446
+ display: inline-block;
447
+ color: #ffffff;
448
+ text-decoration: none;
449
+ }
450
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a:hover,
451
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a:focus,
452
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a:active{
453
+ text-decoration: underline;
454
+ }
455
+
456
+ .wa__popup_chat_box .wa__popup_notice{
457
+ font-size: 11px;
458
+ color: #a5abb7;
459
+ font-weight: 500;
460
+ padding: 0 3px;
461
+ }
462
+ .wa__popup_chat_box .wa__popup_content{
463
+ background: #ffffff;
464
+ padding: 13px 19px 21px 20px;
465
+ text-align: center;
466
+ }
467
+ .wa__popup_chat_box .wa__popup_content_left{
468
+ text-align: right;
469
+ }
470
+ .wa__popup_chat_box .wa__popup_avatar{
471
+ position: absolute;
472
+ overflow: hidden;
473
+ border-radius: 50%;
474
+ -webkit-border-radius: 50%;
475
+ -moz-border-radius: 50%;
476
+ right: 12px;
477
+ top: 12px;
478
+ }
479
+
480
+ .wa__popup_chat_box .wa__popup_avatar.nta-default-avt{
481
+ border-radius: unset;
482
+ -webkit-border-radius: unset;
483
+ -moz-border-radius: unset;
484
+ }
485
+
486
+ .wa__popup_chat_box .wa__stt{
487
+ padding: 13px 74px 12px 40px;
488
+ position: relative;
489
+ text-decoration: none;
490
+ display: table;
491
+ width: 100%;
492
+ border-right: 2px solid #2db742;
493
+ background: #f5f7f9;
494
+ border-radius: 4px 2px 4px 2px;
495
+ -webkit-border-radius: 4px 2px 4px 2px;
496
+ -moz-border-radius: 4px 2px 4px 2px;
497
+ }
498
+ .wa__popup_chat_box .wa__stt:after{
499
+ content: '';
500
+ background: url('../img/whatsapp_logo_green.svg') 100% 0 no-repeat;
501
+ position: absolute;
502
+ left: 14px;
503
+ top: 26px;
504
+ width: 20px;
505
+ height: 20px;
506
+ background-size: 100% 100%;
507
+ -webkit-background-size: 100% 100%;
508
+ -moz-background-size: 100% 100%;
509
+ }
510
+ .wa__popup_chat_box .wa__stt.wa__stt_offline:after{
511
+ background-image: url('../img/whatsapp_logo_gray_sm.svg');
512
+ }
513
+ .wa__popup_chat_box .wa__stt.wa__stt_online{
514
+ transition: 0.2s ease all;
515
+ -webkit-transition: 0.2s ease all;
516
+ -moz-transition: 0.2s ease all;
517
+ }
518
+ .wa__popup_chat_box .wa__stt.wa__stt_online:hover,
519
+ .wa__popup_chat_box .wa__stt.wa__stt_online:active,
520
+ .wa__popup_chat_box .wa__stt.wa__stt_online:focus{
521
+ background: #ffffff;
522
+ box-shadow: 0px 7px 15px 1px rgba(55,62,70,0.07);
523
+ -webkit-box-shadow: 0px 7px 15px 1px rgba(55,62,70,0.07);
524
+ -moz-box-shadow: 0px 7px 15px 1px rgba(55,62,70,0.07);
525
+ }
526
+ .wa__popup_content_list .wa__popup_content_item{
527
+ margin: 14px 0 0;
528
+ transform: translate(0,20px);
529
+ -webkit-transform: translate(0,20px);
530
+ -moz-transform: translate(0,20px);
531
+ will-change: opacity,transform;
532
+ opacity: 0;
533
+ }
534
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item{
535
+ transition: 0.4s ease all;
536
+ -webkit-transition: 0.4s ease all;
537
+ -moz-transition: 0.4s ease all;
538
+ transition-delay: 2.1s;
539
+ -webkit-transition-delay: 2.1s;
540
+ -moz-transition-delay: 2.1s;
541
+ }
542
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(1){
543
+ transition-delay: 0.3s;
544
+ -webkit-transition-delay: 0.3s;
545
+ -moz-transition-delay: 0.3s;
546
+ }
547
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(2){
548
+ transition-delay: 0.5s;
549
+ -webkit-transition-delay: 0.5s;
550
+ -moz-transition-delay: 0.5s;
551
+ }
552
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(3){
553
+ transition-delay: 0.7s;
554
+ -webkit-transition-delay: 0.7s;
555
+ -moz-transition-delay: 0.7s;
556
+ }
557
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(4){
558
+ transition-delay: 0.9s;
559
+ -webkit-transition-delay: 0.9s;
560
+ -moz-transition-delay: 0.9s;
561
+ }
562
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(5){
563
+ transition-delay: 1.1s;
564
+ -webkit-transition-delay: 1.1s;
565
+ -moz-transition-delay: 1.1s;
566
+ }
567
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(6){
568
+ transition-delay: 1.3s;
569
+ -webkit-transition-delay: 1.3s;
570
+ -moz-transition-delay: 1.3s;
571
+ }
572
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(7){
573
+ transition-delay: 1.5s;
574
+ -webkit-transition-delay: 1.5s;
575
+ -moz-transition-delay: 1.5s;
576
+ }
577
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(8){
578
+ transition-delay: 1.7s;
579
+ -webkit-transition-delay: 1.7s;
580
+ -moz-transition-delay: 1.7s;
581
+ }
582
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(9){
583
+ transition-delay: 1.9s;
584
+ -webkit-transition-delay: 1.9s;
585
+ -moz-transition-delay: 1.9s;
586
+ }
587
+ .wa__popup_chat_box.wa__lauch .wa__popup_content_list .wa__popup_content_item{
588
+ opacity: 1;
589
+ transform: translate(0,0);
590
+ -webkit-transform: translate(0,0);
591
+ -moz-transform: translate(0,0);
592
+ }
593
+ .wa__popup_content_list .wa__popup_content_item .wa__member_name{
594
+ font-size: 14px;
595
+ color: #363c47;
596
+ line-height: 1.188em !important;
597
+ }
598
+ .wa__popup_content_list .wa__popup_content_item .wa__member_duty{
599
+ font-size: 11px;
600
+ color: #989b9f;
601
+ padding: 2px 0 0;
602
+ line-height: 1.125em !important;
603
+ }
604
+ .wa__popup_content_list .wa__popup_content_item .wa__member_status{
605
+ color: #F5A623;
606
+ font-size: 10px;
607
+ padding: 5px 0 0;
608
+ line-height: 1.125em !important;
609
+ }
610
+ .wa__popup_content_list .wa__popup_content_item .wa__popup_txt{
611
+ display: table-cell;
612
+ vertical-align: middle;
613
+ min-height: 48px;
614
+ height: 48px;
615
+ }
616
+ .wa__popup_content_list .wa__popup_content_item .wa__stt_offline{
617
+ border-right-color: #c0c5ca;
618
+ }
619
+ .wa__popup_avt_list{
620
+ font-size: 0;
621
+ margin: 7px 0 24px;
622
+ }
623
+ .wa__popup_avt_list .wa__popup_avt_item{
624
+ display: inline-block;
625
+ position: relative;
626
+ width: 46px;
627
+ }
628
+ .wa__popup_avt_list .wa__popup_avt_img{
629
+ width: 60px;
630
+ height: 60px;
631
+ border-radius: 50%;
632
+ -webkit-border-radius: 50%;
633
+ -moz-border-radius: 50%;
634
+ position: relative;
635
+ overflow: hidden;
636
+ border: 2px solid #ffffff;
637
+ right: -7px;
638
+ }
639
+ .wa__popup_call_btn{
640
+ background: #2db742;
641
+ color: #ffffff;
642
+ text-decoration: none;
643
+ display: inline-block;
644
+ width: 275px;
645
+ max-width: 100%;
646
+ font-size: 16px;
647
+ padding: 14px 10px;
648
+ border-radius: 24px;
649
+ -webkit-border-radius: 24px;
650
+ -moz-border-radius: 24px;
651
+ margin: 25px 0 15px;
652
+ box-shadow: 0px 8px 17px 2px rgba(13,15,18,0.2);
653
+ -webkit-box-shadow: 0px 8px 17px 2px rgba(13,15,18,0.2);
654
+ -moz-box-shadow: 0px 8px 17px 2px rgba(13,15,18,0.2);
655
+ }
656
+ .wa__popup_call_btn.wa__popup_call_btn_lg:before{
657
+ content: '';
658
+ display: inline-block;
659
+ width: 20px;
660
+ height: 20px;
661
+ position: relative;
662
+ background: url('../img/whatsapp_logo_green_sm.svg') 100% 0 no-repeat;
663
+ background-size: 100% 100%;
664
+ -webkit-background-size: 100% 100%;
665
+ -moz-background-size: 100% 100%;
666
+ vertical-align: top;
667
+ top: 0px;
668
+ margin-left: -19px;
669
+ right: -31px;
670
+ transition: 0.2s ease background-image;
671
+ -webkit-transition: 0.2s ease background-image;
672
+ -moz-transition: 0.2s ease background-image;
673
+ }
674
+ .wa__popup_call_btn.wa__popup_call_btn_lg:hover:before,
675
+ .wa__popup_call_btn.wa__popup_call_btn_lg:focus:before,
676
+ .wa__popup_call_btn.wa__popup_call_btn_lg:active:before{
677
+ background-image: url('../img/whatsapp_logo.svg')
678
+ }
679
+
680
+ .wa__popup_chat_box_gray{
681
+ border-radius: 2px 2px 8px 8px;
682
+ }
683
+
684
+ .wa__popup_chat_box_gray .wa__popup_heading_gray{
685
+ background: #f8f8f8;
686
+ border-top: 3px solid #2db742;
687
+ color: #868c9a;
688
+ font-weight: 500;
689
+ }
690
+ .wa__popup_chat_box_gray .wa__popup_heading_gray .wa__popup_title{
691
+ color: #595b60;
692
+ }
693
+ .wa__popup_chat_box_gray .wa__popup_heading_gray:before{
694
+ content: '';
695
+ background: url(../img/whatsapp_logo_green.svg) center top no-repeat;
696
+ background-size: 33px;
697
+ display: block;
698
+ width: 55px;
699
+ height: 33px;
700
+ position: absolute;
701
+ top: 20px;
702
+ right: 12px;
703
+ }
704
+ .wa__popup_chat_box_gray .wa__popup_heading_gray .wa__popup_intro a{
705
+ color: #595b60;
706
+ }
707
+
708
+ .wa__popup_chat_box_ct{
709
+ width: 384px;
710
+ text-align: center;
711
+ }
712
+
713
+ .wa__popup_chat_box_ct .wa__popup_heading_ct{
714
+ text-align: center;
715
+ padding: 18px 0 18px;
716
+ }
717
+
718
+ .wa__popup_chat_box_ct .wa__popup_heading_ct:before {
719
+ content: '';
720
+ background: url(../img/whatsapp_logo.svg) center top no-repeat;
721
+ background-size: 30px;
722
+ display: block;
723
+ width: 30px;
724
+ height: 31px;
725
+ position: absolute;
726
+ top: 15px;
727
+ right: 72px;
728
+ }
729
+
730
+ .wa__popup_chat_box_ct .wa__popup_heading_ct .wa__popup_title{
731
+ padding-right: 22px;
732
+ padding-bottom: 14px;
733
+ }
734
+
735
+ .wa__popup_chat_box_ct .wa__popup_heading_ct .wa__popup_intro{
736
+ margin-top: -5px;
737
+ line-height: 12px;
738
+ }
739
+
740
+ .wa__popup_chat_box_ct .wa__popup_ct_avt_list:after{
741
+ content: '';
742
+ clear: both;
743
+ display: block;
744
+ }
745
+
746
+ .wa__popup_chat_box_ct .wa__popup_ct_content{
747
+ background: #ffffff;
748
+ padding: 0 0 14px;
749
+ }
750
+
751
+ .wa__popup_chat_box_ct .wa__popup_ct_content .wa__popup_notice{
752
+ padding-top: 18px;
753
+ padding-bottom: 15px;
754
+ }
755
+
756
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item{
757
+ width: 33%;
758
+ float: right;
759
+ font-size: 10px;
760
+ }
761
+
762
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item a{
763
+ text-decoration: none;
764
+ color: #989b9f;
765
+ }
766
+
767
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__popup_ct_txt{
768
+ padding-top: 8px;
769
+ }
770
+
771
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_name{
772
+ color: #363c47;
773
+ font-size: 13px;
774
+ }
775
+
776
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_duty{
777
+ color: #989b9f;
778
+ padding: 3px 0 0;
779
+ }
780
+
781
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_stt_online{
782
+ color: #2db742;
783
+ font-size: 9px;
784
+ line-height: 12px;
785
+ display: inline-block;
786
+ padding: 3px 16px 0 0;
787
+ background: url('../img/whatsapp_logo_green.svg') 100% 3px no-repeat;
788
+ background-size: 12px auto;
789
+ -webkit-background-size: 12px auto;
790
+ -moz-background-size: 12px auto;
791
+ }
792
+
793
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_stt_offline{
794
+ color: #f5a623;
795
+ font-size: 9px;
796
+ line-height: 12px;
797
+ padding: 2px 0 0;
798
+ }
799
+
800
+
801
+ .wa__popup_chat_box_ct .wa__popup_ct_avatar img{
802
+ border-radius: 50%
803
+ }
804
+
805
+ .wa__popup_chat_box_ct .wa__popup_ct_call_btn{
806
+ width: 97px;
807
+ font-size: 11px;
808
+ padding: 9px 10px 11px;
809
+ margin: 15px 0 15px;
810
+ }
811
+
812
+ /* ^^^--popup--^^^ */
813
+
814
+ /* VVV--popup button--VVV */
815
+ .wa__btn_popup{
816
+ position: fixed;
817
+ left: 30px;
818
+ bottom: 30px;
819
+ cursor: pointer;
820
+ font-family: Arial,Helvetica,sans-serif;
821
+ z-index: 999999999;
822
+ }
823
+ .wa__btn_popup .wa__btn_popup_icon{
824
+ width: 56px;
825
+ height: 56px;
826
+ background: #2db742;
827
+ border-radius: 50%;
828
+ -webkit-border-radius: 50%;
829
+ -moz-border-radius: 50%;
830
+ box-shadow: 0px 6px 8px 2px rgba(0,0,0,0.14);
831
+ -webkit-box-shadow: 0px 6px 8px 2px rgba(0,0,0,0.14);
832
+ -moz-box-shadow: 0px 6px 8px 2px rgba(0,0,0,0.14);
833
+ }
834
+ .wa__btn_popup .wa__btn_popup_icon:before{
835
+ content: '';
836
+ position: absolute;
837
+ z-index: 1;
838
+ width: 100%;
839
+ height: 100%;
840
+ right: 0;
841
+ top: 0;
842
+ background: transparent url('../img/whatsapp_logo.svg') center center no-repeat;
843
+ background-size: 30px auto;
844
+ -webkit-background-size: 30px auto;
845
+ -moz-background-size: 30px auto;
846
+ transition: 0.4s ease all;
847
+ -webkit-transition: 0.4s ease all;
848
+ -moz-transition: 0.4s ease all;
849
+ }
850
+ .wa__btn_popup .wa__btn_popup_icon:after{
851
+ content: '';
852
+ opacity: 0;
853
+ position: absolute;
854
+ z-index: 2;
855
+ width: 100%;
856
+ height: 100%;
857
+ right: 0;
858
+ top: 0;
859
+ background: transparent url('../img/x_icon.svg') center center no-repeat;
860
+ background-size: 14px auto;
861
+ -webkit-background-size: 14px auto;
862
+ -moz-background-size: 14px auto;
863
+ transition: 0.4s ease all;
864
+ -webkit-transition: 0.4s ease all;
865
+ -moz-transition: 0.4s ease all;
866
+ -ms-transform: scale(0) rotate(360deg);
867
+ transform: scale(0) rotate(360deg);
868
+ -webkit-transform: scale(0) rotate(360deg);
869
+ -moz-transform: scale(0) rotate(360deg);
870
+ }
871
+ .wa__btn_popup.wa__active .wa__btn_popup_icon:before{
872
+ opacity: 0;
873
+ -ms-transform: scale(0) rotate(-360deg);
874
+ transform: scale(0) rotate(-360deg);
875
+ -webkit-transform: scale(0) rotate(-360deg);
876
+ -moz-transform: scale(0) rotate(-360deg);
877
+ }
878
+ .wa__btn_popup.wa__active .wa__btn_popup_icon:after{
879
+ opacity: 1;
880
+ -ms-transform: scale(1) rotate(0deg);
881
+ transform: scale(1) rotate(0deg);
882
+ -webkit-transform: scale(1) rotate(0deg);
883
+ -moz-transform: scale(1) rotate(0deg);
884
+ }
885
+ .wa__btn_popup .wa__btn_popup_txt{
886
+ position: absolute;
887
+ width: 156px;
888
+ left: 100%;
889
+ background-color: #f5f7f9;
890
+ font-size: 12px;
891
+ color: #43474e;
892
+ top: 15px;
893
+ /* top: 50%;
894
+ transform: translate(0,-50%);
895
+ -moz-transform: translate(0,-50%);
896
+ -webkit-transform: translate(0,-50%); */
897
+ padding: 7px 12px 7px 0;
898
+ margin-left: 7px;
899
+ letter-spacing: -0.03em;
900
+ border-radius: 4px;
901
+ -webkit-border-radius: 4px;
902
+ -moz-border-radius: 4px;
903
+ transition: 0.4s ease all;
904
+ -webkit-transition: 0.4s ease all;
905
+ -moz-transition: 0.4s ease all;
906
+ }
907
+ .wa__btn_popup.wa__active .wa__btn_popup_txt{
908
+ -ms-transform: translate(0,15px);
909
+ transform: translate(0,15px);
910
+ -webkit-transform: translate(0,15px);
911
+ -moz-transform: translate(0,15px);
912
+ opacity: 0;
913
+ visibility: hidden;
914
+ }
915
+ /* ^^^--popup button--^^^ */
assets/css/style.css ADDED
@@ -0,0 +1,915 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #nta-wa-gdpr{
2
+ vertical-align: text-top !important;
3
+ padding: 0 !important;
4
+ margin: 0 !important;
5
+ }
6
+
7
+ .nta-wa-gdpr{
8
+ font-size: 11px;
9
+ padding: 5px;
10
+ margin-left: -5px;
11
+ margin-right: -5px;
12
+ border-radius: 4px;
13
+ }
14
+
15
+ .nta-wa-gdpr a{
16
+ text-decoration: underline;
17
+ color: inherit;
18
+ }
19
+
20
+ .nta-wa-gdpr label{
21
+ color: inherit;
22
+ font-size: inherit;
23
+ }
24
+
25
+ .pointer-disable{
26
+ pointer-events: none;
27
+ }
28
+
29
+ .nta-woo-products-button:before, .nta-woo-products-button:after{
30
+ content: '';
31
+ display: block;
32
+ clear: both;
33
+ }
34
+
35
+ .wa__button{
36
+ border-bottom: none !important;
37
+ }
38
+
39
+ .wa__btn_w_img:hover{
40
+ text-decoration: none;
41
+ }
42
+
43
+ .wa__button,
44
+ .wa__btn_popup,
45
+ .wa__button *,
46
+ .wa__btn_popup *,
47
+ .wa__btn_popup :before,
48
+ .wa__button :before,
49
+ .wa__button :after,
50
+ .wa__btn_popup :after,
51
+ .wa__popup_chat_box,
52
+ .wa__popup_chat_box *,
53
+ .wa__popup_chat_box :before,
54
+ .wa__popup_chat_box :after{
55
+ box-sizing: border-box;
56
+ -webkit-box-sizing: border-box;
57
+ -moz-box-sizing: border-box;
58
+ }
59
+
60
+ /* VVV--button--VVV */
61
+ .wa__button{
62
+ position: relative;
63
+ width: 300px;
64
+ min-height: 64px;
65
+ display: block;
66
+ font-family: Arial,Helvetica,sans-serif;
67
+ text-decoration: none;
68
+ color: #fff;
69
+ box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.09);
70
+ -webkit-box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.09);
71
+ -moz-box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.09);
72
+ }
73
+ .wa__btn_txt{
74
+ display: inline-block;
75
+ font-size: 12px;
76
+ line-height: 1.33em;
77
+ }
78
+
79
+ .wa__btn_w_icon .wa__btn_txt{
80
+ padding: 16px 20px 15px 71px;
81
+ }
82
+
83
+ .wa__button_text_only .wa__btn_txt,
84
+ .wa__r_button.wa__btn_w_img.wa__button_text_only .wa__btn_txt,
85
+ .wa__sq_button.wa__btn_w_img.wa__button_text_only .wa__btn_txt{
86
+ padding-top: 25px;
87
+ padding-bottom: 24px;
88
+ }
89
+
90
+
91
+
92
+ .wa__btn_w_icon .wa__btn_txt .wa__btn_title{
93
+ font-weight: 600;
94
+ padding-left: 2px;
95
+ font-size: 14px;
96
+ }
97
+
98
+ .wa__cs_info{
99
+ margin-bottom: 2px
100
+ }
101
+
102
+ .wa__btn_status{
103
+ color: #F5A623;
104
+ font-size: 9px;
105
+ padding: 2px 0 0;
106
+ font-weight: 700;
107
+ }
108
+
109
+ .wa__cs_info .wa__cs_name,
110
+ .wa__cs_info .wa__cs_status{
111
+ display: inline-block;
112
+ }
113
+
114
+ .wa__cs_info .wa__cs_name{
115
+ font-weight: 400;
116
+ font-size: 12px;
117
+ line-height: 1.36em;
118
+ }
119
+
120
+ .wa__stt_online .wa__cs_info .wa__cs_name{
121
+ color: #d5f0d9
122
+ }
123
+
124
+ .wa__stt_offline .wa__cs_info .wa__cs_name{
125
+ color: #76787d;
126
+ }
127
+
128
+ .wa__cs_info .wa__cs_status{
129
+ width: 36px;
130
+ height: 14px;
131
+ margin-left: 3px;
132
+ padding: 1px;
133
+ font-size: 9px;
134
+ line-height: 1.34em;
135
+ border-radius: 5px;
136
+ color: rgba(255,255,255,0.98);
137
+ position: relative;
138
+ top: -1px;
139
+ left: 0px;
140
+ text-align: center;
141
+ }
142
+
143
+ .wa__stt_online .wa__cs_info .wa__cs_status{
144
+ background: #62c971;
145
+ }
146
+
147
+ .wa__stt_offline .wa__cs_info .wa__cs_status{
148
+ background: #b9bbbe;
149
+ }
150
+
151
+
152
+ .wa__stt_online{
153
+ background: #2DB742;
154
+ cursor: pointer;
155
+ transition: 0.4s ease all;
156
+ -webkit-transition: 0.4s ease all;
157
+ -moz-transition: 0.4s ease all;
158
+ backface-visibility: hidden;
159
+ will-change: transform;
160
+ }
161
+ .wa__stt_online .wa__btn_txt{
162
+ position: relative;
163
+ z-index: 4;
164
+ }
165
+ .wa__r_button.wa__stt_online:before{
166
+ border-radius: 50vh;
167
+ }
168
+ .wa__sq_button.wa__stt_online:before{
169
+ border-radius: 5px;
170
+ }
171
+ .wa__stt_online:before{
172
+ content: '';
173
+ transition: 0.4s ease all;
174
+ -webkit-transition: 0.4s ease all;
175
+ -moz-transition: 0.4s ease all;
176
+ background: rgba(0,0,0,0.2);
177
+ position: absolute;
178
+ left: 0;
179
+ top: 0;
180
+ z-index: -1;
181
+ width: 100%;
182
+ height: 100%;
183
+ opacity: 0;
184
+ will-change: opacity;
185
+ }
186
+ .wa__button.wa__stt_online:focus,
187
+ .wa__button.wa__stt_online:active,
188
+ .wa__button.wa__stt_online:hover{
189
+ box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.19);
190
+ transform: translate(0,-3px);
191
+ -webkit-transform: translate(0,-3px);
192
+ -moz-transform: translate(0,-3px);
193
+ -ms-transform: translate(0,-3px);
194
+ }
195
+ .wa__button.wa__stt_online:focus:before,
196
+ .wa__button.wa__stt_online:active:before,
197
+ .wa__button.wa__stt_online:hover:before{
198
+ opacity: 1;
199
+ }
200
+ .wa__stt_online.wa__btn_w_icon .wa__btn_icon img{
201
+ transform: scale(1);
202
+ -webkit-transform: scale(1);
203
+ -moz-transform: scale(1);
204
+ -ms-transform: scale(1);
205
+ transition: 0.2s ease all;
206
+ -webkit-transition: 0.2s ease all;
207
+ -moz-transition: 0.2s ease all;
208
+ }
209
+
210
+ .wa__stt_offline{
211
+ background: #EBEDF0;
212
+ color: #595B60;
213
+ box-shadow: none;
214
+ cursor: initial;
215
+ }
216
+
217
+ .wa__stt_offline.wa__btn_w_icon .wa__btn_txt {
218
+ padding: 8px 20px 6px 71px;
219
+ }
220
+
221
+ .wa__stt_offline.wa__r_button.wa__btn_w_img .wa__btn_txt{
222
+ padding: 8px 20px 8px 100px
223
+ }
224
+
225
+ .wa__stt_offline.wa__sq_button.wa__btn_w_img .wa__btn_txt {
226
+ padding: 8px 20px 8px 70px;
227
+ }
228
+
229
+ .wa__btn_w_icon .wa__btn_icon{
230
+ position: absolute;
231
+ top: 50%;
232
+ left: 16px;
233
+ transform: translate(0,-50%);
234
+ -moz-transform: translate(0,-50%);
235
+ -webkit-transform: translate(0,-50%);
236
+ }
237
+
238
+ .wa__btn_w_icon .wa__btn_icon img{
239
+ width: 41px;
240
+ height: 69px;
241
+ }
242
+
243
+ .wa__btn_w_img{
244
+ position: relative;
245
+ width: 300px;
246
+ margin: 20px 0 20px;
247
+ }
248
+
249
+ .wa__btn_w_img .wa__cs_img{
250
+ position: absolute;
251
+ top: 50%;
252
+ left: 0px;
253
+ text-align: center;
254
+ transform: translate(0,-50%);
255
+ -webkit-transform: translate(0,-50%);
256
+ -moz-transform: translate(0,-50%);
257
+ }
258
+ .wa__btn_w_img .wa__cs_img_wrap{
259
+ width: 79px;
260
+ height: 79px;
261
+ border-radius: 50%;
262
+ -webkit-border-radius: 50%;
263
+ -moz-border-radius: 50%;
264
+ border: 3px solid #ffffff;
265
+ position: relative;
266
+ overflow: hidden;
267
+ }
268
+ .wa__btn_w_img .wa__cs_img img{
269
+ max-width: 100%;
270
+ height: auto;
271
+ transition: 0.2s ease transform;
272
+ -webkit-transition: 0.2s ease transform;
273
+ -moz-transition: 0.2s ease transform;
274
+ }
275
+ .wa__btn_w_img .wa__cs_img:after{
276
+ content: '';
277
+ background: #ffffff url('../img/whatsapp_logo_green.svg') center center no-repeat;
278
+ background-size: 21px;
279
+ display: block;
280
+ width: 27px;
281
+ height: 27px;
282
+ position: absolute;
283
+ top: 20px;
284
+ right: -14px;
285
+ border-radius: 50%;
286
+ -webkit-border-radius: 50%;
287
+ -moz-border-radius: 50%;
288
+ box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
289
+ -webkit-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
290
+ -moz-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
291
+ }
292
+
293
+ .wa__stt_offline.wa__btn_w_img .wa__cs_img:after{
294
+ content: '';
295
+ background: #ffffff url('../img/whatsapp_logo_gray.svg') center center no-repeat;
296
+ background-size: 21px;
297
+ display: block;
298
+ width: 27px;
299
+ height: 27px;
300
+ position: absolute;
301
+ top: 20px;
302
+ right: -14px;
303
+ border-radius: 50%;
304
+ -webkit-border-radius: 50%;
305
+ -moz-border-radius: 50%;
306
+ box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
307
+ -webkit-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
308
+ -moz-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
309
+ }
310
+
311
+
312
+ .wa__btn_w_img .wa__btn_txt{
313
+ padding:14px 20px 12px 103px;
314
+ }
315
+
316
+ .wa__r_button{
317
+ border-radius: 50vh;
318
+ }
319
+
320
+ .wa__sq_button{
321
+ border-radius: 5px;
322
+ }
323
+
324
+ .wa__sq_button.wa__btn_w_img{
325
+ width: 270px;
326
+ margin-left: 30px;
327
+ }
328
+
329
+ .wa__r_button.wa__btn_w_img .wa__cs_img{
330
+ left: -5px;
331
+ }
332
+
333
+ .wa__sq_button.wa__btn_w_img .wa__cs_img{
334
+ left: -35px;
335
+ }
336
+
337
+ .wa__sq_button.wa__btn_w_img .wa__btn_txt{
338
+ padding: 10px 20px 10px 70px;
339
+ display: table-cell;
340
+ vertical-align: middle;
341
+ height: 66px;
342
+ }
343
+
344
+ .wa__btn_txt .wa__btn_title{
345
+ font-weight: 600;
346
+ }
347
+
348
+ .wa__r_button.wa__btn_w_img .wa__btn_txt{
349
+ padding: 8px 20px 8px 100px;
350
+ display: table-cell;
351
+ vertical-align: middle;
352
+ height: 66px;
353
+ }
354
+
355
+ .wa__r_button.wa__btn_w_img .wa__cs_info .wa__cs_status{
356
+ margin-left: 3px;
357
+ }
358
+ /* ^^^--button--^^^ */
359
+
360
+ /* VVV--popup--VVV */
361
+
362
+ .wa__popup_chat_box{
363
+ font-family: Arial,Helvetica,sans-serif;
364
+ width: 351px;
365
+ border-radius: 5px 5px 8px 8px;
366
+ -webkit-border-radius: 5px 5px 8px 8px;
367
+ -moz-border-radius: 5px 5px 8px 8px;
368
+ position: fixed;
369
+ overflow: hidden;
370
+ box-shadow: 0px 10px 10px 4px rgba(0,0,0,0.04);
371
+ -webkit-box-shadow: 0px 10px 10px 4px rgba(0,0,0,0.04);
372
+ -moz-box-shadow: 0px 10px 10px 4px rgba(0,0,0,0.04);
373
+ bottom: 102px;
374
+ right: 25px;
375
+ z-index: 999999998;
376
+ opacity: 0;
377
+ visibility: hidden;
378
+ -ms-transform: translate(0,50px);
379
+ transform: translate(0,50px);
380
+ -webkit-transform: translate(0,50px);
381
+ -moz-transform: translate(0,50px);
382
+ transition: 0.4s ease all;
383
+ -webkit-transition: 0.4s ease all;
384
+ -moz-transition: 0.4s ease all;
385
+ will-change: transform,visibility,opacity;
386
+ max-width: calc(100% - 50px);
387
+ }
388
+ .wa__popup_chat_box:hover,
389
+ .wa__popup_chat_box:focus,
390
+ .wa__popup_chat_box:active{
391
+ box-shadow: 0px 10px 10px 4px rgba(32,32,37,0.23);
392
+ -webkit-box-shadow: 0px 10px 10px 4px rgba(32,32,37,0.23);
393
+ -moz-box-shadow: 0px 10px 10px 4px rgba(32,32,37,0.23);
394
+ }
395
+ .wa__popup_chat_box.wa__active{
396
+ -ms-transform: translate(0,0);
397
+ transform: translate(0,0);
398
+ -webkit-transform: translate(0,0);
399
+ -moz-transform: translate(0,0);
400
+ visibility: visible;
401
+ opacity: 1;
402
+ }
403
+ .wa__popup_chat_box .wa__popup_heading{
404
+ position: relative;
405
+ padding: 15px 43px 17px 74px;
406
+ color: #d9ebc6;
407
+ background: #2db742;
408
+ }
409
+ .wa__popup_chat_box .wa__popup_heading_sm{
410
+ padding: 12px 15px 17px 74px;
411
+ }
412
+ .wa__popup_chat_box .wa__popup_heading:before{
413
+ content: '';
414
+ background: url('../img/whatsapp_logo.svg') center top no-repeat;
415
+ background-size: 33px;
416
+ display: block;
417
+ width: 55px;
418
+ height: 33px;
419
+ position: absolute;
420
+ top: 20px;
421
+ left: 12px;
422
+ }
423
+ .wa__popup_chat_box .wa__popup_heading_sm:before{
424
+ top: 19px;
425
+ left: 11px;
426
+ }
427
+
428
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_title{
429
+ padding-top: 2px;
430
+ padding-bottom: 3;
431
+ color: #ffffff;
432
+ font-size: 18px;
433
+ line-height: 24px;
434
+ }
435
+
436
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro{
437
+ padding-top: 4px;
438
+ font-size: 12px;
439
+ line-height: 20px;
440
+ }
441
+ .wa__popup_chat_box .wa__popup_heading_sm .wa__popup_intro{
442
+ padding-top: 0px;
443
+ }
444
+
445
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a{
446
+ display: inline-block;
447
+ color: #ffffff;
448
+ text-decoration: none;
449
+ }
450
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a:hover,
451
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a:focus,
452
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a:active{
453
+ text-decoration: underline;
454
+ }
455
+
456
+ .wa__popup_chat_box .wa__popup_notice{
457
+ font-size: 11px;
458
+ color: #a5abb7;
459
+ font-weight: 500;
460
+ padding: 0 3px;
461
+ }
462
+ .wa__popup_chat_box .wa__popup_content{
463
+ background: #ffffff;
464
+ padding: 13px 20px 21px 19px;
465
+ text-align: center;
466
+ }
467
+ .wa__popup_chat_box .wa__popup_content_left{
468
+ text-align: left;
469
+ }
470
+ .wa__popup_chat_box .wa__popup_avatar{
471
+ position: absolute;
472
+ overflow: hidden;
473
+ border-radius: 50%;
474
+ -webkit-border-radius: 50%;
475
+ -moz-border-radius: 50%;
476
+ left: 12px;
477
+ top: 12px;
478
+ }
479
+
480
+ .wa__popup_chat_box .wa__popup_avatar.nta-default-avt{
481
+ border-radius: unset;
482
+ -webkit-border-radius: unset;
483
+ -moz-border-radius: unset;
484
+ }
485
+
486
+ .wa__popup_chat_box .wa__stt{
487
+ padding: 13px 40px 12px 74px;
488
+ position: relative;
489
+ text-decoration: none;
490
+ display: table;
491
+ width: 100%;
492
+ border-left: 2px solid #2db742;
493
+ background: #f5f7f9;
494
+ border-radius: 2px 4px 2px 4px;
495
+ -webkit-border-radius: 2px 4px 2px 4px;
496
+ -moz-border-radius: 2px 4px 2px 4px;
497
+ }
498
+ .wa__popup_chat_box .wa__stt:after{
499
+ content: '';
500
+ background: url('../img/whatsapp_logo_green.svg') 0 0 no-repeat;
501
+ position: absolute;
502
+ right: 14px;
503
+ top: 26px;
504
+ width: 20px;
505
+ height: 20px;
506
+ background-size: 100% 100%;
507
+ -webkit-background-size: 100% 100%;
508
+ -moz-background-size: 100% 100%;
509
+ }
510
+ .wa__popup_chat_box .wa__stt.wa__stt_offline:after{
511
+ background-image: url('../img/whatsapp_logo_gray_sm.svg');
512
+ }
513
+ .wa__popup_chat_box .wa__stt.wa__stt_online{
514
+ transition: 0.2s ease all;
515
+ -webkit-transition: 0.2s ease all;
516
+ -moz-transition: 0.2s ease all;
517
+ }
518
+ .wa__popup_chat_box .wa__stt.wa__stt_online:hover,
519
+ .wa__popup_chat_box .wa__stt.wa__stt_online:active,
520
+ .wa__popup_chat_box .wa__stt.wa__stt_online:focus{
521
+ background: #ffffff;
522
+ box-shadow: 0px 7px 15px 1px rgba(55,62,70,0.07);
523
+ -webkit-box-shadow: 0px 7px 15px 1px rgba(55,62,70,0.07);
524
+ -moz-box-shadow: 0px 7px 15px 1px rgba(55,62,70,0.07);
525
+ }
526
+ .wa__popup_content_list .wa__popup_content_item{
527
+ margin: 14px 0 0;
528
+ transform: translate(0,20px);
529
+ -webkit-transform: translate(0,20px);
530
+ -moz-transform: translate(0,20px);
531
+ will-change: opacity,transform;
532
+ opacity: 0;
533
+ }
534
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item{
535
+ transition: 0.4s ease all;
536
+ -webkit-transition: 0.4s ease all;
537
+ -moz-transition: 0.4s ease all;
538
+ transition-delay: 2.1s;
539
+ -webkit-transition-delay: 2.1s;
540
+ -moz-transition-delay: 2.1s;
541
+ }
542
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(1){
543
+ transition-delay: 0.3s;
544
+ -webkit-transition-delay: 0.3s;
545
+ -moz-transition-delay: 0.3s;
546
+ }
547
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(2){
548
+ transition-delay: 0.5s;
549
+ -webkit-transition-delay: 0.5s;
550
+ -moz-transition-delay: 0.5s;
551
+ }
552
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(3){
553
+ transition-delay: 0.7s;
554
+ -webkit-transition-delay: 0.7s;
555
+ -moz-transition-delay: 0.7s;
556
+ }
557
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(4){
558
+ transition-delay: 0.9s;
559
+ -webkit-transition-delay: 0.9s;
560
+ -moz-transition-delay: 0.9s;
561
+ }
562
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(5){
563
+ transition-delay: 1.1s;
564
+ -webkit-transition-delay: 1.1s;
565
+ -moz-transition-delay: 1.1s;
566
+ }
567
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(6){
568
+ transition-delay: 1.3s;
569
+ -webkit-transition-delay: 1.3s;
570
+ -moz-transition-delay: 1.3s;
571
+ }
572
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(7){
573
+ transition-delay: 1.5s;
574
+ -webkit-transition-delay: 1.5s;
575
+ -moz-transition-delay: 1.5s;
576
+ }
577
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(8){
578
+ transition-delay: 1.7s;
579
+ -webkit-transition-delay: 1.7s;
580
+ -moz-transition-delay: 1.7s;
581
+ }
582
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(9){
583
+ transition-delay: 1.9s;
584
+ -webkit-transition-delay: 1.9s;
585
+ -moz-transition-delay: 1.9s;
586
+ }
587
+ .wa__popup_chat_box.wa__lauch .wa__popup_content_list .wa__popup_content_item{
588
+ opacity: 1;
589
+ transform: translate(0,0);
590
+ -webkit-transform: translate(0,0);
591
+ -moz-transform: translate(0,0);
592
+ }
593
+ .wa__popup_content_list .wa__popup_content_item .wa__member_name{
594
+ font-size: 14px;
595
+ color: #363c47;
596
+ line-height: 1.188em !important;
597
+ }
598
+ .wa__popup_content_list .wa__popup_content_item .wa__member_duty{
599
+ font-size: 11px;
600
+ color: #989b9f;
601
+ padding: 2px 0 0;
602
+ line-height: 1.125em !important;
603
+ }
604
+ .wa__popup_content_list .wa__popup_content_item .wa__member_status{
605
+ color: #F5A623;
606
+ font-size: 10px;
607
+ padding: 5px 0 0;
608
+ line-height: 1.125em !important;
609
+ }
610
+ .wa__popup_content_list .wa__popup_content_item .wa__popup_txt{
611
+ display: table-cell;
612
+ vertical-align: middle;
613
+ min-height: 48px;
614
+ height: 48px;
615
+ }
616
+ .wa__popup_content_list .wa__popup_content_item .wa__stt_offline{
617
+ border-left-color: #c0c5ca;
618
+ }
619
+ .wa__popup_avt_list{
620
+ font-size: 0;
621
+ margin: 7px 0 24px;
622
+ }
623
+ .wa__popup_avt_list .wa__popup_avt_item{
624
+ display: inline-block;
625
+ position: relative;
626
+ width: 46px;
627
+ }
628
+ .wa__popup_avt_list .wa__popup_avt_img{
629
+ width: 60px;
630
+ height: 60px;
631
+ border-radius: 50%;
632
+ -webkit-border-radius: 50%;
633
+ -moz-border-radius: 50%;
634
+ position: relative;
635
+ overflow: hidden;
636
+ border: 2px solid #ffffff;
637
+ left: -7px;
638
+ }
639
+ .wa__popup_call_btn{
640
+ background: #2db742;
641
+ color: #ffffff;
642
+ text-decoration: none;
643
+ display: inline-block;
644
+ width: 275px;
645
+ max-width: 100%;
646
+ font-size: 16px;
647
+ padding: 14px 10px;
648
+ border-radius: 24px;
649
+ -webkit-border-radius: 24px;
650
+ -moz-border-radius: 24px;
651
+ margin: 25px 0 15px;
652
+ box-shadow: 0px 8px 17px 2px rgba(13,15,18,0.2);
653
+ -webkit-box-shadow: 0px 8px 17px 2px rgba(13,15,18,0.2);
654
+ -moz-box-shadow: 0px 8px 17px 2px rgba(13,15,18,0.2);
655
+ }
656
+ .wa__popup_call_btn.wa__popup_call_btn_lg:before{
657
+ content: '';
658
+ display: inline-block;
659
+ width: 20px;
660
+ height: 20px;
661
+ position: relative;
662
+ background: url('../img/whatsapp_logo_green_sm.svg') 0 0 no-repeat;
663
+ background-size: 100% 100%;
664
+ -webkit-background-size: 100% 100%;
665
+ -moz-background-size: 100% 100%;
666
+ vertical-align: top;
667
+ top: 0px;
668
+ margin-right: -19px;
669
+ left: -31px;
670
+ transition: 0.2s ease background-image;
671
+ -webkit-transition: 0.2s ease background-image;
672
+ -moz-transition: 0.2s ease background-image;
673
+ }
674
+ .wa__popup_call_btn.wa__popup_call_btn_lg:hover:before,
675
+ .wa__popup_call_btn.wa__popup_call_btn_lg:focus:before,
676
+ .wa__popup_call_btn.wa__popup_call_btn_lg:active:before{
677
+ background-image: url('../img/whatsapp_logo.svg')
678
+ }
679
+
680
+ .wa__popup_chat_box_gray{
681
+ border-radius: 2px 2px 8px 8px;
682
+ }
683
+
684
+ .wa__popup_chat_box_gray .wa__popup_heading_gray{
685
+ background: #f8f8f8;
686
+ border-top: 3px solid #2db742;
687
+ color: #868c9a;
688
+ font-weight: 500;
689
+ }
690
+ .wa__popup_chat_box_gray .wa__popup_heading_gray .wa__popup_title{
691
+ color: #595b60;
692
+ }
693
+ .wa__popup_chat_box_gray .wa__popup_heading_gray:before{
694
+ content: '';
695
+ background: url(../img/whatsapp_logo_green.svg) center top no-repeat;
696
+ background-size: 33px;
697
+ display: block;
698
+ width: 55px;
699
+ height: 33px;
700
+ position: absolute;
701
+ top: 20px;
702
+ left: 12px;
703
+ }
704
+ .wa__popup_chat_box_gray .wa__popup_heading_gray .wa__popup_intro a{
705
+ color: #595b60;
706
+ }
707
+
708
+ .wa__popup_chat_box_ct{
709
+ width: 384px;
710
+ text-align: center;
711
+ }
712
+
713
+ .wa__popup_chat_box_ct .wa__popup_heading_ct{
714
+ text-align: center;
715
+ padding: 18px 0 18px;
716
+ }
717
+
718
+ .wa__popup_chat_box_ct .wa__popup_heading_ct:before {
719
+ content: '';
720
+ background: url(../img/whatsapp_logo.svg) center top no-repeat;
721
+ background-size: 30px;
722
+ display: block;
723
+ width: 30px;
724
+ height: 31px;
725
+ position: absolute;
726
+ top: 15px;
727
+ left: 72px;
728
+ }
729
+
730
+ .wa__popup_chat_box_ct .wa__popup_heading_ct .wa__popup_title{
731
+ padding-left: 22px;
732
+ padding-bottom: 14px;
733
+ }
734
+
735
+ .wa__popup_chat_box_ct .wa__popup_heading_ct .wa__popup_intro{
736
+ margin-top: -5px;
737
+ line-height: 12px;
738
+ }
739
+
740
+ .wa__popup_chat_box_ct .wa__popup_ct_avt_list:after{
741
+ content: '';
742
+ clear: both;
743
+ display: block;
744
+ }
745
+
746
+ .wa__popup_chat_box_ct .wa__popup_ct_content{
747
+ background: #ffffff;
748
+ padding: 0 0 14px;
749
+ }
750
+
751
+ .wa__popup_chat_box_ct .wa__popup_ct_content .wa__popup_notice{
752
+ padding-top: 18px;
753
+ padding-bottom: 15px;
754
+ }
755
+
756
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item{
757
+ width: 33%;
758
+ float: left;
759
+ font-size: 10px;
760
+ }
761
+
762
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item a{
763
+ text-decoration: none;
764
+ color: #989b9f;
765
+ }
766
+
767
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__popup_ct_txt{
768
+ padding-top: 8px;
769
+ }
770
+
771
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_name{
772
+ color: #363c47;
773
+ font-size: 13px;
774
+ }
775
+
776
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_duty{
777
+ color: #989b9f;
778
+ padding: 3px 0 0;
779
+ }
780
+
781
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_stt_online{
782
+ color: #2db742;
783
+ font-size: 9px;
784
+ line-height: 12px;
785
+ display: inline-block;
786
+ padding: 3px 0 0 16px;
787
+ background: url('../img/whatsapp_logo_green.svg') 0 3px no-repeat;
788
+ background-size: 12px auto;
789
+ -webkit-background-size: 12px auto;
790
+ -moz-background-size: 12px auto;
791
+ }
792
+
793
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_stt_offline{
794
+ color: #f5a623;
795
+ font-size: 9px;
796
+ line-height: 12px;
797
+ padding: 2px 0 0;
798
+ }
799
+
800
+
801
+ .wa__popup_chat_box_ct .wa__popup_ct_avatar img{
802
+ border-radius: 50%
803
+ }
804
+
805
+ .wa__popup_chat_box_ct .wa__popup_ct_call_btn{
806
+ width: 97px;
807
+ font-size: 11px;
808
+ padding: 9px 10px 11px;
809
+ margin: 15px 0 15px;
810
+ }
811
+
812
+ /* ^^^--popup--^^^ */
813
+
814
+ /* VVV--popup button--VVV */
815
+ .wa__btn_popup{
816
+ position: fixed;
817
+ right: 30px;
818
+ bottom: 30px;
819
+ cursor: pointer;
820
+ font-family: Arial,Helvetica,sans-serif;
821
+ z-index: 999999999;
822
+ }
823
+ .wa__btn_popup .wa__btn_popup_icon{
824
+ width: 56px;
825
+ height: 56px;
826
+ background: #2db742;
827
+ border-radius: 50%;
828
+ -webkit-border-radius: 50%;
829
+ -moz-border-radius: 50%;
830
+ box-shadow: 0px 6px 8px 2px rgba(0,0,0,0.14);
831
+ -webkit-box-shadow: 0px 6px 8px 2px rgba(0,0,0,0.14);
832
+ -moz-box-shadow: 0px 6px 8px 2px rgba(0,0,0,0.14);
833
+ }
834
+ .wa__btn_popup .wa__btn_popup_icon:before{
835
+ content: '';
836
+ position: absolute;
837
+ z-index: 1;
838
+ width: 100%;
839
+ height: 100%;
840
+ left: 0;
841
+ top: 0;
842
+ background: transparent url('../img/whatsapp_logo.svg') center center no-repeat;
843
+ background-size: 30px auto;
844
+ -webkit-background-size: 30px auto;
845
+ -moz-background-size: 30px auto;
846
+ transition: 0.4s ease all;
847
+ -webkit-transition: 0.4s ease all;
848
+ -moz-transition: 0.4s ease all;
849
+ }
850
+ .wa__btn_popup .wa__btn_popup_icon:after{
851
+ content: '';
852
+ opacity: 0;
853
+ position: absolute;
854
+ z-index: 2;
855
+ width: 100%;
856
+ height: 100%;
857
+ left: 0;
858
+ top: 0;
859
+ background: transparent url('../img/x_icon.svg') center center no-repeat;
860
+ background-size: 14px auto;
861
+ -webkit-background-size: 14px auto;
862
+ -moz-background-size: 14px auto;
863
+ transition: 0.4s ease all;
864
+ -webkit-transition: 0.4s ease all;
865
+ -moz-transition: 0.4s ease all;
866
+ -ms-transform: scale(0) rotate(-360deg);
867
+ transform: scale(0) rotate(-360deg);
868
+ -webkit-transform: scale(0) rotate(-360deg);
869
+ -moz-transform: scale(0) rotate(-360deg);
870
+ }
871
+ .wa__btn_popup.wa__active .wa__btn_popup_icon:before{
872
+ opacity: 0;
873
+ -ms-transform: scale(0) rotate(360deg);
874
+ transform: scale(0) rotate(360deg);
875
+ -webkit-transform: scale(0) rotate(360deg);
876
+ -moz-transform: scale(0) rotate(360deg);
877
+ }
878
+ .wa__btn_popup.wa__active .wa__btn_popup_icon:after{
879
+ opacity: 1;
880
+ -ms-transform: scale(1) rotate(0deg);
881
+ transform: scale(1) rotate(0deg);
882
+ -webkit-transform: scale(1) rotate(0deg);
883
+ -moz-transform: scale(1) rotate(0deg);
884
+ }
885
+ .wa__btn_popup .wa__btn_popup_txt{
886
+ position: absolute;
887
+ width: 156px;
888
+ right: 100%;
889
+ background-color: #f5f7f9;
890
+ font-size: 12px;
891
+ color: #43474e;
892
+ top: 15px;
893
+ /* top: 50%;
894
+ transform: translate(0,-50%);
895
+ -moz-transform: translate(0,-50%);
896
+ -webkit-transform: translate(0,-50%); */
897
+ padding: 7px 0 7px 12px;
898
+ margin-right: 7px;
899
+ letter-spacing: -0.03em;
900
+ border-radius: 4px;
901
+ -webkit-border-radius: 4px;
902
+ -moz-border-radius: 4px;
903
+ transition: 0.4s ease all;
904
+ -webkit-transition: 0.4s ease all;
905
+ -moz-transition: 0.4s ease all;
906
+ }
907
+ .wa__btn_popup.wa__active .wa__btn_popup_txt{
908
+ -ms-transform: translate(0,15px);
909
+ transform: translate(0,15px);
910
+ -webkit-transform: translate(0,15px);
911
+ -moz-transform: translate(0,15px);
912
+ opacity: 0;
913
+ visibility: hidden;
914
+ }
915
+ /* ^^^--popup button--^^^ */
assets/img/whatsapp_logo.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 478.165 478.165" style="enable-background:new 0 0 478.165 478.165;" xml:space="preserve" width="512px" height="512px">
3
+ <g>
4
+ <path id="WhatsApp" d="M478.165,232.946c0,128.567-105.057,232.966-234.679,232.966c-41.102,0-79.814-10.599-113.445-28.969 L0,478.165l42.437-125.04c-21.438-35.065-33.77-76.207-33.77-120.159C8.667,104.34,113.763,0,243.485,0 C373.108,0,478.165,104.34,478.165,232.946z M243.485,37.098c-108.802,0-197.422,87.803-197.422,195.868 c0,42.915,13.986,82.603,37.576,114.879l-24.586,72.542l75.849-23.968c31.121,20.481,68.457,32.296,108.583,32.296 c108.723,0,197.323-87.843,197.323-195.908C440.808,124.921,352.208,37.098,243.485,37.098z M361.931,286.62 c-1.395-2.331-5.22-3.746-10.898-6.814c-5.917-2.849-34.089-16.497-39.508-18.37c-5.16-1.913-8.986-2.849-12.811,2.829 c-4.005,5.638-14.903,18.629-18.23,22.354c-3.546,3.785-6.854,4.264-12.552,1.435c-5.618-2.809-24.267-8.866-46.203-28.391 c-17.055-15.042-28.67-33.711-31.997-39.508c-3.427-5.758-0.398-8.826,2.471-11.635c2.69-2.59,5.778-6.734,8.627-10.041 c2.969-3.287,3.905-5.638,5.798-9.424c1.913-3.905,0.936-7.192-0.478-10.141c-1.415-2.849-13.01-30.881-17.752-42.337 c-4.841-11.416-9.543-9.523-12.871-9.523c-3.467,0-7.212-0.478-11.117-0.478c-3.785,0-10.041,1.395-15.381,7.192 c-5.2,5.658-20.123,19.465-20.123,47.597c0,28.052,20.601,55.308,23.55,59.053c2.869,3.785,39.747,63.197,98.303,86.07 c58.476,22.872,58.476,15.321,69.115,14.365c10.38-0.956,34.069-13.867,38.811-27.096 C363.345,300.307,363.345,288.991,361.931,286.62z" fill="#FFFFFF"/>
5
+ </g>
6
+ <g>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ </svg>
assets/img/whatsapp_logo_gray.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 478.165 478.165" style="enable-background:new 0 0 478.165 478.165;" xml:space="preserve" width="512px" height="512px">
3
+ <g>
4
+ <path id="WhatsApp" d="M478.165,232.946c0,128.567-105.057,232.966-234.679,232.966c-41.102,0-79.814-10.599-113.445-28.969 L0,478.165l42.437-125.04c-21.438-35.065-33.77-76.207-33.77-120.159C8.667,104.34,113.763,0,243.485,0 C373.108,0,478.165,104.34,478.165,232.946z M243.485,37.098c-108.802,0-197.422,87.803-197.422,195.868 c0,42.915,13.986,82.603,37.576,114.879l-24.586,72.542l75.849-23.968c31.121,20.481,68.457,32.296,108.583,32.296 c108.723,0,197.323-87.843,197.323-195.908C440.808,124.921,352.208,37.098,243.485,37.098z M361.931,286.62 c-1.395-2.331-5.22-3.746-10.898-6.814c-5.917-2.849-34.089-16.497-39.508-18.37c-5.16-1.913-8.986-2.849-12.811,2.829 c-4.005,5.638-14.903,18.629-18.23,22.354c-3.546,3.785-6.854,4.264-12.552,1.435c-5.618-2.809-24.267-8.866-46.203-28.391 c-17.055-15.042-28.67-33.711-31.997-39.508c-3.427-5.758-0.398-8.826,2.471-11.635c2.69-2.59,5.778-6.734,8.627-10.041 c2.969-3.287,3.905-5.638,5.798-9.424c1.913-3.905,0.936-7.192-0.478-10.141c-1.415-2.849-13.01-30.881-17.752-42.337 c-4.841-11.416-9.543-9.523-12.871-9.523c-3.467,0-7.212-0.478-11.117-0.478c-3.785,0-10.041,1.395-15.381,7.192 c-5.2,5.658-20.123,19.465-20.123,47.597c0,28.052,20.601,55.308,23.55,59.053c2.869,3.785,39.747,63.197,98.303,86.07 c58.476,22.872,58.476,15.321,69.115,14.365c10.38-0.956,34.069-13.867,38.811-27.096 C363.345,300.307,363.345,288.991,361.931,286.62z" fill="#CBCFD5"/>
5
+ </g>
6
+ <g>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ </svg>
assets/img/whatsapp_logo_gray_sm.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 478.165 478.165" style="enable-background:new 0 0 478.165 478.165;" xml:space="preserve" width="512px" height="512px">
3
+ <g>
4
+ <path id="WhatsApp" d="M478.165,232.946c0,128.567-105.057,232.966-234.679,232.966c-41.102,0-79.814-10.599-113.445-28.969 L0,478.165l42.437-125.04c-21.438-35.065-33.77-76.207-33.77-120.159C8.667,104.34,113.763,0,243.485,0 C373.108,0,478.165,104.34,478.165,232.946z M243.485,37.098c-108.802,0-197.422,87.803-197.422,195.868 c0,42.915,13.986,82.603,37.576,114.879l-24.586,72.542l75.849-23.968c31.121,20.481,68.457,32.296,108.583,32.296 c108.723,0,197.323-87.843,197.323-195.908C440.808,124.921,352.208,37.098,243.485,37.098z M361.931,286.62 c-1.395-2.331-5.22-3.746-10.898-6.814c-5.917-2.849-34.089-16.497-39.508-18.37c-5.16-1.913-8.986-2.849-12.811,2.829 c-4.005,5.638-14.903,18.629-18.23,22.354c-3.546,3.785-6.854,4.264-12.552,1.435c-5.618-2.809-24.267-8.866-46.203-28.391 c-17.055-15.042-28.67-33.711-31.997-39.508c-3.427-5.758-0.398-8.826,2.471-11.635c2.69-2.59,5.778-6.734,8.627-10.041 c2.969-3.287,3.905-5.638,5.798-9.424c1.913-3.905,0.936-7.192-0.478-10.141c-1.415-2.849-13.01-30.881-17.752-42.337 c-4.841-11.416-9.543-9.523-12.871-9.523c-3.467,0-7.212-0.478-11.117-0.478c-3.785,0-10.041,1.395-15.381,7.192 c-5.2,5.658-20.123,19.465-20.123,47.597c0,28.052,20.601,55.308,23.55,59.053c2.869,3.785,39.747,63.197,98.303,86.07 c58.476,22.872,58.476,15.321,69.115,14.365c10.38-0.956,34.069-13.867,38.811-27.096 C363.345,300.307,363.345,288.991,361.931,286.62z" fill="#a9aeb6"/>
5
+ </g>
6
+ <g>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ </svg>
assets/img/whatsapp_logo_green.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 478.165 478.165" style="enable-background:new 0 0 478.165 478.165;" xml:space="preserve" width="512px" height="512px">
3
+ <g>
4
+ <path id="WhatsApp" d="M478.165,232.946c0,128.567-105.057,232.966-234.679,232.966c-41.102,0-79.814-10.599-113.445-28.969 L0,478.165l42.437-125.04c-21.438-35.065-33.77-76.207-33.77-120.159C8.667,104.34,113.763,0,243.485,0 C373.108,0,478.165,104.34,478.165,232.946z M243.485,37.098c-108.802,0-197.422,87.803-197.422,195.868 c0,42.915,13.986,82.603,37.576,114.879l-24.586,72.542l75.849-23.968c31.121,20.481,68.457,32.296,108.583,32.296 c108.723,0,197.323-87.843,197.323-195.908C440.808,124.921,352.208,37.098,243.485,37.098z M361.931,286.62 c-1.395-2.331-5.22-3.746-10.898-6.814c-5.917-2.849-34.089-16.497-39.508-18.37c-5.16-1.913-8.986-2.849-12.811,2.829 c-4.005,5.638-14.903,18.629-18.23,22.354c-3.546,3.785-6.854,4.264-12.552,1.435c-5.618-2.809-24.267-8.866-46.203-28.391 c-17.055-15.042-28.67-33.711-31.997-39.508c-3.427-5.758-0.398-8.826,2.471-11.635c2.69-2.59,5.778-6.734,8.627-10.041 c2.969-3.287,3.905-5.638,5.798-9.424c1.913-3.905,0.936-7.192-0.478-10.141c-1.415-2.849-13.01-30.881-17.752-42.337 c-4.841-11.416-9.543-9.523-12.871-9.523c-3.467,0-7.212-0.478-11.117-0.478c-3.785,0-10.041,1.395-15.381,7.192 c-5.2,5.658-20.123,19.465-20.123,47.597c0,28.052,20.601,55.308,23.55,59.053c2.869,3.785,39.747,63.197,98.303,86.07 c58.476,22.872,58.476,15.321,69.115,14.365c10.38-0.956,34.069-13.867,38.811-27.096 C363.345,300.307,363.345,288.991,361.931,286.62z" fill="#2DB742"/>
5
+ </g>
6
+ <g>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ </svg>
assets/img/whatsapp_logo_green_sm.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 478.165 478.165" style="enable-background:new 0 0 478.165 478.165;" xml:space="preserve" width="512px" height="512px">
3
+ <g>
4
+ <path id="WhatsApp" d="M478.165,232.946c0,128.567-105.057,232.966-234.679,232.966c-41.102,0-79.814-10.599-113.445-28.969 L0,478.165l42.437-125.04c-21.438-35.065-33.77-76.207-33.77-120.159C8.667,104.34,113.763,0,243.485,0 C373.108,0,478.165,104.34,478.165,232.946z M243.485,37.098c-108.802,0-197.422,87.803-197.422,195.868 c0,42.915,13.986,82.603,37.576,114.879l-24.586,72.542l75.849-23.968c31.121,20.481,68.457,32.296,108.583,32.296 c108.723,0,197.323-87.843,197.323-195.908C440.808,124.921,352.208,37.098,243.485,37.098z M361.931,286.62 c-1.395-2.331-5.22-3.746-10.898-6.814c-5.917-2.849-34.089-16.497-39.508-18.37c-5.16-1.913-8.986-2.849-12.811,2.829 c-4.005,5.638-14.903,18.629-18.23,22.354c-3.546,3.785-6.854,4.264-12.552,1.435c-5.618-2.809-24.267-8.866-46.203-28.391 c-17.055-15.042-28.67-33.711-31.997-39.508c-3.427-5.758-0.398-8.826,2.471-11.635c2.69-2.59,5.778-6.734,8.627-10.041 c2.969-3.287,3.905-5.638,5.798-9.424c1.913-3.905,0.936-7.192-0.478-10.141c-1.415-2.849-13.01-30.881-17.752-42.337 c-4.841-11.416-9.543-9.523-12.871-9.523c-3.467,0-7.212-0.478-11.117-0.478c-3.785,0-10.041,1.395-15.381,7.192 c-5.2,5.658-20.123,19.465-20.123,47.597c0,28.052,20.601,55.308,23.55,59.053c2.869,3.785,39.747,63.197,98.303,86.07 c58.476,22.872,58.476,15.321,69.115,14.365c10.38-0.956,34.069-13.867,38.811-27.096 C363.345,300.307,363.345,288.991,361.931,286.62z" fill="#4bc174"/>
5
+ </g>
6
+ <g>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ </svg>
assets/img/x_icon.svg ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.65881 6.99817L13.6591 1.99791C14.1136 1.54334 14.1136 0.795496 13.6591 0.340927C13.2045 -0.113642 12.4567 -0.113642 12.0021 0.340927L7.00183 5.34119L2.00157 0.340927C1.547 -0.113642 0.799162 -0.113642 0.344593 0.340927C0.117308 0.568212 0 0.868814 0 1.16942C0 1.47002 0.117308 1.77062 0.344593 1.99791L5.34485 6.99817L0.344593 11.9984C0.117308 12.2257 0 12.5263 0 12.8269C0 13.1275 0.117308 13.4281 0.344593 13.6554C0.799162 14.11 1.547 14.11 2.00157 13.6554L7.00183 8.65515L12.0021 13.6554C12.4567 14.11 13.2045 14.11 13.6591 13.6554C14.1136 13.2008 14.1136 12.453 13.6591 11.9984L8.65881 6.99817Z" fill="white"/>
3
+ </svg>
assets/js/main.js ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ var wa_time_out, wa_time_in;
3
+ ntaWA.init = function(){
4
+ function setCookie(cname, cvalue, exdays) {
5
+ var d = new Date();
6
+ d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
7
+ var expires = "expires=" + d.toUTCString();
8
+ document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
9
+ }
10
+
11
+ function getCookie(cname) {
12
+ var name = cname + "=";
13
+ var ca = document.cookie.split(";");
14
+ for (var i = 0; i < ca.length; i++) {
15
+ var c = ca[i];
16
+ while (c.charAt(0) == " ") {
17
+ c = c.substring(1);
18
+ }
19
+ if (c.indexOf(name) == 0) {
20
+ return c.substring(name.length, c.length);
21
+ }
22
+ }
23
+ return "";
24
+ }
25
+
26
+ $("#nta-wa-gdpr").change(function () {
27
+ if (this.checked) {
28
+ setCookie("nta-wa-gdpr", "accept", 30);
29
+ if (getCookie("nta-wa-gdpr") != "") {
30
+ $(".nta-wa-gdpr").hide(500);
31
+ $(".wa__popup_content_item").each(function () {
32
+ $(this).removeClass("pointer-disable");
33
+ $(".wa__popup_content_list").off("click");
34
+ });
35
+ }
36
+ }
37
+ });
38
+
39
+ if (getCookie("nta-wa-gdpr") != "") {
40
+ $(".wa__popup_content_list").off("click");
41
+ } else {
42
+ $(".wa__popup_content_list").click(function () {
43
+ $(".nta-wa-gdpr").delay(500).css({ background: "red", color: "#fff" });
44
+ });
45
+ }
46
+
47
+ // google analytics
48
+ if (ntaWA.ga) {
49
+ $("a.wa__stt_online").click(function () {
50
+ var href = $(this).attr("href");
51
+ var startPhone = href.indexOf("phone=") + 6;
52
+ var endPhone = href.indexOf("&text=");
53
+ if (endPhone === -1) {
54
+ endPhone = href.length;
55
+ }
56
+ var phone = href.substring(startPhone, endPhone);
57
+ var gaCategory = "NinjaTeam WhatsApp";
58
+ var gaAction = "Phone Number: " + phone;
59
+ var gaLabel = document.title;
60
+
61
+ if (typeof gtag !== "undefined") {
62
+ gtag("event", gaAction, {
63
+ event_category: gaCategory,
64
+ event_label: gaLabel,
65
+ });
66
+ return;
67
+ }
68
+ if (typeof ga !== "undefined" && typeof ga.getAll !== "undefined") {
69
+ var tracker = ga.getAll();
70
+ tracker[0].send("event", gaCategory, gaAction, gaLabel);
71
+ return;
72
+ }
73
+
74
+ if (typeof __gaTracker !== "undefined") {
75
+ __gaTracker("send", "event", gaCategory, gaAction, gaLabel);
76
+ }
77
+ });
78
+ }
79
+
80
+ function isMobileWA() {
81
+ return /Android|webOS|iPhone|iPad|iPod|Windows Phone|IEMobile|Mobile|BlackBerry/i.test(navigator.userAgent);
82
+ }
83
+ var elm = jQuery('a[href*="whatsapp.com"]');
84
+ jQuery.each(elm, function (index, value) {
85
+ var item = jQuery(value).attr("href");
86
+ if (item.indexOf("chat") != -1) {
87
+ //nothing
88
+ } else if (item.indexOf("web.whatsapp") != -1 && isMobileWA()) {
89
+ var itemLink = item;
90
+ var newLink = itemLink.replace("web.whatsapp", "api.whatsapp");
91
+ jQuery(value).attr("href", newLink);
92
+ } else if (item.indexOf("api.whatsapp") != -1 && !isMobileWA()) {
93
+ var itemLink = item;
94
+ var newLink = itemLink.replace("api.whatsapp", "web.whatsapp");
95
+ jQuery(value).attr("href", newLink);
96
+ }
97
+ });
98
+ }
99
+ // $(document).on('ntawa_init', function(){
100
+ // ntaWA.init()
101
+ // })
102
+ $(document).ready(function () {
103
+ ntaWA.init()
104
+
105
+ // if (!jQuery('.wa__btn_popup').length) return false
106
+ // $.ajax({
107
+ // url: ntaWA.ajaxurl,
108
+ // type: 'POST',
109
+ // data: {
110
+ // 'action': 'njt_wa_load_popup',
111
+ // 'nonce': ntaWA.nonce
112
+ // },
113
+ // success(res){
114
+ // // $(res).insertAfter('.wa__btn_popup').trigger('ntawa_init')
115
+ // }
116
+ // })
117
+
118
+ $(".wa__btn_popup").on("click", function () {
119
+ if ($(".wa__popup_chat_box").hasClass("wa__active")) {
120
+ $(".wa__popup_chat_box").removeClass("wa__active");
121
+ $(".wa__btn_popup").removeClass("wa__active");
122
+ clearTimeout(wa_time_in);
123
+ if ($(".wa__popup_chat_box").hasClass("wa__lauch")) {
124
+ wa_time_out = setTimeout(function () {
125
+ $(".wa__popup_chat_box").removeClass("wa__pending");
126
+ $(".wa__popup_chat_box").removeClass("wa__lauch");
127
+ }, 400);
128
+ }
129
+ } else {
130
+ $(".wa__popup_chat_box").addClass("wa__pending");
131
+ $(".wa__popup_chat_box").addClass("wa__active");
132
+ $(".wa__btn_popup").addClass("wa__active");
133
+ clearTimeout(wa_time_out);
134
+ if (!$(".wa__popup_chat_box").hasClass("wa__lauch")) {
135
+ wa_time_in = setTimeout(function () {
136
+ $(".wa__popup_chat_box").addClass("wa__lauch");
137
+ }, 100);
138
+ }
139
+ }
140
+ });
141
+ })
142
+ })(jQuery);
dist/assets/css/reset.css ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .njt-pricing-table-redesign-wrapper a, .njt-pricing-table-redesign-wrapper abbr, .njt-pricing-table-redesign-wrapper acronym, .njt-pricing-table-redesign-wrapper address, .njt-pricing-table-redesign-wrapper applet, .njt-pricing-table-redesign-wrapper article, .njt-pricing-table-redesign-wrapper aside, .njt-pricing-table-redesign-wrapper audio, .njt-pricing-table-redesign-wrapper b, .njt-pricing-table-redesign-wrapper blockquote, .njt-pricing-table-redesign-wrapper big, .njt-pricing-table-redesign-wrapper body, .njt-pricing-table-redesign-wrapper center, .njt-pricing-table-redesign-wrapper canvas, .njt-pricing-table-redesign-wrapper caption, .njt-pricing-table-redesign-wrapper cite, .njt-pricing-table-redesign-wrapper code, .njt-pricing-table-redesign-wrapper command, .njt-pricing-table-redesign-wrapper datalist, .njt-pricing-table-redesign-wrapper dd, .njt-pricing-table-redesign-wrapper del, .njt-pricing-table-redesign-wrapper details, .njt-pricing-table-redesign-wrapper dfn, .njt-pricing-table-redesign-wrapper dl, .njt-pricing-table-redesign-wrapper div, .njt-pricing-table-redesign-wrapper dt, .njt-pricing-table-redesign-wrapper em, .njt-pricing-table-redesign-wrapper embed, .njt-pricing-table-redesign-wrapper fieldset, .njt-pricing-table-redesign-wrapper figcaption, .njt-pricing-table-redesign-wrapper figure, .njt-pricing-table-redesign-wrapper font, .njt-pricing-table-redesign-wrapper footer, .njt-pricing-table-redesign-wrapper form, .njt-pricing-table-redesign-wrapper h1, .njt-pricing-table-redesign-wrapper h2, .njt-pricing-table-redesign-wrapper h3, .njt-pricing-table-redesign-wrapper h4, .njt-pricing-table-redesign-wrapper h5, .njt-pricing-table-redesign-wrapper h6, .njt-pricing-table-redesign-wrapper header, .njt-pricing-table-redesign-wrapper hgroup, .njt-pricing-table-redesign-wrapper html, .njt-pricing-table-redesign-wrapper i, .njt-pricing-table-redesign-wrapper iframe, .njt-pricing-table-redesign-wrapper img, .njt-pricing-table-redesign-wrapper ins, .njt-pricing-table-redesign-wrapper kbd, .njt-pricing-table-redesign-wrapper keygen, .njt-pricing-table-redesign-wrapper label, .njt-pricing-table-redesign-wrapper legend, .njt-pricing-table-redesign-wrapper li, .njt-pricing-table-redesign-wrapper meter, .njt-pricing-table-redesign-wrapper nav, .njt-pricing-table-redesign-wrapper object, .njt-pricing-table-redesign-wrapper ol, .njt-pricing-table-redesign-wrapper output, .njt-pricing-table-redesign-wrapper p, .njt-pricing-table-redesign-wrapper pre, .njt-pricing-table-redesign-wrapper progress, .njt-pricing-table-redesign-wrapper q, .njt-pricing-table-redesign-wrapper s, .njt-pricing-table-redesign-wrapper samp, .njt-pricing-table-redesign-wrapper section, .njt-pricing-table-redesign-wrapper small, .njt-pricing-table-redesign-wrapper span, .njt-pricing-table-redesign-wrapper source, .njt-pricing-table-redesign-wrapper strike, .njt-pricing-table-redesign-wrapper strong, .njt-pricing-table-redesign-wrapper sub, .njt-pricing-table-redesign-wrapper sup, .njt-pricing-table-redesign-wrapper table, .njt-pricing-table-redesign-wrapper tbody, .njt-pricing-table-redesign-wrapper tfoot, .njt-pricing-table-redesign-wrapper thead, .njt-pricing-table-redesign-wrapper th, .njt-pricing-table-redesign-wrapper tr, .njt-pricing-table-redesign-wrapper tdvideo, .njt-pricing-table-redesign-wrapper tt, .njt-pricing-table-redesign-wrapper u, .njt-pricing-table-redesign-wrapper ul, .njt-pricing-table-redesign-wrapper var {
2
+ background: transparent;
3
+ border: 0 none;
4
+ font-size: 100%;
5
+ margin: 0;
6
+ padding: 0;
7
+ border: 0;
8
+ outline: 0;
9
+ vertical-align: top;
10
+ box-shadow: none;
11
+ -moz-box-shadow: none;
12
+ -webkit-box-shadow: none; }
13
+
14
+ .njt-pricing-table-redesign-wrapper ol, .njt-pricing-table-redesign-wrapper ul {
15
+ list-style: none; }
16
+
17
+ .njt-pricing-table-redesign-wrapper blockquote, .njt-pricing-table-redesign-wrapper q {
18
+ quotes: none; }
19
+
20
+ .njt-pricing-table-redesign-wrapper table, .njt-pricing-table-redesign-wrapper table td {
21
+ padding: 0;
22
+ border: none;
23
+ border-collapse: collapse; }
24
+
25
+ .njt-pricing-table-redesign-wrapper img {
26
+ vertical-align: top; }
27
+
28
+ .njt-pricing-table-redesign-wrapper embed {
29
+ vertical-align: top; }
30
+
31
+ .njt-pricing-table-redesign-wrapper article, .njt-pricing-table-redesign-wrapper aside, .njt-pricing-table-redesign-wrapper audio, .njt-pricing-table-redesign-wrapper canvas, .njt-pricing-table-redesign-wrapper command, .njt-pricing-table-redesign-wrapper datalist, .njt-pricing-table-redesign-wrapper details, .njt-pricing-table-redesign-wrapper embed, .njt-pricing-table-redesign-wrapper figcaption, .njt-pricing-table-redesign-wrapper figure, .njt-pricing-table-redesign-wrapper footer, .njt-pricing-table-redesign-wrapper header, .njt-pricing-table-redesign-wrapper hgroup, .njt-pricing-table-redesign-wrapper keygen, .njt-pricing-table-redesign-wrapper meter, .njt-pricing-table-redesign-wrapper nav, .njt-pricing-table-redesign-wrapper output, .njt-pricing-table-redesign-wrapper progress, .njt-pricing-table-redesign-wrapper section, .njt-pricing-table-redesign-wrapper source, .njt-pricing-table-redesign-wrapper video {
32
+ display: block; }
33
+
34
+ .njt-pricing-table-redesign-wrapper mark, .njt-pricing-table-redesign-wrapper rp, .njt-pricing-table-redesign-wrapper rt, .njt-pricing-table-redesign-wrapper ruby, .njt-pricing-table-redesign-wrapper summary, .njt-pricing-table-redesign-wrapper time {
35
+ display: inline; }
dist/assets/css/style.css ADDED
@@ -0,0 +1,859 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wa__button,
2
+ .wa__btn_popup,
3
+ .wa__button *,
4
+ .wa__btn_popup *,
5
+ .wa__btn_popup :before,
6
+ .wa__button :before,
7
+ .wa__button :after,
8
+ .wa__btn_popup :after,
9
+ .wa__popup_chat_box,
10
+ .wa__popup_chat_box *,
11
+ .wa__popup_chat_box :before,
12
+ .wa__popup_chat_box :after{
13
+ box-sizing: border-box;
14
+ -webkit-box-sizing: border-box;
15
+ -moz-box-sizing: border-box;
16
+ }
17
+
18
+ /* VVV--button--VVV */
19
+ .wa__button{
20
+ position: relative;
21
+ width: 288px;
22
+ min-height: 64px;
23
+ display: block;
24
+ font-family: Arial,Helvetica,sans-serif;
25
+ text-decoration: none;
26
+ color: #fff;
27
+ box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.09);
28
+ -webkit-box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.09);
29
+ -moz-box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.09);
30
+ }
31
+ .wa__btn_txt{
32
+ display: inline-block;
33
+ font-size: 12px;
34
+ line-height: 1.33em;
35
+ }
36
+
37
+ .wa__btn_w_icon .wa__btn_txt{
38
+ padding: 16px 20px 15px 71px;
39
+ }
40
+
41
+ .wa__button_text_only .wa__btn_txt,
42
+ .wa__r_button.wa__btn_w_img.wa__button_text_only .wa__btn_txt,
43
+ .wa__sq_button.wa__btn_w_img.wa__button_text_only .wa__btn_txt{
44
+ padding-top: 25px;
45
+ padding-bottom: 24px;
46
+ }
47
+
48
+
49
+
50
+ .wa__btn_w_icon .wa__btn_txt .wa__btn_title{
51
+ font-weight: 600;
52
+ padding-left: 2px;
53
+ font-size: 14px;
54
+ }
55
+
56
+ .wa__cs_info{
57
+ margin-bottom: 2px
58
+ }
59
+
60
+ .wa__btn_status{
61
+ color: #F5A623;
62
+ font-size: 9px;
63
+ padding: 2px 0 0;
64
+ font-weight: 700;
65
+ }
66
+
67
+ .wa__cs_info .wa__cs_name,
68
+ .wa__cs_info .wa__cs_status{
69
+ display: inline-block;
70
+ }
71
+
72
+ .wa__cs_info .wa__cs_name{
73
+ font-weight: 400;
74
+ font-size: 12px;
75
+ line-height: 1.36em;
76
+ }
77
+
78
+ .wa__stt_online .wa__cs_info .wa__cs_name{
79
+ color: #d5f0d9
80
+ }
81
+
82
+ .wa__stt_offline .wa__cs_info .wa__cs_name{
83
+ color: #76787d;
84
+ }
85
+
86
+ .wa__cs_info .wa__cs_status{
87
+ width: 36px;
88
+ height: 14px;
89
+ margin-left: 3px;
90
+ padding: 1px;
91
+ font-size: 9px;
92
+ line-height: 1.34em;
93
+ border-radius: 5px;
94
+ color: rgba(255,255,255,0.98);
95
+ position: relative;
96
+ top: -1px;
97
+ left: 0px;
98
+ text-align: center;
99
+ }
100
+
101
+ .wa__stt_online .wa__cs_info .wa__cs_status{
102
+ background: #62c971;
103
+ }
104
+
105
+ .wa__stt_offline .wa__cs_info .wa__cs_status{
106
+ background: #b9bbbe;
107
+ }
108
+
109
+
110
+ .wa__stt_online{
111
+ background: #2DB742;
112
+ cursor: pointer;
113
+ transition: 0.4s ease all;
114
+ -webkit-transition: 0.4s ease all;
115
+ -moz-transition: 0.4s ease all;
116
+ backface-visibility: hidden;
117
+ will-change: transform;
118
+ }
119
+ .wa__stt_online .wa__btn_txt{
120
+ position: relative;
121
+ z-index: 4;
122
+ }
123
+ .wa__r_button.wa__stt_online:before{
124
+ border-radius: 50vh;
125
+ }
126
+ .wa__sq_button.wa__stt_online:before{
127
+ border-radius: 5px;
128
+ }
129
+ .wa__stt_online:before{
130
+ content: '';
131
+ transition: 0.4s ease all;
132
+ -webkit-transition: 0.4s ease all;
133
+ -moz-transition: 0.4s ease all;
134
+ background: rgba(0,0,0,0.2);
135
+ position: absolute;
136
+ left: 0;
137
+ top: 0;
138
+ z-index: -1;
139
+ width: 100%;
140
+ height: 100%;
141
+ opacity: 0;
142
+ will-change: opacity;
143
+ }
144
+ .wa__button.wa__stt_online:focus,
145
+ .wa__button.wa__stt_online:active,
146
+ /* .wa__button.wa__stt_online:hover{
147
+ box-shadow: 0px 4px 8px 1px rgba(32,32,37,0.19);
148
+ transform: translate(0,-3px);
149
+ -webkit-transform: translate(0,-3px);
150
+ -moz-transform: translate(0,-3px);
151
+ -ms-transform: translate(0,-3px);
152
+ } */
153
+ .wa__button.wa__stt_online:focus:before,
154
+ .wa__button.wa__stt_online:active:before,
155
+ /* .wa__button.wa__stt_online:hover:before{
156
+ opacity: 1;
157
+ } */
158
+ .wa__stt_online.wa__btn_w_icon .wa__btn_icon img{
159
+ transform: scale(1);
160
+ -webkit-transform: scale(1);
161
+ -moz-transform: scale(1);
162
+ -ms-transform: scale(1);
163
+ transition: 0.2s ease all;
164
+ -webkit-transition: 0.2s ease all;
165
+ -moz-transition: 0.2s ease all;
166
+ }
167
+
168
+ .wa__stt_offline{
169
+ background: #EBEDF0;
170
+ color: #595B60;
171
+ box-shadow: none;
172
+ cursor: initial;
173
+ }
174
+
175
+ .wa__stt_offline.wa__btn_w_icon .wa__btn_txt {
176
+ padding: 8px 20px 6px 71px;
177
+ }
178
+
179
+ .wa__stt_offline.wa__r_button.wa__btn_w_img .wa__btn_txt{
180
+ padding: 8px 20px 8px 100px
181
+ }
182
+
183
+ .wa__stt_offline.wa__sq_button.wa__btn_w_img .wa__btn_txt {
184
+ padding: 8px 20px 8px 70px;
185
+ }
186
+
187
+ .wa__btn_w_icon .wa__btn_icon{
188
+ position: absolute;
189
+ top: 50%;
190
+ left: 16px;
191
+ transform: translate(0,-50%);
192
+ -moz-transform: translate(0,-50%);
193
+ -webkit-transform: translate(0,-50%);
194
+ }
195
+
196
+ .wa__btn_w_icon .wa__btn_icon img{
197
+ width: 41px;
198
+ height: 69px;
199
+ }
200
+
201
+ .wa__btn_w_img{
202
+ position: relative;
203
+ width: 285px;
204
+ margin: 20px 0 20px;
205
+ }
206
+
207
+ .wa__btn_w_img .wa__cs_img{
208
+ position: absolute;
209
+ top: 50%;
210
+ left: 0px;
211
+ text-align: center;
212
+ transform: translate(0,-50%);
213
+ -webkit-transform: translate(0,-50%);
214
+ -moz-transform: translate(0,-50%);
215
+ }
216
+ .wa__btn_w_img .wa__cs_img_wrap{
217
+ width: 79px;
218
+ height: 79px;
219
+ border-radius: 50%;
220
+ -webkit-border-radius: 50%;
221
+ -moz-border-radius: 50%;
222
+ border: 3px solid #ffffff;
223
+ position: relative;
224
+ overflow: hidden;
225
+ }
226
+ .wa__btn_w_img .wa__cs_img img{
227
+ max-width: 100%;
228
+ height: auto;
229
+ transition: 0.2s ease transform;
230
+ -webkit-transition: 0.2s ease transform;
231
+ -moz-transition: 0.2s ease transform;
232
+ }
233
+ .wa__btn_w_img .wa__cs_img:after{
234
+ content: '';
235
+ background: #ffffff url('../img/whatsapp_logo_green.svg') center center no-repeat;
236
+ background-size: 21px;
237
+ display: block;
238
+ width: 27px;
239
+ height: 27px;
240
+ position: absolute;
241
+ top: 20px;
242
+ right: -14px;
243
+ border-radius: 50%;
244
+ -webkit-border-radius: 50%;
245
+ -moz-border-radius: 50%;
246
+ box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
247
+ -webkit-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
248
+ -moz-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
249
+ }
250
+
251
+ .wa__stt_offline.wa__btn_w_img .wa__cs_img:after{
252
+ content: '';
253
+ background: #ffffff url('../img/whatsapp_logo_gray.svg') center center no-repeat;
254
+ background-size: 21px;
255
+ display: block;
256
+ width: 27px;
257
+ height: 27px;
258
+ position: absolute;
259
+ top: 20px;
260
+ right: -14px;
261
+ border-radius: 50%;
262
+ -webkit-border-radius: 50%;
263
+ -moz-border-radius: 50%;
264
+ box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
265
+ -webkit-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
266
+ -moz-box-shadow: 0px 4px 6px 0px rgba(39,38,38,0.3);
267
+ }
268
+
269
+
270
+ .wa__btn_w_img .wa__btn_txt{
271
+ padding:14px 20px 12px 103px;
272
+ }
273
+
274
+ .wa__r_button{
275
+ border-radius: 50vh;
276
+ }
277
+
278
+ .wa__sq_button{
279
+ border-radius: 5px;
280
+ }
281
+
282
+ .wa__sq_button.wa__btn_w_img{
283
+ width: 270px;
284
+ margin-left: 30px;
285
+ }
286
+
287
+ .wa__r_button.wa__btn_w_img .wa__cs_img{
288
+ left: -5px;
289
+ }
290
+
291
+ .wa__sq_button.wa__btn_w_img .wa__cs_img{
292
+ left: -35px;
293
+ }
294
+
295
+ .wa__sq_button.wa__btn_w_img .wa__btn_txt{
296
+ padding: 10px 20px 10px 70px;
297
+ display: table-cell;
298
+ vertical-align: middle;
299
+ height: 66px;
300
+ }
301
+
302
+ .wa__btn_txt .wa__btn_title{
303
+ font-weight: 600;
304
+ }
305
+
306
+ .wa__r_button.wa__btn_w_img .wa__btn_txt{
307
+ padding: 8px 20px 8px 100px;
308
+ display: table-cell;
309
+ vertical-align: middle;
310
+ height: 66px;
311
+ }
312
+
313
+ .wa__r_button.wa__btn_w_img .wa__cs_info .wa__cs_status{
314
+ margin-left: 3px;
315
+ }
316
+ /* ^^^--button--^^^ */
317
+
318
+ /* VVV--popup--VVV */
319
+
320
+ .wa__popup_chat_box{
321
+ font-family: Arial,Helvetica,sans-serif;
322
+ width: 351px;
323
+ border-radius: 5px 5px 8px 8px;
324
+ -webkit-border-radius: 5px 5px 8px 8px;
325
+ -moz-border-radius: 5px 5px 8px 8px;
326
+ position: fixed;
327
+ overflow: hidden;
328
+ box-shadow: 0px 10px 10px 4px rgba(0,0,0,0.04);
329
+ -webkit-box-shadow: 0px 10px 10px 4px rgba(0,0,0,0.04);
330
+ -moz-box-shadow: 0px 10px 10px 4px rgba(0,0,0,0.04);
331
+ bottom: 102px;
332
+ right: 25px;
333
+ z-index: 998;
334
+ opacity: 0;
335
+ visibility: hidden;
336
+ -ms-transform: translate(0,50px);
337
+ transform: translate(0,50px);
338
+ -webkit-transform: translate(0,50px);
339
+ -moz-transform: translate(0,50px);
340
+ transition: 0.4s ease all;
341
+ -webkit-transition: 0.4s ease all;
342
+ -moz-transition: 0.4s ease all;
343
+ will-change: transform,visibility,opacity;
344
+ max-width: calc(100% - 50px);
345
+ }
346
+ /* .wa__popup_chat_box:hover, */
347
+ .wa__popup_chat_box:focus,
348
+ .wa__popup_chat_box:active{
349
+ box-shadow: 0px 10px 10px 4px rgba(32,32,37,0.23);
350
+ -webkit-box-shadow: 0px 10px 10px 4px rgba(32,32,37,0.23);
351
+ -moz-box-shadow: 0px 10px 10px 4px rgba(32,32,37,0.23);
352
+ }
353
+ .wa__popup_chat_box.wa__active{
354
+ -ms-transform: translate(0,0);
355
+ transform: translate(0,0);
356
+ -webkit-transform: translate(0,0);
357
+ -moz-transform: translate(0,0);
358
+ visibility: visible;
359
+ opacity: 1;
360
+ }
361
+ .wa__popup_chat_box .wa__popup_heading{
362
+ position: relative;
363
+ padding: 15px 43px 17px 74px;
364
+ color: #d9ebc6;
365
+ background: #2db742;
366
+ }
367
+ .wa__popup_chat_box .wa__popup_heading_sm{
368
+ padding: 12px 15px 17px 74px;
369
+ }
370
+ .wa__popup_chat_box .wa__popup_heading:before{
371
+ content: '';
372
+ background: url('../img/whatsapp_logo.svg') center top no-repeat;
373
+ background-size: 33px;
374
+ display: block;
375
+ width: 55px;
376
+ height: 33px;
377
+ position: absolute;
378
+ top: 20px;
379
+ left: 12px;
380
+ }
381
+ .wa__popup_chat_box .wa__popup_heading_sm:before{
382
+ top: 19px;
383
+ left: 11px;
384
+ }
385
+
386
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_title{
387
+ padding-top: 2px;
388
+ padding-bottom: 3;
389
+ color: #ffffff;
390
+ font-size: 18px;
391
+ line-height: 24px;
392
+ }
393
+
394
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro{
395
+ padding-top: 4px;
396
+ font-size: 12px;
397
+ line-height: 20px;
398
+ }
399
+ .wa__popup_chat_box .wa__popup_heading_sm .wa__popup_intro{
400
+ padding-top: 0px;
401
+ }
402
+
403
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a{
404
+ display: inline-block;
405
+ color: #ffffff;
406
+ text-decoration: none;
407
+ }
408
+ /* .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a:hover, */
409
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a:focus,
410
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro a:active{
411
+ text-decoration: underline;
412
+ }
413
+
414
+ .wa__popup_chat_box .wa__popup_notice{
415
+ font-size: 11px;
416
+ color: #a5abb7;
417
+ font-weight: 500;
418
+ padding: 0 3px;
419
+ }
420
+ .wa__popup_chat_box .wa__popup_content{
421
+ background: #ffffff;
422
+ padding: 13px 20px 21px 19px;
423
+ text-align: center;
424
+ }
425
+ .wa__popup_chat_box .wa__popup_content_left{
426
+ text-align: left;
427
+ }
428
+ .wa__popup_chat_box .wa__popup_avatar{
429
+ position: absolute;
430
+ overflow: hidden;
431
+ border-radius: 50%;
432
+ -webkit-border-radius: 50%;
433
+ -moz-border-radius: 50%;
434
+ left: 12px;
435
+ top: 12px;
436
+ }
437
+ .wa__popup_chat_box .wa__stt{
438
+ padding: 13px 40px 12px 74px;
439
+ position: relative;
440
+ text-decoration: none;
441
+ display: table;
442
+ width: 100%;
443
+ border-left: 2px solid #2db742;
444
+ background: #f5f7f9;
445
+ border-radius: 2px 4px 2px 4px;
446
+ -webkit-border-radius: 2px 4px 2px 4px;
447
+ -moz-border-radius: 2px 4px 2px 4px;
448
+ }
449
+ .wa__popup_chat_box .wa__stt:after{
450
+ content: '';
451
+ background: url('../img/whatsapp_logo_green.svg') 0 0 no-repeat;
452
+ position: absolute;
453
+ right: 14px;
454
+ top: 26px;
455
+ width: 20px;
456
+ height: 20px;
457
+ background-size: 100% 100%;
458
+ -webkit-background-size: 100% 100%;
459
+ -moz-background-size: 100% 100%;
460
+ }
461
+ .wa__popup_chat_box .wa__stt.wa__stt_offline:after{
462
+ background-image: url('../img/whatsapp_logo_gray_sm.svg');
463
+ }
464
+ .wa__popup_chat_box .wa__stt.wa__stt_online{
465
+ transition: 0.2s ease all;
466
+ -webkit-transition: 0.2s ease all;
467
+ -moz-transition: 0.2s ease all;
468
+ }
469
+ /* .wa__popup_chat_box .wa__stt.wa__stt_online:hover, */
470
+ .wa__popup_chat_box .wa__stt.wa__stt_online:active,
471
+ .wa__popup_chat_box .wa__stt.wa__stt_online:focus{
472
+ background: #ffffff;
473
+ box-shadow: 0px 7px 15px 1px rgba(55,62,70,0.07);
474
+ -webkit-box-shadow: 0px 7px 15px 1px rgba(55,62,70,0.07);
475
+ -moz-box-shadow: 0px 7px 15px 1px rgba(55,62,70,0.07);
476
+ }
477
+ .wa__popup_content_list .wa__popup_content_item{
478
+ margin: 14px 0 0;
479
+ transform: translate(0,20px);
480
+ -webkit-transform: translate(0,20px);
481
+ -moz-transform: translate(0,20px);
482
+ will-change: opacity,transform;
483
+ opacity: 0;
484
+ }
485
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item{
486
+ transition: 0.4s ease all;
487
+ -webkit-transition: 0.4s ease all;
488
+ -moz-transition: 0.4s ease all;
489
+ transition-delay: 2.1s;
490
+ -webkit-transition-delay: 2.1s;
491
+ -moz-transition-delay: 2.1s;
492
+ }
493
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(1){
494
+ transition-delay: 0.3s;
495
+ -webkit-transition-delay: 0.3s;
496
+ -moz-transition-delay: 0.3s;
497
+ }
498
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(2){
499
+ transition-delay: 0.5s;
500
+ -webkit-transition-delay: 0.5s;
501
+ -moz-transition-delay: 0.5s;
502
+ }
503
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(3){
504
+ transition-delay: 0.7s;
505
+ -webkit-transition-delay: 0.7s;
506
+ -moz-transition-delay: 0.7s;
507
+ }
508
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(4){
509
+ transition-delay: 0.9s;
510
+ -webkit-transition-delay: 0.9s;
511
+ -moz-transition-delay: 0.9s;
512
+ }
513
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(5){
514
+ transition-delay: 1.1s;
515
+ -webkit-transition-delay: 1.1s;
516
+ -moz-transition-delay: 1.1s;
517
+ }
518
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(6){
519
+ transition-delay: 1.3s;
520
+ -webkit-transition-delay: 1.3s;
521
+ -moz-transition-delay: 1.3s;
522
+ }
523
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(7){
524
+ transition-delay: 1.5s;
525
+ -webkit-transition-delay: 1.5s;
526
+ -moz-transition-delay: 1.5s;
527
+ }
528
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(8){
529
+ transition-delay: 1.7s;
530
+ -webkit-transition-delay: 1.7s;
531
+ -moz-transition-delay: 1.7s;
532
+ }
533
+ .wa__popup_chat_box.wa__pending .wa__popup_content_list .wa__popup_content_item:nth-child(9){
534
+ transition-delay: 1.9s;
535
+ -webkit-transition-delay: 1.9s;
536
+ -moz-transition-delay: 1.9s;
537
+ }
538
+ .wa__popup_chat_box.wa__lauch .wa__popup_content_list .wa__popup_content_item{
539
+ opacity: 1;
540
+ transform: translate(0,0);
541
+ -webkit-transform: translate(0,0);
542
+ -moz-transform: translate(0,0);
543
+ }
544
+ .wa__popup_content_list .wa__popup_content_item .wa__member_name{
545
+ font-size: 14px;
546
+ color: #363c47;
547
+ }
548
+ .wa__popup_content_list .wa__popup_content_item .wa__member_duty{
549
+ font-size: 11px;
550
+ color: #989b9f;
551
+ padding: 2px 0 0;
552
+ }
553
+ .wa__popup_content_list .wa__popup_content_item .wa__member_status{
554
+ color: #F5A623;
555
+ font-size: 9px;
556
+ padding: 5px 0 0;
557
+ }
558
+ .wa__popup_content_list .wa__popup_content_item .wa__popup_txt{
559
+ display: table-cell;
560
+ vertical-align: middle;
561
+ min-height: 48px;
562
+ height: 48px;
563
+ }
564
+ .wa__popup_content_list .wa__popup_content_item .wa__stt_offline{
565
+ border-left-color: #c0c5ca;
566
+ }
567
+ .wa__popup_avt_list{
568
+ font-size: 0;
569
+ margin: 7px 0 24px;
570
+ }
571
+ .wa__popup_avt_list .wa__popup_avt_item{
572
+ display: inline-block;
573
+ position: relative;
574
+ width: 46px;
575
+ }
576
+ .wa__popup_avt_list .wa__popup_avt_img{
577
+ width: 60px;
578
+ height: 60px;
579
+ border-radius: 50%;
580
+ -webkit-border-radius: 50%;
581
+ -moz-border-radius: 50%;
582
+ position: relative;
583
+ overflow: hidden;
584
+ border: 2px solid #ffffff;
585
+ left: -7px;
586
+ }
587
+ .wa__popup_call_btn{
588
+ background: #2db742;
589
+ color: #ffffff;
590
+ text-decoration: none;
591
+ display: inline-block;
592
+ width: 275px;
593
+ max-width: 100%;
594
+ font-size: 16px;
595
+ padding: 14px 10px;
596
+ border-radius: 24px;
597
+ -webkit-border-radius: 24px;
598
+ -moz-border-radius: 24px;
599
+ margin: 25px 0 15px;
600
+ box-shadow: 0px 8px 17px 2px rgba(13,15,18,0.2);
601
+ -webkit-box-shadow: 0px 8px 17px 2px rgba(13,15,18,0.2);
602
+ -moz-box-shadow: 0px 8px 17px 2px rgba(13,15,18,0.2);
603
+ }
604
+ .wa__popup_call_btn.wa__popup_call_btn_lg:before{
605
+ content: '';
606
+ display: inline-block;
607
+ width: 20px;
608
+ height: 20px;
609
+ position: relative;
610
+ background: url('../img/whatsapp_logo_green_sm.svg') 0 0 no-repeat;
611
+ background-size: 100% 100%;
612
+ -webkit-background-size: 100% 100%;
613
+ -moz-background-size: 100% 100%;
614
+ vertical-align: top;
615
+ top: 0px;
616
+ margin-right: -19px;
617
+ left: -31px;
618
+ transition: 0.2s ease background-image;
619
+ -webkit-transition: 0.2s ease background-image;
620
+ -moz-transition: 0.2s ease background-image;
621
+ }
622
+ /* .wa__popup_call_btn.wa__popup_call_btn_lg:hover:before, */
623
+ .wa__popup_call_btn.wa__popup_call_btn_lg:focus:before,
624
+ .wa__popup_call_btn.wa__popup_call_btn_lg:active:before{
625
+ background-image: url('../img/whatsapp_logo.svg')
626
+ }
627
+
628
+ .wa__popup_chat_box_gray{
629
+ border-radius: 2px 2px 8px 8px;
630
+ }
631
+
632
+ .wa__popup_chat_box_gray .wa__popup_heading_gray{
633
+ background: #f8f8f8;
634
+ border-top: 3px solid #2db742;
635
+ color: #868c9a;
636
+ font-weight: 500;
637
+ }
638
+ .wa__popup_chat_box_gray .wa__popup_heading_gray .wa__popup_title{
639
+ color: #595b60;
640
+ }
641
+ .wa__popup_chat_box_gray .wa__popup_heading_gray:before{
642
+ content: '';
643
+ background: url(../img/whatsapp_logo_green.svg) center top no-repeat;
644
+ background-size: 33px;
645
+ display: block;
646
+ width: 55px;
647
+ height: 33px;
648
+ position: absolute;
649
+ top: 20px;
650
+ left: 12px;
651
+ }
652
+ .wa__popup_chat_box_gray .wa__popup_heading_gray .wa__popup_intro a{
653
+ color: #595b60;
654
+ }
655
+
656
+ .wa__popup_chat_box_ct{
657
+ width: 384px;
658
+ text-align: center;
659
+ }
660
+
661
+ .wa__popup_chat_box_ct .wa__popup_heading_ct{
662
+ text-align: center;
663
+ padding: 18px 0 18px;
664
+ }
665
+
666
+ .wa__popup_chat_box_ct .wa__popup_heading_ct:before {
667
+ content: '';
668
+ background: url(../img/whatsapp_logo.svg) center top no-repeat;
669
+ background-size: 30px;
670
+ display: block;
671
+ width: 30px;
672
+ height: 31px;
673
+ position: absolute;
674
+ top: 15px;
675
+ left: 72px;
676
+ }
677
+
678
+ .wa__popup_chat_box_ct .wa__popup_heading_ct .wa__popup_title{
679
+ padding-left: 22px;
680
+ padding-bottom: 14px;
681
+ }
682
+
683
+ .wa__popup_chat_box_ct .wa__popup_heading_ct .wa__popup_intro{
684
+ margin-top: -5px;
685
+ line-height: 12px;
686
+ }
687
+
688
+ .wa__popup_chat_box_ct .wa__popup_ct_avt_list:after{
689
+ content: '';
690
+ clear: both;
691
+ display: block;
692
+ }
693
+
694
+ .wa__popup_chat_box_ct .wa__popup_ct_content{
695
+ background: #ffffff;
696
+ padding: 0 0 14px;
697
+ }
698
+
699
+ .wa__popup_chat_box_ct .wa__popup_ct_content .wa__popup_notice{
700
+ padding-top: 18px;
701
+ padding-bottom: 15px;
702
+ }
703
+
704
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item{
705
+ width: 33%;
706
+ float: left;
707
+ font-size: 10px;
708
+ }
709
+
710
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item a{
711
+ text-decoration: none;
712
+ color: #989b9f;
713
+ }
714
+
715
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__popup_ct_txt{
716
+ padding-top: 8px;
717
+ }
718
+
719
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_name{
720
+ color: #363c47;
721
+ font-size: 13px;
722
+ }
723
+
724
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_duty{
725
+ color: #989b9f;
726
+ padding: 3px 0 0;
727
+ }
728
+
729
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_stt_online{
730
+ color: #2db742;
731
+ font-size: 9px;
732
+ line-height: 12px;
733
+ display: inline-block;
734
+ padding: 3px 0 0 16px;
735
+ background: url('../img/whatsapp_logo_green.svg') 0 3px no-repeat;
736
+ background-size: 12px auto;
737
+ -webkit-background-size: 12px auto;
738
+ -moz-background-size: 12px auto;
739
+ }
740
+
741
+ .wa__popup_chat_box_ct .wa__popup_ct_content_item .wa__member_stt_offline{
742
+ color: #f5a623;
743
+ font-size: 9px;
744
+ line-height: 12px;
745
+ padding: 2px 0 0;
746
+ }
747
+
748
+
749
+ .wa__popup_chat_box_ct .wa__popup_ct_avatar img{
750
+ border-radius: 50%
751
+ }
752
+
753
+ .wa__popup_chat_box_ct .wa__popup_ct_call_btn{
754
+ width: 97px;
755
+ font-size: 11px;
756
+ padding: 9px 10px 11px;
757
+ margin: 15px 0 15px;
758
+ }
759
+
760
+ /* ^^^--popup--^^^ */
761
+
762
+ /* VVV--popup button--VVV */
763
+ .wa__btn_popup{
764
+ position: fixed;
765
+ right: 30px;
766
+ bottom: 30px;
767
+ cursor: pointer;
768
+ font-family: Arial,Helvetica,sans-serif;
769
+ z-index: 999;
770
+ }
771
+ .wa__btn_popup .wa__btn_popup_icon{
772
+ width: 56px;
773
+ height: 56px;
774
+ background: #2db742;
775
+ border-radius: 50%;
776
+ -webkit-border-radius: 50%;
777
+ -moz-border-radius: 50%;
778
+ box-shadow: 0px 6px 8px 2px rgba(0,0,0,0.14);
779
+ -webkit-box-shadow: 0px 6px 8px 2px rgba(0,0,0,0.14);
780
+ -moz-box-shadow: 0px 6px 8px 2px rgba(0,0,0,0.14);
781
+ }
782
+ .wa__btn_popup .wa__btn_popup_icon:before{
783
+ content: '';
784
+ position: absolute;
785
+ z-index: 1;
786
+ width: 100%;
787
+ height: 100%;
788
+ left: 0;
789
+ top: 0;
790
+ background: transparent url('../img/whatsapp_logo.svg') center center no-repeat;
791
+ background-size: 30px auto;
792
+ -webkit-background-size: 30px auto;
793
+ -moz-background-size: 30px auto;
794
+ transition: 0.4s ease all;
795
+ -webkit-transition: 0.4s ease all;
796
+ -moz-transition: 0.4s ease all;
797
+ }
798
+ .wa__btn_popup .wa__btn_popup_icon:after{
799
+ content: '';
800
+ opacity: 0;
801
+ position: absolute;
802
+ z-index: 2;
803
+ width: 100%;
804
+ height: 100%;
805
+ left: 0;
806
+ top: 0;
807
+ background: transparent url('../img/x_icon.svg') center center no-repeat;
808
+ background-size: 14px auto;
809
+ -webkit-background-size: 14px auto;
810
+ -moz-background-size: 14px auto;
811
+ transition: 0.4s ease all;
812
+ -webkit-transition: 0.4s ease all;
813
+ -moz-transition: 0.4s ease all;
814
+ -ms-transform: scale(0) rotate(-360deg);
815
+ transform: scale(0) rotate(-360deg);
816
+ -webkit-transform: scale(0) rotate(-360deg);
817
+ -moz-transform: scale(0) rotate(-360deg);
818
+ }
819
+ .wa__btn_popup.wa__active .wa__btn_popup_icon:before{
820
+ opacity: 0;
821
+ -ms-transform: scale(0) rotate(360deg);
822
+ transform: scale(0) rotate(360deg);
823
+ -webkit-transform: scale(0) rotate(360deg);
824
+ -moz-transform: scale(0) rotate(360deg);
825
+ }
826
+ .wa__btn_popup.wa__active .wa__btn_popup_icon:after{
827
+ opacity: 1;
828
+ -ms-transform: scale(1) rotate(0deg);
829
+ transform: scale(1) rotate(0deg);
830
+ -webkit-transform: scale(1) rotate(0deg);
831
+ -moz-transform: scale(1) rotate(0deg);
832
+ }
833
+ .wa__btn_popup .wa__btn_popup_txt{
834
+ position: absolute;
835
+ width: 156px;
836
+ right: 100%;
837
+ background-color: #f5f7f9;
838
+ font-size: 12px;
839
+ color: #43474e;
840
+ top: 15px;
841
+ padding: 7px 0 7px 12px;
842
+ margin-right: 7px;
843
+ letter-spacing: -0.03em;
844
+ border-radius: 4px;
845
+ -webkit-border-radius: 4px;
846
+ -moz-border-radius: 4px;
847
+ transition: 0.4s ease all;
848
+ -webkit-transition: 0.4s ease all;
849
+ -moz-transition: 0.4s ease all;
850
+ }
851
+ .wa__btn_popup.wa__active .wa__btn_popup_txt{
852
+ -ms-transform: translate(0,15px);
853
+ transform: translate(0,15px);
854
+ -webkit-transform: translate(0,15px);
855
+ -moz-transform: translate(0,15px);
856
+ opacity: 0;
857
+ visibility: hidden;
858
+ }
859
+ /* ^^^--popup button--^^^ */
dist/assets/img/whatsapp_logo.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 478.165 478.165" style="enable-background:new 0 0 478.165 478.165;" xml:space="preserve" width="512px" height="512px">
3
+ <g>
4
+ <path id="WhatsApp" d="M478.165,232.946c0,128.567-105.057,232.966-234.679,232.966c-41.102,0-79.814-10.599-113.445-28.969 L0,478.165l42.437-125.04c-21.438-35.065-33.77-76.207-33.77-120.159C8.667,104.34,113.763,0,243.485,0 C373.108,0,478.165,104.34,478.165,232.946z M243.485,37.098c-108.802,0-197.422,87.803-197.422,195.868 c0,42.915,13.986,82.603,37.576,114.879l-24.586,72.542l75.849-23.968c31.121,20.481,68.457,32.296,108.583,32.296 c108.723,0,197.323-87.843,197.323-195.908C440.808,124.921,352.208,37.098,243.485,37.098z M361.931,286.62 c-1.395-2.331-5.22-3.746-10.898-6.814c-5.917-2.849-34.089-16.497-39.508-18.37c-5.16-1.913-8.986-2.849-12.811,2.829 c-4.005,5.638-14.903,18.629-18.23,22.354c-3.546,3.785-6.854,4.264-12.552,1.435c-5.618-2.809-24.267-8.866-46.203-28.391 c-17.055-15.042-28.67-33.711-31.997-39.508c-3.427-5.758-0.398-8.826,2.471-11.635c2.69-2.59,5.778-6.734,8.627-10.041 c2.969-3.287,3.905-5.638,5.798-9.424c1.913-3.905,0.936-7.192-0.478-10.141c-1.415-2.849-13.01-30.881-17.752-42.337 c-4.841-11.416-9.543-9.523-12.871-9.523c-3.467,0-7.212-0.478-11.117-0.478c-3.785,0-10.041,1.395-15.381,7.192 c-5.2,5.658-20.123,19.465-20.123,47.597c0,28.052,20.601,55.308,23.55,59.053c2.869,3.785,39.747,63.197,98.303,86.07 c58.476,22.872,58.476,15.321,69.115,14.365c10.38-0.956,34.069-13.867,38.811-27.096 C363.345,300.307,363.345,288.991,361.931,286.62z" fill="#FFFFFF"/>
5
+ </g>
6
+ <g>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ </svg>
dist/assets/img/whatsapp_logo_gray.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 478.165 478.165" style="enable-background:new 0 0 478.165 478.165;" xml:space="preserve" width="512px" height="512px">
3
+ <g>
4
+ <path id="WhatsApp" d="M478.165,232.946c0,128.567-105.057,232.966-234.679,232.966c-41.102,0-79.814-10.599-113.445-28.969 L0,478.165l42.437-125.04c-21.438-35.065-33.77-76.207-33.77-120.159C8.667,104.34,113.763,0,243.485,0 C373.108,0,478.165,104.34,478.165,232.946z M243.485,37.098c-108.802,0-197.422,87.803-197.422,195.868 c0,42.915,13.986,82.603,37.576,114.879l-24.586,72.542l75.849-23.968c31.121,20.481,68.457,32.296,108.583,32.296 c108.723,0,197.323-87.843,197.323-195.908C440.808,124.921,352.208,37.098,243.485,37.098z M361.931,286.62 c-1.395-2.331-5.22-3.746-10.898-6.814c-5.917-2.849-34.089-16.497-39.508-18.37c-5.16-1.913-8.986-2.849-12.811,2.829 c-4.005,5.638-14.903,18.629-18.23,22.354c-3.546,3.785-6.854,4.264-12.552,1.435c-5.618-2.809-24.267-8.866-46.203-28.391 c-17.055-15.042-28.67-33.711-31.997-39.508c-3.427-5.758-0.398-8.826,2.471-11.635c2.69-2.59,5.778-6.734,8.627-10.041 c2.969-3.287,3.905-5.638,5.798-9.424c1.913-3.905,0.936-7.192-0.478-10.141c-1.415-2.849-13.01-30.881-17.752-42.337 c-4.841-11.416-9.543-9.523-12.871-9.523c-3.467,0-7.212-0.478-11.117-0.478c-3.785,0-10.041,1.395-15.381,7.192 c-5.2,5.658-20.123,19.465-20.123,47.597c0,28.052,20.601,55.308,23.55,59.053c2.869,3.785,39.747,63.197,98.303,86.07 c58.476,22.872,58.476,15.321,69.115,14.365c10.38-0.956,34.069-13.867,38.811-27.096 C363.345,300.307,363.345,288.991,361.931,286.62z" fill="#CBCFD5"/>
5
+ </g>
6
+ <g>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ </svg>
dist/assets/img/whatsapp_logo_gray_sm.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 478.165 478.165" style="enable-background:new 0 0 478.165 478.165;" xml:space="preserve" width="512px" height="512px">
3
+ <g>
4
+ <path id="WhatsApp" d="M478.165,232.946c0,128.567-105.057,232.966-234.679,232.966c-41.102,0-79.814-10.599-113.445-28.969 L0,478.165l42.437-125.04c-21.438-35.065-33.77-76.207-33.77-120.159C8.667,104.34,113.763,0,243.485,0 C373.108,0,478.165,104.34,478.165,232.946z M243.485,37.098c-108.802,0-197.422,87.803-197.422,195.868 c0,42.915,13.986,82.603,37.576,114.879l-24.586,72.542l75.849-23.968c31.121,20.481,68.457,32.296,108.583,32.296 c108.723,0,197.323-87.843,197.323-195.908C440.808,124.921,352.208,37.098,243.485,37.098z M361.931,286.62 c-1.395-2.331-5.22-3.746-10.898-6.814c-5.917-2.849-34.089-16.497-39.508-18.37c-5.16-1.913-8.986-2.849-12.811,2.829 c-4.005,5.638-14.903,18.629-18.23,22.354c-3.546,3.785-6.854,4.264-12.552,1.435c-5.618-2.809-24.267-8.866-46.203-28.391 c-17.055-15.042-28.67-33.711-31.997-39.508c-3.427-5.758-0.398-8.826,2.471-11.635c2.69-2.59,5.778-6.734,8.627-10.041 c2.969-3.287,3.905-5.638,5.798-9.424c1.913-3.905,0.936-7.192-0.478-10.141c-1.415-2.849-13.01-30.881-17.752-42.337 c-4.841-11.416-9.543-9.523-12.871-9.523c-3.467,0-7.212-0.478-11.117-0.478c-3.785,0-10.041,1.395-15.381,7.192 c-5.2,5.658-20.123,19.465-20.123,47.597c0,28.052,20.601,55.308,23.55,59.053c2.869,3.785,39.747,63.197,98.303,86.07 c58.476,22.872,58.476,15.321,69.115,14.365c10.38-0.956,34.069-13.867,38.811-27.096 C363.345,300.307,363.345,288.991,361.931,286.62z" fill="#a9aeb6"/>
5
+ </g>
6
+ <g>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ </svg>
dist/assets/img/whatsapp_logo_green.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 478.165 478.165" style="enable-background:new 0 0 478.165 478.165;" xml:space="preserve" width="512px" height="512px">
3
+ <g>
4
+ <path id="WhatsApp" d="M478.165,232.946c0,128.567-105.057,232.966-234.679,232.966c-41.102,0-79.814-10.599-113.445-28.969 L0,478.165l42.437-125.04c-21.438-35.065-33.77-76.207-33.77-120.159C8.667,104.34,113.763,0,243.485,0 C373.108,0,478.165,104.34,478.165,232.946z M243.485,37.098c-108.802,0-197.422,87.803-197.422,195.868 c0,42.915,13.986,82.603,37.576,114.879l-24.586,72.542l75.849-23.968c31.121,20.481,68.457,32.296,108.583,32.296 c108.723,0,197.323-87.843,197.323-195.908C440.808,124.921,352.208,37.098,243.485,37.098z M361.931,286.62 c-1.395-2.331-5.22-3.746-10.898-6.814c-5.917-2.849-34.089-16.497-39.508-18.37c-5.16-1.913-8.986-2.849-12.811,2.829 c-4.005,5.638-14.903,18.629-18.23,22.354c-3.546,3.785-6.854,4.264-12.552,1.435c-5.618-2.809-24.267-8.866-46.203-28.391 c-17.055-15.042-28.67-33.711-31.997-39.508c-3.427-5.758-0.398-8.826,2.471-11.635c2.69-2.59,5.778-6.734,8.627-10.041 c2.969-3.287,3.905-5.638,5.798-9.424c1.913-3.905,0.936-7.192-0.478-10.141c-1.415-2.849-13.01-30.881-17.752-42.337 c-4.841-11.416-9.543-9.523-12.871-9.523c-3.467,0-7.212-0.478-11.117-0.478c-3.785,0-10.041,1.395-15.381,7.192 c-5.2,5.658-20.123,19.465-20.123,47.597c0,28.052,20.601,55.308,23.55,59.053c2.869,3.785,39.747,63.197,98.303,86.07 c58.476,22.872,58.476,15.321,69.115,14.365c10.38-0.956,34.069-13.867,38.811-27.096 C363.345,300.307,363.345,288.991,361.931,286.62z" fill="#2DB742"/>
5
+ </g>
6
+ <g>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ </svg>
dist/assets/img/whatsapp_logo_green_sm.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 478.165 478.165" style="enable-background:new 0 0 478.165 478.165;" xml:space="preserve" width="512px" height="512px">
3
+ <g>
4
+ <path id="WhatsApp" d="M478.165,232.946c0,128.567-105.057,232.966-234.679,232.966c-41.102,0-79.814-10.599-113.445-28.969 L0,478.165l42.437-125.04c-21.438-35.065-33.77-76.207-33.77-120.159C8.667,104.34,113.763,0,243.485,0 C373.108,0,478.165,104.34,478.165,232.946z M243.485,37.098c-108.802,0-197.422,87.803-197.422,195.868 c0,42.915,13.986,82.603,37.576,114.879l-24.586,72.542l75.849-23.968c31.121,20.481,68.457,32.296,108.583,32.296 c108.723,0,197.323-87.843,197.323-195.908C440.808,124.921,352.208,37.098,243.485,37.098z M361.931,286.62 c-1.395-2.331-5.22-3.746-10.898-6.814c-5.917-2.849-34.089-16.497-39.508-18.37c-5.16-1.913-8.986-2.849-12.811,2.829 c-4.005,5.638-14.903,18.629-18.23,22.354c-3.546,3.785-6.854,4.264-12.552,1.435c-5.618-2.809-24.267-8.866-46.203-28.391 c-17.055-15.042-28.67-33.711-31.997-39.508c-3.427-5.758-0.398-8.826,2.471-11.635c2.69-2.59,5.778-6.734,8.627-10.041 c2.969-3.287,3.905-5.638,5.798-9.424c1.913-3.905,0.936-7.192-0.478-10.141c-1.415-2.849-13.01-30.881-17.752-42.337 c-4.841-11.416-9.543-9.523-12.871-9.523c-3.467,0-7.212-0.478-11.117-0.478c-3.785,0-10.041,1.395-15.381,7.192 c-5.2,5.658-20.123,19.465-20.123,47.597c0,28.052,20.601,55.308,23.55,59.053c2.869,3.785,39.747,63.197,98.303,86.07 c58.476,22.872,58.476,15.321,69.115,14.365c10.38-0.956,34.069-13.867,38.811-27.096 C363.345,300.307,363.345,288.991,361.931,286.62z" fill="#4bc174"/>
5
+ </g>
6
+ <g>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ </svg>
dist/assets/img/x_icon.svg ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.65881 6.99817L13.6591 1.99791C14.1136 1.54334 14.1136 0.795496 13.6591 0.340927C13.2045 -0.113642 12.4567 -0.113642 12.0021 0.340927L7.00183 5.34119L2.00157 0.340927C1.547 -0.113642 0.799162 -0.113642 0.344593 0.340927C0.117308 0.568212 0 0.868814 0 1.16942C0 1.47002 0.117308 1.77062 0.344593 1.99791L5.34485 6.99817L0.344593 11.9984C0.117308 12.2257 0 12.5263 0 12.8269C0 13.1275 0.117308 13.4281 0.344593 13.6554C0.799162 14.11 1.547 14.11 2.00157 13.6554L7.00183 8.65515L12.0021 13.6554C12.4567 14.11 13.2045 14.11 13.6591 13.6554C14.1136 13.2008 14.1136 12.453 13.6591 11.9984L8.65881 6.99817Z" fill="white"/>
3
+ </svg>
dist/blocks.build.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";var r=n(2),o=(n.n(r),n(3)),l=(n.n(o),n(4)),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("ninjateam/nta-whatsapp",{title:a("WhatsApp Button"),icon:wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 32 32"},wp.element.createElement("path",{d:"M30.667,14.939c0,8.25-6.74,14.938-15.056,14.938c-2.639,0-5.118-0.675-7.276-1.857L0,30.667l2.717-8.017 c-1.37-2.25-2.159-4.892-2.159-7.712C0.559,6.688,7.297,0,15.613,0C23.928,0.002,30.667,6.689,30.667,14.939z M15.61,2.382 c-6.979,0-12.656,5.634-12.656,12.56c0,2.748,0.896,5.292,2.411,7.362l-1.58,4.663l4.862-1.545c2,1.312,4.393,2.076,6.963,2.076 c6.979,0,12.658-5.633,12.658-12.559C28.27,8.016,22.59,2.382,15.61,2.382z M23.214,18.38c-0.094-0.151-0.34-0.243-0.708-0.427 c-0.367-0.184-2.184-1.069-2.521-1.189c-0.34-0.123-0.586-0.185-0.832,0.182c-0.243,0.367-0.951,1.191-1.168,1.437 c-0.215,0.245-0.43,0.276-0.799,0.095c-0.369-0.186-1.559-0.57-2.969-1.817c-1.097-0.972-1.838-2.169-2.052-2.536 c-0.217-0.366-0.022-0.564,0.161-0.746c0.165-0.165,0.369-0.428,0.554-0.643c0.185-0.213,0.246-0.364,0.369-0.609 c0.121-0.245,0.06-0.458-0.031-0.643c-0.092-0.184-0.829-1.984-1.138-2.717c-0.307-0.732-0.614-0.611-0.83-0.611 c-0.215,0-0.461-0.03-0.707-0.03S9.897,8.215,9.56,8.582s-1.291,1.252-1.291,3.054c0,1.804,1.321,3.543,1.506,3.787 c0.186,0.243,2.554,4.062,6.305,5.528c3.753,1.465,3.753,0.976,4.429,0.914c0.678-0.062,2.184-0.885,2.49-1.739 C23.307,19.268,23.307,18.533,23.214,18.38z",fill:"currentColor"})),category:"widgets",keywords:[a("ninjateam"),a("whatsapp"),a("nta")],edit:l.a,save:function(){return null}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(5),i=n(6),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=wp.element,s=u.Component,p=u.Fragment,f=wp.components.ServerSideRender,m=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=(e.waPostType,e.attributes),n=e.setAttributes;return wp.element.createElement(p,null,wp.element.createElement(a.a,{attributes:t,setAttributes:n}),-1!=t.isSelectedAccount?wp.element.createElement(f,{block:"ninjateam/nta-whatsapp",attributes:t}):wp.element.createElement(i.a,{attributes:t,setAttributes:n}))}}]),t}(s);t.a=m},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=wp.element,c=i.Component,u=i.Fragment,s=wp.data.withSelect,p=wp.editor,f=p.InspectorControls,m=p.PanelColorSettings,w=wp.components,b=w.PanelBody,d=w.SelectControl,y=(w.Button,w.RadioControl),_=(w.Placeholder,w.Spinner,w.TextControl),h=wp.i18n.__,g=wp,v=(g.data,g.apiFetch,function(e){function t(){r(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state={isLoading:!0},e}return l(t,e),a(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.waPostType,r=t.attributes,o=t.setAttributes,l=(r.title,r.isSelectedAccount),a=r.buttonStyle,i=r.buttonColor,c=r.textColor,s=r.waUrl,p=this.state.isLoading;return new Promise(function(e,t){n&&-1!=n[0].id?e(n):t(null)}).then(function(t){-1!=n[0].id&&n.unshift({title:{rendered:"Custom Button"},id:-1}),e.setState({isLoading:!p})},function(e){}).catch(function(e){}),wp.element.createElement(u,null,wp.element.createElement(f,{key:"inspector"},wp.element.createElement(b,{title:h("Select Account:"),initialOpen:!1},n?wp.element.createElement("div",null,wp.element.createElement(d,{label:"Choose your account from list:",value:l,options:n.map(function(e){return{label:e.title.rendered,value:e.id}}),onChange:function(e){o({isSelectedAccount:e})}}),-1==l?wp.element.createElement(_,{label:"Enter your phone number:",value:s,pattern:"[0-9]*",onChange:function(e){return o({waUrl:e.replace(/\D/,"")})}}):null):null),-1==l?wp.element.createElement(b,{title:h("Button Style"),initialOpen:!1},wp.element.createElement(y,{help:"Choose style for button.",selected:a,options:[{label:"Round",value:"round"},{label:"Square",value:"square"}],onChange:function(e){return o({buttonStyle:e})}})):null,-1==l?wp.element.createElement(m,{initialOpen:!1,title:h("Button Color"),colorSettings:[{value:i,onChange:function(e){return o({buttonColor:e})},label:h("Background Color")},{value:c,onChange:function(e){return o({textColor:e})},label:h("Text Color")}]}):null))}}]),t}(c));t.a=s(function(e,t){return{waPostType:(0,e("core").getEntityRecords)("postType","whatsapp-accounts")}})(v)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=wp.element,c=i.Component,u=(i.Fragment,wp.components),s=u.IconButton,p=u.Toolbar,f=wp.editor,m=f.BlockControls,w=f.MediaUpload,b=(f.URLInput,f.PlainText),d=function(e){function t(){r(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.renderAvatar=function(){var t=e.props.attributes,n=t.imageUrl,r=t.plugin_dir;return n?wp.element.createElement("div",{className:"wa__cs_img"},wp.element.createElement("div",{className:"wa__cs_img_wrap",style:{background:"url("+n+") center center no-repeat"}})):wp.element.createElement("div",{className:"wa__btn_icon"},wp.element.createElement("img",{src:r+"dist/assets/img/whatsapp_logo.svg",alt:"img"}))},e.state={editLinkButton:!1},e}return l(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.imageID,o=t.imageUrl,l=t.buttonStyle,a=t.buttonColor,i=t.textColor,c=t.buttonTitle,u=t.buttonInfo,f=(this.state.editLinkButton,o?"wa__btn_w_img":"wa__btn_w_icon"),d="round"==l?"wa__r_button":"wa__sq_button";return wp.element.createElement("div",null,wp.element.createElement(m,null,wp.element.createElement(p,null,wp.element.createElement(w,{onSelect:function(e){n({imageAlt:e.alt,imageUrl:e.url,imageID:e.id})},type:"image",value:r,render:function(e){var t=e.open;return wp.element.createElement(s,{icon:"format-image",label:"Add button image",onClick:t})}}))),wp.element.createElement("div",null,wp.element.createElement("a",{className:"wa__button "+d+" wa__stt_online "+f,style:{backgroundColor:a,color:i}},this.renderAvatar(),wp.element.createElement("div",{className:"wa__btn_txt"},wp.element.createElement("div",{className:"wa__cs_info"},wp.element.createElement("div",{className:"wa__cs_name",style:{color:i}},wp.element.createElement(b,{style:{backgroundColor:a},onChange:function(e){return n({buttonInfo:e})},value:u,className:"nta-block-info",placeholder:"Add info here"}))),wp.element.createElement("div",{className:"wa__btn_title"},wp.element.createElement(b,{style:{backgroundColor:a},onChange:function(e){return n({buttonTitle:e})},value:c,className:"nta-block-title",placeholder:"Add title here"}))))))}}]),t}(c);t.a=d}]);
dist/blocks.editor.build.css ADDED
@@ -0,0 +1 @@
 
1
+ .wp-block-cgb-block-gunter-data{background:#bada55;border:0.2rem solid #292929;color:#292929;margin:0 auto;max-width:740px;padding:2rem}.wa__cs_img_wrap{background-size:cover !important}a.wa__button:hover,a.wa__button:focus{color:unset;-webkit-box-shadow:unset;box-shadow:unset}textarea.nta-block-info:focus,textarea.nta-block-title:focus,textarea.nta-block-info::-webkit-input-placeholder,textarea.nta-block-title::-webkit-input-placeholder{color:#fff}textarea.nta-block-info:focus,textarea.nta-block-title:focus,textarea.nta-block-info::-ms-input-placeholder,textarea.nta-block-title::-ms-input-placeholder{color:#fff}textarea.nta-block-info:focus,textarea.nta-block-title:focus,textarea.nta-block-info::placeholder,textarea.nta-block-title::placeholder{color:#fff}
gutenberg/init.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Blocks Initializer
4
+ *
5
+ * Enqueue CSS/JS of all the blocks.
6
+ *
7
+ * @since 1.0.0
8
+ * @package CGB
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ if (!defined('ABSPATH')) {
13
+ exit;
14
+ }
15
+
16
+ /**
17
+ * Enqueue Gutenberg block assets for both frontend + backend.
18
+ *
19
+ * @uses {wp-editor} for WP editor styles.
20
+ * @since 1.0.0
21
+ */
22
+ // function nta_whatsapp_block_assets()
23
+ // { // phpcs:ignore
24
+ // // Styles.
25
+ // wp_enqueue_style(
26
+ // 'nta_whatsapp-style-css', // Handle.
27
+ // plugins_url('dist/blocks.style.build.css', dirname(__FILE__)), // Block style CSS.
28
+ // array('wp-editor') // Dependency to include the CSS after it.
29
+ // // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css' ) // Version: File modification time.
30
+ // );
31
+ // }
32
+
33
+ // Hook: Frontend assets.
34
+ // add_action('enqueue_block_assets', 'nta_whatsapp_block_assets');
35
+
36
+ /**
37
+ * Enqueue Gutenberg block assets for backend editor.
38
+ *
39
+ * @uses {wp-blocks} for block type registration & related functions.
40
+ * @uses {wp-element} for WP Element abstraction — structure of blocks.
41
+ * @uses {wp-i18n} to internationalize the block's text.
42
+ * @uses {wp-editor} for WP editor styles.
43
+ * @since 1.0.0
44
+ */
45
+ function nta_whatsapp_editor_assets()
46
+ { // phpcs:ignore
47
+ // Scripts.
48
+ wp_enqueue_script(
49
+ 'nta_whatsapp-block-js', // Handle.
50
+ plugins_url('/dist/blocks.build.js', dirname(__FILE__)), // Block.build.js: We register the block here. Built with Webpack.
51
+ array('wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor', 'wp-components'), // Dependencies, defined above.
52
+ // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: File modification time.
53
+ true// Enqueue the script in the footer.
54
+ );
55
+
56
+ // Styles.
57
+ wp_enqueue_style(
58
+ 'nta_whatsapp-block-editor-css', // Handle.
59
+ plugins_url('dist/blocks.editor.build.css', dirname(__FILE__)), // Block editor CSS.
60
+ array('wp-edit-blocks') // Dependency to include the CSS after it.
61
+ // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css' ) // Version: File modification time.
62
+ );
63
+
64
+ wp_enqueue_style('nta-css-block-button', plugins_url('dist/assets/css/style.css', dirname(__FILE__)));
65
+ }
66
+
67
+ // Hook: Editor assets.
68
+ add_action('enqueue_block_editor_assets', 'nta_whatsapp_editor_assets');
69
+
70
+ add_action('rest_api_init', 'nta_whatsapp_posts_meta_field');
71
+
72
+ function nta_whatsapp_posts_meta_field()
73
+ {
74
+ register_rest_field('whatsapp-accounts', 'post-meta-fields', array(
75
+ 'get_callback' => 'nta_whatsapp_post_meta_for_api',
76
+ 'schema' => null)
77
+ );
78
+ }
79
+
80
+ function nta_whatsapp_post_meta_for_api($object)
81
+ {
82
+ $post_id = $object['id'];
83
+ $data = get_post_meta($post_id, 'nta_whatsapp_accounts', true);
84
+ return $data;
85
+ }
86
+
87
+ function nta_render_block_core_whatsapp($attributes)
88
+ {
89
+ if ($attributes['isSelectedAccount'] != -1) {
90
+ return do_shortcode("[njwa_button id={$attributes['isSelectedAccount']}]");
91
+ } else {
92
+ $avatarClass = $attributes['imageUrl'] ? "wa__btn_w_img" : "wa__btn_w_icon";
93
+ $btnStyleClass = $attributes['buttonStyle'] == "round" ? "wa__r_button" : "wa__sq_button";
94
+ $btn_icon_or_image = '';
95
+ if (!$attributes['imageUrl']) {
96
+ $btn_icon_or_image = '<div class="wa__btn_icon"><img src="' . NTA_WHATSAPP_PLUGIN_URL . 'dist/assets/img/whatsapp_logo.svg' . '" alt=""/></div>';
97
+ } else {
98
+ $btn_icon_or_image = '<div class="wa__cs_img"><div class="wa__cs_img_wrap" style="background: url(' . $attributes['imageUrl'] . ') center center no-repeat; background-size: cover;"></div></div>';
99
+ }
100
+ $html = '';
101
+ $html .= '<div style="margin: 30px 0 30px;">';
102
+ $html .= '<a target="_blank" href="https://web.whatsapp.com/send?phone=' . $attributes['waUrl'] . '" class="wa__button ' . $btnStyleClass . ' wa__stt_online ' . $avatarClass . '" style="background-color: ' . $attributes['buttonColor'] . '; color: ' . $attributes['textColor'] . '">';
103
+ $html .= $btn_icon_or_image;
104
+ $html .= '<div class="wa__btn_txt"><div class="wa__cs_info">';
105
+ $html .= '<div class="wa__cs_name" style="color: ' . $attributes['textColor'] . '">' . $attributes['buttonInfo'] . '</div>';
106
+ $html .= '<div class="wa__cs_status">Online</div></div>';
107
+ $html .= '<div class="wa__btn_title">' . $attributes['buttonTitle'] . '</div></div></a></div>';
108
+ return $html;
109
+ }
110
+ }
111
+
112
+ function nta_register_block_core_whatsapp()
113
+ {
114
+ register_block_type(
115
+ 'ninjateam/nta-whatsapp',
116
+ array(
117
+ 'attributes' => array(
118
+ 'isSelectedAccount' => array(
119
+ 'type' => 'string',
120
+ 'default' => -1,
121
+ ),
122
+ 'title' => array(
123
+ 'type' => 'string',
124
+ 'default' => "THu ne",
125
+ ),
126
+ 'imageID' => array(
127
+ 'type' => 'string',
128
+ 'default' => "",
129
+ ),
130
+ 'imageAlt' => array(
131
+ 'type' => 'string',
132
+ 'default' => "img",
133
+ ),
134
+ 'imageUrl' => array(
135
+ 'type' => 'string',
136
+ 'default' => "",
137
+ ),
138
+ 'buttonStyle' => array(
139
+ 'type' => 'string',
140
+ 'default' => "round",
141
+ ),
142
+ 'buttonColor' => array(
143
+ 'type' => 'string',
144
+ 'default' => "#2DB742",
145
+ ),
146
+ 'buttonTitle' => array(
147
+ 'type' => 'string',
148
+ 'default' => "",
149
+ ),
150
+ 'buttonInfo' => array(
151
+ 'type' => 'string',
152
+ 'default' => "",
153
+ ),
154
+ 'textColor' => array(
155
+ 'type' => 'string',
156
+ 'default' => "#fff",
157
+ ),
158
+ 'waUrl' => array(
159
+ 'type' => 'string',
160
+ 'default' => "",
161
+ ),
162
+ 'className' => array(
163
+ 'type' => 'string',
164
+ ),
165
+ 'plugin_dir' => array(
166
+ 'type' => 'string',
167
+ 'default' => NTA_WHATSAPP_PLUGIN_URL,
168
+ ),
169
+ ),
170
+ 'editor_script' => 'njwa_button',
171
+ 'render_callback' => 'nta_render_block_core_whatsapp',
172
+ )
173
+ );
174
+ //add_shortcode('njwa_button', 'render_block_core_whatsapp');
175
+ }
176
+ add_action('init', 'nta_register_block_core_whatsapp');
images/bar-sortable.svg ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generated by IcoMoon.io -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="512px" height="512px" viewBox="0 0 16 16">
5
+ <path fill="#9e9e9e" d="M0 1h16v3h-16v-3z"/>
6
+ <path fill="#9e9e9e" d="M0 6h16v3h-16v-3z"/>
7
+ <path fill="#9e9e9e" d="M0 11h16v3h-16v-3z"/>
8
+ </svg>
images/whatsapp-menu.svg ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 30.667 30.667" style="enable-background:new 0 0 30.667 30.667;" xml:space="preserve">
5
+ <g>
6
+ <path d="M30.667,14.939c0,8.25-6.74,14.938-15.056,14.938c-2.639,0-5.118-0.675-7.276-1.857L0,30.667l2.717-8.017 c-1.37-2.25-2.159-4.892-2.159-7.712C0.559,6.688,7.297,0,15.613,0C23.928,0.002,30.667,6.689,30.667,14.939z M15.61,2.382 c-6.979,0-12.656,5.634-12.656,12.56c0,2.748,0.896,5.292,2.411,7.362l-1.58,4.663l4.862-1.545c2,1.312,4.393,2.076,6.963,2.076 c6.979,0,12.658-5.633,12.658-12.559C28.27,8.016,22.59,2.382,15.61,2.382z M23.214,18.38c-0.094-0.151-0.34-0.243-0.708-0.427 c-0.367-0.184-2.184-1.069-2.521-1.189c-0.34-0.123-0.586-0.185-0.832,0.182c-0.243,0.367-0.951,1.191-1.168,1.437 c-0.215,0.245-0.43,0.276-0.799,0.095c-0.369-0.186-1.559-0.57-2.969-1.817c-1.097-0.972-1.838-2.169-2.052-2.536 c-0.217-0.366-0.022-0.564,0.161-0.746c0.165-0.165,0.369-0.428,0.554-0.643c0.185-0.213,0.246-0.364,0.369-0.609 c0.121-0.245,0.06-0.458-0.031-0.643c-0.092-0.184-0.829-1.984-1.138-2.717c-0.307-0.732-0.614-0.611-0.83-0.611 c-0.215,0-0.461-0.03-0.707-0.03S9.897,8.215,9.56,8.582s-1.291,1.252-1.291,3.054c0,1.804,1.321,3.543,1.506,3.787 c0.186,0.243,2.554,4.062,6.305,5.528c3.753,1.465,3.753,0.976,4.429,0.914c0.678-0.062,2.184-0.885,2.49-1.739 C23.307,19.268,23.307,18.533,23.214,18.38z" fill="#FFFFFF"/>
7
+ </g>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ <g>
37
+ </g>
38
+ </svg>
images/whatsapp.svg ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
5
+ <path style="fill:#EDEDED;" d="M0,512l35.31-128C12.359,344.276,0,300.138,0,254.234C0,114.759,114.759,0,255.117,0
6
+ S512,114.759,512,254.234S395.476,512,255.117,512c-44.138,0-86.51-14.124-124.469-35.31L0,512z"/>
7
+ <path style="fill:#55CD6C;" d="M137.71,430.786l7.945,4.414c32.662,20.303,70.621,32.662,110.345,32.662
8
+ c115.641,0,211.862-96.221,211.862-213.628S371.641,44.138,255.117,44.138S44.138,137.71,44.138,254.234
9
+ c0,40.607,11.476,80.331,32.662,113.876l5.297,7.945l-20.303,74.152L137.71,430.786z"/>
10
+ <path style="fill:#FEFEFE;" d="M187.145,135.945l-16.772-0.883c-5.297,0-10.593,1.766-14.124,5.297
11
+ c-7.945,7.062-21.186,20.303-24.717,37.959c-6.179,26.483,3.531,58.262,26.483,90.041s67.09,82.979,144.772,105.048
12
+ c24.717,7.062,44.138,2.648,60.028-7.062c12.359-7.945,20.303-20.303,22.952-33.545l2.648-12.359
13
+ c0.883-3.531-0.883-7.945-4.414-9.71l-55.614-25.6c-3.531-1.766-7.945-0.883-10.593,2.648l-22.069,28.248
14
+ c-1.766,1.766-4.414,2.648-7.062,1.766c-15.007-5.297-65.324-26.483-92.69-79.448c-0.883-2.648-0.883-5.297,0.883-7.062
15
+ l21.186-23.834c1.766-2.648,2.648-6.179,1.766-8.828l-25.6-57.379C193.324,138.593,190.676,135.945,187.145,135.945"/>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ <g>
37
+ </g>
38
+ <g>
39
+ </g>
40
+ <g>
41
+ </g>
42
+ <g>
43
+ </g>
44
+ <g>
45
+ </g>
46
+ </svg>
includes/Helper.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!function_exists('add_action')) {
3
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
4
+ exit;
5
+ }
6
+ class NTA_Helper
7
+ {
8
+ public static function print_date($array_data)
9
+ {
10
+ $date_string = "";
11
+ if ($array_data['nta_sunday'] == 'checked') {
12
+ $date_string .= 'Sunday';
13
+ }
14
+
15
+ if ($array_data['nta_monday'] == 'checked') {
16
+ $date_string .= ', Monday';
17
+ }
18
+
19
+ if ($array_data['nta_tuesday'] == 'checked') {
20
+ $date_string .= ', Tuesday';
21
+ }
22
+
23
+ if ($array_data['nta_wednesday'] == 'checked') {
24
+ $date_string .= ', Wednesday';
25
+ }
26
+
27
+ if ($array_data['nta_thursday'] == 'checked') {
28
+ $date_string .= ', Thursday';
29
+ }
30
+
31
+ if ($array_data['nta_friday'] == 'checked') {
32
+ $date_string .= ', Friday';
33
+ }
34
+
35
+ if ($array_data['nta_saturday'] == 'checked') {
36
+ $date_string .= ', Saturday';
37
+ }
38
+
39
+ $date_string = trim($date_string, ',');
40
+ return $date_string;
41
+ }
42
+
43
+ public static function getValueOrDefault($object, $objectKey, $defaultValue = '')
44
+ {
45
+ return (isset($object[$objectKey]) ? $object[$objectKey] : $defaultValue);
46
+ }
47
+
48
+ public static function get_times($default = '08:00', $interval = '+30 minutes')
49
+ {
50
+
51
+ $output = '';
52
+
53
+ $current = strtotime('00:00');
54
+ $end = strtotime('23:59');
55
+
56
+ while ($current <= $end) {
57
+ $time = date('H:i', $current);
58
+ $sel = ($time == $default) ? ' selected' : '';
59
+
60
+ $output .= "<option value=\"{$time}\"{$sel}>" . date('H:i', $current) . '</option>';
61
+ $current = strtotime($interval, $current);
62
+ }
63
+ $sel = ($default === '23:59') ? ' selected' : '';
64
+ $output .= "<option value=\"23:59\"{$sel}>" . '23:59' . '</option>';
65
+ return $output;
66
+ }
67
+
68
+ public static function sanitize_array($input)
69
+ {
70
+ // Initialize the new array that will hold the sanitize values
71
+ $new_input = array();
72
+ // Loop through the input and sanitize each of the values
73
+ foreach ($input as $key => $val) {
74
+ $new_input[$key] = (isset($input[$key])) ? sanitize_text_field($val) : '';
75
+ }
76
+ return $new_input;
77
+ }
78
+
79
+ public static function get_back_time($account_info)
80
+ {
81
+ // IF CHECKED ALWAYS AVAILABLE
82
+ if (isset($account_info['nta_button_available']) && $account_info['nta_button_available'] == 'ON') {
83
+ return 'online';
84
+ }
85
+
86
+ // $todayDayOfWeek = current_time('l');
87
+ // $timeNow = current_time('H:i');
88
+ // $timeNow = new DateTime($timeNow);
89
+ // $todayDayOfWeek = strtolower(date("l", strtotime(current_time('mysql'))));
90
+ // $timeNow = new DateTime(current_time('mysql'));
91
+
92
+ $timezone = get_option('timezone_string');
93
+ if (!empty($timezone)) {
94
+ $timezone = new \DateTimeZone($timezone);
95
+ $timeNow = new \DateTime(current_time('mysql'), $timezone);
96
+ $dateTime = new \DateTime('now', $timezone);
97
+ $todayDayOfWeek = strtolower($dateTime->format('l'));
98
+ } else {
99
+ $timeNow = new \DateTime(current_time('mysql'));
100
+ $todayDayOfWeek = strtolower(date("l", strtotime(current_time('mysql'))));
101
+ }
102
+
103
+ $getTimeWorking = explode("-", $account_info["nta_{$todayDayOfWeek}_working"]);
104
+
105
+ if (!empty($timezone)) {
106
+ $start = new \DateTime($getTimeWorking[0], $timezone);
107
+ $end = new \DateTime($getTimeWorking[1], $timezone);
108
+ } else {
109
+ $start = new \DateTime($getTimeWorking[0]);
110
+ $end = new \DateTime($getTimeWorking[1]);
111
+ }
112
+
113
+ if ($account_info["nta_{$todayDayOfWeek}"] == 'checked') {
114
+ $hours = $start->diff($timeNow);
115
+ if ($timeNow >= $start && $timeNow <= $end) {
116
+ return 'online';
117
+ } else if ($timeNow < $start) {
118
+ return $hours->format("%h:%i");
119
+ }
120
+ }
121
+ return 'offline';
122
+ }
123
+ }
includes/nta-whatsapp-ads.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!function_exists('add_action')) {
3
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
4
+ exit;
5
+ }
6
+ class NTA_ADS
7
+ {
8
+ protected static $instance = null;
9
+
10
+ public static function getInstance()
11
+ {
12
+ if (null == self::$instance) {
13
+ self::$instance = new self;
14
+ }
15
+ return self::$instance;
16
+ }
17
+
18
+
19
+ public function __construct()
20
+ {
21
+ if (!defined('NJT_FILEBIRD_VERSION') && !defined('NJFB_VERSION')) {
22
+ $option = get_option('njt_wa_ads');
23
+ if (!$option || time() >= $option['date']) {
24
+ add_action('admin_notices', array($this, 'renderNotice'));
25
+ add_action('wp_ajax_njt_wa_ads_save', array($this, 'save_ads_status'));
26
+ }
27
+ }
28
+ }
29
+
30
+ public function save_ads_status()
31
+ {
32
+ $isMyAjax = isset($_POST['action']) && sanitize_text_field($_POST['action']) == 'njt_wa_ads_save';
33
+ if ($isMyAjax) {
34
+ $nonce = sanitize_text_field($_POST['nonce']);
35
+ if (!wp_verify_nonce($nonce, 'ajax-nonce')) {
36
+ wp_send_json_error(array('status' => 'Nonce error'));
37
+ return;
38
+ }
39
+ }
40
+ //Save after 30 days
41
+ $arr = ['date' => time() + (30 * 60 * 60 * 24)];
42
+ update_option('njt_wa_ads', $arr);
43
+ wp_send_json_success();
44
+ }
45
+
46
+ public function renderNotice()
47
+ {
48
+ if (function_exists('get_current_screen')) {
49
+ $screen = get_current_screen();
50
+ if ($screen->id != 'upload' && $screen->id != 'plugins') {
51
+ return;
52
+ }
53
+ }
54
+ $plugin_slug = 'filebird';
55
+ if (function_exists('current_user_can') && current_user_can('install_plugins')) {
56
+ $nonce = wp_create_nonce('install-plugin_' . $plugin_slug);
57
+ $url = self_admin_url('update.php?action=install-plugin&plugin=' . $plugin_slug . '&_wpnonce=' . $nonce);
58
+ } else {
59
+ $url = admin_url('plugin-install.php?s=filebird+ninjateam&tab=search&type=term');
60
+ }
61
+ ?>
62
+ <div class="notice notice-info is-dismissible" id="njt-wa-ads-wrapper">
63
+ <p>
64
+ <?php _e('To easily manage your files in WordPress media library with folders, please try to use FileBird plugin.', 'ninjateam-whatsapp') ?>
65
+ <div>
66
+ <a class="button button-primary" target="_blank" href="<?php echo esc_url($url) ?>">
67
+ <strong><?php _e('I\'m feeling lucky', 'ninjateam-whatsapp') ?></strong>
68
+ </a>
69
+ <a class="button button-primary" target="_blank" href="<?php echo esc_url('https://1.envato.market/FileBird3') ?>">
70
+ <strong><?php _e('Go FileBird Pro', 'ninjateam-whatsapp') ?></strong>
71
+ </a>
72
+ <a class="button button-secondary" href="javascript:;" id="njt-wa-ads">
73
+ <?php _e('No, thanks', 'ninjateam-whatsapp') ?>
74
+ </a>
75
+ </div>
76
+ </p>
77
+ </div>
78
+ <script>
79
+ jQuery(document).ready(function() {
80
+ jQuery('#njt-wa-ads').click(function() {
81
+ jQuery.ajax({
82
+ url: ajaxurl,
83
+ type: 'POST',
84
+ dataType: 'json',
85
+ data: {
86
+ 'action': 'njt_wa_ads_save',
87
+ 'nonce': window.nta.njt_wa_nonce
88
+ }
89
+ }).done(function(result) {
90
+ if (result.success) {
91
+ jQuery('#njt-wa-ads-wrapper').hide('slow')
92
+ } else {
93
+ console.log("Error", result.data.status)
94
+ }
95
+ });
96
+ })
97
+ });
98
+ </script>
99
+ <?php
100
+ }
101
+ }
includes/nta-whatsapp-class.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!function_exists('add_action')) {
4
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
5
+ exit;
6
+ }
7
+
8
+ class NTA_Whatsapp
9
+ {
10
+ protected static $instance = null;
11
+
12
+ public static function getInstance()
13
+ {
14
+ if (null == self::$instance) {
15
+ self::$instance = new self;
16
+ }
17
+ return self::$instance;
18
+ }
19
+
20
+ public function __construct()
21
+ {
22
+ NTA_Whatsapp_Shortcode::getInstance();
23
+ NTA_Whatsapp_Popup::getInstance();
24
+ NTA_Whatsapp_Setting::getInstance();
25
+ NTA_Whatsapp_PostType::getInstance();
26
+ NTA_Whatsapp_Woocommerce::getInstance();
27
+ NTA_Whatsapp_Wpml::getInstance();
28
+ NTA_ADS::getInstance();
29
+ }
30
+
31
+ public function activation_hook()
32
+ {
33
+
34
+ }
35
+
36
+ public function deactivation_hook()
37
+ {
38
+
39
+ }
40
+ }
includes/nta-whatsapp-popup.php ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!function_exists('add_action')) {
3
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
4
+ exit;
5
+ }
6
+ class NTA_Whatsapp_Popup
7
+ {
8
+ protected static $instance = null;
9
+ protected $nta_WA_Post_Instance;
10
+
11
+ public static function getInstance()
12
+ {
13
+ if (null == self::$instance) {
14
+ self::$instance = new self;
15
+ }
16
+ return self::$instance;
17
+ }
18
+
19
+ public function __construct()
20
+ {
21
+ $this->nta_WA_Post_Instance = NTA_Whatsapp_PostType::getInstance();
22
+
23
+ add_action('wp_enqueue_scripts', [$this, 'enqueue_scripts_styles']);
24
+ add_action('wp_head', [$this, 'popup_style_setting']);
25
+ add_action('init', [$this,'show_widget']);
26
+ }
27
+
28
+ public function show_widget(){
29
+ $availableAccount = get_option('nta_whatsapp_available_account', 0);
30
+ $showWidgetScreen = $this->check_Show_On_Screen();
31
+
32
+ if ((int)$availableAccount > 0) {
33
+ if (wp_is_mobile() && $showWidgetScreen['show_on_mobile'])
34
+ add_action('wp_footer', [$this, 'show_popup_view']);
35
+ else if (!wp_is_mobile() && $showWidgetScreen['show_on_desktop']) {
36
+ add_action('wp_footer', [$this, 'show_popup_view']);
37
+ } else if ($showWidgetScreen['show_on_mobile'] && $showWidgetScreen['show_on_desktop']) {
38
+ add_action('wp_footer', [$this, 'show_popup_view']);
39
+ }
40
+ }
41
+ }
42
+
43
+ public function enqueue_scripts_styles(){
44
+ wp_register_style('nta-css-popup', NTA_WHATSAPP_PLUGIN_URL . 'assets/css/style.css');
45
+ wp_enqueue_style('nta-css-popup');
46
+ wp_style_add_data('nta-css-popup', 'rtl', 'replace');
47
+
48
+ wp_register_script('nta-js-popup', NTA_WHATSAPP_PLUGIN_URL . 'assets/js/main.js', ['jquery']);
49
+ wp_localize_script('nta-js-popup', 'ntaWA', [
50
+ 'ga' => get_option('nta_wa_ga_setting', '0') == '1' ? true : false,
51
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
52
+ 'nonce' => wp_create_nonce('ajax-nonce')
53
+ ]);
54
+ wp_enqueue_script('nta-js-popup');
55
+ }
56
+
57
+ public function check_Show_On_Screen()
58
+ {
59
+ $setting = get_option('nta_whatsapp_setting');
60
+ if ($setting == false) {
61
+ return array('show_on_desktop' => true, 'show_on_mobile' => true);
62
+ }
63
+
64
+ $showOnDesktop = false;
65
+ $showOnMobile = false;
66
+ if (isset($setting['show_on_desktop']) && $setting['show_on_desktop'] == 'ON') {
67
+ $showOnDesktop = true;
68
+ }
69
+
70
+ if (isset($setting['show_on_mobile']) && $setting['show_on_mobile'] == 'ON') {
71
+ $showOnMobile = true;
72
+ }
73
+
74
+ return array('show_on_desktop' => $showOnDesktop, 'show_on_mobile' => $showOnMobile);
75
+ }
76
+
77
+ public function check_Show_Pages_Widget()
78
+ {
79
+ global $wp_query;
80
+
81
+ //$post_id = (isset($wp_query->post) ? $wp_query->post->ID : '');
82
+ // global $post;
83
+
84
+ // $post_id = $post->ID ? $post->ID : '';
85
+ // if (empty($post_id)) {
86
+ // return false;
87
+ // }
88
+ $post_id = get_the_ID();
89
+
90
+ $option = get_option("nta_whatsapp_setting");
91
+ if ($option && isset($option['display-pages'])) {
92
+ $type = $option['display-pages'];
93
+ if (isset($option['nta-wa-hide-pages']) && $type == 'hide') {
94
+ $all_page = $option['nta-wa-hide-pages'];
95
+ if (is_array($all_page) && is_page() && in_array($post_id, $all_page)) {
96
+ return false;
97
+ }
98
+ } else if (isset($option['nta-wa-show-pages']) && $type == 'show') {
99
+ $all_page = $option['nta-wa-show-pages'];
100
+ if (is_array($all_page) && is_page() && in_array($post_id, $all_page)) {
101
+ return true;
102
+ } else {
103
+ return false;
104
+ }
105
+ }
106
+ }
107
+
108
+ return true;
109
+ }
110
+
111
+ public function show_popup_view()
112
+ {
113
+ //prevent Oxygen builder
114
+ if (isset( $_GET['ct_builder'] ) && !isset( $_GET['oxygen_iframe'] )) {
115
+ return;
116
+ }
117
+
118
+ if ($this->check_Show_Pages_Widget() == false) {
119
+ return;
120
+ }
121
+
122
+ $option = get_option('nta_whatsapp_setting');
123
+ if (empty($option)) {
124
+ $option['widget_name'] = 'Start a Conversation';
125
+ $option['widget_description'] = 'Hi! Click one of our member below to chat on <strong>WhatsApp</strong>';
126
+ $option['widget_label'] = 'Need Help? <strong>Chat with us</strong>';
127
+ $option['widget_responseText'] = 'The team typically replies in a few minutes.';
128
+ $option['widget_gdpr'] = 'Please accept our <a href="https://ninjateam.org/privacy-policy/">privacy policy</a> first to start a conversation.';
129
+ } else {
130
+ $option['widget_responseText'] = NTA_Helper::getValueOrDefault($option, 'widget_responseText', 'The team typically replies in a few minutes.');
131
+ $option['widget_gdpr'] = NTA_Helper::getValueOrDefault($option, 'widget_gdpr', 'Please accept our <a href="https://ninjateam.org/privacy-policy/">privacy policy</a> first to start a conversation.');
132
+ }
133
+
134
+ //Show GDPR alert
135
+ $option['widget_gdpr_status'] = false;
136
+
137
+ if (isset($_COOKIE["nta-wa-gdpr"]) && $_COOKIE["nta-wa-gdpr"] == 'accept') {
138
+ $option['widget_gdpr_status'] = true;
139
+ };
140
+
141
+ if (!isset($option['show_gdpr'])) {
142
+ $option['widget_gdpr_status'] = true;
143
+ }
144
+
145
+ //Show Account Data
146
+ $account_list = $this->nta_WA_Post_Instance->get_posts();
147
+
148
+ $account_list_view = array();
149
+ foreach ($account_list as $account) {
150
+ $get_data = get_post_meta($account->ID, 'nta_whatsapp_accounts', true);
151
+
152
+ if ($get_data['nta_active'] != 'none') {
153
+ $account_list_view[$account->ID] = array(
154
+ 'account_id' => $account->ID,
155
+ 'post_title' => $account->post_title,
156
+ 'nta_group_number' => $get_data['nta_group_number'],
157
+ 'nta_predefined_text' => $get_data['nta_predefined_text'],
158
+ 'nta_over_time' => $get_data['nta_over_time'],
159
+ 'nta_title' => $get_data['nta_title'],
160
+ 'nta_active' => $get_data['nta_active'],
161
+ 'nta_offline_text' => $get_data['nta_offline_text'],
162
+ 'nta_sunday' => $get_data['nta_sunday'],
163
+ 'nta_sunday_working' => $get_data['nta_sunday_working'],
164
+ 'nta_monday' => $get_data['nta_monday'],
165
+ 'nta_monday_working' => $get_data['nta_monday_working'],
166
+ 'nta_tuesday' => $get_data['nta_tuesday'],
167
+ 'nta_tuesday_working' => $get_data['nta_tuesday_working'],
168
+ 'nta_wednesday' => $get_data['nta_wednesday'],
169
+ 'nta_wednesday_working' => $get_data['nta_wednesday_working'],
170
+ 'nta_thursday' => $get_data['nta_thursday'],
171
+ 'nta_thursday_working' => $get_data['nta_thursday_working'],
172
+ 'nta_friday' => $get_data['nta_friday'],
173
+ 'nta_friday_working' => $get_data['nta_friday_working'],
174
+ 'nta_saturday' => $get_data['nta_saturday'],
175
+ 'nta_saturday_working' => $get_data['nta_saturday_working'],
176
+ 'position' => $get_data['position'],
177
+ 'avatar' => get_the_post_thumbnail_url($account->ID),
178
+ 'nta_button_available' => isset($get_data['nta_button_available']) ? 'ON' : 'OFF'
179
+ );
180
+ }
181
+ }
182
+ usort($account_list_view, function ($first, $second) {
183
+ return $first['position'] > $second['position'];
184
+ });
185
+
186
+ //Check redirect on mobile or desktop
187
+ $link_to_app = 'web';
188
+ if (wp_is_mobile()) {
189
+ $link_to_app = 'api';
190
+ }
191
+
192
+ require NTA_WHATSAPP_PLUGIN_DIR . 'views/nta-whatsapp-widget-view.php';
193
+ }
194
+
195
+ public function popup_style_setting()
196
+ {
197
+ $option = get_option('nta_whatsapp_setting');
198
+ if (empty($option)) {
199
+ $option['text_color'] = '#fff';
200
+ $option['back_color'] = '#2db742';
201
+ $option['widget_position'] = 'right';
202
+ }
203
+ ?>
204
+ <style>
205
+ .wa__stt_offline {
206
+ pointer-events: none;
207
+ }
208
+
209
+ .wa__button_text_only_me .wa__btn_txt {
210
+ padding-top: 16px !important;
211
+ padding-bottom: 15px !important;
212
+ }
213
+
214
+ .wa__popup_content_item .wa__cs_img_wrap {
215
+ width: 48px;
216
+ height: 48px;
217
+ }
218
+
219
+ .wa__popup_chat_box .wa__popup_heading {
220
+ background: <?php echo $option['back_color'] ?>;
221
+ }
222
+
223
+ .wa__btn_popup .wa__btn_popup_icon {
224
+ background: <?php echo $option['back_color'] ?>;
225
+ }
226
+
227
+ .wa__popup_chat_box .wa__stt {
228
+ border-left: 2px solid <?php echo $option['back_color'] ?>;
229
+ }
230
+
231
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_title {
232
+ color: <?php echo $option['text_color'] ?>;
233
+ }
234
+
235
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro {
236
+ color: <?php echo $option['text_color'] ?>;
237
+ opacity: 0.8;
238
+ }
239
+
240
+ .wa__popup_chat_box .wa__popup_heading .wa__popup_intro strong {}
241
+
242
+ <?php if ($option['widget_position'] == 'left') : ?>.wa__btn_popup {
243
+ left: 30px;
244
+ right: unset;
245
+ }
246
+
247
+ .wa__btn_popup .wa__btn_popup_txt {
248
+ left: 100%;
249
+ }
250
+
251
+ .wa__popup_chat_box {
252
+ left: 25px;
253
+ }
254
+
255
+ <?php endif; ?>
256
+ </style>
257
+ <?php
258
+ }
259
+ }
includes/nta-whatsapp-post-type.php ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!function_exists('add_action')) {
3
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
4
+ exit;
5
+ }
6
+
7
+ class NTA_Whatsapp_PostType
8
+ {
9
+ protected static $instance = null;
10
+
11
+ public static function getInstance()
12
+ {
13
+ if (null == self::$instance) {
14
+ self::$instance = new self;
15
+ }
16
+ return self::$instance;
17
+ }
18
+
19
+ public function __construct()
20
+ {
21
+
22
+ add_action('init', function () {
23
+
24
+ $labels = array(
25
+ 'name' => __('WhatsApp Accounts'),
26
+ 'singular_name' => __('Whatsapp Account'),
27
+ 'add_new' => __('Add New Account', 'ninjateam-whatsapp'),
28
+ 'add_new_item' => __('Add New Account', 'ninjateam-whatsapp'),
29
+ 'edit_item' => __('Edit Account', 'ninjateam-whatsapp'),
30
+ 'new_item' => __('New Account', 'ninjateam-whatsapp'),
31
+ 'all_items' => __('All Accounts', 'ninjateam-whatsapp'),
32
+ 'view_item' => __('View Accounts', 'ninjateam-whatsapp'),
33
+ 'search_items' => __('Search Account', 'ninjateam-whatsapp'),
34
+ 'featured_image' => __('Avatar', 'ninjateam-whatsapp'),
35
+ 'set_featured_image' => __('Select an image', 'ninjateam-whatsapp'),
36
+ 'remove_featured_image' => __('Remove avatar', 'ninjateam-whatsapp'),
37
+ );
38
+
39
+ $args = array(
40
+ 'labels' => $labels,
41
+ 'description' => __('Manager Accounts', 'ninjateam-whatsapp'),
42
+ 'public' => false,
43
+ 'show_ui' => true,
44
+ 'has_archive' => true,
45
+ 'show_in_admin_bar' => false,
46
+ 'show_in_rest' => true,
47
+ 'show_in_menu' => 'nta_whatsapp',
48
+ 'menu_position' => 100,
49
+ 'query_var' => 'whatsapp-accounts',
50
+ 'supports' => array(
51
+ 'title',
52
+ 'thumbnail',
53
+ ),
54
+ 'capabilities' => array(
55
+ 'edit_post' => 'manage_options',
56
+ 'read_post' => 'manage_options',
57
+ 'delete_post' => 'manage_options',
58
+ 'edit_posts' => 'manage_options',
59
+ 'edit_others_posts' => 'manage_options',
60
+ 'delete_posts' => 'manage_options',
61
+ 'publish_posts' => 'manage_options',
62
+ 'read_private_posts' => 'manage_options'
63
+ ),
64
+ );
65
+ register_post_type('whatsapp-accounts', $args);
66
+ });
67
+
68
+ add_action('save_post', [$this, 'save_account'], 10, 2);
69
+
70
+ add_action('add_meta_boxes', function () {
71
+ add_meta_box('whatsapp-account-info', 'WhatsApp Account Information', [$this, 'meta_form_account'], 'whatsapp-accounts', 'normal');
72
+ add_meta_box('whatsapp-button-style', 'Button Style', [$this, 'meta_form_button_style'], 'whatsapp-accounts', 'normal');
73
+ $current_screen = get_current_screen();
74
+ if ($current_screen->action != 'add') {
75
+ add_meta_box('whatsapp-button-shortcode', 'Shortcode for this account', [$this, 'account_shortcode_form'], 'whatsapp-accounts', 'side');
76
+ }
77
+ });
78
+
79
+ add_filter('manage_whatsapp-accounts_posts_columns', [$this, 'manager_accounts_columns'], 10, 1);
80
+
81
+ add_action('manage_whatsapp-accounts_posts_custom_column', [$this, 'manager_accounts_show_columns'], 10, 2);
82
+ add_filter('enter_title_here', 'my_title_place_holder', 20, 2);
83
+
84
+ function my_title_place_holder($title, $post)
85
+ {
86
+ if ($post->post_type == 'whatsapp-accounts') {
87
+ $my_title = "Account Name";
88
+ return $my_title;
89
+ }
90
+
91
+ return $title;
92
+ }
93
+
94
+ }
95
+
96
+ public function get_posts(){
97
+
98
+ $defaultArgs = array(
99
+ 'post_type' => 'whatsapp-accounts',
100
+ 'post_status' => 'publish',
101
+ 'numberposts' => -1
102
+ );
103
+
104
+ $args = apply_filters('njt_wa_get_post_type', $defaultArgs);
105
+ $account_list = get_posts($args);
106
+
107
+ return $account_list;
108
+ }
109
+
110
+ public function save_account($post_id, $post)
111
+ {
112
+ if (!isset($_POST['form_account_nonce'])) {
113
+ return;
114
+ }
115
+
116
+ if (!wp_verify_nonce($_POST['form_account_nonce'], 'save_form_account')) {
117
+ return;
118
+ }
119
+
120
+ $new_account = array(
121
+ 'nta_group_number' => sanitize_text_field($_POST['nta_group_number']),
122
+ 'nta_title' => sanitize_text_field($_POST['nta_title']),
123
+ 'nta_predefined_text' => sanitize_text_field($_POST['nta_predefined_text']),
124
+ 'nta_offline_text' => sanitize_text_field($_POST['nta_offline_text']),
125
+ 'nta_over_time' => sanitize_text_field($_POST['nta_over_time']),
126
+ 'nta_sunday' => isset($_POST['nta_sunday']) ? 'checked' : '',
127
+ 'nta_sunday_working' => sanitize_text_field($_POST['nta_sunday_hour_start']) . '-' . sanitize_text_field($_POST['nta_sunday_hour_end']),
128
+ 'nta_monday' => isset($_POST['nta_monday']) ? 'checked' : '',
129
+ 'nta_monday_working' => sanitize_text_field($_POST['nta_monday_hour_start']) . '-' . sanitize_text_field($_POST['nta_monday_hour_end']),
130
+ 'nta_tuesday' => isset($_POST['nta_tuesday']) ? 'checked' : '',
131
+ 'nta_tuesday_working' => sanitize_text_field($_POST['nta_tuesday_hour_start']) . '-' . sanitize_text_field($_POST['nta_tuesday_hour_end']),
132
+ 'nta_wednesday' => isset($_POST['nta_wednesday']) ? 'checked' : '',
133
+ 'nta_wednesday_working' => sanitize_text_field($_POST['nta_wednesday_hour_start']) . '-' . sanitize_text_field($_POST['nta_wednesday_hour_end']),
134
+ 'nta_thursday' => isset($_POST['nta_thursday']) ? 'checked' : '',
135
+ 'nta_thursday_working' => sanitize_text_field($_POST['nta_thursday_hour_start']) . '-' . sanitize_text_field($_POST['nta_thursday_hour_end']),
136
+ 'nta_friday' => isset($_POST['nta_friday']) ? 'checked' : '',
137
+ 'nta_friday_working' => sanitize_text_field($_POST['nta_friday_hour_start']) . '-' . sanitize_text_field($_POST['nta_friday_hour_end']),
138
+ 'nta_saturday' => isset($_POST['nta_saturday']) ? 'checked' : '',
139
+ 'nta_saturday_working' => sanitize_text_field($_POST['nta_saturday_hour_start']) . '-' . sanitize_text_field($_POST['nta_saturday_hour_end']),
140
+ );
141
+
142
+ $refer_url = sanitize_text_field($_POST['_wp_http_referer']);
143
+ $add_new_action = strpos($refer_url, 'post-new.php');
144
+ if ($add_new_action !== false) {
145
+ $new_account['position'] = '0';
146
+ $new_account['nta_active'] = 'none';
147
+ $new_account['wo_active'] = 'none';
148
+ $new_account['wo_position'] = '0';
149
+ } else {
150
+ $old_account = get_post_meta($post_id, 'nta_whatsapp_accounts', true);
151
+ $new_account['position'] = $old_account['position'];
152
+ $new_account['nta_active'] = $old_account['nta_active'];
153
+ $new_account['wo_active'] = $old_account['wo_active'];
154
+ $new_account['wo_position'] = $old_account['wo_position'];
155
+ }
156
+
157
+ if (isset($_POST['nta_button_available'])) {
158
+ $new_account['nta_button_available'] = 'ON';
159
+ }
160
+
161
+ update_post_meta($post_id, 'nta_whatsapp_accounts', $new_account);
162
+
163
+ //Save button style
164
+
165
+ if ($_POST['nta_button_label'] != '' || $_POST['button_style'] != '' || $_POST['button_back_color'] != '' || $_POST['button_text_color'] != '') {
166
+ $new_input['button-text'] = sanitize_text_field($_POST['nta_button_label']);
167
+ $new_input['button_style'] = sanitize_text_field($_POST['button_style']);
168
+ $new_input['button_back_color'] = sanitize_hex_color($_POST['button_back_color']);
169
+ $new_input['button_text_color'] = sanitize_hex_color($_POST['button_text_color']);
170
+ update_post_meta($post_id, 'nta_wabutton_style', $new_input);
171
+ }
172
+ }
173
+
174
+ public function meta_form_account($post)
175
+ {
176
+ wp_nonce_field('save_form_account', 'form_account_nonce');
177
+ $edit_account = get_post_meta($post->ID, 'nta_whatsapp_accounts', true);
178
+ $edit_button_label = get_post_meta($post->ID, 'nta_wabutton_style', true);
179
+ $dayOfWeek = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
180
+
181
+ require NTA_WHATSAPP_PLUGIN_DIR . 'views/nta-whatsapp-meta-accounts.php';
182
+ }
183
+
184
+ public function account_shortcode_form()
185
+ {
186
+ ?>
187
+ <p>Copy the shortcode below and paste it into the editor to display the button.</p>
188
+ <p><input type="text" id="nta-button-shortcode-copy" value="[njwa_button id=&quot;<?php echo esc_attr(get_the_ID()) ?>&quot;]" class="widefat" readonly=""></p>
189
+ <p class="nta-shortcode-copy-status hidden" style="color: green"><strong>Copied!</strong></p>
190
+ <?php
191
+ }
192
+
193
+ public function meta_form_button_style($post)
194
+ {
195
+ $buttonStyle = get_post_meta($post->ID, 'nta_wabutton_style', true);
196
+ if (empty($buttonStyle)) {
197
+ $buttonStyle = array();
198
+ $buttonStyle['button-text'] = '';
199
+ $buttonStyle['button_style'] = '';
200
+ $buttonStyle['button_back_color'] = '';
201
+ $buttonStyle['button_text_color'] = '';
202
+ }
203
+
204
+ require NTA_WHATSAPP_PLUGIN_DIR . 'views/nta-whatsapp-meta-button-style.php';
205
+ }
206
+
207
+ public function manager_accounts_columns($columns)
208
+ {
209
+ $columns = array(
210
+ 'cb' => '<input type="checkbox" />',
211
+ 'title' => __('Account Name', 'ninjateam-whatsapp'),
212
+ 'nta_wa_avatar' => __('Avatar', 'ninjateam-whatsapp'),
213
+ 'nta_wa_number' => __('Number', 'ninjateam-whatsapp'),
214
+ 'nta_wa_title' => __('Title', 'ninjateam-whatsapp'),
215
+ 'activedays' => __('Active Days', 'ninjateam-whatsapp'),
216
+ 'shortcode' => __('Shortcode', 'ninjateam-whatsapp'),
217
+ );
218
+ return $columns;
219
+ }
220
+
221
+ public function manager_accounts_sortable_columns($columns)
222
+ {
223
+
224
+ $columns['number'] = __('Number', 'ninjateam-whatsapp');
225
+ $columns['timeslot'] = __('Time Slot', 'ninjateam-whatsapp');
226
+
227
+ return $columns;
228
+ }
229
+
230
+ public function manager_accounts_show_columns($name, $post_id)
231
+ {
232
+ $data_account = get_post_meta($post_id, 'nta_whatsapp_accounts', true);
233
+
234
+ switch ($name) {
235
+ case 'nta_wa_avatar':
236
+ the_post_thumbnail('thumbnail', array('class' => 'img-size-table'));
237
+ break;
238
+ case 'nta_wa_number':
239
+ echo esc_html($data_account['nta_group_number']);
240
+ break;
241
+ case 'nta_wa_title':
242
+ echo esc_html($data_account['nta_title']);
243
+ break;
244
+ case 'activedays':
245
+ echo esc_html(NTA_Helper::print_date($data_account));
246
+ break;
247
+ case 'shortcode':
248
+ echo '<input type="text" class="nta-shortcode-table" name="country" value="[njwa_button id=&quot;' . esc_attr($post_id) . '&quot;]" readonly>';
249
+ break;
250
+ }
251
+ }
252
+
253
+ }
includes/nta-whatsapp-setting.php ADDED
@@ -0,0 +1,487 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!function_exists('add_action')) {
3
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
4
+ exit;
5
+ }
6
+
7
+ class NTA_Whatsapp_Setting
8
+ {
9
+
10
+ protected $option;
11
+ protected $option_group = 'nta_whatsapp_group';
12
+ protected $option_button_group = 'nta_whatsapp_button_group';
13
+ protected $option_woo_button_group = 'nta_wa_woo_button_group';
14
+ protected $option_ga_group = 'nta_wa_ga_group';
15
+
16
+ protected $nta_WA_Post_Instance;
17
+ protected static $instance = null;
18
+
19
+ public static function getInstance()
20
+ {
21
+ if (null == self::$instance) {
22
+ self::$instance = new self;
23
+ }
24
+ return self::$instance;
25
+ }
26
+
27
+ public function __construct()
28
+ {
29
+ $this->option = get_option('nta_whatsapp_setting');
30
+ $this->nta_WA_Post_Instance = NTA_Whatsapp_PostType::getInstance();
31
+ add_action('admin_init', [$this, 'register_setting']);
32
+
33
+ add_action('admin_menu', function () {
34
+ $all_accounts_link = 'edit.php?post_type=whatsapp-accounts';
35
+ $edit_account_link = 'post-new.php?post_type=whatsapp-accounts';
36
+
37
+ add_menu_page('NTA Whatsapp', 'WhatsApp', 'manage_options', 'nta_whatsapp', [$this, 'create_page_setting_widget'], NTA_WHATSAPP_PLUGIN_URL . 'images/whatsapp-menu.svg');
38
+ add_submenu_page('nta_whatsapp', __('Add New account', 'ninjateam-whatsapp'), __('Add New account', 'ninjateam-whatsapp'), 'manage_options', $edit_account_link);
39
+ add_submenu_page('nta_whatsapp', __('Floating Widget', 'ninjateam-whatsapp'), __('Floating Widget', 'ninjateam-whatsapp'), 'manage_options', 'floating-widget-whatsapp', [$this, 'tab_menu_page']);
40
+ add_submenu_page('nta_whatsapp', __('Settings', 'ninjateam-whatsapp'), __('Settings', 'ninjateam-whatsapp'), 'manage_options', 'nta_whatsapp', [$this, 'create_page_setting_widget']);
41
+ });
42
+
43
+ add_action('admin_enqueue_scripts', function () {
44
+ wp_register_style('nta-css', NTA_WHATSAPP_PLUGIN_URL . 'scripts/css/style.css');
45
+ wp_enqueue_style('nta-css');
46
+ wp_enqueue_style('wp-color-picker');
47
+
48
+ wp_register_script('nta-js', NTA_WHATSAPP_PLUGIN_URL . 'scripts/js/admin-scripts.js', ['jquery', 'wp-color-picker']);
49
+ wp_localize_script('nta-js', 'nta', [
50
+ 'url' => admin_url('admin-ajax.php'),
51
+ 'njt_wa_nonce' => wp_create_nonce('ajax-nonce')
52
+ ]);
53
+
54
+ //wp_enqueue_script('nta-js-sortable', NTA_WHATSAPP_PLUGIN_URL . 'scripts/js/jquery-ui.min.js');
55
+ wp_enqueue_script('nta-js-sortable', NTA_WHATSAPP_PLUGIN_URL . 'scripts/js/jquery.validate.min.js');
56
+ wp_enqueue_script('jquery-ui-sortable');
57
+ wp_enqueue_script('jquery-ui-autocomplete');
58
+ wp_enqueue_script('nta-js');
59
+ });
60
+
61
+ add_action('wp_ajax_save_account_position', [$this, 'save_account_position']);
62
+ add_action('wp_ajax_load_accounts_ajax', [$this, 'load_accounts_ajax']);
63
+ add_action('wp_ajax_remove_account', [$this, 'remove_account']);
64
+ add_action('wp_ajax_add_account', [$this, 'add_account']);
65
+ }
66
+
67
+ public function page_display_settings_section_callback()
68
+ {
69
+ $option_group = 'nta_whatsapp_group';
70
+ $option = get_option('nta_whatsapp_setting');
71
+ if (!$option) {
72
+ $option = array();
73
+ $option['widget_name'] = 'Start a Conversation';
74
+ $option['widget_position'] = 'right';
75
+ $option['widget_label'] = 'Need Help? <strong>Chat with us</strong>';
76
+ $option['widget_responseText'] = 'The team typically replies in a few minutes.';
77
+ $option['text_color'] = '#fff';
78
+ $option['back_color'] = '#2db742';
79
+ $option['widget_description'] = 'Hi! Click one of our member below to chat on <strong>WhatsApp</strong>';
80
+ $option['widget_gdpr'] = 'Please accept our <a href="https://ninjateam.org/privacy-policy/">privacy policy</a> first to start a conversation.';
81
+ $option['show_on_desktop'] = 'ON';
82
+ $option['show_on_mobile'] = 'ON';
83
+ $option['nta-wa-hide-pages'] = '';
84
+ $option['nta-wa-show-pages'] = '';
85
+ $option['display-pages'] = 'hide';
86
+ } else {
87
+ $option['widget_name'] = NTA_Helper::getValueOrDefault($option, 'widget_name', 'Start a Conversation');
88
+ $option['widget_position'] = NTA_Helper::getValueOrDefault($option, 'widget_position', 'right');
89
+ $option['widget_label'] = NTA_Helper::getValueOrDefault($option, 'widget_label', 'Need Help? <strong>Chat with us</strong>');
90
+ $option['widget_responseText'] = NTA_Helper::getValueOrDefault($option, 'widget_responseText', 'The team typically replies in a few minutes.');
91
+ $option['text_color'] = NTA_Helper::getValueOrDefault($option, 'text_color', '#fff');
92
+ $option['back_color'] = NTA_Helper::getValueOrDefault($option, 'back_color', '#2db742');
93
+ $option['widget_description'] = NTA_Helper::getValueOrDefault($option, 'widget_description', 'Hi! Click one of our member below to chat on <strong>WhatsApp</strong>');
94
+ $option['widget_gdpr'] = NTA_Helper::getValueOrDefault($option, 'widget_gdpr', 'Please accept our <a href="https://ninjateam.org/privacy-policy/">privacy policy</a> first to start a conversation.');
95
+ $option['nta-wa-hide-pages'] = NTA_Helper::getValueOrDefault($option, 'nta-wa-hide-pages', '');
96
+ $option['nta-wa-show-pages'] = NTA_Helper::getValueOrDefault($option, 'nta-wa-show-pages', '');
97
+ $option['display-pages'] = NTA_Helper::getValueOrDefault($option, 'display-pages', 'hide');
98
+ }
99
+
100
+ $get_pages_query = new WP_Query(array("posts_per_page" => -1, "post_type" => "page", "post_status" => "publish"));
101
+
102
+ require NTA_WHATSAPP_PLUGIN_DIR . 'views/nta-whatsapp-display-settings.php';
103
+ }
104
+
105
+ public function page_selected_accounts_section_callback()
106
+ {
107
+ $account_list = $this->nta_WA_Post_Instance->get_posts();
108
+ $account_list_view = array();
109
+ foreach ($account_list as $account) {
110
+ $get_data = get_post_meta($account->ID, 'nta_whatsapp_accounts', true);
111
+
112
+ if ($get_data['nta_active'] != 'none') {
113
+ $account_list_view[$account->ID] = array(
114
+ 'account_id' => $account->ID,
115
+ 'post_title' => $account->post_title,
116
+ 'nta_title' => $get_data['nta_title'],
117
+ 'nta_active' => $get_data['nta_active'],
118
+ 'nta_sunday' => $get_data['nta_sunday'],
119
+ 'nta_monday' => $get_data['nta_monday'],
120
+ 'nta_tuesday' => $get_data['nta_tuesday'],
121
+ 'nta_wednesday' => $get_data['nta_wednesday'],
122
+ 'nta_thursday' => $get_data['nta_thursday'],
123
+ 'nta_friday' => $get_data['nta_friday'],
124
+ 'nta_saturday' => $get_data['nta_saturday'],
125
+ 'position' => $get_data['position'],
126
+ 'avatar' => get_the_post_thumbnail_url($account->ID),
127
+ );
128
+ }
129
+ }
130
+ usort($account_list_view, function ($first, $second) {
131
+ return $first['position'] > $second['position'];
132
+ });
133
+
134
+ require NTA_WHATSAPP_PLUGIN_DIR . 'views/nta-whatsapp-selected-accounts.php';
135
+ }
136
+
137
+ public function nta_page_settings_callback()
138
+ {
139
+ $option_group = 'nta_whatsapp_button_group';
140
+ $option = get_option('nta_wabutton_setting');
141
+ if (!$option) {
142
+ $option = array();
143
+ $option['button-text'] = 'Need help? Chat via Whatsapp';
144
+ $option['button_style'] = 'round';
145
+ $option['button_back_color'] = '#2db742';
146
+ $option['button_text_color'] = '#fff';
147
+ }
148
+ require NTA_WHATSAPP_PLUGIN_DIR . 'views/nta-whatsapp-settings.php';
149
+ }
150
+
151
+ public function nta_woocommerce_button_callback()
152
+ {
153
+ $option_group = 'nta_wa_woo_button_group';
154
+
155
+ $account_list = $this->nta_WA_Post_Instance->get_posts();
156
+ $account_list_view = array();
157
+ foreach ($account_list as $account) {
158
+ $get_data = get_post_meta($account->ID, 'nta_whatsapp_accounts', true);
159
+
160
+ if ($get_data['wo_active'] != 'none') {
161
+ $account_list_view[$account->ID] = array(
162
+ 'account_id' => $account->ID,
163
+ 'post_title' => $account->post_title,
164
+ 'nta_title' => $get_data['nta_title'],
165
+ 'nta_active' => $get_data['nta_active'],
166
+ 'nta_sunday' => $get_data['nta_sunday'],
167
+ 'nta_monday' => $get_data['nta_monday'],
168
+ 'nta_tuesday' => $get_data['nta_tuesday'],
169
+ 'nta_wednesday' => $get_data['nta_wednesday'],
170
+ 'nta_thursday' => $get_data['nta_thursday'],
171
+ 'nta_friday' => $get_data['nta_friday'],
172
+ 'nta_saturday' => $get_data['nta_saturday'],
173
+ 'wo_position' => $get_data['wo_position'],
174
+ 'avatar' => get_the_post_thumbnail_url($account->ID),
175
+ );
176
+ }
177
+ }
178
+ usort($account_list_view, function ($first, $second) {
179
+ return $first['wo_position'] > $second['wo_position'];
180
+ });
181
+
182
+ $woo_button_setting = get_option('nta_wa_woobutton_setting');
183
+ if (!$woo_button_setting) {
184
+ $woo_button_setting['nta_woo_button_position'] = 'after_atc';
185
+ }
186
+ require NTA_WHATSAPP_PLUGIN_DIR . 'views/nta-whatsapp-woocommerce-button.php';
187
+ }
188
+
189
+ public function nta_ga_callback(){
190
+ $option_group = 'nta_wa_ga_group';
191
+ $status = get_option('nta_wa_ga_setting', '0') == '1' ? true : false;
192
+
193
+ require NTA_WHATSAPP_PLUGIN_DIR . 'views/nta-whatsapp-ga.php';
194
+ }
195
+
196
+ public function create_page_setting_widget()
197
+ {
198
+ if (isset($_GET['tab'])) {
199
+ $active_tab = sanitize_text_field($_GET['tab']);
200
+ } else {
201
+ $active_tab = 'tab_one';
202
+ }
203
+ ?>
204
+ <div class="wrap">
205
+ <h1>Settings</h1>
206
+
207
+ <?php settings_errors(); ?>
208
+
209
+ <h2 class="nav-tab-wrapper nta-tab-wrapper">
210
+ <a href="?page=nta_whatsapp&tab=tab_one" class="nav-tab nta-selected-tab <?php echo $active_tab == 'tab_one' ? 'nav-tab-active' : ''; ?>">Settings</a>
211
+ <a href="?page=nta_whatsapp&tab=tab_two" class="nav-tab nta-display-setting-tab <?php echo $active_tab == 'tab_two' ? 'nav-tab-active' : ''; ?>">WooCommerce Button</a>
212
+ <a href="?page=nta_whatsapp&tab=tab_three" class="nav-tab nta-display-setting-tab <?php echo $active_tab == 'tab_three' ? 'nav-tab-active' : ''; ?>">Google Analytics</a>
213
+ </h2>
214
+ <div class="nta-tabs-content">
215
+ <form name="post" method="post" action="options.php" id="post" autocomplete="off">
216
+ <?php
217
+ if ($active_tab == 'tab_one') {
218
+ do_settings_sections('nta_page_settings-1');
219
+ } elseif ($active_tab == 'tab_two') {
220
+ do_settings_sections('nta_page_settings-2');
221
+ } elseif ($active_tab == 'tab_three') {
222
+ do_settings_sections('nta_page_settings-3');
223
+ }
224
+ ?>
225
+ </form>
226
+ </div>
227
+ </div>
228
+ <?php
229
+ }
230
+
231
+ public function tab_menu_page()
232
+ {
233
+ if (isset($_GET['tab'])) {
234
+ $active_tab = sanitize_text_field($_GET['tab']);
235
+ } else {
236
+ $active_tab = 'tab_one';
237
+ }
238
+ ?>
239
+ <div class="wrap">
240
+ <h1>Floating Widget</h1>
241
+
242
+ <?php settings_errors(); ?>
243
+
244
+ <h2 class="nav-tab-wrapper nta-tab-wrapper">
245
+ <a href="?page=floating-widget-whatsapp&tab=tab_one" class="nav-tab nta-selected-tab <?php echo $active_tab == 'tab_one' ? 'nav-tab-active' : ''; ?>">Selected Accounts</a>
246
+ <a href="?page=floating-widget-whatsapp&tab=tab_two" class="nav-tab nta-display-setting-tab <?php echo $active_tab == 'tab_two' ? 'nav-tab-active' : ''; ?>">Display Settings</a>
247
+ </h2>
248
+ <div class="nta-tabs-content">
249
+ <div id="form-selected-account" autocomplete="off">
250
+ <?php
251
+ if ($active_tab == 'tab_one') {
252
+ do_settings_sections('floating-widget-whatsapp-1');
253
+ } elseif ($active_tab == 'tab_two') {
254
+ do_settings_sections('floating-widget-whatsapp-2');
255
+ }
256
+ ?>
257
+ </div>
258
+ </div>
259
+ </div>
260
+ <?php
261
+ }
262
+
263
+ public function create_page_add_account()
264
+ {
265
+ $option_group = $this->option_group;
266
+ require NTA_WHATSAPP_PLUGIN_DIR . 'views/nta-whatsapp-add-accounts.php';
267
+ }
268
+
269
+ public function register_setting()
270
+ {
271
+ register_setting($this->option_group, 'nta_whatsapp_setting', [$this, 'save_setting']);
272
+ register_setting($this->option_button_group,'nta_wabutton_setting', [$this, 'save_button_setting']);
273
+ register_setting($this->option_woo_button_group,'nta_wa_woobutton_setting', [$this, 'save_woobutton_setting']);
274
+ register_setting($this->option_ga_group,'nta_wa_ga_setting', [$this, 'save_ga_setting'], [
275
+ 'type' => 'string',
276
+ 'sanitize_callback' => 'sanitize_text_field',
277
+ 'default' => NULL,
278
+ ]);
279
+
280
+ add_settings_section('page_selected_accounts_section', '', [$this, 'page_selected_accounts_section_callback'], 'floating-widget-whatsapp-1');
281
+ add_settings_section('page_display_settings_section', '', [$this, 'page_display_settings_section_callback'], 'floating-widget-whatsapp-2');
282
+ add_settings_section('nta_page_settings', '', [$this, 'nta_page_settings_callback'], 'nta_page_settings-1');
283
+ add_settings_section('nta_woocommerce_button', '', [$this, 'nta_woocommerce_button_callback'], 'nta_page_settings-2');
284
+ add_settings_section('nta_ga', '', [$this, 'nta_ga_callback'], 'nta_page_settings-3');
285
+ }
286
+
287
+ public function save_woobutton_setting($input)
288
+ {
289
+ $new_input = [];
290
+
291
+ $new_input['nta_woo_button_position'] = sanitize_text_field($_POST['nta_woo_button_position']);
292
+ if (isset($_POST['nta_woo_button_status'])) {
293
+ $new_input['nta_woo_button_status'] = 'ON';
294
+ }
295
+ return $new_input;
296
+ }
297
+
298
+ public function save_ga_setting($input)
299
+ {
300
+ if (isset($_POST['nta_wa_ga_status'])) {
301
+ return '1';
302
+ }
303
+ return '0';
304
+ }
305
+
306
+ public function save_button_setting($input)
307
+ {
308
+ $new_input = [];
309
+
310
+ $new_input['button-text'] = sanitize_text_field($_POST['button-text']);
311
+ $new_input['button_style'] = sanitize_text_field($_POST['button_style']);
312
+ $new_input['button_back_color'] = sanitize_hex_color($_POST['button_back_color']);
313
+ $new_input['button_text_color'] = sanitize_hex_color($_POST['button_text_color']);
314
+
315
+ return $new_input;
316
+ }
317
+
318
+ public function save_setting($input)
319
+ {
320
+ $new_input = [];
321
+ $new_input['widget_name'] = sanitize_text_field($_POST['widget_name']);
322
+ $new_input['widget_label'] = wp_kses_post(wp_unslash($_POST['widget_label'])); // It can be an html tag
323
+ $new_input['text_color'] = sanitize_hex_color($_POST['text_color']);
324
+ $new_input['back_color'] = sanitize_hex_color($_POST['back_color']);
325
+ $new_input['widget_position'] = sanitize_text_field($_POST['widget_position']);
326
+ $new_input['widget_description'] = wp_kses_post(wp_unslash($_POST['widget_description']));
327
+ $new_input['widget_gdpr'] = wp_kses_post(wp_unslash($_POST['widget_gdpr']));
328
+ $new_input['widget_responseText'] = sanitize_text_field($_POST['widget_responseText']);
329
+ $new_input['display-pages'] = sanitize_text_field($_POST['nta-wa-display-pages']);
330
+
331
+ if (isset($_POST['nta-wa-hide-pages'])) {
332
+ $new_input['nta-wa-hide-pages'] = NTA_Helper::sanitize_array($_POST['nta-wa-hide-pages']);
333
+ }
334
+
335
+ if (isset($_POST['nta-wa-show-pages'])) {
336
+ $new_input['nta-wa-show-pages'] = NTA_Helper::sanitize_array($_POST['nta-wa-show-pages']);
337
+ }
338
+
339
+ if (isset($_POST['show_on_desktop'])) {
340
+ $new_input['show_on_desktop'] = 'ON';
341
+ }
342
+ if (isset($_POST['show_on_mobile'])) {
343
+ $new_input['show_on_mobile'] = 'ON';
344
+ }
345
+
346
+ if (isset($_POST['show_gdpr'])) {
347
+ $new_input['show_gdpr'] = 'ON';
348
+ }
349
+ return $new_input;
350
+ }
351
+
352
+ public function save_account_position()
353
+ {
354
+ if (isset($_POST['update'])) {
355
+ foreach ($_POST['positions'] as $pos) {
356
+ $index = $pos[0];
357
+ $newPosision = $pos[1];
358
+ $old_meta_value = get_post_meta($index, 'nta_whatsapp_accounts', true);
359
+ $clone_meta_value = $old_meta_value;
360
+ if ($_POST['update'] == 'woo') {
361
+ $clone_meta_value['wo_position'] = $newPosision;
362
+ } else {
363
+ $clone_meta_value['position'] = $newPosision;
364
+ }
365
+ if (update_post_meta($index, 'nta_whatsapp_accounts', $clone_meta_value) == false) {
366
+ wp_send_json_error(json_encode(array('status' => "error")));
367
+ return;
368
+ };
369
+ }
370
+
371
+ $res_out = json_encode(array('status' => "success"));
372
+ wp_send_json_success($res_out);
373
+ }
374
+ }
375
+
376
+ public function load_accounts_ajax()
377
+ {
378
+ if (isset($_POST['load'])) {
379
+ $account_list = $this->nta_WA_Post_Instance->get_posts();
380
+ $account_list_view = array();
381
+
382
+ foreach ($account_list as $account) {
383
+ $get_data = get_post_meta($account->ID, 'nta_whatsapp_accounts', true);
384
+ $account_list_view[] = array(
385
+ 'label' => $account->post_title,
386
+ 'image_url' => NTA_WHATSAPP_PLUGIN_URL,
387
+ 'account_id' => $account->ID,
388
+ 'nta_title' => $get_data['nta_title'],
389
+ 'nta_active' => $get_data['nta_active'],
390
+ 'nta_sunday' => $get_data['nta_sunday'],
391
+ 'nta_monday' => $get_data['nta_monday'],
392
+ 'nta_tuesday' => $get_data['nta_tuesday'],
393
+ 'nta_wednesday' => $get_data['nta_wednesday'],
394
+ 'nta_thursday' => $get_data['nta_thursday'],
395
+ 'nta_friday' => $get_data['nta_friday'],
396
+ 'nta_saturday' => $get_data['nta_saturday'],
397
+ 'nta_active' => $get_data['nta_active'],
398
+ 'wo_active' => $get_data['wo_active'],
399
+ 'avatar' => get_the_post_thumbnail_url($account->ID),
400
+ );
401
+ }
402
+
403
+ wp_send_json_success($account_list_view);
404
+ }
405
+ }
406
+
407
+ public function remove_account()
408
+ {
409
+ if (isset($_POST['remove'])) {
410
+ $id = sanitize_text_field($_POST['remove_id']);
411
+ $old_meta_value = get_post_meta($id, 'nta_whatsapp_accounts', true);
412
+ $clone_meta_value = $old_meta_value;
413
+ $type_account = '';
414
+ if ($_POST['remove'] == 'all') {
415
+ $clone_meta_value['nta_active'] = 'none';
416
+ $clone_meta_value['position'] = '0';
417
+ $count = get_option('nta_whatsapp_available_account');
418
+ $type_account = 'nta_whatsapp_available_account';
419
+ if ($count == false) {
420
+ $count = 0;
421
+ } else {
422
+ $count--;
423
+ }
424
+ } else {
425
+ $clone_meta_value['wo_active'] = 'none';
426
+ $clone_meta_value['wo_position'] = '0';
427
+ $count = get_option('nta_whatsapp_available_woo_account');
428
+ $type_account = 'nta_whatsapp_available_woo_account';
429
+ if ($count == false) {
430
+ $count = 0;
431
+ } else {
432
+ $count--;
433
+ }
434
+ }
435
+
436
+ if (update_post_meta($id, 'nta_whatsapp_accounts', $clone_meta_value) == false) {
437
+ wp_send_json_error(json_encode(array('status' => "error")));
438
+ return;
439
+ } else {
440
+ update_option($type_account, $count);
441
+ };
442
+ $res_out = json_encode(array('status' => "success"));
443
+ wp_send_json_success($res_out);
444
+ }
445
+ }
446
+
447
+ public function add_account()
448
+ {
449
+ if (isset($_POST['add'])) {
450
+ $id = sanitize_text_field($_POST['account_id']);
451
+ $old_meta_value = get_post_meta($id, 'nta_whatsapp_accounts', true);
452
+ $clone_meta_value = $old_meta_value;
453
+ $type_account = '';
454
+ if ($_POST['add'] == 'all') {
455
+ $clone_meta_value['nta_active'] = 'active';
456
+ $count = get_option('nta_whatsapp_available_account');
457
+ $type_account = 'nta_whatsapp_available_account';
458
+ if ($count == false) {
459
+ $count = 1;
460
+ } else {
461
+ $count++;
462
+ }
463
+ } else {
464
+ $clone_meta_value['wo_active'] = 'active';
465
+ $count = get_option('nta_whatsapp_available_woo_account');
466
+ if ($count == false) {
467
+ $count = 1;
468
+ } else {
469
+ $count++;
470
+ }
471
+ $type_account = 'nta_whatsapp_available_woo_account';
472
+ }
473
+ if (update_post_meta($id, 'nta_whatsapp_accounts', $clone_meta_value) == false) {
474
+ wp_send_json_error(json_encode(array('status' => "error")));
475
+ return;
476
+ } else {
477
+ update_option($type_account, $count);
478
+ };
479
+ $clone_meta_value['index'] = $id;
480
+ $clone_meta_value['account_name'] = sanitize_text_field($_POST['account_name']);
481
+ $clone_meta_value['image_url'] = NTA_WHATSAPP_PLUGIN_URL;
482
+ $clone_meta_value['avatar'] = get_the_post_thumbnail_url($id);
483
+ $res_out = json_encode(array('status' => "success"));
484
+ wp_send_json_success($clone_meta_value);
485
+ }
486
+ }
487
+ }
includes/nta-whatsapp-shortcode.php ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!function_exists('add_action')) {
4
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
5
+ exit;
6
+ }
7
+
8
+ class NTA_Whatsapp_Shortcode
9
+ {
10
+ protected static $instance = null;
11
+ protected $accountID;
12
+
13
+ public static function getInstance()
14
+ {
15
+ if (null == self::$instance) {
16
+ self::$instance = new self;
17
+ }
18
+ return self::$instance;
19
+ }
20
+
21
+ public function __construct()
22
+ {
23
+ add_shortcode('njwa_time_work', [$this, 'nta_get_time_backwork_shortcode']);
24
+ add_shortcode('njwa_button', [$this, 'nta_whatsapp_button_shortcode']);
25
+ add_shortcode('njwa_page_title', [$this, 'nta_page_title']);
26
+ add_shortcode('njwa_page_url', [$this, 'nta_page_url']);
27
+ add_shortcode('njwa_time_work_wg', [$this, 'nta_get_time_backworkWidget_shortcode']);
28
+ }
29
+
30
+ public function nta_whatsapp_button_shortcode($id)
31
+ {
32
+ extract($id);
33
+ $check_account_status = get_post_status($id);
34
+ if ($check_account_status == false || $check_account_status != 'publish') {
35
+ return '';
36
+ }
37
+ $this->accountID = $id;
38
+ $mainStyle = array();
39
+ $buttonStyle = get_post_meta($id, 'nta_wabutton_style', true);
40
+ $data_posts = get_the_title($id);
41
+ $data_meta = get_post_meta($id, 'nta_whatsapp_accounts', true);
42
+ $buttonSetting = get_option('nta_wabutton_setting');
43
+ $back_time = NTA_Helper::get_back_time($data_meta);
44
+ $avatar = get_the_post_thumbnail_url($id);
45
+ $content = '';
46
+
47
+ //Check redirect on mobile or desktop
48
+ $link_to_app = 'web';
49
+ $new_page_open = 'target="_blank"';
50
+ if (wp_is_mobile()) {
51
+ $link_to_app = 'api';
52
+ $new_page_open = '';
53
+ }
54
+
55
+ //create link in button
56
+ $href = '';
57
+
58
+ if (strpos($data_meta['nta_group_number'], 'chat.whatsapp.com')) {
59
+ $href .= 'target="_blank"';
60
+ $href .= ' href="' . esc_url($data_meta['nta_group_number']) . '"';
61
+ } else {
62
+ $href = $new_page_open;
63
+ $href .= ' href="https://';
64
+ $href .= $link_to_app . '.whatsapp.com/send?phone=';
65
+ $number = preg_replace('/[^0-9]/', '', $data_meta['nta_group_number']);
66
+ $href .= $number;
67
+ $href .= ($data_meta['nta_predefined_text'] != '' ? '&text=' . do_shortcode($data_meta['nta_predefined_text']) : '');
68
+ $href .= '"';
69
+ }
70
+
71
+ if (empty($buttonStyle)) {
72
+ if (empty($buttonSetting)) {
73
+ $mainStyle['button-text'] = 'Need help? Chat via WhatsApp';
74
+ $mainStyle['button_style'] = 'round';
75
+ $mainStyle['button_back_color'] = '#2DB742';
76
+ $mainStyle['button_text_color'] = '#fff';
77
+ } else {
78
+ if ($buttonSetting['button-text'] == '') {
79
+ $mainStyle['button-text'] = 'Need help? Chat via WhatsApp';
80
+ } else {
81
+ $mainStyle['button-text'] = $buttonSetting['button-text'];
82
+ }
83
+ $mainStyle['button_style'] = $buttonSetting['button_style'];
84
+ $mainStyle['button_back_color'] = $buttonSetting['button_back_color'];
85
+ $mainStyle['button_text_color'] = $buttonSetting['button_text_color'];
86
+ }
87
+ } else {
88
+ if ($buttonStyle['button-text'] == '') {
89
+ if ($buttonSetting['button-text'] == '') {
90
+ $mainStyle['button-text'] = 'Need help? Chat via WhatsApp';
91
+ } else {
92
+ $mainStyle['button-text'] = $buttonSetting['button-text'];
93
+ }
94
+ } else {
95
+ $mainStyle['button-text'] = $buttonStyle['button-text'];
96
+ }
97
+
98
+ $mainStyle['button_style'] = $buttonStyle['button_style'];
99
+
100
+ $mainStyle['button_back_color'] = $buttonStyle['button_back_color'];
101
+ $mainStyle['button_text_color'] = $buttonStyle['button_text_color'];
102
+
103
+ if (!empty($buttonSetting) && $buttonStyle['button_back_color'] == '') {
104
+ $mainStyle['button_back_color'] = $buttonSetting['button_back_color'];
105
+ }
106
+
107
+ if (!empty($buttonSetting) && $buttonStyle['button_text_color'] == '') {
108
+ $mainStyle['button_text_color'] = $buttonSetting['button_text_color'];
109
+ }
110
+ }
111
+
112
+ add_action('wp_enqueue_scripts', [$this, 'nta_whatsapp_button_style']);
113
+ wp_register_style('nta-wabutton-style', '');
114
+ wp_enqueue_style('nta-wabutton-style');
115
+ $custom_css = "
116
+ #nta-wabutton-$id .wa__stt_online{
117
+ background: " . $mainStyle['button_back_color'] . ";
118
+ }
119
+
120
+ #nta-wabutton-$id .wa__stt_online{
121
+ color: " . $mainStyle['button_text_color'] . ";
122
+ }
123
+
124
+ #nta-wabutton-$id .wa__stt_online .wa__cs_name{
125
+ color: " . $mainStyle['button_text_color'] . ";
126
+ opacity: 0.8;
127
+ }
128
+
129
+ #nta-wabutton-$id p{
130
+ display: none;
131
+ }
132
+ ";
133
+ wp_add_inline_style('nta-wabutton-style', $custom_css);
134
+
135
+ if ($avatar == false) {
136
+ if ($back_time == 'online') {
137
+ $content = '<div id="nta-wabutton-' . $id . '" style="margin: 30px 0 30px;">';
138
+ $content .= '<a ' . $href;
139
+ $content .= ' class="wa__button ' . ($mainStyle['button_style'] == 'round' ? 'wa__r_button' : 'wa__sq_button') . ' wa__stt_online wa__btn_w_icon ' . (empty($data_posts) ? 'wa__button_text_only' : '') . '">';
140
+ $content .= '<div class="wa__btn_icon">';
141
+ $content .= '<img src="' . NTA_WHATSAPP_PLUGIN_URL . 'assets/img/whatsapp_logo.svg" alt="img"/></div>';
142
+ $content .= '<div class="wa__btn_txt">';
143
+ if (!empty($data_posts)) {
144
+ $content .= '<div class="wa__cs_info"><div class="wa__cs_name">' . $data_posts . '</div>';
145
+ $content .= '<div class="wa__cs_status">' . __('Online', 'ninjateam-whatsapp') . '</div></div>';
146
+ }
147
+ $content .= '<div class="wa__btn_title">' . $mainStyle['button-text'] . '</div>';
148
+ $content .= '</div></a></div>';
149
+ } else {
150
+ $content = '<div id="nta-wabutton-' . $id . '" style="margin: 30px 0 30px;">
151
+ <div class="wa__button ' . ($mainStyle['button_style'] == 'round' ? 'wa__r_button' : 'wa__sq_button') . ' wa__stt_offline wa__btn_w_icon ' . (empty($data_posts) ? 'wa__button_text_only_me' : '') . '">';
152
+ $content .= '<div class="wa__btn_icon">';
153
+ $content .= '<img src="' . NTA_WHATSAPP_PLUGIN_URL . 'assets/img/whatsapp_logo_gray.svg" alt=""/></div>';
154
+ $content .= '<div class="wa__btn_txt">';
155
+ if (!empty($data_posts)) {
156
+ $content .= '<div class="wa__cs_info"><div class="wa__cs_name">' . $data_posts . '</div>';
157
+ $content .= '<div class="wa__cs_status">' . __('Offline', 'ninjateam-whatsapp') . '</div></div>';
158
+ }
159
+ $content .= '<div class="wa__btn_title">' . $mainStyle['button-text'] . '</div>';
160
+ $content .= '<div class="wa__btn_status">' . ($back_time == 'offline' ? $data_meta['nta_over_time'] : do_shortcode($data_meta['nta_offline_text'])) . '</div></div></div></div>';
161
+ }
162
+ } else {
163
+ if ($back_time == 'online') {
164
+ $content = '<div id="nta-wabutton-' . $id . '" style="margin: 30px 0 30px;">';
165
+ $content .= '<a ' . $href;
166
+ $content .= ' class="wa__button ' . ($mainStyle['button_style'] == 'round' ? 'wa__r_button' : 'wa__sq_button') . ' wa__stt_online wa__btn_w_img ' . (empty($data_posts) ? 'wa__button_text_only' : '') . '">';
167
+ $content .= '<div class="wa__cs_img">';
168
+ $content .= '<div class="wa__cs_img_wrap" style="background: url(' . $avatar . ') center center no-repeat; background-size: cover;"></div></div>';
169
+ $content .= '<div class="wa__btn_txt">';
170
+ if (!empty($data_posts)) {
171
+ $content .= '<div class="wa__cs_info"><div class="wa__cs_name">' . $data_posts . '</div>';
172
+ $content .= '<div class="wa__cs_status">' . __('Online', 'ninjateam-whatsapp') . '</div></div>';
173
+ }
174
+
175
+ $content .= '<div class="wa__btn_title">' . $mainStyle['button-text'] . '</div>';
176
+ $content .= '</div></a></div>';
177
+ } else {
178
+ $content = '<div id="nta-wabutton-' . $id . '" style="margin: 30px 0 30px;">
179
+ <div class="wa__button ' . ($mainStyle['button_style'] == 'round' ? 'wa__r_button' : 'wa__sq_button') . ' wa__stt_offline wa__btn_w_img ' . (empty($data_posts) ? 'wa__button_text_only_me' : '') . '">';
180
+ $content .= '<div class="wa__cs_img">';
181
+ $content .= '<div class="wa__cs_img_wrap" style="background: url(' . $avatar . ') center center no-repeat; background-size: cover;"></div></div>';
182
+ $content .= '<div class="wa__btn_txt">';
183
+ if (!empty($data_posts)) {
184
+ $content .= '<div class="wa__cs_info"><div class="wa__cs_name">' . $data_posts . '</div>';
185
+ $content .= '<div class="wa__cs_status">' . __('Offline', 'ninjateam-whatsapp') . '</div></div>';
186
+ }
187
+ $content .= '<div class="wa__btn_title">' . $mainStyle['button-text'] . '</div>';
188
+ $content .= '<div class="wa__btn_status">' . ($back_time == 'offline' ? $data_meta['nta_over_time'] : do_shortcode($data_meta['nta_offline_text'])) . '</div></div></div></div>';
189
+ }
190
+ }
191
+
192
+ return $content;
193
+ }
194
+
195
+ public function nta_get_time_backwork_shortcode()
196
+ {
197
+ //extract($postID);
198
+ $account = get_post_meta($this->accountID, 'nta_whatsapp_accounts', true);
199
+ return NTA_Helper::get_back_time($account);
200
+ }
201
+
202
+ public function nta_get_time_backworkWidget_shortcode($id)
203
+ {
204
+ extract($id);
205
+ $this->accountID = $id;
206
+ $content = '';
207
+ $data_meta = get_post_meta($id, 'nta_whatsapp_accounts', true);
208
+ $content = do_shortcode($data_meta['nta_offline_text']);
209
+ return $content;
210
+ }
211
+
212
+ public function nta_page_title()
213
+ {
214
+ $page_title = ltrim(wp_title('', false));
215
+ return $page_title;
216
+ }
217
+
218
+ public function nta_page_url()
219
+ {
220
+ global $wp;
221
+ return home_url(add_query_arg(array(), $wp->request));
222
+ }
223
+
224
+ }
includes/nta-whatsapp-woocommerce.php ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!function_exists('add_action')) {
4
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
5
+ exit;
6
+ }
7
+
8
+ class NTA_Whatsapp_Woocommerce
9
+ {
10
+ protected static $instance = null;
11
+ protected static $added_insert_wa_woobutton = false;
12
+ protected $nta_WA_Post_Instance;
13
+
14
+ public static function getInstance()
15
+ {
16
+ if (null == self::$instance) {
17
+ self::$instance = new self;
18
+ }
19
+ return self::$instance;
20
+ }
21
+
22
+ public function __construct()
23
+ {
24
+ $woo_button_setting = get_option('nta_wa_woobutton_setting');
25
+ $availableAccount = get_option('nta_whatsapp_available_woo_account');
26
+ $this->nta_WA_Post_Instance = NTA_Whatsapp_PostType::getInstance();
27
+
28
+ if ((int)$availableAccount == 0 || $woo_button_setting == false || !isset($woo_button_setting['nta_woo_button_status'])) {
29
+ return;
30
+ } else {
31
+ if ($woo_button_setting['nta_woo_button_position'] == 'after_atc') {
32
+ add_action('woocommerce_after_add_to_cart_button', [$this, 'insert_wa_woobutton']);
33
+ } elseif ($woo_button_setting['nta_woo_button_position'] == 'before_atc') {
34
+ add_action('woocommerce_before_add_to_cart_button', [$this, 'insert_wa_woobutton']);
35
+ } elseif ($woo_button_setting['nta_woo_button_position'] == 'after_short_description') {
36
+ add_filter('woocommerce_short_description', [$this, 'showAfterShortDescription']);
37
+ // add_action('woocommerce_single_product_summary', [$this,'woo_custom_single_product_summary'], 2);
38
+ } elseif ($woo_button_setting['nta_woo_button_position'] == 'after_long_description') {
39
+ add_filter('the_content', [$this, 'showAfterLongDescription']);
40
+ }
41
+ }
42
+ }
43
+
44
+ public function woo_custom_single_product_summary()
45
+ {
46
+ remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20);
47
+ add_action('woocommerce_single_product_summary', [$this, 'woo_custom_single_excerpt'], 20);
48
+ }
49
+
50
+ public function woo_custom_single_excerpt()
51
+ {
52
+ global $post;
53
+
54
+ $short_description = apply_filters('woocommerce_short_description', $post->post_excerpt);
55
+
56
+ if (!$short_description) {
57
+ return;
58
+ }
59
+
60
+ $btn_content = '';
61
+ $account_list = $this->nta_WA_Post_Instance->get_posts();
62
+ $account_list_view = array();
63
+ foreach ($account_list as $account) {
64
+ $get_data = get_post_meta($account->ID, 'nta_whatsapp_accounts', true);
65
+
66
+ if ($get_data['wo_active'] == 'active') {
67
+ $account_list_view[$account->ID] = array(
68
+ 'account_id' => $account->ID,
69
+ 'wo_position' => $get_data['wo_position'],
70
+ );
71
+ }
72
+ }
73
+ usort($account_list_view, function ($first, $second) {
74
+ return $first['wo_position'] > $second['wo_position'];
75
+ });
76
+
77
+ foreach ($account_list_view as $row) {
78
+ $btn_content .= '<div class="nta-woo-products-button">' . do_shortcode('[njwa_button id="' . $row['account_id'] . '"]') . '</div>';
79
+ };
80
+
81
+ // The custom text
82
+ $custom_text = $btn_content;
83
+
84
+ ?>
85
+ <div class="woo-product-details_short-description">
86
+ <?php echo $short_description . $custom_text; ?>
87
+ </div>
88
+ <?php
89
+ }
90
+
91
+ public function showAfterShortDescription($post_excerpt)
92
+ {
93
+ if (!is_single()) {
94
+ return $post_excerpt;
95
+ }
96
+ if (!self::$added_insert_wa_woobutton){
97
+ self::$added_insert_wa_woobutton = true;
98
+ } else {
99
+ return;
100
+ }
101
+ $btn_content = '';
102
+ $account_list = get_posts([
103
+ 'post_type' => 'whatsapp-accounts',
104
+ 'post_status' => 'publish',
105
+ 'numberposts' => -1,
106
+ ]);
107
+ $account_list_view = array();
108
+ foreach ($account_list as $account) {
109
+ $get_data = get_post_meta($account->ID, 'nta_whatsapp_accounts', true);
110
+
111
+ if ($get_data['wo_active'] == 'active') {
112
+ $account_list_view[$account->ID] = array(
113
+ 'account_id' => $account->ID,
114
+ 'wo_position' => $get_data['wo_position'],
115
+ );
116
+ }
117
+ }
118
+ usort($account_list_view, function ($first, $second) {
119
+ return $first['wo_position'] > $second['wo_position'];
120
+ });
121
+
122
+ foreach ($account_list_view as $row) {
123
+ $btn_content .= '<div class="nta-woo-products-button">' . do_shortcode('[njwa_button id="' . $row['account_id'] . '"]') . '</div>';
124
+ }
125
+ return $post_excerpt . $btn_content;
126
+ }
127
+
128
+ public function showAfterLongDescription($content)
129
+ {
130
+ if ('product' !== get_post_type() || !is_single()) {
131
+ return $content;
132
+ }
133
+ $btn_content = '';
134
+
135
+ $account_list = $this->nta_WA_Post_Instance->get_posts();
136
+ $account_list_view = array();
137
+ foreach ($account_list as $account) {
138
+ $get_data = get_post_meta($account->ID, 'nta_whatsapp_accounts', true);
139
+
140
+ if ($get_data['wo_active'] == 'active') {
141
+ $account_list_view[$account->ID] = array(
142
+ 'account_id' => $account->ID,
143
+ 'wo_position' => $get_data['wo_position'],
144
+ );
145
+ }
146
+ }
147
+ usort($account_list_view, function ($first, $second) {
148
+ return $first['wo_position'] > $second['wo_position'];
149
+ });
150
+
151
+ foreach ($account_list_view as $row) {
152
+ $btn_content .= '<div class="nta-woo-products-button">' . do_shortcode('[njwa_button id="' . $row['account_id'] . '"]') . '</div>';
153
+ }
154
+ return $content . $btn_content;
155
+ }
156
+
157
+ public function insert_wa_woobutton()
158
+ {
159
+ if (!self::$added_insert_wa_woobutton){
160
+ self::$added_insert_wa_woobutton = true;
161
+ } else {
162
+ return;
163
+ }
164
+
165
+ $account_list = $this->nta_WA_Post_Instance->get_posts();
166
+ $account_list_view = array();
167
+ foreach ($account_list as $account) {
168
+ $get_data = get_post_meta($account->ID, 'nta_whatsapp_accounts', true);
169
+
170
+ if ($get_data['wo_active'] == 'active') {
171
+ $account_list_view[$account->ID] = array(
172
+ 'account_id' => $account->ID,
173
+ 'wo_position' => $get_data['wo_position'],
174
+ );
175
+ }
176
+ }
177
+ usort($account_list_view, function ($first, $second) {
178
+ return $first['wo_position'] > $second['wo_position'];
179
+ });
180
+
181
+ foreach ($account_list_view as $row) {
182
+ echo '<div class="nta-woo-products-button">' . do_shortcode('[njwa_button id="' . $row['account_id'] . '"]') . '</div>';
183
+ }
184
+ }
185
+
186
+ }
includes/nta-whatsapp-wpml.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!function_exists('add_action')) {
4
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
5
+ exit;
6
+ }
7
+
8
+ class NTA_Whatsapp_Wpml
9
+ {
10
+ protected static $instance = null;
11
+
12
+ public static function getInstance()
13
+ {
14
+ if (null == self::$instance) {
15
+ self::$instance = new self;
16
+ }
17
+ return self::$instance;
18
+ }
19
+
20
+ public function __construct()
21
+ {
22
+ global $sitepress;
23
+
24
+ if ($sitepress !== null && get_class($sitepress) === 'SitePress') {
25
+ $settings = $sitepress->get_setting('custom_posts_sync_option', array());
26
+ $post_type = 'whatsapp-accounts';
27
+ if (isset($settings[$post_type]) && ($settings[$post_type] == 1 || $settings[$post_type] == 2)) {
28
+ $this->isActive = true;
29
+ add_filter('njt_wa_get_post_type', array($this, 'getPostType'), 10, 1);
30
+ }
31
+ }
32
+ }
33
+
34
+ public function getPostType($args)
35
+ {
36
+ $args['suppress_filters'] = false;
37
+ $args['language'] = ICL_LANGUAGE_CODE;
38
+ return $args;
39
+ }
40
+ }
index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+
languages/en_US.mo ADDED
Binary file
languages/en_US.po ADDED
@@ -0,0 +1,359 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WhatsApp Chat by NinjaTeam\n"
4
+ "POT-Creation-Date: 2019-04-09 09:20+0700\n"
5
+ "PO-Revision-Date: 2019-04-09 09:20+0700\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
8
+ "Language: en_US\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.2\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
+ "X-Poedit-WPHeader: whatsapp.php\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
20
+ "_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
+ "X-Poedit-SearchPath-0: .\n"
22
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
23
+
24
+ #: includes/nta-whatsapp-post-type.php:16
25
+ msgid "WhatsApp Accounts"
26
+ msgstr ""
27
+
28
+ #: includes/nta-whatsapp-post-type.php:17
29
+ msgid "Whatsapp Account"
30
+ msgstr ""
31
+
32
+ #: includes/nta-whatsapp-post-type.php:18
33
+ #: includes/nta-whatsapp-post-type.php:19
34
+ msgid "Add New Account"
35
+ msgstr ""
36
+
37
+ #: includes/nta-whatsapp-post-type.php:20
38
+ msgid "Edit Account"
39
+ msgstr ""
40
+
41
+ #: includes/nta-whatsapp-post-type.php:21
42
+ msgid "New Account"
43
+ msgstr ""
44
+
45
+ #: includes/nta-whatsapp-post-type.php:22
46
+ msgid "All Accounts"
47
+ msgstr ""
48
+
49
+ #: includes/nta-whatsapp-post-type.php:23
50
+ msgid "View Accounts"
51
+ msgstr ""
52
+
53
+ #: includes/nta-whatsapp-post-type.php:24
54
+ msgid "Search Account"
55
+ msgstr ""
56
+
57
+ #: includes/nta-whatsapp-post-type.php:25
58
+ #: includes/nta-whatsapp-post-type.php:179
59
+ msgid "Avatar"
60
+ msgstr ""
61
+
62
+ #: includes/nta-whatsapp-post-type.php:26
63
+ msgid "Select an image"
64
+ msgstr ""
65
+
66
+ #: includes/nta-whatsapp-post-type.php:27
67
+ msgid "Remove avatar"
68
+ msgstr ""
69
+
70
+ #: includes/nta-whatsapp-post-type.php:32
71
+ msgid "Manager Accounts"
72
+ msgstr ""
73
+
74
+ #: includes/nta-whatsapp-post-type.php:178
75
+ msgid "Account Name"
76
+ msgstr ""
77
+
78
+ #: includes/nta-whatsapp-post-type.php:180
79
+ #: includes/nta-whatsapp-post-type.php:191
80
+ msgid "Number"
81
+ msgstr ""
82
+
83
+ #: includes/nta-whatsapp-post-type.php:181
84
+ #: views/nta-whatsapp-meta-accounts.php:19
85
+ msgid "Title"
86
+ msgstr ""
87
+
88
+ #: includes/nta-whatsapp-post-type.php:182
89
+ msgid "Active Days"
90
+ msgstr ""
91
+
92
+ #: includes/nta-whatsapp-post-type.php:183
93
+ msgid "Shortcode"
94
+ msgstr ""
95
+
96
+ #: includes/nta-whatsapp-post-type.php:192
97
+ msgid "Time Slot"
98
+ msgstr ""
99
+
100
+ #: includes/nta-whatsapp-setting.php:37
101
+ msgid "Add New account"
102
+ msgstr ""
103
+
104
+ #: includes/nta-whatsapp-setting.php:38
105
+ msgid "Floating Widget"
106
+ msgstr ""
107
+
108
+ #: includes/nta-whatsapp-setting.php:39 whatsapp.php:32
109
+ msgid "Settings"
110
+ msgstr ""
111
+
112
+ #: includes/nta-whatsapp-shortcode.php:136
113
+ #: includes/nta-whatsapp-shortcode.php:163
114
+ msgid "Online"
115
+ msgstr ""
116
+
117
+ #: includes/nta-whatsapp-shortcode.php:148
118
+ #: includes/nta-whatsapp-shortcode.php:176
119
+ msgid "Offline"
120
+ msgstr ""
121
+
122
+ #: views/nta-whatsapp-display-settings.php:6
123
+ msgid "Setting text and style for the floating widget."
124
+ msgstr ""
125
+
126
+ #: views/nta-whatsapp-display-settings.php:9
127
+ msgid "Show on desktop"
128
+ msgstr ""
129
+
130
+ #: views/nta-whatsapp-display-settings.php:18
131
+ msgid "Show on mobile"
132
+ msgstr ""
133
+
134
+ #: views/nta-whatsapp-display-settings.php:27
135
+ msgid "Widget Text"
136
+ msgstr ""
137
+
138
+ #: views/nta-whatsapp-display-settings.php:32
139
+ msgid "Widget Label"
140
+ msgstr ""
141
+
142
+ #: views/nta-whatsapp-display-settings.php:37
143
+ msgid "Response Time Text"
144
+ msgstr ""
145
+
146
+ #: views/nta-whatsapp-display-settings.php:42
147
+ msgid "Widget Text Color"
148
+ msgstr ""
149
+
150
+ #: views/nta-whatsapp-display-settings.php:47
151
+ msgid "Widget Background Color"
152
+ msgstr ""
153
+
154
+ #: views/nta-whatsapp-display-settings.php:52
155
+ msgid "Widget Position"
156
+ msgstr ""
157
+
158
+ #: views/nta-whatsapp-display-settings.php:57
159
+ msgid "Left"
160
+ msgstr ""
161
+
162
+ #: views/nta-whatsapp-display-settings.php:60
163
+ msgid "Right"
164
+ msgstr ""
165
+
166
+ #: views/nta-whatsapp-display-settings.php:68
167
+ msgid "Description"
168
+ msgstr ""
169
+
170
+ #: views/nta-whatsapp-display-settings.php:82
171
+ msgid "GDPR Notice"
172
+ msgstr ""
173
+
174
+ #: views/nta-whatsapp-display-settings.php:97
175
+ msgid "Display"
176
+ msgstr ""
177
+
178
+ #: views/nta-whatsapp-display-settings.php:101
179
+ msgid "Display all pages but except"
180
+ msgstr ""
181
+
182
+ #: views/nta-whatsapp-display-settings.php:102
183
+ msgid "Display for pages..."
184
+ msgstr ""
185
+
186
+ #: views/nta-whatsapp-display-settings.php:109
187
+ msgid "Select pages"
188
+ msgstr ""
189
+
190
+ #: views/nta-whatsapp-display-settings.php:166
191
+ msgid "Save Display Settings"
192
+ msgstr ""
193
+
194
+ #: views/nta-whatsapp-meta-accounts.php:6
195
+ msgid "Account Number or group chat URL"
196
+ msgstr ""
197
+
198
+ #: views/nta-whatsapp-meta-accounts.php:27
199
+ msgid "Predefined Text"
200
+ msgstr ""
201
+
202
+ #: views/nta-whatsapp-meta-accounts.php:38
203
+ msgid "Button Label"
204
+ msgstr ""
205
+
206
+ #: views/nta-whatsapp-meta-accounts.php:43
207
+ msgid ""
208
+ "This text applies only on shortcode button. Leave empty to use the default "
209
+ "label."
210
+ msgstr ""
211
+
212
+ #: views/nta-whatsapp-meta-accounts.php:49
213
+ msgid "Always available online"
214
+ msgstr ""
215
+
216
+ #: views/nta-whatsapp-meta-accounts.php:61
217
+ msgid "Custom Availability"
218
+ msgstr ""
219
+
220
+ #: views/nta-whatsapp-meta-accounts.php:69
221
+ msgid "Sunday"
222
+ msgstr ""
223
+
224
+ #: views/nta-whatsapp-meta-accounts.php:78
225
+ msgid "Apply to All Days"
226
+ msgstr ""
227
+
228
+ #: views/nta-whatsapp-meta-accounts.php:84
229
+ msgid "Monday"
230
+ msgstr ""
231
+
232
+ #: views/nta-whatsapp-meta-accounts.php:98
233
+ msgid "Tuesday"
234
+ msgstr ""
235
+
236
+ #: views/nta-whatsapp-meta-accounts.php:111
237
+ msgid "Wednesday"
238
+ msgstr ""
239
+
240
+ #: views/nta-whatsapp-meta-accounts.php:126
241
+ msgid "Thursday"
242
+ msgstr ""
243
+
244
+ #: views/nta-whatsapp-meta-accounts.php:141
245
+ msgid "Friday"
246
+ msgstr ""
247
+
248
+ #: views/nta-whatsapp-meta-accounts.php:156
249
+ msgid "Saturday"
250
+ msgstr ""
251
+
252
+ #: views/nta-whatsapp-meta-accounts.php:173
253
+ msgid "Description text when offline"
254
+ msgstr ""
255
+
256
+ #: views/nta-whatsapp-meta-button-style.php:2
257
+ msgid ""
258
+ "This styling applies only to the shortcode buttons for this account. Leave "
259
+ "blank to use the <a href=\"admin.php?page=nta_whatsapp\">default styles set "
260
+ "on the settings page"
261
+ msgstr ""
262
+
263
+ #: views/nta-whatsapp-meta-button-style.php:5
264
+ #: views/nta-whatsapp-settings.php:15
265
+ msgid "Button Style"
266
+ msgstr ""
267
+
268
+ #: views/nta-whatsapp-meta-button-style.php:10
269
+ #: views/nta-whatsapp-settings.php:20
270
+ msgid "Round"
271
+ msgstr ""
272
+
273
+ #: views/nta-whatsapp-meta-button-style.php:13
274
+ #: views/nta-whatsapp-settings.php:23
275
+ msgid "Square"
276
+ msgstr ""
277
+
278
+ #: views/nta-whatsapp-meta-button-style.php:22
279
+ #: views/nta-whatsapp-settings.php:32
280
+ msgid "Button Background Color"
281
+ msgstr ""
282
+
283
+ #: views/nta-whatsapp-meta-button-style.php:29
284
+ #: views/nta-whatsapp-settings.php:39
285
+ msgid "Button Text Color"
286
+ msgstr ""
287
+
288
+ #: views/nta-whatsapp-selected-accounts.php:6
289
+ #: views/nta-whatsapp-woocommerce-button.php:35
290
+ msgid "Selected Accounts:"
291
+ msgstr ""
292
+
293
+ #: views/nta-whatsapp-selected-accounts.php:27
294
+ msgid "Remove"
295
+ msgstr ""
296
+
297
+ #: views/nta-whatsapp-settings.php:5
298
+ msgid ""
299
+ "Use this form to set default style for shortcode buttons. You can reset the "
300
+ "style for individual button when creating/editing a WhatsApp account."
301
+ msgstr ""
302
+
303
+ #: views/nta-whatsapp-settings.php:8
304
+ msgid "Button Text"
305
+ msgstr ""
306
+
307
+ #: views/nta-whatsapp-settings.php:46
308
+ msgid "Save Changes"
309
+ msgstr ""
310
+
311
+ #: views/nta-whatsapp-woocommerce-button.php:8
312
+ msgid "Enabled"
313
+ msgstr ""
314
+
315
+ #: views/nta-whatsapp-woocommerce-button.php:17
316
+ msgid "Button position"
317
+ msgstr ""
318
+
319
+ #: views/nta-whatsapp-woocommerce-button.php:20
320
+ msgid "Before Add to Cart button"
321
+ msgstr ""
322
+
323
+ #: views/nta-whatsapp-woocommerce-button.php:21
324
+ msgid "After Add to Cart button"
325
+ msgstr ""
326
+
327
+ #: views/nta-whatsapp-woocommerce-button.php:22
328
+ msgid "After short description"
329
+ msgstr ""
330
+
331
+ #: views/nta-whatsapp-woocommerce-button.php:23
332
+ msgid "After long description"
333
+ msgstr ""
334
+
335
+ #: views/nta-whatsapp-woocommerce-button.php:28
336
+ msgid "Select accounts to display"
337
+ msgstr ""
338
+
339
+ #. Plugin Name of the plugin/theme
340
+ msgid "WhatsApp Chat by NinjaTeam"
341
+ msgstr ""
342
+
343
+ #. Plugin URI of the plugin/theme
344
+ msgid "https://ninjateam.org/wordpress-whatsapp-chat"
345
+ msgstr ""
346
+
347
+ #. Description of the plugin/theme
348
+ msgid ""
349
+ "Integrate your WhatsApp experience directly into your website. This is one "
350
+ "of the best way to connect and interact with your customer."
351
+ msgstr ""
352
+
353
+ #. Author of the plugin/theme
354
+ msgid "NinjaTeam"
355
+ msgstr ""
356
+
357
+ #. Author URI of the plugin/theme
358
+ msgid "https://ninjateam.org"
359
+ msgstr ""
languages/ninjateam-whatsapp.pot ADDED
@@ -0,0 +1,400 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
+ "Project-Id-Version: WhatsApp Chat by NinjaTeam\n"
6
+ "POT-Creation-Date: 2020-09-14 15:43+0700\n"
7
+ "PO-Revision-Date: 2020-09-14 15:43+0700\n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: \n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.4.1\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
+ "X-Poedit-WPHeader: whatsapp.php\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
20
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
+ "X-Poedit-SearchPath-0: .\n"
22
+ "X-Poedit-SearchPathExcluded-0: *.min.js\n"
23
+
24
+ #: includes/nta-whatsapp-ads.php:64
25
+ msgid ""
26
+ "To easily manage your files in WordPress media library with folders, please "
27
+ "try to use FileBird plugin."
28
+ msgstr ""
29
+
30
+ #: includes/nta-whatsapp-ads.php:67
31
+ msgid "I'm feeling lucky"
32
+ msgstr ""
33
+
34
+ #: includes/nta-whatsapp-ads.php:70
35
+ msgid "Go FileBird Pro"
36
+ msgstr ""
37
+
38
+ #: includes/nta-whatsapp-ads.php:73
39
+ msgid "No, thanks"
40
+ msgstr ""
41
+
42
+ #: includes/nta-whatsapp-post-type.php:25
43
+ msgid "WhatsApp Accounts"
44
+ msgstr ""
45
+
46
+ #: includes/nta-whatsapp-post-type.php:26
47
+ msgid "Whatsapp Account"
48
+ msgstr ""
49
+
50
+ #: includes/nta-whatsapp-post-type.php:27
51
+ #: includes/nta-whatsapp-post-type.php:28
52
+ msgid "Add New Account"
53
+ msgstr ""
54
+
55
+ #: includes/nta-whatsapp-post-type.php:29
56
+ msgid "Edit Account"
57
+ msgstr ""
58
+
59
+ #: includes/nta-whatsapp-post-type.php:30
60
+ msgid "New Account"
61
+ msgstr ""
62
+
63
+ #: includes/nta-whatsapp-post-type.php:31
64
+ msgid "All Accounts"
65
+ msgstr ""
66
+
67
+ #: includes/nta-whatsapp-post-type.php:32
68
+ msgid "View Accounts"
69
+ msgstr ""
70
+
71
+ #: includes/nta-whatsapp-post-type.php:33
72
+ msgid "Search Account"
73
+ msgstr ""
74
+
75
+ #: includes/nta-whatsapp-post-type.php:34
76
+ #: includes/nta-whatsapp-post-type.php:202
77
+ msgid "Avatar"
78
+ msgstr ""
79
+
80
+ #: includes/nta-whatsapp-post-type.php:35
81
+ msgid "Select an image"
82
+ msgstr ""
83
+
84
+ #: includes/nta-whatsapp-post-type.php:36
85
+ msgid "Remove avatar"
86
+ msgstr ""
87
+
88
+ #: includes/nta-whatsapp-post-type.php:41
89
+ msgid "Manager Accounts"
90
+ msgstr ""
91
+
92
+ #: includes/nta-whatsapp-post-type.php:201
93
+ msgid "Account Name"
94
+ msgstr ""
95
+
96
+ #: includes/nta-whatsapp-post-type.php:203
97
+ #: includes/nta-whatsapp-post-type.php:214
98
+ msgid "Number"
99
+ msgstr ""
100
+
101
+ #: includes/nta-whatsapp-post-type.php:204
102
+ #: views/nta-whatsapp-meta-accounts.php:20
103
+ msgid "Title"
104
+ msgstr ""
105
+
106
+ #: includes/nta-whatsapp-post-type.php:205
107
+ msgid "Active Days"
108
+ msgstr ""
109
+
110
+ #: includes/nta-whatsapp-post-type.php:206
111
+ msgid "Shortcode"
112
+ msgstr ""
113
+
114
+ #: includes/nta-whatsapp-post-type.php:215
115
+ msgid "Time Slot"
116
+ msgstr ""
117
+
118
+ #: includes/nta-whatsapp-setting.php:38
119
+ msgid "Add New account"
120
+ msgstr ""
121
+
122
+ #: includes/nta-whatsapp-setting.php:39
123
+ msgid "Floating Widget"
124
+ msgstr ""
125
+
126
+ #: includes/nta-whatsapp-setting.php:40 whatsapp.php:32
127
+ msgid "Settings"
128
+ msgstr ""
129
+
130
+ #: includes/nta-whatsapp-shortcode.php:145
131
+ #: includes/nta-whatsapp-shortcode.php:172
132
+ msgid "Online"
133
+ msgstr ""
134
+
135
+ #: includes/nta-whatsapp-shortcode.php:157
136
+ #: includes/nta-whatsapp-shortcode.php:185
137
+ msgid "Offline"
138
+ msgstr ""
139
+
140
+ #: views/nta-whatsapp-display-settings.php:6
141
+ msgid "Setting text and style for the floating widget."
142
+ msgstr ""
143
+
144
+ #: views/nta-whatsapp-display-settings.php:9
145
+ msgid "Show on desktop"
146
+ msgstr ""
147
+
148
+ #: views/nta-whatsapp-display-settings.php:18
149
+ msgid "Show on mobile"
150
+ msgstr ""
151
+
152
+ #: views/nta-whatsapp-display-settings.php:27
153
+ msgid "Widget Text"
154
+ msgstr ""
155
+
156
+ #: views/nta-whatsapp-display-settings.php:32
157
+ msgid "Widget Label"
158
+ msgstr ""
159
+
160
+ #: views/nta-whatsapp-display-settings.php:37
161
+ msgid "Response Time Text"
162
+ msgstr ""
163
+
164
+ #: views/nta-whatsapp-display-settings.php:42
165
+ msgid "Widget Text Color"
166
+ msgstr ""
167
+
168
+ #: views/nta-whatsapp-display-settings.php:47
169
+ msgid "Widget Background Color"
170
+ msgstr ""
171
+
172
+ #: views/nta-whatsapp-display-settings.php:52
173
+ msgid "Widget Position"
174
+ msgstr ""
175
+
176
+ #: views/nta-whatsapp-display-settings.php:57
177
+ msgid "Left"
178
+ msgstr ""
179
+
180
+ #: views/nta-whatsapp-display-settings.php:60
181
+ msgid "Right"
182
+ msgstr ""
183
+
184
+ #: views/nta-whatsapp-display-settings.php:68
185
+ msgid "Description"
186
+ msgstr ""
187
+
188
+ #: views/nta-whatsapp-display-settings.php:82
189
+ msgid "GDPR Notice"
190
+ msgstr ""
191
+
192
+ #: views/nta-whatsapp-display-settings.php:97
193
+ msgid "Display"
194
+ msgstr ""
195
+
196
+ #: views/nta-whatsapp-display-settings.php:101
197
+ msgid "Display all pages except"
198
+ msgstr ""
199
+
200
+ #: views/nta-whatsapp-display-settings.php:102
201
+ msgid "Display for pages..."
202
+ msgstr ""
203
+
204
+ #: views/nta-whatsapp-display-settings.php:104
205
+ msgid ""
206
+ "Select type you want to display WhatsApp Widget (If it does not display in "
207
+ "WooCommerce pages, please make sure you selected 'Display all pages except' "
208
+ "option)"
209
+ msgstr ""
210
+
211
+ #: views/nta-whatsapp-display-settings.php:109
212
+ msgid "Select pages"
213
+ msgstr ""
214
+
215
+ #: views/nta-whatsapp-display-settings.php:162
216
+ msgid "Save Display Settings"
217
+ msgstr ""
218
+
219
+ #: views/nta-whatsapp-ga.php:4
220
+ msgid ""
221
+ "By enabling this function, you can see our WhatsApp tracking in your Google "
222
+ "Analytics > Behavior > Events."
223
+ msgstr ""
224
+
225
+ #: views/nta-whatsapp-ga.php:8 views/nta-whatsapp-woocommerce-button.php:8
226
+ msgid "Enabled"
227
+ msgstr ""
228
+
229
+ #: views/nta-whatsapp-ga.php:18
230
+ msgid "Save"
231
+ msgstr ""
232
+
233
+ #: views/nta-whatsapp-meta-accounts.php:6
234
+ msgid "Account Number or group chat URL"
235
+ msgstr ""
236
+
237
+ #: views/nta-whatsapp-meta-accounts.php:14
238
+ msgid ""
239
+ "Refer to <a href=\"https://faq.whatsapp.com/en/general/21016748\" target="
240
+ "\"_blank\">https://faq.whatsapp.com/en/general/21016748</a> for a detailed "
241
+ "explanation."
242
+ msgstr ""
243
+
244
+ #: views/nta-whatsapp-meta-accounts.php:28
245
+ msgid "Predefined Text"
246
+ msgstr ""
247
+
248
+ #: views/nta-whatsapp-meta-accounts.php:33
249
+ msgid ""
250
+ "Use [njwa_page_title] and [njwa_page_url] shortcodes to output the page's "
251
+ "title and URL respectively."
252
+ msgstr ""
253
+
254
+ #: views/nta-whatsapp-meta-accounts.php:39
255
+ msgid "Button Label"
256
+ msgstr ""
257
+
258
+ #: views/nta-whatsapp-meta-accounts.php:44
259
+ msgid ""
260
+ "This text applies only on shortcode button. Leave empty to use the default "
261
+ "label."
262
+ msgstr ""
263
+
264
+ #: views/nta-whatsapp-meta-accounts.php:50
265
+ msgid "Always available online"
266
+ msgstr ""
267
+
268
+ #: views/nta-whatsapp-meta-accounts.php:62
269
+ msgid "Custom Availability"
270
+ msgstr ""
271
+
272
+ #: views/nta-whatsapp-meta-accounts.php:81
273
+ msgid "Apply to All Days"
274
+ msgstr ""
275
+
276
+ #: views/nta-whatsapp-meta-accounts.php:91
277
+ msgid "Description text when offline"
278
+ msgstr ""
279
+
280
+ #: views/nta-whatsapp-meta-accounts.php:94
281
+ msgid ""
282
+ "You can use shortcode [njwa_time_work] to display the exact time this "
283
+ "account is back to work on a working day."
284
+ msgstr ""
285
+
286
+ #: views/nta-whatsapp-meta-accounts.php:96
287
+ msgid "You can use this text to display on days this account does not work."
288
+ msgstr ""
289
+
290
+ #: views/nta-whatsapp-meta-button-style.php:2
291
+ msgid ""
292
+ "This styling applies only to the shortcode buttons for this account. Leave "
293
+ "blank to use the <a href=\"admin.php?page=nta_whatsapp\">default styles set "
294
+ "on the settings page"
295
+ msgstr ""
296
+
297
+ #: views/nta-whatsapp-meta-button-style.php:5
298
+ #: views/nta-whatsapp-settings.php:15
299
+ msgid "Button Style"
300
+ msgstr ""
301
+
302
+ #: views/nta-whatsapp-meta-button-style.php:10
303
+ #: views/nta-whatsapp-settings.php:20
304
+ msgid "Round"
305
+ msgstr ""
306
+
307
+ #: views/nta-whatsapp-meta-button-style.php:13
308
+ #: views/nta-whatsapp-settings.php:23
309
+ msgid "Square"
310
+ msgstr ""
311
+
312
+ #: views/nta-whatsapp-meta-button-style.php:22
313
+ #: views/nta-whatsapp-settings.php:32
314
+ msgid "Button Background Color"
315
+ msgstr ""
316
+
317
+ #: views/nta-whatsapp-meta-button-style.php:29
318
+ #: views/nta-whatsapp-settings.php:39
319
+ msgid "Button Text Color"
320
+ msgstr ""
321
+
322
+ #: views/nta-whatsapp-selected-accounts.php:6
323
+ #: views/nta-whatsapp-woocommerce-button.php:35
324
+ msgid "Selected Accounts:"
325
+ msgstr ""
326
+
327
+ #: views/nta-whatsapp-selected-accounts.php:29
328
+ #: views/nta-whatsapp-woocommerce-button.php:59
329
+ msgid "Remove"
330
+ msgstr ""
331
+
332
+ #: views/nta-whatsapp-settings.php:5
333
+ msgid ""
334
+ "Use this form to set default style for shortcode buttons. You can reset the "
335
+ "style for individual button when creating/editing a WhatsApp account."
336
+ msgstr ""
337
+
338
+ #: views/nta-whatsapp-settings.php:8
339
+ msgid "Button Text"
340
+ msgstr ""
341
+
342
+ #: views/nta-whatsapp-settings.php:46
343
+ msgid "Save Changes"
344
+ msgstr ""
345
+
346
+ #: views/nta-whatsapp-woocommerce-button.php:4
347
+ msgid ""
348
+ "Use the form below to automatically display buttons on WooCommerce product "
349
+ "page."
350
+ msgstr ""
351
+
352
+ #: views/nta-whatsapp-woocommerce-button.php:17
353
+ msgid "Button position"
354
+ msgstr ""
355
+
356
+ #: views/nta-whatsapp-woocommerce-button.php:20
357
+ msgid "Before Add to Cart button"
358
+ msgstr ""
359
+
360
+ #: views/nta-whatsapp-woocommerce-button.php:21
361
+ msgid "After Add to Cart button"
362
+ msgstr ""
363
+
364
+ #: views/nta-whatsapp-woocommerce-button.php:22
365
+ msgid "After short description"
366
+ msgstr ""
367
+
368
+ #: views/nta-whatsapp-woocommerce-button.php:23
369
+ msgid "After long description"
370
+ msgstr ""
371
+
372
+ #: views/nta-whatsapp-woocommerce-button.php:28
373
+ msgid "Select accounts to display"
374
+ msgstr ""
375
+
376
+ #: views/nta-whatsapp-woocommerce-button.php:74
377
+ msgid "Save WooCommerce Button"
378
+ msgstr ""
379
+
380
+ #. Plugin Name of the plugin/theme
381
+ msgid "WhatsApp Chat by NinjaTeam"
382
+ msgstr ""
383
+
384
+ #. Plugin URI of the plugin/theme
385
+ msgid "https://ninjateam.org/wordpress-whatsapp-chat"
386
+ msgstr ""
387
+
388
+ #. Description of the plugin/theme
389
+ msgid ""
390
+ "Integrate your WhatsApp experience directly into your website. This is one "
391
+ "of the best way to connect and interact with your customer."
392
+ msgstr ""
393
+
394
+ #. Author of the plugin/theme
395
+ msgid "NinjaTeam"
396
+ msgstr ""
397
+
398
+ #. Author URI of the plugin/theme
399
+ msgid "https://ninjateam.org"
400
+ msgstr ""
readme.txt ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === WP Chat App ===
2
+ Contributors: ninjateam
3
+ Tags: click to chat whatsapp, whatsapp, whatsapp chat wordpress, whatsapp click to chat, whatsapp wordpress, wp whatsapp, click to chat wp, whatsapp plugin, chat, contact, whats app, wame, wp social chat, join chat
4
+ Requires at least: 3.0
5
+ Tested up to: 5.7
6
+ Stable tag: trunk
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ Integrate WhatsApp experience directly into your WordPress website.
11
+
12
+
13
+ == Description ==
14
+
15
+
16
+ WhatsApp Chat plugin for WordPress allows you to enable WhatsApp click-to-chat widget on your website. This is the best way to connect and interact with your audience. Via WhatsApp button, you can offer support directly, build trust and increase customer loyalty.
17
+
18
+ [DEMO](https://demo.ninjateam.org/whatsapp-chat-wordpress/) | [DOCUMENTATION](https://ninjateam.org/wordpress-whatsapp-chat-tutorial/)
19
+
20
+ VIDEO DEMO
21
+ [youtube https://www.youtube.com/watch?v=7YNIHLtiNo4]
22
+
23
+ ###⚡️ FEATURES
24
+
25
+ **MULTIPLE AGENT ACCOUNTS**
26
+ WhatsApp Chat plugin allows you to add multiple accounts of your members into a WhatsApp box to display. You can choose a specific agent to show on a particular page, or show them all.
27
+
28
+ **ENHANCED RELATIONSHIP**
29
+ It’s always better to greet someone by name. Thus, it’s much better when your customers know whom they’re talking to. That's how you can create mutual trust through chat communication and build customer loyalty by leaving a good impression from the very first conversation.
30
+
31
+ **EASY TO USE**
32
+ WhatsApp Chat plugin provides the options to pick colors for the WhatsApp button to fit your website style and brand. Moreover, you can customize each agent profile depending on their working hours, avatar, name tag and job title.
33
+
34
+ **SUPPORT WPML**
35
+ Running multilingual websites? Don’t worry! You can use any WordPress translation plugins like WPML, Polylang, etc. to customize available languages on your site easily.
36
+
37
+ **SHORTCODE INCLUDED**
38
+ With shortcode from WP WhatsApp Chat plugin, you can display the click-to-WhatsApp widget anywhere on your site. It can be a page, a post, sidebar, widget, or other elements of your website builder.
39
+
40
+ **NO CODING REQUIRED**
41
+ We took the hardest part of coding. We've dedicated to designing and making UI/UX simple as best as we can. All you need to do is to activate the plugin, fill your WhatsApp numbers, customize all the available options and Done!
42
+
43
+ ###🚀 HOW IT WORKS
44
+
45
+ After activating, you can add your WhatsApp number for the floating widget. This is where your visitors can reach you and see multiple WhatsApp accounts of your store support agents with his/her own name, title, avatar and greetings.
46
+
47
+ Otherwise, you can add a WhatsApp block in Gutenberg editor. There, you can easily find the block settings and customize your text, button color and phone number as you see fit for your campaign, giveaway, coupon code, etc.
48
+
49
+ You then can get back to answer whatever questions your customers have, or even set an automated reply to those messages using the WhatsApp Business App.
50
+
51
+ Enjoy conversations with your customers anytime & anywhere! It's never been easier to capture your potential leads!
52
+
53
+ ###🎉 COMPATIBILITY
54
+
55
+ WP Chat App plugin has been developed to be compatible with the most popular WordPress page builders, themes and plugins.
56
+
57
+ It's perfect to combine WhatsApp customer support plugin with [Facebook marketing plugins](https://1.envato.market/Marketing-Toolkit) or [FileBird - WordPress Media Library Folders](https://ninjateam.org/wordpress-media-library-folders/).
58
+
59
+ ###🤟 FUN FACTS
60
+ - This plugin works seamlessly with [WhatsApp Business App](https://www.whatsapp.com/business/).
61
+ - You can run a WhatsApp campaign on Facebook Ads. Your audience will see the call-to-action of “Send message on WhatsApp” on display ads.
62
+ - You can suggest questions for people to tap in the omnichannel Messenger-WhatsApp marketing campaigns.
63
+ - The WhatsApp Business app includes product catalog, away messages, quick replies and customer/order labels.
64
+ - You can get back to those audience anytime you want.
65
+ - WP Chat App plugin is optimized for WooCommerce product pages.
66
+
67
+ == Installation ==
68
+ Manual installation is easy and takes fewer than one minute.
69
+
70
+ 1. Download the plugin from wordpress.org, unpack it and upload the <strong>[WP WhatsApp]</strong> folder to your <strong>wp-content/plugins/</strong> directory.
71
+ 2. Activate the plugin through the ‘Plugins‘ menu in WordPress.
72
+ 3. Go to your main <strong>WordPress menu > WhatsApp</strong> to start add your WhatsApp accounts.
73
+ 4. Go to Floating Widget to select the WhatsApp profile to display on your website.
74
+
75
+ Done! Happy chatting!
76
+
77
+ == Frequently Asked Questions ==
78
+ = Is it compatible with WordPress 5? =
79
+ Definitely yes! We’re always up-to-date to give you the best experience in using our plugin.
80
+
81
+ = Is it works with multi-language site =
82
+ Yes, You can use translation plugin like WPML to customize any languages on your site easily and quickly.
83
+
84
+ = Is WP WhatsApp free? =
85
+ Yes, NinjaTeam's WP WhatsApp is completely free to use. You can check out [FileBird plugin here](https://wordpress.org/plugins/filebird/). It's free, too.
86
+
87
+ = Should I purchase a paid plan? =
88
+ If you want to use premium features, you can [upgrade to WhatsApp Chat WordPress PRO here](https://1.envato.market/WP-WhatsApp).
89
+
90
+ == Screenshots ==
91
+ 1. Allows you to integrate your WhatsApp experience directly into your WordPress website
92
+ 2. Making contact and connecting with your business easier & no potential customers ignored
93
+ 3. WhatsApp Gutenberg Block Demo
94
+
95
+ == Changelog ==
96
+
97
+ = Nov 5, 2020 – Version 2.6 =
98
+ - Improved: Permissions
99
+ - Removed: Missing tags
100
+ - Fixed: Conflict with Oxygen builder
101
+ - Fixed: Script warnings
102
+ - Fixed: Small bugs
103
+
104
+ = Sep 14, 2020 – Version 2.5 =
105
+ - Improved: Floating widget
106
+ - Fixed: Duplicate WhatsApp button in WooCommerce product pages
107
+ - Fixed: Detect time by WordPress timezone setting
108
+
109
+ = Sep 1, 2020 – Version 2.4 =
110
+ - Added: Google Analytics
111
+ - Added: Support multisite
112
+ - Updated: Pot file
113
+ - Changed: Some text
114
+ - Removed: Unused files
115
+ - Fixed: Some small bugs
116
+
117
+ = Jun 9, 2020 – Version 2.3.3 =
118
+ - Fixed: WPML and Floating Widget
119
+
120
+ = May 15, 2020 – Version 2.3.2 =
121
+ - Fixed: WPML and Polylang translation compatibility
122
+
123
+ = Feb 24, 2020 – Version 2.3.1 =
124
+ - Fixed: Get pages error (thanks to bhdrdnz)
125
+
126
+ = Feb 12, 2020 – Version 2.3 =
127
+ - Fixed: Replace link detected in device
128
+ - Fixed: Time availibility not correctly
129
+ - Fixed: Display in page chosen
130
+
131
+ = Nov 21, 2019 – Version 2.2.1 =
132
+ - Fixed: WPML conflict
133
+
134
+ = Apr 9, 2019 – Version 2.2
135
+ - Added: Translation files (Spanish, Portuguese, German, French, Russian)
136
+
137
+ = Feb 28, 2019 – Version 2.1.1 =
138
+ - Fixed: Widget disappears once there are too many accounts
139
+
140
+ = Jan 28, 2019 – Version 2.1 =
141
+ - Added: Option to enable/ disable GDPR
142
+ - Improved: Work on WordPress with/ without Gutenberg
143
+ - Fixed: Small bugs
144
+
145
+ = 2.0 =
146
+ * Added: Select pages to display WhatsApp box
147
+ * Added: Select devices desktop/ mobile
148
+ * Added: Notice alert for wrong phone number/ group link input
149
+ * Added: Translation files (Spanish, Portuguese, German, French, Russian)
150
+ * Added: GDPR notice with privacy policy link
151
+ * Added: Support Gutenberg
152
+ * Added: Option always online
153
+ * Added: Option to enable/ disable GDPR
154
+ * Added: Edit response time text
155
+ * Added: On/Off for widget
156
+ * Added: Multi-Languages
157
+ * Added: Widget label option
158
+ * Added: Default settings
159
+ * Added: Ajax accounts loading
160
+
161
+ * Improved: Translation with PoEdit
162
+ * Improved: Clean code
163
+ * Improved: Work on WordPress with/ without Gutenberg
164
+ * Improved: Optimize plugin
165
+ * Improved: Loading speed when select account
166
+ * Improved: UI/UX
167
+ * Improved: Important updates
168
+ * Improved: Link to WhatsApp app on phone
169
+ * Improved: List accounts pages
170
+
171
+
172
+ * Fixed: Get pages error (thanks to bhdrdnz)
173
+ * Fixed: Replace link detected in device
174
+ * Fixed: Time availibility not correctly
175
+ * Fixed: Display in page chosen
176
+ * Fixed: WPML conflict
177
+ * Fixed: Widget disappears once there are too many accounts
178
+ * Fixed: Work with sever cache
179
+ * Fixed: GDPR CSS
180
+ * Fixed: Error on WooCommerce variable products
181
+ * Fixed: Some small bugs
182
+ * Fixed: Group link, links in label description
183
+ * Fixed: Loading languages
184
+ * Fixed: Update options for new version
185
+ * Fixed: CSS for button
186
+ * Fixed: Display settings for WhatsApp Widget
187
+ * Fixed: Some small bugs
188
+
189
+ = 1.1 =
190
+ * Added: Time Availability
191
+ * Added: Shortcode [njwa_time_work] for each account
192
+ * Added: Button shortcode
193
+ * Improved: UI/UX
194
+
195
+ = 1.0 =
196
+ * Version 1.0 Initial Release
scripts/css/style.css ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ To change this license header, choose License Headers in Project Properties.
3
+ To change this template file, choose Tools | Templates
4
+ and open the template in the editor.
5
+ */
6
+ /*
7
+ Created on : Oct 15, 2018, 4:01:41 PM
8
+ Author : tatthang96
9
+ */
10
+ .img-size-table{
11
+ max-width: 48px;
12
+ max-height: 48px;
13
+ }
14
+
15
+ .ui-autocomplete-loading{
16
+ background-position-x: 365px !important;
17
+ }
18
+
19
+
20
+ .time-available td{
21
+ padding: 0px;
22
+ }
23
+
24
+ .time-available{
25
+ margin: 0px;
26
+ }
27
+ /*List Account*/
28
+ .nta-list-box-accounts{
29
+ max-width: 390px;
30
+ }
31
+
32
+ .nta-list-box-select{
33
+ max-width: 388px;
34
+ box-shadow: 0px 8px 7px 0px rgba(0, 0, 0, 0.05);
35
+ }
36
+ .nta-list-box-accounts .nta-list-items{
37
+ background-color: #fff;
38
+ }
39
+
40
+ .nta-list-box-accounts .nta-list-items:hover{
41
+ cursor: move;
42
+ }
43
+
44
+ .nta-list-box-accounts .nta-list-items:hover .icon-block img{
45
+ opacity: 1;
46
+ }
47
+
48
+ :not(:last-child).nta-list-items{
49
+ border-bottom: 1px solid #F2F2F2;
50
+ }
51
+
52
+ .nta-list-items .box-content:not(.box-content-woo){
53
+ display: table;
54
+ padding: 10px;
55
+ }
56
+
57
+ .nta-list-items .box-content-woo{
58
+ padding: 10px;
59
+ }
60
+
61
+ .box-content .box-row{
62
+ display: table-row;
63
+ }
64
+
65
+ .box-content .btn-remove-account{
66
+ color: red;
67
+ }
68
+
69
+ .box-content .account-avatar{
70
+ display: table-cell;
71
+ text-align: center;
72
+ width: 50px;
73
+ vertical-align: top;
74
+ }
75
+
76
+ .icon-block img{
77
+ opacity: 0.7;
78
+ }
79
+
80
+ .account-avatar .wa_img_wrap{
81
+ width: 48px;
82
+ height: 48px;
83
+ border-radius: 50%;
84
+ -webkit-border-radius: 50%;
85
+ -moz-border-radius: 50%;
86
+
87
+ }
88
+
89
+ .box-content .container-block{
90
+ display: table-cell;
91
+ vertical-align: middle;
92
+ padding-left: 10px;
93
+ }
94
+
95
+ .box-content .container-block a{
96
+ text-decoration: none;
97
+ }
98
+
99
+ .box-content .container-block ul{
100
+ margin: 0px;
101
+ }
102
+
103
+ .nta-list-box-select .box-content .container-block span{
104
+
105
+ }
106
+
107
+ .box-content .container-block span{
108
+ margin-right: 3px;
109
+ display: inline-block;
110
+ padding: 2px 5px;
111
+ border-radius: 3px;
112
+ background-color: #C9CFD6;
113
+ line-height: 1.4;
114
+ color: #fff;
115
+ }
116
+
117
+ .box-content .container-block span.active-date{
118
+ background-color: #00BC28;
119
+ }
120
+
121
+ .box-content .container-block h4{
122
+ color: #3584b5;
123
+ margin: 0px 0px 5px;
124
+ }
125
+
126
+ .box-content .container-block p{
127
+ margin: 0px 0px 5px;
128
+ }
129
+
130
+ .nta-list-box-accounts .box-content .container-block{
131
+ width: 280px;
132
+ }
133
+
134
+ .box-content .icon-block{
135
+ display: table-cell;
136
+ vertical-align: middle;
137
+ }
138
+
139
+ /*All Accounts Admin Page*/
140
+
141
+ /*Selected Account*/
142
+
143
+ #nta_wa_avatar{
144
+ width: 8%;
145
+ }
146
+
147
+ #nta_wa_number{
148
+ width: 15%;
149
+ }
150
+
151
+ .nta-shortcode-table{
152
+ min-width: 165px;
153
+ }
154
+
155
+ .post-type-whatsapp-accounts #remove-post-thumbnail{
156
+ color: #a00;
157
+ }
158
+
159
+ .nta-list-box-select {
160
+ max-height: 293px;
161
+ overflow-y: auto;
162
+ }
163
+
164
+ .nta-list-box-select .ui-menu-item:hover{
165
+ background-color: #F7F9FB;
166
+ cursor: pointer;
167
+ }
168
+
169
+ .nta-list-box-select .ui-menu-item{
170
+ padding: 0px;
171
+ }
172
+
173
+ :not(:last-child).ui-menu-item{
174
+ border-bottom: 1px solid #F2F2F2;
175
+ }
176
+
177
+
178
+
179
+ #input-account{
180
+ width: 390px;
181
+ }
182
+
183
+ .nta-list-box-select .box-content .container-block{
184
+ width: 300px;
185
+ }
186
+
187
+
188
+ #input-users, #input-users-woo{
189
+ width: 390px;
190
+ background-color: #F7F9FB;
191
+ }
192
+
193
+
194
+ /*ADMIN TAB STYLE*/
195
+ .nta-tab-wrapper .nav-tab-active{
196
+ border-bottom: 1px solid #fff;
197
+ }
198
+
199
+ .nta-selected-tab{
200
+ margin-left: 0px;
201
+ background: #fff;
202
+ }
203
+
204
+ .nta-display-setting-tab{
205
+ background: #fff;
206
+ }
207
+
208
+ .nta-tabs-content{
209
+ border: 1px solid #dfdfdf;
210
+ border-top: none;
211
+ padding: 20px;
212
+ background: #fff;
213
+ }
214
+
215
+
216
+ /*SVG SIZE AVTAR*/
217
+ .nta-whatsapp-default-avatar{
218
+ width: 48px;
219
+ height: 48px;
220
+ }
221
+
222
+ /*ON/OFF BUTTON STYLE*/
223
+
224
+ #nta-wa-switch:checked + label.red {
225
+ background: #ECA9A7;
226
+ }
227
+ #nta-wa-switch:checked + label.red:after {
228
+ background: #D9534F;
229
+ }
230
+ #nta-wa-switch:checked + label.green {
231
+ background: #AEDCAE;
232
+ }
233
+ #nta-wa-switch:checked + label.green:after {
234
+ background: #5CB85C;
235
+ }
236
+ #nta-wa-switch:checked + label:after {
237
+ left: calc(100% - 18px);
238
+ }
239
+ #nta-wa-switch + label {
240
+ background: #ddd;
241
+ border-radius: 20px;
242
+ }
243
+ #nta-wa-switch + label:after {
244
+ background: #fff;
245
+ border-radius: 50%;
246
+ width: 16px;
247
+ height: 16px;
248
+ top: 2px;
249
+ left: 2px;
250
+ }
251
+
252
+ /* Duplication for another checkbox */
253
+ /* Display on mobile */
254
+ #nta-wa-switch-mb:checked + label.green {
255
+ background: #AEDCAE;
256
+ }
257
+ #nta-wa-switch-mb:checked + label.green:after {
258
+ background: #5CB85C;
259
+ }
260
+ #nta-wa-switch-mb:checked + label:after {
261
+ left: calc(100% - 18px);
262
+ }
263
+ #nta-wa-switch-mb + label {
264
+ background: #ddd;
265
+ border-radius: 20px;
266
+ }
267
+ #nta-wa-switch-mb + label:after {
268
+ background: #fff;
269
+ border-radius: 50%;
270
+ width: 16px;
271
+ height: 16px;
272
+ top: 2px;
273
+ left: 2px;
274
+ }
275
+ /* Display GDPR */
276
+ #nta-wa-switch-gdpr:checked + label.green {
277
+ background: #AEDCAE;
278
+ }
279
+ #nta-wa-switch-gdpr:checked + label.green:after {
280
+ background: #5CB85C;
281
+ }
282
+ #nta-wa-switch-gdpr:checked + label:after {
283
+ left: calc(100% - 18px);
284
+ }
285
+ #nta-wa-switch-gdpr + label {
286
+ background: #ddd;
287
+ border-radius: 20px;
288
+ }
289
+ #nta-wa-switch-gdpr + label:after {
290
+ background: #fff;
291
+ border-radius: 50%;
292
+ width: 16px;
293
+ height: 16px;
294
+ top: 2px;
295
+ left: 2px;
296
+ }
297
+ /* End of duplication */
298
+
299
+
300
+ .nta-wa-switch-control input[type=checkbox] {
301
+ display: none;
302
+ }
303
+ .nta-wa-switch-control input[type=checkbox] + label {
304
+ display: inline-block;
305
+ width: 40px;
306
+ height: 20px;
307
+ position: relative;
308
+ transition: 0.3s;
309
+ /*margin: 0px 20px;*/
310
+ box-sizing: border-box;
311
+ }
312
+ .nta-wa-switch-control input[type=checkbox] + label:after, input[type=checkbox] + label:before {
313
+ content: "";
314
+ display: block;
315
+ position: absolute;
316
+ left: 0px;
317
+ top: 0px;
318
+ width: 20px;
319
+ height: 20px;
320
+ transition: 0.3s;
321
+ cursor: pointer;
322
+ }
323
+
324
+ /* JQUERY UI AUTOCOMPLE CUSTOM */
325
+ .whatsapp_page_floating-widget-whatsapp .ui-autocomplete .ui-menu-item.ui-state-focus{
326
+ background-color: #F7F9FB;
327
+ }
328
+
329
+ .toplevel_page_nta_whatsapp .ui-autocomplete .ui-menu-item.ui-state-focus{
330
+ background-color: #F7F9FB;
331
+ }
332
+
333
+ .wa-validate-error{
334
+ color: red;
335
+ }
336
+
337
+ /* DISPLAY PAGES FLOATING WIDGET CSS */
338
+ .nta-wa-pages-content{
339
+ padding-top: 20px !important;
340
+ }
341
+
342
+ #nta-wa-pages-checkall-show, #nta-wa-pages-checkall-hide{
343
+ margin-left: 16px;
344
+ }
345
+
346
+ #nta-wa-display-pages-list{
347
+ max-height: 150px;
348
+ overflow-y: scroll;
349
+ background: #fff;
350
+ padding: 15px;
351
+ border: 1px solid #dfdfdf;
352
+ }
353
+
354
+ .hide-select{
355
+ display: none !important;
356
+ }
scripts/js/admin-scripts.js ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function ($) {
2
+ //Validate form with JQuery----------
3
+ jQuery.validator.addMethod("domain", function(value, element) {
4
+ return this.optional(element)
5
+ || /^https:\/\/chat.whatsapp.com/.test(value)
6
+ || /^(\+)?\d+$/.test(value)
7
+ }, "Please enter a valid phone number or group link");
8
+ jQuery.validator.setDefaults({
9
+ //debug: true,
10
+ errorClass: "wa-validate-error",
11
+ success: "valid",
12
+ });
13
+ $( ".post-type-whatsapp-accounts #post" ).validate({
14
+ rules: {
15
+ nta_group_number: {
16
+ required: true,
17
+ domain: true,
18
+ }
19
+ }
20
+ });
21
+ //Validate-----------------
22
+
23
+ var svgImage = `<svg width="48px" height="48px" class="nta-whatsapp-default-avatar" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
24
+ viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
25
+ <path style="fill:#EDEDED;" d="M0,512l35.31-128C12.359,344.276,0,300.138,0,254.234C0,114.759,114.759,0,255.117,0
26
+ S512,114.759,512,254.234S395.476,512,255.117,512c-44.138,0-86.51-14.124-124.469-35.31L0,512z"/>
27
+ <path style="fill:#55CD6C;" d="M137.71,430.786l7.945,4.414c32.662,20.303,70.621,32.662,110.345,32.662
28
+ c115.641,0,211.862-96.221,211.862-213.628S371.641,44.138,255.117,44.138S44.138,137.71,44.138,254.234
29
+ c0,40.607,11.476,80.331,32.662,113.876l5.297,7.945l-20.303,74.152L137.71,430.786z"/>
30
+ <path style="fill:#FEFEFE;" d="M187.145,135.945l-16.772-0.883c-5.297,0-10.593,1.766-14.124,5.297
31
+ c-7.945,7.062-21.186,20.303-24.717,37.959c-6.179,26.483,3.531,58.262,26.483,90.041s67.09,82.979,144.772,105.048
32
+ c24.717,7.062,44.138,2.648,60.028-7.062c12.359-7.945,20.303-20.303,22.952-33.545l2.648-12.359
33
+ c0.883-3.531-0.883-7.945-4.414-9.71l-55.614-25.6c-3.531-1.766-7.945-0.883-10.593,2.648l-22.069,28.248
34
+ c-1.766,1.766-4.414,2.648-7.062,1.766c-15.007-5.297-65.324-26.483-92.69-79.448c-0.883-2.648-0.883-5.297,0.883-7.062
35
+ l21.186-23.834c1.766-2.648,2.648-6.179,1.766-8.828l-25.6-57.379C193.324,138.593,190.676,135.945,187.145,135.945"/></svg>`;
36
+
37
+ $('.widget-text-color').wpColorPicker();
38
+ $('.widget-background-color').wpColorPicker();
39
+ $('.widget-hover-backcolor').wpColorPicker();
40
+ $('.widget-hover-textcolor').wpColorPicker();
41
+
42
+ btn_always_available();
43
+ select_display_pages_option();
44
+ checkAll_SelectPages_List();
45
+ checkItemsAccountsList();
46
+ selectAll_table_input_shortcode();
47
+ copy_clipboard_shortcode_input();
48
+ change_button_position();
49
+ change_widget_position();
50
+ btn_apply_time_all();
51
+ btn_show_gdpr();
52
+
53
+ //Checking selector
54
+ var selector = $('.njt-wa-woobutton').length;
55
+ if (selector > 0){
56
+ register_autocomplete('woo');
57
+ removeAccount('woo');
58
+ } else {
59
+ register_autocomplete('all');
60
+ removeAccount('all');
61
+ }
62
+ //DATA
63
+ var DeactiveData;
64
+ var fullData;
65
+
66
+ //Loading Data input
67
+ var isLoading = true;
68
+
69
+ $("#sortable").sortable({
70
+ connectWith: '#sortable',
71
+ update: function (event, ui) {
72
+
73
+ $(this).children().each(function (index) {
74
+ if ($(this).attr('data-position') != (index + 1)) {
75
+ $(this).attr('data-position', (index + 1)).addClass('updated-position');
76
+ }
77
+ });
78
+
79
+ if (selector > 0){
80
+ saveNewPositions('woo');
81
+ } else {
82
+ saveNewPositions('all');
83
+ }
84
+ }
85
+ });
86
+
87
+ function saveNewPositions(load_type) {
88
+ var pos = [];
89
+ $('.updated-position').each(function () {
90
+ pos.push([$(this).attr('data-index'), $(this).attr('data-position')]);
91
+ $(this).removeClass('updated-position');
92
+ });
93
+
94
+ $.ajax({
95
+ url: nta.url,
96
+ type: 'POST',
97
+ dataType: 'json',
98
+ data: {
99
+ 'action': 'save_account_position',
100
+ 'update': load_type,
101
+ 'positions': pos
102
+ }
103
+ }).done(function ($result) {
104
+
105
+ });
106
+ }
107
+ $("#sortable").disableSelection();
108
+
109
+ function add_item(event, ui, load_type) {
110
+ var html = "";
111
+ html = '<div class="nta-list-items"';
112
+ html += 'data-index="' + ui.item.account_id + '" data-position="0">';
113
+ html += '<div class="box-content ' + (load_type == 'woo' ? 'box-content-woo' : '') + '">';
114
+ html += `<div class="box-row"><div class="account-avatar">`;
115
+ if (ui.item.avatar != '') {
116
+ html += '<div class="wa_img_wrap" style="background: url(' + ui.item.avatar + ') center center no-repeat; background-size: cover;"></div>';
117
+ } else {
118
+ html += svgImage;
119
+ }
120
+ html += `</div><div class="container-block">`;
121
+ html += '<a href=""><h4>' + ui.item.label + '</h4></a>';
122
+ html += '<p>' + ui.item.nta_title + '</p><p>';
123
+ html += '<span class="' + (ui.item.nta_monday === 'checked' ? 'active-date' : '') + '">' + 'Mon</span>';
124
+ html += '<span class="' + (ui.item.nta_tuesday === 'checked' ? 'active-date' : '') + '">' + 'Tue</span>';
125
+ html += '<span class="' + (ui.item.nta_wednesday === 'checked' ? 'active-date' : '') + '">' + 'Wed</span>';
126
+ html += '<span class="' + (ui.item.nta_thursday === 'checked' ? 'active-date' : '') + '">' + 'Thur</span>';
127
+ html += '<span class="' + (ui.item.nta_friday === 'checked' ? 'active-date' : '') + '">' + 'Fri</span>';
128
+ html += '<span class="' + (ui.item.nta_saturday === 'checked' ? 'active-date' : '') + '">' + 'Sar</span>';
129
+ html += '<span class="' + (ui.item.nta_sunday === 'checked' ? 'active-date' : '') + '">' + 'Sun</span>';
130
+ html += '</p><a data-remove="' + ui.item.account_id + '" href="javascript:;" class="btn-remove-account">Remove</a></div>';
131
+ html += '<div class="icon-block">';
132
+ html += '<img src="' + ui.item.image_url + 'images/bar-sortable.svg' + '" width="20px"></div></div></div></div>';
133
+ $('.nta-list-box-accounts').prepend(html);
134
+ let obj = DeactiveData.findIndex(o => o.account_id === ui.item.account_id);
135
+ DeactiveData.splice(obj, 1);
136
+ $("#input-users").addClass('ui-autocomplete-loading')
137
+ //AJAX Save
138
+ $.ajax({
139
+ url: nta.url,
140
+ type: 'POST',
141
+ dataType: 'json',
142
+ data: {
143
+ 'action': 'add_account',
144
+ 'add': load_type,
145
+ 'account_id': ui.item.account_id,
146
+ 'account_name': ui.item.label
147
+ }
148
+ }).done(function ($result) {
149
+ removeAccount(load_type);
150
+ $("#input-users").removeClass('ui-autocomplete-loading')
151
+ });
152
+
153
+ $('.nta-list-status strong').text("Selected Accounts:");
154
+ $('.nta-list-box-accounts').show();
155
+
156
+ }
157
+
158
+ function register_autocomplete($load_type = 'all') {
159
+ if ($("#input-users").length > 0) {
160
+ if (isLoading) {
161
+ $(this).addClass('ui-autocomplete-loading');
162
+ }
163
+ $.ajax({
164
+ url: nta.url,
165
+ type: 'POST',
166
+ dataType: 'json',
167
+ data: {
168
+ 'action': 'load_accounts_ajax',
169
+ 'load': 1,
170
+ }
171
+ }).done(function ($result) {
172
+ isLoading = false;
173
+ if ($result.data == null && $('.nta-list-box-accounts .nta-list-items').length < 1) {
174
+ $('.nta-list-status strong').text("Please add a WhatsApp account here");
175
+ $('.nta-list-box-accounts').hide();
176
+ } else {
177
+ if ($result.data == null) {
178
+ $result.data = []
179
+ }
180
+ fullData = $result.data;
181
+ DeactiveData = $result.data.filter(function (item) {
182
+ return item.nta_active == "none";
183
+ })
184
+ if($load_type == 'woo'){
185
+ fullData = $result.data;
186
+ DeactiveData = $result.data.filter(function (item) {
187
+ return item.wo_active == "none";
188
+ })
189
+ } else {
190
+ fullData = $result.data;
191
+ DeactiveData = $result.data.filter(function (item) {
192
+ return item.nta_active == "none";
193
+ })
194
+ }
195
+
196
+ $("#input-users").autocomplete({
197
+ minLength: 0,
198
+ source: DeactiveData,
199
+ classes: {
200
+ "ui-autocomplete": "nta-list-box-select"
201
+ },
202
+ select: function (event, ui) {
203
+ add_item(event, ui, $load_type);
204
+
205
+ return false;
206
+ }
207
+ }).autocomplete("instance")._renderItem = function (ul, item) {
208
+ var html = "";
209
+ html = `<div class="nta-list-items" data-position="0">
210
+ <div class="box-content">
211
+ <div class="box-row">
212
+ <div class="account-avatar">`;
213
+ if (item.avatar != '') {
214
+ html += '<div class="wa_img_wrap" style="background: url(' + item.avatar + ') center center no-repeat; background-size: cover;"></div>';
215
+ } else {
216
+ html += svgImage;
217
+ }
218
+ html += `</div><div class="container-block">`;
219
+ html += '<h4>' + item.label + '</h4>';
220
+ html += '<p>' + item.nta_title + '</p><p>';
221
+ html += '<span class="' + (item.nta_monday === 'checked' ? 'active-date' : '') + '">' + 'Mon</span>';
222
+ html += '<span class="' + (item.nta_tuesday === 'checked' ? 'active-date' : '') + '">' + 'Tue</span>';
223
+ html += '<span class="' + (item.nta_wednesday === 'checked' ? 'active-date' : '') + '">' + 'Wed</span>';
224
+ html += '<span class="' + (item.nta_thursday === 'checked' ? 'active-date' : '') + '">' + 'Thur</span>';
225
+ html += '<span class="' + (item.nta_friday === 'checked' ? 'active-date' : '') + '">' + 'Fri</span>';
226
+ html += '<span class="' + (item.nta_saturday === 'checked' ? 'active-date' : '') + '">' + 'Sar</span>';
227
+ html += '<span class="' + (item.nta_sunday === 'checked' ? 'active-date' : '') + '">' + 'Sun</span>';
228
+ html += '</p></div></div></div></div>';
229
+ return $("<li>").append("<div>" + html + "</div>").appendTo(ul);
230
+ }
231
+ }
232
+ });
233
+ }
234
+ }
235
+
236
+ $("#input-users").on("click", function () {
237
+ if (isLoading) {
238
+ $(this).addClass('ui-autocomplete-loading');
239
+ var njt_input_id = setInterval(njt_loading_checking, 1000);
240
+
241
+ function njt_loading_checking() {
242
+ if (!isLoading) {
243
+ clearInterval(njt_input_id);
244
+ $("#input-users").autocomplete("search", "");
245
+ }
246
+ }
247
+ } else {
248
+ $("#input-users").autocomplete("search", "");
249
+ }
250
+ });
251
+
252
+
253
+ function removeAccount(load_type) {
254
+ $(".btn-remove-account").unbind("click");
255
+ $(".btn-remove-account").on("click", function () {
256
+ $remove_id = $(this).data("remove");
257
+ $remove_done = $('.nta-list-items[data-index="' + $remove_id + '"]').remove();
258
+ let obj = fullData.findIndex(o => o.account_id == $remove_id);
259
+ DeactiveData.push(fullData[obj]);
260
+ $("#input-users").addClass('ui-autocomplete-loading')
261
+ $.ajax({
262
+ url: nta.url,
263
+ type: 'POST',
264
+ dataType: 'json',
265
+ data: {
266
+ 'action': 'remove_account',
267
+ 'remove': load_type,
268
+ 'remove_id': $remove_id
269
+ }
270
+ }).done(function ($result) {
271
+ if ($result.success) {
272
+ }
273
+ checkItemsAccountsList();
274
+ $("#input-users").removeClass('ui-autocomplete-loading')
275
+ });
276
+ })
277
+ }
278
+
279
+ function change_widget_position() {
280
+ $(".btn-left").on("click", function () {
281
+ $(this).addClass('active');
282
+ $(".btn-right").removeClass('active');
283
+ $("#widget_position").val("left");
284
+ });
285
+
286
+ $(".btn-right").on("click", function () {
287
+ $(this).addClass('active');
288
+ $(".btn-left").removeClass('active');
289
+ $("#widget_position").val("right");
290
+ });
291
+ }
292
+
293
+
294
+ function change_button_position() {
295
+ $(".btn-round").on("click", function () {
296
+ $(this).addClass('active');
297
+ $(".btn-square").removeClass('active');
298
+ $("#nta_button_style").val("round");
299
+ });
300
+
301
+ $(".btn-square").on("click", function () {
302
+ $(this).addClass('active');
303
+ $(".btn-round").removeClass('active');
304
+ $("#nta_button_style").val("square");
305
+ });
306
+ }
307
+
308
+ function copy_clipboard_shortcode_input() {
309
+ $('#nta-button-shortcode-copy').click(function () {
310
+ $(this).focus();
311
+ $(this).select();
312
+ document.execCommand('copy');
313
+ $('.nta-shortcode-copy-status').show();
314
+ });
315
+ }
316
+
317
+ function selectAll_table_input_shortcode() {
318
+ $('.nta-shortcode-table').click(function () {
319
+ $(this).focus();
320
+ $(this).select();
321
+ });
322
+ }
323
+
324
+ function btn_apply_time_all() {
325
+ $('#btn-apply-time').on('click', function () {
326
+ startTime = $(".time-available .nta_sunday_hour_start").val();
327
+ endTime = $(".time-available .nta_sunday_hour_end").val();
328
+
329
+ $(".time-available .nta_hour_start").val(startTime);
330
+ $(".time-available .nta_hour_end").val(endTime);
331
+ });
332
+ }
333
+
334
+ function checkItemsAccountsList() {
335
+ items = $('.nta-list-box-accounts .nta-list-items').length;
336
+
337
+ if (items < 1) {
338
+ $('.nta-list-status strong').text("Please select accounts you want them to display in WhatsApp Chat Widget");
339
+ $('.nta-list-box-accounts').hide();
340
+ }
341
+ }
342
+
343
+ function btn_always_available(){
344
+ $('body.post-type-whatsapp-accounts input#nta-wa-switch').click(function(){
345
+ var checked = $(this).prop("checked");
346
+ if(checked){
347
+ $('.nta-btncustom-offline').hide();
348
+ }else{
349
+ $('.nta-btncustom-offline').show();
350
+ }
351
+ })
352
+ }
353
+
354
+ function btn_show_gdpr(){
355
+ $('body.whatsapp_page_floating-widget-whatsapp input#nta-wa-switch-gdpr').click(function(){
356
+ var checked = $(this).prop("checked");
357
+ if(checked){
358
+ $('#nta-gdpr-editor').show();
359
+ }else{
360
+ $('#nta-gdpr-editor').hide();
361
+ }
362
+ })
363
+ }
364
+
365
+ function select_display_pages_option(){
366
+ $("#ninja-wa-display-pages").change(function(){
367
+ var display = $(this).val();
368
+ if ( display == 'show' ) {
369
+ $(".nta-wa-pages-content.show-page").removeClass("hide-select");
370
+ $(".nta-wa-pages-content.hide-page").addClass("hide-select");
371
+ }else{
372
+ $(".nta-wa-pages-content.hide-page").removeClass("hide-select");
373
+ $(".nta-wa-pages-content.show-page").addClass("hide-select");
374
+ }
375
+ })
376
+ }
377
+
378
+ function checkAll_SelectPages_List(){
379
+ $("#nta-wa-pages-checkall-hide").change(function(){
380
+ $(".nta-wa-hide-pages").prop('checked', $(this).prop("checked"));
381
+ })
382
+
383
+ $("#nta-wa-pages-checkall-show").change(function(){
384
+ $(".nta-wa-show-pages").prop('checked', $(this).prop("checked"));
385
+ })
386
+ }
387
+
388
+
389
+ });
scripts/js/jquery.validate.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*! jQuery Validation Plugin - v1.19.0 - 11/28/2018
2
+ * https://jqueryvalidation.org/
3
+ * Copyright (c) 2018 Jörn Zaefferer; Licensed MIT */
4
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
views/nta-whatsapp-display-settings.php ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form name="post" method="post" action="options.php" id="post" autocomplete="off">
2
+ <input type="hidden" name="option_page" value="<?php echo esc_attr($option_group); ?>">
3
+ <input type="hidden" name="action" value="update">
4
+ <?php wp_nonce_field($option_group . '-options'); ?>
5
+ <table class="form-table">
6
+ <p><?php echo __('Setting text and style for the floating widget.', 'ninjateam-whatsapp') ?></p>
7
+ <tbody>
8
+ <tr>
9
+ <th scope="row"><label for="nta-wa-switch-control"><?php echo __('Show on desktop', 'ninjateam-whatsapp') ?></label></th>
10
+ <td>
11
+ <div class="nta-wa-switch-control">
12
+ <input type="checkbox" id="nta-wa-switch" name="show_on_desktop" <?php echo (isset($option['show_on_desktop']) ? 'checked' : '') ?>>
13
+ <label for="nta-wa-switch" class="green"></label>
14
+ </div>
15
+ </td>
16
+ </tr>
17
+ <tr>
18
+ <th scope="row"><label for="nta-wa-switch-control"><?php echo __('Show on mobile', 'ninjateam-whatsapp') ?></label></th>
19
+ <td>
20
+ <div class="nta-wa-switch-control">
21
+ <input type="checkbox" id="nta-wa-switch-mb" name="show_on_mobile" <?php echo (isset($option['show_on_mobile']) ? 'checked' : '') ?>>
22
+ <label for="nta-wa-switch-mb" class="green"></label>
23
+ </div>
24
+ </td>
25
+ </tr>
26
+ <tr>
27
+ <th scope="row"><label for="whatsapp_name"><?php echo __('Widget Text', 'ninjateam-whatsapp') ?></label></th>
28
+ <td><input name="widget_name" placeholder="Start a Conversation" type="text" id="whatsapp_name" value="<?php echo esc_attr($option['widget_name']) ?>" class="regular-text"></td>
29
+ </tr>
30
+
31
+ <tr>
32
+ <th scope="row"><label for="whatsapp_label"><?php echo __('Widget Label', 'ninjateam-whatsapp') ?></label></th>
33
+ <td><input name="widget_label" placeholder="Need Help? <strong>Chat with us</strong>" type="text" id="whatsapp_label" value="<?php echo esc_attr($option['widget_label']) ?>" class="regular-text"></td>
34
+ </tr>
35
+
36
+ <tr>
37
+ <th scope="row"><label for="whatsapp_responseText"><?php echo __('Response Time Text', 'ninjateam-whatsapp') ?></label></th>
38
+ <td><input name="widget_responseText" placeholder="The team typically replies in a few minutes." type="text" id="whatsapp_responseText" value="<?php echo esc_attr($option['widget_responseText']) ?>" class="regular-text"></td>
39
+ </tr>
40
+
41
+ <tr>
42
+ <th scope="row"><label for="text_color"><?php echo __('Widget Text Color', 'ninjateam-whatsapp') ?></label></th>
43
+ <td><input type="text" id="text_color" name="text_color" value="<?php echo esc_attr($option['text_color']) ?>" class="widget-text-color" data-default-color="#fff" /></td>
44
+ </tr>
45
+
46
+ <tr>
47
+ <th scope="row"><label for="back_color"><?php echo __('Widget Background Color', 'ninjateam-whatsapp') ?></label></th>
48
+ <td><input id="back_color" type="text" name="back_color" value="<?php echo esc_attr($option['back_color']) ?>" class="widget-background-color" data-default-color="#2db742" /></td>
49
+ </tr>
50
+
51
+ <tr>
52
+ <th scope="row"><label for=""><?php echo __('Widget Position', 'ninjateam-whatsapp') ?></label></th>
53
+ <td>
54
+ <div class="setting align">
55
+ <div class="button-group button-large" data-setting="align">
56
+ <button class="button btn-left <?php echo ($option['widget_position'] == 'left' ? 'active' : '') ?>" value="left" type="button">
57
+ <?php echo __('Left', 'ninjateam-whatsapp') ?>
58
+ </button>
59
+ <button class="button btn-right <?php echo ($option['widget_position'] == 'right' ? 'active' : '') ?>" value="right" type="button">
60
+ <?php echo __('Right', 'ninjateam-whatsapp') ?>
61
+ </button>
62
+ </div>
63
+ <input name="widget_position" id="widget_position" class="hidden" value="<?php echo esc_attr($option['widget_position']) ?>" />
64
+ </div>
65
+ </td>
66
+ </tr>
67
+ <tr>
68
+ <th scope="row"><label for="widget_description"><?php echo __('Description', 'ninjateam-whatsapp') ?></label></th>
69
+ <td>
70
+ <?php
71
+ $settings = array(
72
+ 'media_buttons' => false,
73
+ 'textarea_rows' => get_option('default_post_edit_rows', 5),
74
+ 'quicktags' => false,
75
+ 'teeny' => true,
76
+ );
77
+ wp_editor($option['widget_description'], 'widget_description', $settings);
78
+ ?>
79
+ </td>
80
+ </tr>
81
+ <tr>
82
+ <th scope="row"><label for="widget_gdpr"><?php echo __('GDPR Notice', 'ninjateam-whatsapp') ?></label></th>
83
+ <td>
84
+ <div class="nta-wa-switch-control" style="margin-top: 5px;">
85
+ <input type="checkbox" id="nta-wa-switch-gdpr" name="show_gdpr" <?php echo (isset($option['show_gdpr']) ? 'checked' : '') ?>>
86
+ <label for="nta-wa-switch-gdpr" class="green"></label>
87
+ </div>
88
+ <br />
89
+ <div id="nta-gdpr-editor" class="<?php echo (isset($option['show_gdpr']) ? '' : 'hidden') ?>">
90
+ <?php
91
+ wp_editor($option['widget_gdpr'], 'widget_gdpr', $settings);
92
+ ?>
93
+ </div>
94
+ </td>
95
+ </tr>
96
+ <tr>
97
+ <th scope="row"><label for="widget_display_pages"><?php echo __('Display', 'ninjateam-whatsapp') ?></label></th>
98
+ <td>
99
+ <?php $display = $option['display-pages'] ?>
100
+ <select name="nta-wa-display-pages" id="ninja-wa-display-pages">
101
+ <option <?php echo ($display == 'hide' ? 'selected' : '') ?> value="hide"><?php echo __("Display all pages except", "ninjateam-whatsapp") ?></option>
102
+ <option <?php echo ($display == 'show' ? 'selected' : '') ?> value="show"><?php echo __("Display for pages...", "ninjateam-whatsapp") ?></option>
103
+ </select>
104
+ <p class="description"><?php _e('Select type you want to display WhatsApp Widget (If it does not display in WooCommerce pages, please make sure you selected \'Display all pages except\' option)', 'ninjateam-whatsapp') ?></p>
105
+ </td>
106
+ </tr>
107
+ <th scope="row">
108
+ <label for="widget_show_on_pages">
109
+ <?php echo __('Select pages', 'ninjateam-whatsapp') ?>
110
+ </label>
111
+ </th>
112
+ <td class="nta-wa-pages-content hide-page <?php echo esc_attr($option['display-pages'] == 'show' ? 'hide-select' : '') ?>">
113
+ <input type="checkbox" id="nta-wa-pages-checkall-hide" />
114
+ <label for="nta-wa-pages-checkall">All</label>
115
+ <ul id="nta-wa-display-pages-list">
116
+ <?php
117
+ $array_hide = $option['nta-wa-hide-pages'];
118
+ if (!$array_hide) {
119
+ $array_hide = array();
120
+ }
121
+ while ($get_pages_query->have_posts()) : $get_pages_query->the_post();
122
+ ?>
123
+ <li>
124
+ <input <?php if (in_array(get_the_ID(), $array_hide)) {
125
+ echo 'checked="checked"';
126
+ } ?> name="nta-wa-hide-pages[]" class="nta-wa-hide-pages" type="checkbox" value="<?php esc_attr(the_ID()) ?>" id="nta-wa-hide-page-<?php esc_attr(the_ID()) ?>" />
127
+ <label for="nta-wa-hide-page-<?php esc_attr(the_ID()) ?>"><?php esc_html(the_title()) ?></label>
128
+ </li>
129
+ <?php
130
+ endwhile;
131
+ wp_reset_postdata();
132
+ ?>
133
+ </ul>
134
+ </td>
135
+
136
+ <td class="nta-wa-pages-content show-page <?php echo esc_attr($option['display-pages'] == 'hide' ? 'hide-select' : '') ?>">
137
+ <input type="checkbox" id="nta-wa-pages-checkall-show" />
138
+ <label for="nta-wa-pages-checkall">All</label>
139
+ <ul id="nta-wa-display-pages-list">
140
+ <?php
141
+ $array_show = $option['nta-wa-show-pages'];
142
+ if (!$array_show) {
143
+ $array_show = array();
144
+ }
145
+ while ($get_pages_query->have_posts()) : $get_pages_query->the_post();
146
+ ?>
147
+ <li>
148
+ <input <?php if (in_array(get_the_ID(), $array_show)) {
149
+ echo 'checked="checked"';
150
+ } ?> name="nta-wa-show-pages[]" class="nta-wa-show-pages" type="checkbox" value="<?php esc_attr(the_ID()) ?>" id="nta-wa-show-page-<?php esc_attr(the_ID()) ?>" />
151
+ <label for="nta-wa-show-page-<?php esc_attr(the_ID()) ?>"><?php esc_html(the_title()) ?></label>
152
+ </li>
153
+ <?php
154
+ endwhile;
155
+ wp_reset_postdata();
156
+ ?>
157
+ </ul>
158
+ </td>
159
+ </tr>
160
+ </tbody>
161
+ </table>
162
+ <button class="button button-primary button-large" id="btnSave" type="submit"><?php echo __('Save Display Settings', 'ninjateam-whatsapp') ?></button>
163
+ </form>
views/nta-whatsapp-ga.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <input type="hidden" name="option_page" value="<?php echo esc_attr($option_group); ?>">
2
+ <input type="hidden" name="action" value="update">
3
+ <?php wp_nonce_field($option_group . '-options'); ?>
4
+ <p><?php echo __('By enabling this function, you can see our WhatsApp tracking in your Google Analytics > Behavior > Events.', 'ninjateam-whatsapp') ?></p>
5
+ <table class="form-table">
6
+ <tbody>
7
+ <tr>
8
+ <th scope="row"><label for="nta-wa-switch-control"><?php echo __('Enabled', 'ninjateam-whatsapp') ?></label></th>
9
+ <td>
10
+ <div class="nta-wa-switch-control">
11
+ <input type="checkbox" id="nta-wa-switch" name="nta_wa_ga_status" <?php echo esc_attr($status ? 'checked' : '') ?>>
12
+ <label for="nta-wa-switch" class="green"></label>
13
+ </div>
14
+ </td>
15
+ </tr>
16
+ </tbody>
17
+ </table>
18
+ <p><input type="submit" id="submit" class="button button-primary" value="<?php echo __('Save','ninjateam-whatsapp') ?>"></p>
views/nta-whatsapp-meta-accounts.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <table class="form-table" id="nta-custom-wc-button-settings">
2
+ <tbody>
3
+ <tr>
4
+ <th scope="row">
5
+ <label for="nta_group_number">
6
+ <?php echo __('Account Number or group chat URL', 'ninjateam-whatsapp') ?>
7
+ </label>
8
+ </th>
9
+ <td>
10
+ <p>
11
+ <input type="text" class="widefat" id="nta_group_number" name="nta_group_number" value="<?php echo esc_attr(!empty($edit_account) ? $edit_account['nta_group_number'] : '') ?>" autocomplete="off">
12
+ </p>
13
+ <p class="description">
14
+ <?php echo __('Refer to <a href="https://faq.whatsapp.com/en/general/21016748" target="_blank">https://faq.whatsapp.com/en/general/21016748</a> for a detailed explanation.', 'ninjateam-whatsapp')?>
15
+ </p>
16
+ </td>
17
+ </tr>
18
+ <tr>
19
+ <th scope="row">
20
+ <label for="nta_title"><?php echo __('Title','ninjateam-whatsapp')?></label>
21
+ </th>
22
+ <td>
23
+ <input type="text" id="nta_title" name="nta_title" value="<?php echo esc_attr(!empty($edit_account) ? $edit_account['nta_title'] : '') ?>" class="widefat" autocomplete="off">
24
+ </td>
25
+ </tr>
26
+ <tr>
27
+ <th scope="row">
28
+ <label for="nta_predefined_text"><?php echo __('Predefined Text', 'ninjateam-whatsapp')?></label>
29
+ </th>
30
+ <td>
31
+ <textarea name="nta_predefined_text" id="nta_predefined_text" rows="3" class="widefat"><?php echo esc_textarea(!empty($edit_account) ? $edit_account['nta_predefined_text'] : '') ?></textarea>
32
+ <p class="description">
33
+ <?php echo __('Use [njwa_page_title] and [njwa_page_url] shortcodes to output the page\'s title and URL respectively.', 'ninjateam-whatsapp') ?>
34
+ </p>
35
+ </td>
36
+ </tr>
37
+ <tr>
38
+ <th scope="row">
39
+ <label for="nta_button_label"><?php echo __('Button Label','ninjateam-whatsapp')?></label>
40
+ </th>
41
+ <td>
42
+ <input type="text" id="nta_button_label" name="nta_button_label" value="<?php echo esc_attr(!empty($edit_button_label['button-text']) ? $edit_button_label['button-text'] : '') ?>" placeholder="Need help? Chat via WhatsApp"
43
+ class="widefat" autocomplete="off">
44
+ <p class="description"><?php echo __('This text applies only on shortcode button. Leave empty to use the default label.','ninjateam-whatsapp')?>
45
+ </p>
46
+ </td>
47
+ </tr>
48
+ <tr>
49
+ <th scope="row">
50
+ <label for="nta_button_available"><?php echo __('Always available online','ninjateam-whatsapp')?></label>
51
+ </th>
52
+ <td>
53
+ <div class="nta-wa-switch-control">
54
+ <input type="checkbox" id="nta-wa-switch" name="nta_button_available" <?php echo esc_attr(isset($edit_account['nta_button_available']) ? 'checked' : '') ?>>
55
+ <label for="nta-wa-switch" class="green"></label>
56
+ </div>
57
+ </td>
58
+ </tr>
59
+
60
+ <tr class="nta-btncustom-offline <?php echo (isset($edit_account['nta_button_available'])) ? 'hidden' : '' ?>">
61
+ <th scope="row">
62
+ <label><?php echo __('Custom Availability', 'ninjateam-whatsapp')?></label>
63
+ </th>
64
+ <td>
65
+ <table class="form-table time-available">
66
+ <tbody>
67
+ <?php foreach($dayOfWeek as $day): ?>
68
+ <tr>
69
+ <td width="150">
70
+ <input type="checkbox" id="nta_<?php echo esc_attr($day) ?>" name="nta_<?php echo esc_attr($day) ?>" <?php echo (!empty($edit_account) ? $edit_account["nta_{$day}"] : '') ?>>
71
+ <label for="nta_<?php echo esc_attr($day) ?>"><?php echo __(ucfirst($day),'ninjateam-whatsapp')?> </label>
72
+ </td>
73
+ <td width="100">
74
+ <select name="nta_<?php echo esc_attr($day) ?>_hour_start" class="nta_<?php echo esc_attr($day) ?>_hour_start nta_hour_start"><?php echo (!empty($edit_account) ? NTA_Helper::get_times(substr($edit_account["nta_{$day}_working"], 0, 5)) : NTA_Helper::get_times()); ?></select>
75
+ </td>
76
+ <td width="100">
77
+ <select name="nta_<?php echo esc_attr($day) ?>_hour_end" class="nta_<?php echo esc_attr($day) ?>_hour_end nta_hour_end"><?php echo (!empty($edit_account) ? NTA_Helper::get_times(substr($edit_account["nta_{$day}_working"], 6, 5)) : NTA_Helper::get_times('17:30')); ?></select>
78
+ </td>
79
+ <?php if ($day === 'sunday'): ?>
80
+ <td>
81
+ <a href="javascript:;" type="button" class="button" id="btn-apply-time"><?php echo __('Apply to All Days','ninjateam-whatsapp')?></button>
82
+ </td>
83
+ <?php endif?>
84
+ </tr>
85
+ <?php endforeach;?>
86
+ </tbody>
87
+ </table>
88
+ </td>
89
+ </tr>
90
+ <tr class="nta-btncustom-offline <?php echo (isset($edit_account['nta_button_available'])) ? 'hidden' : '' ?>">
91
+ <th scope="row"><label for="nta_offline_text"><?php echo __('Description text when offline','ninjateam-whatsapp')?></label></th>
92
+ <td>
93
+ <input type="text" id="nta_offline_text" name="nta_offline_text" value="<?php echo esc_attr(!empty($edit_account) ? $edit_account['nta_offline_text'] : 'I will be back in [njwa_time_work]') ?>" class="widefat" autocomplete="off">
94
+ <p class="description"><?php echo __('You can use shortcode [njwa_time_work] to display the exact time this account is back to work on a working day.', 'ninjateam-whatsapp')?></p>
95
+ <input type="text" id="nta_over_time" name="nta_over_time" value="<?php echo esc_attr(!empty($edit_account) ? $edit_account['nta_over_time'] : 'I will be back soon') ?>" class="widefat" autocomplete="off">
96
+ <p class="description"><?php echo __('You can use this text to display on days this account does not work.','ninjateam-whatsapp') ?>
97
+ </p>
98
+ </td>
99
+ </tr>
100
+ </tbody>
101
+ </table>
views/nta-whatsapp-meta-button-style.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <table class="form-table">
2
+ <p><?php echo __('This styling applies only to the shortcode buttons for this account. Leave blank to use the <a href="admin.php?page=nta_whatsapp">default styles set on the settings page', 'ninjateam-whatsapp') ?></a></p>
3
+ <tbody>
4
+ <tr>
5
+ <th scope="row"><label for="button_style"><?php echo __('Button Style', 'ninjateam-whatsapp') ?></label></th>
6
+ <td>
7
+ <div class="setting align">
8
+ <div class="button-group button-large" data-setting="align">
9
+ <button class="button btn-round <?php echo ($buttonStyle['button_style'] == 'round' ? 'active' : '') ?>" value="round" type="button">
10
+ <?php echo __('Round', 'ninjateam-whatsapp') ?>
11
+ </button>
12
+ <button class="button btn-square <?php echo ($buttonStyle['button_style'] == 'square' ? 'active' : '') ?>" value="square" type="button">
13
+ <?php echo __('Square', 'ninjateam-whatsapp') ?>
14
+ </button>
15
+ </div>
16
+ <input name="button_style" id="nta_button_style" class="hidden" value="<?php echo esc_attr($buttonStyle['button_style']) ?>" />
17
+ </div>
18
+ </td>
19
+ </tr>
20
+
21
+ <tr>
22
+ <th scope="row"><label for="button_back_color"><?php echo __('Button Background Color', 'ninjateam-whatsapp') ?></label></th>
23
+ <td>
24
+ <input type="text" id="button_back_color" name="button_back_color" value="<?php echo esc_attr($buttonStyle['button_back_color']) ?>" class="widget-background-color" data-default-color="#2DB742" />
25
+ </td>
26
+ </tr>
27
+
28
+ <tr>
29
+ <th scope="row"><label for="button_text_color"><?php echo __('Button Text Color', 'ninjateam-whatsapp') ?></label></th>
30
+ <td>
31
+ <input type="text" id="button_text_color" name="button_text_color" value="<?php echo esc_attr($buttonStyle['button_text_color']) ?>" class="widget-background-color" data-default-color="#fff" />
32
+ </td>
33
+ </tr>
34
+ </tbody>
35
+ </table>
views/nta-whatsapp-selected-accounts.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="search-account">
2
+ <input id="input-users" type="text" autocomplete="off" placeholder="Search account by enter name or title">
3
+ </div>
4
+ <br />
5
+
6
+ <label class="nta-list-status"><strong><?php echo __('Selected Accounts:', 'ninjateam-whatsapp') ?></strong></label>
7
+
8
+ <div class="nta-list-box-accounts postbox" id="sortable">
9
+ <?php foreach ($account_list_view as $row) : ?>
10
+ <div class="nta-list-items" data-index="<?php echo esc_attr($row['account_id']) ?>" data-position="<?php echo esc_attr($row['position']) ?>">
11
+ <div class="box-content">
12
+ <div class="box-row">
13
+ <div class="account-avatar">
14
+ <?php if (!empty($row['avatar'])) : ?>
15
+ <div class="wa_img_wrap" style="background: url(<?php echo esc_attr($row['avatar']) ?>) center center no-repeat; background-size: cover;"></div>
16
+ <?php else :
17
+ echo NTA_WHATSAPP_DEFAULT_AVATAR;
18
+ ?>
19
+ <?php endif; ?>
20
+ </div>
21
+ <div class="container-block">
22
+ <a href="<?php echo get_edit_post_link($row['account_id']); ?>">
23
+ <h4><?php echo $row['post_title'] ?></h4>
24
+ </a>
25
+ <p><?php echo $row['nta_title'] ?></p>
26
+ <p>
27
+ <span <?php echo ($row['nta_monday'] == 'checked' ? 'class="active-date"' : '') ?>>Mon</span><span <?php echo ($row['nta_tuesday'] == 'checked' ? 'class="active-date"' : '') ?>>Tue</span><span <?php echo ($row['nta_wednesday'] == 'checked' ? 'class="active-date"' : '') ?>>Wed</span><span <?php echo ($row['nta_thursday'] == 'checked' ? 'class="active-date"' : '') ?>>Thur</span><span <?php echo ($row['nta_friday'] == 'checked' ? 'class="active-date"' : '') ?>>Fri</span><span <?php echo ($row['nta_saturday'] == 'checked' ? 'class="active-date"' : '') ?>>Sar</span><span <?php echo ($row['nta_sunday'] == 'checked' ? 'class="active-date"' : '') ?>>Sun</span>
28
+ </p>
29
+ <a data-remove="<?php echo esc_attr($row['account_id']) ?>" href="javascript:;" class="btn-remove-account"><?php echo __('Remove', 'ninjateam-whatsapp') ?></a>
30
+ </div>
31
+ <div class="icon-block">
32
+ <img src="<?php echo NTA_WHATSAPP_PLUGIN_URL . 'images/bar-sortable.svg' ?>" width="20px">
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ <?php endforeach; ?>
38
+ </div>
views/nta-whatsapp-settings.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <input type="hidden" name="option_page" value="<?php echo esc_attr($option_group); ?>">
2
+ <input type="hidden" name="action" value="update">
3
+ <?php wp_nonce_field($option_group . '-options');?>
4
+ <table class="form-table">
5
+ <p><?php echo __('Use this form to set default style for shortcode buttons. You can reset the style for individual button when creating/editing a WhatsApp account.', 'ninjateam-whatsapp') ?></p>
6
+ <tbody>
7
+ <tr>
8
+ <th scope="row"><label for="nta-whatsapp-button-text"><?php echo __('Button Text', 'ninjateam-whatsapp') ?></label></th>
9
+ <td>
10
+ <input type="text" id="nta-whatsapp-button-text" name="button-text" value="<?php echo esc_attr($option['button-text']) ?>" class="nta-whatsapp-button-text regular-text" placeholder="Need help? Chat via Whatsapp"/>
11
+ </td>
12
+ </tr>
13
+
14
+ <tr>
15
+ <th scope="row"><label for="nta_button_style"><?php echo __('Button Style', 'ninjateam-whatsapp') ?></label></th>
16
+ <td>
17
+ <div class="setting align">
18
+ <div class="button-group button-large" data-setting="align">
19
+ <button class="button btn-round <?php echo ($option['button_style'] == 'round' ? 'active' : '') ?>" value="round" type="button">
20
+ <?php echo __('Round', 'ninjateam-whatsapp') ?>
21
+ </button>
22
+ <button class="button btn-square <?php echo ($option['button_style'] == 'square' ? 'active' : '') ?>" value="square" type="button">
23
+ <?php echo __('Square', 'ninjateam-whatsapp') ?>
24
+ </button>
25
+ </div>
26
+ <input name="button_style" id="nta_button_style" class="hidden" value="<?php echo esc_attr($option['button_style']) ?>" />
27
+ </div>
28
+ </td>
29
+ </tr>
30
+
31
+ <tr>
32
+ <th scope="row"><label for="button_back_color"><?php echo __('Button Background Color', 'ninjateam-whatsapp') ?></label></th>
33
+ <td>
34
+ <input type="text" id="button_back_color" name="button_back_color" value="<?php echo esc_attr($option['button_back_color']) ?>" class="widget-background-color" data-default-color="#2DB742" />
35
+ </td>
36
+ </tr>
37
+
38
+ <tr>
39
+ <th scope="row"><label for="button_text_color"><?php echo __('Button Text Color', 'ninjateam-whatsapp') ?></label></th>
40
+ <td>
41
+ <input type="text" id="button_text_color" name="button_text_color" value="<?php echo esc_attr($option['button_text_color']) ?>" class="widget-background-color" data-default-color="#fff" />
42
+ </td>
43
+ </tr>
44
+ </tbody>
45
+ </table>
46
+ <button class="button button-primary button-large" id="btnSave" type="submit"><?php echo __('Save Changes', 'ninjateam-whatsapp') ?></button>
views/nta-whatsapp-widget-content.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wa__popup_chat_box">
2
+ <div class="wa__popup_heading">
3
+ <div class="wa__popup_title"><?php echo $option['widget_name'] ?></div>
4
+ <div class="wa__popup_intro"><?php echo $option['widget_description'] ?></a></div>
5
+ </div>
6
+ <!-- /.wa__popup_heading -->
7
+ <div class="wa__popup_content wa__popup_content_left">
8
+ <div class="wa__popup_notice"><?php echo $option['widget_responseText'] ?></div>
9
+
10
+ <?php if (!$option['widget_gdpr_status']) :?>
11
+ <div class="nta-wa-gdpr"><input id="nta-wa-gdpr" type="checkbox" value="accept">
12
+ <label for="nta-wa-gdpr"><?php echo $option['widget_gdpr'] ?></label>
13
+ </div>
14
+ <?php endif; ?>
15
+
16
+ <div class="wa__popup_content_list">
17
+ <?php foreach ($account_list_view as $row):
18
+ $status = NTA_Helper::get_back_time($row);
19
+ $href = '';
20
+
21
+ if (strpos($row['nta_group_number'], 'chat.whatsapp.com')) {
22
+ $href .= 'target="_blank"';
23
+ $href .= ' href="' . esc_url($row['nta_group_number']) . '"';
24
+ } else {
25
+ $href = $link_to_app == 'web' ? 'target="_blank"' : '';
26
+ $href .= ' href="https://';
27
+ $href .= $link_to_app . '.whatsapp.com/send?phone=';
28
+ $number = preg_replace('/[^0-9]/', '', $row['nta_group_number']);
29
+ $href .= $number;
30
+ $href .= ($row['nta_predefined_text'] != '' ? '&text=' . do_shortcode($row['nta_predefined_text']) : '');
31
+ $href .= '"';
32
+ }
33
+
34
+ $href .= ' class="wa__stt ';
35
+ $href .= ($status == 'online' ? 'wa__stt_online' : 'wa__stt_offline');
36
+ $href .= '"';
37
+ ?>
38
+ <div class="wa__popup_content_item <?php echo ($option['widget_gdpr_status'] ? '' : 'pointer-disable') ?>">
39
+ <a <?php echo $href ?>>
40
+ <?php if (!empty($row['avatar'])): ?>
41
+ <div class="wa__popup_avatar">
42
+ <div class="wa__cs_img_wrap" style="background: url(<?php echo esc_attr($row['avatar']) ?>) center center no-repeat; background-size: cover;"></div>
43
+ </div>
44
+ <?php else: ?>
45
+ <div class="wa__popup_avatar nta-default-avt">
46
+ <?php echo NTA_WHATSAPP_DEFAULT_AVATAR ?>
47
+ </div>
48
+ <?php endif;?>
49
+
50
+ <div class="wa__popup_txt">
51
+ <div class="wa__member_name"><?php echo $row['post_title'] ?></div>
52
+ <!-- /.wa__member_name -->
53
+ <div class="wa__member_duty"><?php echo $row['nta_title'] ?></div>
54
+ <!-- /.wa__member_duty -->
55
+ <?php if ($status != 'online'): ?>
56
+ <div class="wa__member_status">
57
+ <?php echo (($status == 'offline') ? $row['nta_over_time'] : do_shortcode('[njwa_time_work_wg id="' . $row['account_id'] . '"]')); ?>
58
+ </div>
59
+ <?php endif;?>
60
+ </div>
61
+ <!-- /.wa__popup_txt -->
62
+ </a>
63
+ </div>
64
+ <?php endforeach;?>
65
+
66
+ </div>
67
+ <!-- /.wa__popup_content_list -->
68
+ </div>
69
+ <!-- /.wa__popup_content -->
70
+ </div>
views/nta-whatsapp-widget-view.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wa__btn_popup">
2
+ <div class="wa__btn_popup_txt"><?php echo $option['widget_label'] ?></div>
3
+ <div class="wa__btn_popup_icon"></div>
4
+ </div>
5
+ <div class="wa__popup_chat_box">
6
+ <div class="wa__popup_heading">
7
+ <div class="wa__popup_title"><?php echo $option['widget_name'] ?></div>
8
+ <div class="wa__popup_intro"><?php echo $option['widget_description'] ?></div>
9
+ </div>
10
+ <!-- /.wa__popup_heading -->
11
+ <div class="wa__popup_content wa__popup_content_left">
12
+ <div class="wa__popup_notice"><?php echo $option['widget_responseText'] ?></div>
13
+
14
+ <?php if (!$option['widget_gdpr_status']) :?>
15
+ <div class="nta-wa-gdpr"><input id="nta-wa-gdpr" type="checkbox" value="accept">
16
+ <label for="nta-wa-gdpr"><?php echo $option['widget_gdpr'] ?></label>
17
+ </div>
18
+ <?php endif; ?>
19
+
20
+ <div class="wa__popup_content_list">
21
+ <?php foreach ($account_list_view as $row):
22
+ $status = NTA_Helper::get_back_time($row);
23
+ $href = '';
24
+
25
+ if (strpos($row['nta_group_number'], 'chat.whatsapp.com')) {
26
+ $href .= 'target="_blank"';
27
+ $href .= ' href="' . esc_url($row['nta_group_number']) . '"';
28
+ } else {
29
+ $href = $link_to_app == 'web' ? 'target="_blank"' : '';
30
+ $href .= ' href="https://';
31
+ $href .= $link_to_app . '.whatsapp.com/send?phone=';
32
+ $number = preg_replace('/[^0-9]/', '', $row['nta_group_number']);
33
+ $href .= $number;
34
+ $href .= ($row['nta_predefined_text'] != '' ? '&text=' . do_shortcode($row['nta_predefined_text']) : '');
35
+ $href .= '"';
36
+ }
37
+
38
+ $href .= ' class="wa__stt ';
39
+ $href .= ($status == 'online' ? 'wa__stt_online' : 'wa__stt_offline');
40
+ $href .= '"';
41
+ ?>
42
+ <div class="wa__popup_content_item <?php echo ($option['widget_gdpr_status'] ? '' : 'pointer-disable') ?>">
43
+ <a <?php echo $href ?>>
44
+ <?php if (!empty($row['avatar'])): ?>
45
+ <div class="wa__popup_avatar">
46
+ <div class="wa__cs_img_wrap" style="background: url(<?php echo esc_attr($row['avatar']) ?>) center center no-repeat; background-size: cover;"></div>
47
+ </div>
48
+ <?php else: ?>
49
+ <div class="wa__popup_avatar nta-default-avt">
50
+ <?php echo NTA_WHATSAPP_DEFAULT_AVATAR ?>
51
+ </div>
52
+ <?php endif;?>
53
+
54
+ <div class="wa__popup_txt">
55
+ <div class="wa__member_name"><?php echo $row['post_title'] ?></div>
56
+ <!-- /.wa__member_name -->
57
+ <div class="wa__member_duty"><?php echo $row['nta_title'] ?></div>
58
+ <!-- /.wa__member_duty -->
59
+ <?php if ($status != 'online'): ?>
60
+ <div class="wa__member_status">
61
+ <?php echo (($status == 'offline') ? $row['nta_over_time'] : do_shortcode('[njwa_time_work_wg id="' . $row['account_id'] . '"]')); ?>
62
+ </div>
63
+ <?php endif;?>
64
+ </div>
65
+ <!-- /.wa__popup_txt -->
66
+ </a>
67
+ </div>
68
+ <?php endforeach;?>
69
+
70
+ </div>
71
+ <!-- /.wa__popup_content_list -->
72
+ </div>
73
+ <!-- /.wa__popup_content -->
74
+ </div>
views/nta-whatsapp-woocommerce-button.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <input type="hidden" name="option_page" value="<?php echo esc_attr($option_group); ?>">
2
+ <input type="hidden" name="action" value="update">
3
+ <?php wp_nonce_field($option_group . '-options'); ?>
4
+ <p><?php echo __('Use the form below to automatically display buttons on WooCommerce product page.', 'ninjateam-whatsapp') ?></p>
5
+ <table class="form-table">
6
+ <tbody>
7
+ <tr>
8
+ <th scope="row"><label for="nta-wa-switch-control"><?php echo __('Enabled', 'ninjateam-whatsapp') ?></label></th>
9
+ <td>
10
+ <div class="nta-wa-switch-control">
11
+ <input type="checkbox" id="nta-wa-switch" name="nta_woo_button_status" <?php echo esc_attr(isset($woo_button_setting['nta_woo_button_status']) ? 'checked' : '') ?>>
12
+ <label for="nta-wa-switch" class="green"></label>
13
+ </div>
14
+ </td>
15
+ </tr>
16
+ <tr>
17
+ <th scope="row"><label for="nta_woo_button_position"><?php echo __('Button position', 'ninjateam-whatsapp') ?></label></th>
18
+ <td>
19
+ <select name="nta_woo_button_position" id="nta_woo_button_position">
20
+ <option value="before_atc" <?php echo esc_attr($woo_button_setting['nta_woo_button_position'] == 'before_atc' ? 'selected' : '') ?>><?php echo __('Before Add to Cart button', 'ninjateam-whatsapp') ?></option>
21
+ <option value="after_atc" <?php echo esc_attr($woo_button_setting['nta_woo_button_position'] == 'after_atc' ? 'selected' : '') ?>><?php echo __('After Add to Cart button', 'ninjateam-whatsapp') ?></option>
22
+ <option value="after_short_description" <?php echo esc_attr($woo_button_setting['nta_woo_button_position'] == 'after_short_description' ? 'selected' : '') ?>><?php echo __('After short description', 'ninjateam-whatsapp') ?></option>
23
+ <option value="after_long_description" <?php echo esc_attr($woo_button_setting['nta_woo_button_position'] == 'after_long_description' ? 'selected' : '') ?>><?php echo __('After long description', 'ninjateam-whatsapp') ?></option>
24
+ </select>
25
+ </td>
26
+ </tr>
27
+ <tr>
28
+ <th scope="row"><label for="selected_accounts"><?php echo __('Select accounts to display', 'ninjateam-whatsapp') ?></label></th>
29
+ <td>
30
+ <div class="search-account">
31
+ <input id="input-users" class="njt-wa-woobutton" type="text" autocomplete="off" placeholder="Search account by enter name or title">
32
+ </div>
33
+ <br />
34
+
35
+ <label class="nta-list-status"><strong><?php echo __('Selected Accounts:', 'ninjateam-whatsapp') ?></strong></label>
36
+
37
+ <div class="nta-list-box-accounts postbox" id="sortable">
38
+ <?php foreach ($account_list_view as $row) : ?>
39
+ <div class="nta-list-items" data-index="<?php echo esc_attr($row['account_id']) ?>" data-position="<?php echo esc_attr($row['wo_position']) ?>">
40
+ <div class="box-content box-content-woo">
41
+ <div class="box-row">
42
+ <div class="account-avatar">
43
+ <?php if (!empty($row['avatar'])) : ?>
44
+ <div class="wa_img_wrap" style="background: url(<?php echo esc_attr($row['avatar']) ?>) center center no-repeat; background-size: cover;"></div>
45
+ <?php
46
+ else :
47
+ echo NTA_WHATSAPP_DEFAULT_AVATAR;
48
+ ?>
49
+ <?php endif; ?>
50
+ </div>
51
+ <div class="container-block">
52
+ <a href="<?php echo get_edit_post_link($row['account_id']); ?>">
53
+ <h4><?php echo $row['post_title'] ?></h4>
54
+ </a>
55
+ <p><?php echo $row['nta_title'] ?></p>
56
+ <p>
57
+ <span <?php echo ($row['nta_monday'] == 'checked' ? 'class="active-date"' : '') ?>>Mon</span><span <?php echo ($row['nta_tuesday'] == 'checked' ? 'class="active-date"' : '') ?>>Tue</span><span <?php echo ($row['nta_wednesday'] == 'checked' ? 'class="active-date"' : '') ?>>Wed</span><span <?php echo ($row['nta_thursday'] == 'checked' ? 'class="active-date"' : '') ?>>Thur</span><span <?php echo ($row['nta_friday'] == 'checked' ? 'class="active-date"' : '') ?>>Fri</span><span <?php echo ($row['nta_saturday'] == 'checked' ? 'class="active-date"' : '') ?>>Sar</span><span <?php echo ($row['nta_sunday'] == 'checked' ? 'class="active-date"' : '') ?>>Sun</span>
58
+ </p>
59
+ <a data-remove="<?php echo esc_attr($row['account_id']) ?>" href="javascript:;" class="btn-remove-account"><?php echo __('Remove', 'ninjateam-whatsapp')?></a>
60
+ </div>
61
+ <div class="icon-block">
62
+ <img src="<?php echo esc_attr(NTA_WHATSAPP_PLUGIN_URL . 'images/bar-sortable.svg') ?>" width="20px">
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ <?php endforeach; ?>
68
+ </div>
69
+
70
+ </td>
71
+ </tr>
72
+ </tbody>
73
+ </table>
74
+ <p><input type="submit" id="submit" class="button button-primary" value="<?php echo __('Save WooCommerce Button','ninjateam-whatsapp') ?>"></p>
whatsapp.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * This file is read by WordPress to generate the plugin information in the plugin
5
+ * admin area. This file also includes all of the dependencies used by the plugin,
6
+ * registers the activation and deactivation functions, and defines a function
7
+ * that starts the plugin.
8
+ *
9
+ *
10
+ * @wordpress-plugin
11
+ * Plugin Name: WP Chat App
12
+ * Plugin URI: https://ninjateam.org/wordpress-whatsapp-chat
13
+ * Description: Integrate your WhatsApp experience directly into your website. This is one of the best way to connect and interact with your customer.
14
+ * Version: 2.6
15
+ * Author: NinjaTeam
16
+ * Author URI: https://ninjateam.org
17
+ * Text Domain: ninjateam-whatsapp
18
+ * Domain Path: /languages
19
+ */
20
+ if ( ! defined( 'ABSPATH' ) ) {
21
+ exit;
22
+ }
23
+
24
+ if (!function_exists('add_action')) {
25
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
26
+ exit;
27
+ }
28
+
29
+ function nta_whatsapp_action_links($links)
30
+ {
31
+ $links = array_merge(array(
32
+ '<a href="' . esc_url(admin_url('/admin.php?page=floating-widget-whatsapp')) . '">' . __('Settings', 'ninjateam-whatsapp') . '</a>',
33
+ ), $links);
34
+ return $links;
35
+ }
36
+ add_action('plugin_action_links_' . plugin_basename(__FILE__), 'nta_whatsapp_action_links');
37
+
38
+ function nta_whatsapp_uninstall_hook()
39
+ {
40
+ // delete_option('nta_whatsapp_setting');
41
+ // delete_option('nta_wabutton_setting');
42
+ // delete_option('nta_wa_woobutton_setting');
43
+ }
44
+
45
+ register_uninstall_hook(__FILE__, 'nta_whatsapp_uninstall_hook');
46
+
47
+ function nta_whatsapp_languages_init()
48
+ {
49
+ $current_user = wp_get_current_user();
50
+
51
+ if (!($current_user instanceof WP_User)) {
52
+ return;
53
+ }
54
+
55
+ if (function_exists('get_user_locale')) {
56
+ $language = get_user_locale($current_user);
57
+ } else {
58
+ $language = get_locale();
59
+ }
60
+
61
+ load_textdomain("ninjateam-whatsapp", NTA_WHATSAPP_PLUGIN_DIR . '/languages/' . $language . '.mo');
62
+ }
63
+
64
+ add_action('plugins_loaded', 'nta_whatsapp_languages_init');
65
+
66
+ define('NTA_WHATSAPP_VERSION', '2.5');
67
+ define('NTA_WHATSAPP_MINIMUM_WP_VERSION', '4.1.1');
68
+ define('NTA_WHATSAPP_PLUGIN_URL', plugin_dir_url(__FILE__));
69
+ define('NTA_WHATSAPP_PLUGIN_DIR', plugin_dir_path(__FILE__));
70
+
71
+ define('NTA_WHATSAPP_DEFAULT_AVATAR', '<svg width="48px" height="48px" class="nta-whatsapp-default-avatar" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
72
+ viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
73
+ <path style="fill:#EDEDED;" d="M0,512l35.31-128C12.359,344.276,0,300.138,0,254.234C0,114.759,114.759,0,255.117,0
74
+ S512,114.759,512,254.234S395.476,512,255.117,512c-44.138,0-86.51-14.124-124.469-35.31L0,512z"/>
75
+ <path style="fill:#55CD6C;" d="M137.71,430.786l7.945,4.414c32.662,20.303,70.621,32.662,110.345,32.662
76
+ c115.641,0,211.862-96.221,211.862-213.628S371.641,44.138,255.117,44.138S44.138,137.71,44.138,254.234
77
+ c0,40.607,11.476,80.331,32.662,113.876l5.297,7.945l-20.303,74.152L137.71,430.786z"/>
78
+ <path style="fill:#FEFEFE;" d="M187.145,135.945l-16.772-0.883c-5.297,0-10.593,1.766-14.124,5.297
79
+ c-7.945,7.062-21.186,20.303-24.717,37.959c-6.179,26.483,3.531,58.262,26.483,90.041s67.09,82.979,144.772,105.048
80
+ c24.717,7.062,44.138,2.648,60.028-7.062c12.359-7.945,20.303-20.303,22.952-33.545l2.648-12.359
81
+ c0.883-3.531-0.883-7.945-4.414-9.71l-55.614-25.6c-3.531-1.766-7.945-0.883-10.593,2.648l-22.069,28.248
82
+ c-1.766,1.766-4.414,2.648-7.062,1.766c-15.007-5.297-65.324-26.483-92.69-79.448c-0.883-2.648-0.883-5.297,0.883-7.062
83
+ l21.186-23.834c1.766-2.648,2.648-6.179,1.766-8.828l-25.6-57.379C193.324,138.593,190.676,135.945,187.145,135.945"/>
84
+ </svg>');
85
+
86
+ require_once NTA_WHATSAPP_PLUGIN_DIR . 'includes/nta-whatsapp-post-type.php';
87
+ require_once NTA_WHATSAPP_PLUGIN_DIR . 'includes/nta-whatsapp-popup.php';
88
+ require_once NTA_WHATSAPP_PLUGIN_DIR . 'includes/nta-whatsapp-setting.php';
89
+ require_once NTA_WHATSAPP_PLUGIN_DIR . 'includes/nta-whatsapp-class.php';
90
+ require_once NTA_WHATSAPP_PLUGIN_DIR . 'includes/nta-whatsapp-shortcode.php';
91
+ require_once NTA_WHATSAPP_PLUGIN_DIR . 'includes/nta-whatsapp-woocommerce.php';
92
+ require_once NTA_WHATSAPP_PLUGIN_DIR . 'includes/nta-whatsapp-ads.php';
93
+ require_once NTA_WHATSAPP_PLUGIN_DIR . 'includes/nta-whatsapp-wpml.php';
94
+ require_once NTA_WHATSAPP_PLUGIN_DIR . 'includes/Helper.php';
95
+
96
+ $nta_whatsapp = NTA_Whatsapp::getInstance();
97
+
98
+ //Gutenberg
99
+ if ( function_exists( 'register_block_type' ) ) {
100
+ // Gutenberg is available.
101
+ require_once plugin_dir_path( __FILE__ ) . 'gutenberg/init.php';
102
+ }
103
+
wpml-config.xml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <wpml-config>
2
+ <custom-types>
3
+ <custom-type translate="1" display-as-translated="1">whatsapp-accounts</custom-type>
4
+ </custom-types>
5
+ <custom-fields>
6
+ <custom-field action="translate">nta_whatsapp_accounts</custom-field>
7
+ <custom-field action="translate">nta_wabutton_style</custom-field>
8
+ </custom-fields>
9
+ <admin-texts>
10
+ <key name="nta_wabutton_setting">
11
+ <key name="button-text"/>
12
+ </key>
13
+ <key name="nta_whatsapp_setting">
14
+ <key name="widget_name"/>
15
+ <key name="widget_label"/>
16
+ <key name="widget_description"/>
17
+ <key name="widget_gdpr"/>
18
+ <key name="widget_responseText"/>
19
+ </key>
20
+ </admin-texts>
21
+ </wpml-config>