Google Reviews Widget - Version 2.0.1

Version Description

  • Instantly Google reviews connecting
  • Full Google reviews multi-language support
  • Bug and style fixes
Download this release

Release Info

Developer widgetpack
Plugin Icon 128x128 Google Reviews Widget
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0 to 2.0.1

assets/css/admin.css CHANGED
@@ -1,3 +1,4 @@
 
1
  .grw-admin #wpcontent {
2
  padding: 0;
3
  }
@@ -17,6 +18,12 @@
17
  position: relative;
18
  }
19
 
 
 
 
 
 
 
20
  .grw-admin .update-nag {
21
  margin: 20px 0 0 20px;
22
  }
@@ -29,6 +36,24 @@
29
  margin-left: 0;
30
  }
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  .grw-tophead {
33
  -ms-flex-align: center;
34
  -webkit-align-items: center;
@@ -80,29 +105,26 @@
80
  line-height: 29px;
81
  }
82
 
83
- .grw-admin #wpbody #screen-meta-links {
84
- display:none
85
- }
86
-
87
- .grw-admin #screen-meta {
88
- background-color: #ecf0f1;
89
- border: 0;
90
- margin: 0;
91
- }
92
-
93
- .grw-admin #screen-meta-links {
94
- position: absolute;
95
- top: 0;
96
- right: 0;
97
- z-index: 1;
98
- }
99
-
100
- .grw-admin.edit-php #wpbody .wp-header-end,
101
- .grw-admin.post-new-php #wpbody .wp-header-end,
102
- .grw-admin.post-php #wpbody .wp-header-end {
103
- margin-top: 6px;
104
- }
105
-
106
  .grw-toolbar {
107
  padding: 15px 20px;
108
  background-color: #fff;
@@ -209,6 +231,28 @@
209
  background: #fafafa;
210
  }
211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  .nav-tab.nav-tab-active {
213
  box-shadow: none;
214
  background: #fff;
@@ -226,6 +270,102 @@
226
  font-size: 14px;
227
  }
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  .grw-field,
230
  .grw-field * {
231
  box-sizing: border-box;
@@ -263,61 +403,21 @@
263
  margin-left: 0;
264
  }
265
 
266
- .grw-alert {
267
- font-size: 14px;
268
- line-height: 1.846;
269
- border: none;
270
- color: #fff;
271
- padding: 15px;
272
- margin-bottom: 23px;
273
- border: 1px solid transparent;
274
- border-radius: 3px;
275
- }
276
-
277
- .grw-alert-dismissable,
278
- .grw-alert-dismissible {
279
- padding-right: 35px;
280
- }
281
-
282
- .grw-alert-success {
283
- color: #fff;
284
- border-color: #d6e9c6;
285
- background-color: #4caf50;
286
- }
287
-
288
- .grw-alert-warning {
289
- background-color: #a22525;
290
- }
291
-
292
- .grw-alert a:not(.close),
293
- .grw-alert .alert-link {
294
- color: #fff;
295
- font-weight: bold;
296
- }
297
-
298
- .grw-settings-workspace .grw-alert {
299
- max-width: 500px;
300
- word-wrap: break-word;
301
- }
302
-
303
  .grw-flex-row {
304
  display: flex;
305
  flex-flow: row wrap;
306
  width: 100%;
307
- align-items: center!important;
308
- text-align: left;
309
- margin-bottom: 40px;
310
  }
311
 
312
  .grw-flex-col,
313
  .grw-flex-col3 {
314
  box-sizing: border-box;
315
- padding: 0 20px;
316
- line-height: 24px;
317
  }
318
 
319
  .grw-flex-col:first-child,
320
- .grw-flex-col3:first-child {
 
321
  padding-right: 10px;
322
  }
323
 
@@ -325,52 +425,45 @@
325
  .grw-flex-col {
326
  width: 50%;
327
  }
328
- .grw-flex-col7 {
329
- width: 70%;
330
- }
331
  .grw-flex-col3 {
332
  width: 30%;
333
  }
 
 
 
 
 
 
334
  }
335
 
336
- .grw-support-question {
337
- padding-bottom: 10px;
338
- }
339
-
340
- .grw-support-workspace {
341
- font-size: 15px;
342
- line-height: 22px;
343
- margin: 20px;
344
- padding: 20px;
345
- background: #fff;
346
  }
347
 
348
- .grw-support-workspace p {
349
- font-size: 15px;
 
350
  }
351
 
352
- .grw-support-workspace img {
353
- width: 100%;
 
 
354
  }
355
 
356
- .grw-support-workspace .subheader {
357
- color: #4b76b7;
358
- margin: 40px 0 20px;
359
- text-decoration: underline;
360
  }
361
 
362
- .grw-support-workspace .grw-flex-col > b:first-child,
363
- .grw-support-workspace .grw-flex-col3 > b:first-child {
364
- padding: 2px 8px;
365
- margin-right: 4px;
366
- border-radius: 50%;
367
  color: #fff;
368
- background: #36ad55;
369
- box-shadow: 0 2px 5px 0 rgb(0 0 0 / 26%);
370
- }
371
-
372
- .box-img {
373
- padding: 15px;
374
- margin: 0 0 10px;
375
- box-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
376
  }
1
+ /*-------------------------------- WP Overrides --------------------------------*/
2
  .grw-admin #wpcontent {
3
  padding: 0;
4
  }
18
  position: relative;
19
  }
20
 
21
+ .grw-admin.edit-php #wpbody .wp-header-end,
22
+ .grw-admin.post-new-php #wpbody .wp-header-end,
23
+ .grw-admin.post-php #wpbody .wp-header-end {
24
+ margin-top: 6px;
25
+ }
26
+
27
  .grw-admin .update-nag {
28
  margin: 20px 0 0 20px;
29
  }
36
  margin-left: 0;
37
  }
38
 
39
+ .grw-admin #wpbody #screen-meta-links {
40
+ display:none
41
+ }
42
+
43
+ .grw-admin #screen-meta {
44
+ background-color: #ecf0f1;
45
+ border: 0;
46
+ margin: 0;
47
+ }
48
+
49
+ .grw-admin #screen-meta-links {
50
+ position: absolute;
51
+ top: 0;
52
+ right: 0;
53
+ z-index: 1;
54
+ }
55
+
56
+ /*-------------------------------- Top Header --------------------------------*/
57
  .grw-tophead {
58
  -ms-flex-align: center;
59
  -webkit-align-items: center;
105
  line-height: 29px;
106
  }
107
 
108
+ .grw-version {
109
+ position: absolute;
110
+ top: 6px;
111
+ right: 16px;
112
+ -webkit-border-radius: 3px;
113
+ -moz-border-radius: 3px;
114
+ border-radius: 3px;
115
+ display: inline-block;
116
+ margin: 12px 0 0;
117
+ padding: 6px 10px;
118
+ font-size: 12px;
119
+ line-height: 14px;
120
+ color: #FFF;
121
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
122
+ white-space: nowrap;
123
+ vertical-align: baseline;
124
+ background-color: #999;
125
+ }
126
+
127
+ /*-------------------------------- Builder page --------------------------------*/
 
 
 
128
  .grw-toolbar {
129
  padding: 15px 20px;
130
  background-color: #fff;
231
  background: #fafafa;
232
  }
233
 
234
+ .wp-gr .wp-review-hidden {
235
+ opacity: .5 !important;
236
+ }
237
+
238
+ .wp-gr .wp-review-hide {
239
+ color: #fff !important;
240
+ font-size: 12px !important;
241
+ font-weight: 600 !important;
242
+ line-height: 26px !important;
243
+ text-decoration: none !important;
244
+ text-transform: uppercase !important;
245
+ padding: 2px 8px !important;
246
+ border-radius: 3px !important;
247
+ border-color: #0062cc !important;
248
+ background-color: #427fbf !important;
249
+ }
250
+
251
+ .wp-gr .wp-review-hide:hover {
252
+ background-color: #1d62ab !important;
253
+ }
254
+
255
+ /*-------------------------------- Settings page --------------------------------*/
256
  .nav-tab.nav-tab-active {
257
  box-shadow: none;
258
  background: #fff;
270
  font-size: 14px;
271
  }
272
 
273
+ .grw-settings-workspace .grw-alert {
274
+ max-width: 500px;
275
+ word-wrap: break-word;
276
+ }
277
+
278
+ /*-------------------------------- Support page --------------------------------*/
279
+ .grw-support-question {
280
+ padding-bottom: 10px;
281
+ }
282
+
283
+ .grw-support-workspace {
284
+ font-size: 15px;
285
+ line-height: 22px;
286
+ margin: 20px;
287
+ padding: 20px;
288
+ background: #fff;
289
+ }
290
+
291
+ .grw-support-workspace p {
292
+ font-size: 15px;
293
+ }
294
+
295
+ .grw-support-workspace #fig p {
296
+ line-height: 24px;
297
+ }
298
+
299
+ .grw-support-workspace img {
300
+ width: 100%;
301
+ }
302
+
303
+ .grw-support-workspace .subheader {
304
+ color: #4b76b7;
305
+ margin: 40px 0 20px;
306
+ text-decoration: underline;
307
+ }
308
+
309
+ .grw-support-workspace .grw-flex-col > b:first-child,
310
+ .grw-support-workspace .grw-flex-col3 > b:first-child {
311
+ padding: 2px 8px;
312
+ margin-right: 4px;
313
+ border-radius: 50%;
314
+ color: #fff;
315
+ background: #36ad55;
316
+ box-shadow: 0 2px 5px 0 rgb(0 0 0 / 26%);
317
+ }
318
+
319
+ .box-img {
320
+ padding: 15px;
321
+ margin: 0 0 10px;
322
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
323
+ }
324
+
325
+ /*-------------------------------- Full Installation Guide --------------------------------*/
326
+ #fig hr {
327
+ border-top: 1px solid #bbb;
328
+ border-bottom: 2px solid #eee;
329
+ }
330
+
331
+ #fig .grw-flex-row {
332
+ align-items: center!important;
333
+ text-align: left;
334
+ margin-bottom: 40px;
335
+ }
336
+
337
+ #fig .grw-flex-col,
338
+ #fig .grw-flex-col3 {
339
+ padding: 0 20px;
340
+ line-height: 24px;
341
+ }
342
+
343
+ #fig .grw-flex-col:first-child,
344
+ #fig .grw-flex-col3:first-child {
345
+ padding-right: 10px;
346
+ }
347
+
348
+ #fig img {
349
+ width: 100%;
350
+ }
351
+
352
+ #fig .subheader {
353
+ color: #4b76b7;
354
+ margin: 40px 0 20px;
355
+ text-decoration: underline;
356
+ }
357
+
358
+ #fig .grw-flex-col > b:first-child,
359
+ #fig .grw-flex-col3 > b:first-child {
360
+ padding: 2px 8px;
361
+ margin-right: 4px;
362
+ border-radius: 50%;
363
+ color: #fff;
364
+ background: #36ad55;
365
+ box-shadow: 0 2px 5px 0 rgb(0 0 0 / 26%);
366
+ }
367
+
368
+ /*-------------------------------- Field --------------------------------*/
369
  .grw-field,
370
  .grw-field * {
371
  box-sizing: border-box;
403
  margin-left: 0;
404
  }
405
 
406
+ /*-------------------------------- Flex row/col --------------------------------*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
407
  .grw-flex-row {
408
  display: flex;
409
  flex-flow: row wrap;
410
  width: 100%;
 
 
 
411
  }
412
 
413
  .grw-flex-col,
414
  .grw-flex-col3 {
415
  box-sizing: border-box;
 
 
416
  }
417
 
418
  .grw-flex-col:first-child,
419
+ .grw-flex-col3:first-child,
420
+ .grw-flex-col3 + .grw-flex-col3 {
421
  padding-right: 10px;
422
  }
423
 
425
  .grw-flex-col {
426
  width: 50%;
427
  }
 
 
 
428
  .grw-flex-col3 {
429
  width: 30%;
430
  }
431
+ .grw-flex-col6 {
432
+ width: 66.7%;
433
+ }
434
+ .grw-flex-col7 {
435
+ width: 70%;
436
+ }
437
  }
438
 
439
+ /*-------------------------------- Alert --------------------------------*/
440
+ .grw-alert {
441
+ font-size: 14px;
442
+ line-height: 1.846;
443
+ border: none;
444
+ color: #fff;
445
+ padding: 15px;
446
+ border: 1px solid transparent;
447
+ border-radius: 3px;
 
448
  }
449
 
450
+ .grw-alert-dismissable,
451
+ .grw-alert-dismissible {
452
+ padding-right: 35px;
453
  }
454
 
455
+ .grw-alert-success {
456
+ color: #fff;
457
+ border-color: #d6e9c6;
458
+ background-color: #4caf50;
459
  }
460
 
461
+ .grw-alert-warning {
462
+ background-color: #a22525;
 
 
463
  }
464
 
465
+ .grw-alert a:not(.close),
466
+ .grw-alert .alert-link {
 
 
 
467
  color: #fff;
468
+ font-weight: bold;
 
 
 
 
 
 
 
469
  }
assets/css/{feedbuilder.css → builder.css} RENAMED
File without changes
assets/css/rplg-setting.css DELETED
@@ -1,275 +0,0 @@
1
- .rplg-version {
2
- position: absolute;
3
- top: 6px;
4
- right: 16px;
5
- -webkit-border-radius: 3px;
6
- -moz-border-radius: 3px;
7
- border-radius: 3px;
8
- display: inline-block;
9
- margin: 12px 0 0;
10
- padding: 6px 10px;
11
- font-size: 12px;
12
- line-height: 14px;
13
- color: #FFF;
14
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
15
- white-space: nowrap;
16
- vertical-align: baseline;
17
- background-color: #999;
18
- }
19
-
20
- .rplg-page-title {
21
- font-size: 23px;
22
- font-weight: 400;
23
- margin: 0;
24
- padding: 20px 0 0 20px;
25
- line-height: 29px;
26
- }
27
-
28
- .rplg-page-title img {
29
- vertical-align: middle;
30
- }
31
-
32
- .rplg-settings-workspace {
33
- font-size: 14px;
34
- margin: 20px;
35
- padding: 20px;
36
- background: #fff;
37
- }
38
-
39
- .rplg-settings-workspace p {
40
- font-size: 14px;
41
- }
42
-
43
- .nav-tab.nav-tab-active {
44
- box-shadow: none;
45
- background: #fff;
46
- border-bottom-color: #fff;
47
- }
48
-
49
- .rplg-field,
50
- .rplg-field * {
51
- box-sizing: border-box;
52
- }
53
-
54
- .rplg-field {
55
- padding: 0 0 15px 0;
56
- margin-top: 1em;
57
- margin-bottom: 1em;
58
- border-bottom: 1px dashed #ddd;
59
- }
60
-
61
- @media (min-width: 600px) {
62
- .rplg-field {
63
- display: flex;
64
- flex-wrap: wrap;
65
- }
66
- .rplg-field-label {
67
- flex: 0 0 25%;
68
- padding-right: 4%;
69
- }
70
- .rplg-field-option {
71
- flex: 0 0 75%;
72
- }
73
- }
74
-
75
- .rplg-field input[type="text"] {
76
- margin: 0;
77
- padding: 5px 8px;
78
- border-radius: 2px;
79
- }
80
-
81
- .rplg-field select {
82
- width: 15em;
83
- margin-left: 0;
84
- }
85
-
86
- .rplg-flex-row {
87
- display: flex;
88
- flex-flow: row wrap;
89
- width: 100%;
90
- }
91
-
92
- .rplg-flex-col,
93
- .rplg-flex-col3 {
94
- box-sizing: border-box;
95
- }
96
-
97
- .rplg-flex-col:first-child,
98
- .rplg-flex-col3:first-child,
99
- .rplg-flex-col3+.rplg-flex-col3 {
100
- padding-right: 10px;
101
- }
102
-
103
- @media (min-width: 700px) {
104
- .rplg-flex-col {
105
- width: 50%;
106
- }
107
- .rplg-flex-col3 {
108
- width: 30%;
109
- }
110
- .rplg-flex-col6 {
111
- width: 66.7%;
112
- }
113
- .rplg-flex-col7 {
114
- width: 70%;
115
- }
116
- }
117
-
118
- .rplg-support-question {
119
- padding-bottom: 10px;
120
- }
121
-
122
- .rplg-alert {
123
- font-size: 14px;
124
- line-height: 1.846;
125
- border: none;
126
- color: #fff;
127
- padding: 15px;
128
- border: 1px solid transparent;
129
- border-radius: 3px;
130
- }
131
-
132
- .rplg-alert-dismissable,
133
- .rplg-alert-dismissible {
134
- padding-right: 35px;
135
- }
136
-
137
- .rplg-alert-success {
138
- color: #fff;
139
- border-color: #d6e9c6;
140
- background-color: #4caf50;
141
- }
142
-
143
- .rplg-alert-danger {
144
- color: #e51c23;
145
- border-color: #f7a4af;
146
- background-color: #f9bdbb;
147
- }
148
-
149
- .rplg-alert a:not(.close),
150
- .rplg-alert .alert-link {
151
- color: #fff;
152
- font-weight: bold;
153
- }
154
-
155
- .rplg-socials > * {
156
- vertical-align: middle!important;
157
- }
158
-
159
- .rplg-setting .widget-content,
160
- .rplg-setting .shortcode-content {
161
- padding: 0 20px;
162
- border-radius: 3px;
163
- border: 1px solid #eee;
164
- }
165
-
166
- .rplg-setting .shortcode-content {
167
- padding: 20px 20px 0;
168
- }
169
-
170
- .rplg-setting .wp-google-place {
171
- padding: 20px !important;
172
- }
173
-
174
- .rplg-setting .wp-google-place:hover {
175
- cursor: pointer !important;
176
- background: #eee !important;
177
- }
178
-
179
- .rplg-setting .wp-google-list,
180
- .rplg-setting .wp-google-content-inner {
181
- border-radius: 3px;
182
- border: 1px solid #eee;
183
- }
184
-
185
- .rplg-setting .wp-google-content-inner {
186
- padding: 0 15px 10px;
187
- }
188
-
189
- .rplg-setting .wp-more-toggle,
190
- .rplg-setting .wp-google-url {
191
- display: none !important;
192
- }
193
-
194
- .wp-gr .wp-review-hidden {
195
- opacity: .5 !important;
196
- }
197
-
198
- .wp-gr .wp-review-hide {
199
- color: #fff !important;
200
- font-size: 12px !important;
201
- font-weight: 600 !important;
202
- line-height: 26px !important;
203
- text-decoration: none !important;
204
- text-transform: uppercase !important;
205
- padding: 2px 8px !important;
206
- border-radius: 3px !important;
207
- border-color: #0062cc !important;
208
- background-color: #427fbf !important;
209
- }
210
-
211
- .wp-gr .wp-review-hide:hover {
212
- background-color: #1d62ab !important;
213
- }
214
-
215
- #support h3 {
216
- line-height: 24px;
217
- }
218
-
219
- #fig p,
220
- #fig div {
221
- font-size: 15px;
222
- line-height: 24px;
223
- }
224
-
225
- #fig hr {
226
- border-top: 1px solid #bbb;
227
- border-bottom: 2px solid #eee;
228
- }
229
-
230
- #fig .rplg-flex-row {
231
- align-items: center!important;
232
- text-align: left;
233
- margin-bottom: 40px;
234
- }
235
-
236
- #fig .rplg-flex-col,
237
- #fig .rplg-flex-col3 {
238
- padding: 0 20px;
239
- line-height: 24px;
240
- }
241
-
242
- #fig .rplg-flex-col:first-child,
243
- #fig .rplg-flex-col3:first-child {
244
- padding-right: 10px;
245
- }
246
-
247
- .rplg-support-question {
248
- padding-bottom: 10px;
249
- }
250
-
251
- #fig img {
252
- width: 100%;
253
- }
254
-
255
- #fig .subheader {
256
- color: #4b76b7;
257
- margin: 40px 0 20px;
258
- text-decoration: underline;
259
- }
260
-
261
- #fig .rplg-flex-col > b:first-child,
262
- #fig .rplg-flex-col3 > b:first-child {
263
- padding: 2px 8px;
264
- margin-right: 4px;
265
- border-radius: 50%;
266
- color: #fff;
267
- background: #36ad55;
268
- box-shadow: 0 2px 5px 0 rgb(0 0 0 / 26%);
269
- }
270
-
271
- .box-img {
272
- padding: 15px;
273
- margin: 0 0 10px;
274
- box-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
275
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/rplg-wp.css DELETED
@@ -1,462 +0,0 @@
1
- /*-------------------------------- WP overrides --------------------------------*/
2
- .widget-content input[type="text"],
3
- .widget-content select,
4
- .widget-content button {
5
- border-spacing: 0;
6
- width: 100%;
7
- clear: both;
8
- }
9
-
10
- .form-group {
11
- position: relative;
12
- }
13
-
14
- .widget-content .form-group {
15
- margin: 10px 0 0;
16
- }
17
-
18
- .widget-content .form-group label {
19
- vertical-align: baseline;
20
- }
21
-
22
- .widget-content .form-group img {
23
- vertical-align: middle;
24
- }
25
-
26
- .widget-control-actions {
27
- position: relative;
28
- }
29
-
30
- /*-------------------------------- Commons --------------------------------*/
31
- .rplg-widget {
32
- margin: 10px 0;
33
- }
34
-
35
- .rplg-options-toggle {
36
- padding: 10px;
37
- margin: 10px 0 0;
38
- cursor: pointer;
39
- border: 1px solid #dbdbdb;
40
- background: #eee url('../img/button-down-black.svg') no-repeat right;
41
- }
42
-
43
- .rplg-options {
44
- padding: 0px 4px;
45
- }
46
-
47
- .rplg-disabled label,
48
- .rplg-disabled small {
49
- opacity: .7;
50
- }
51
-
52
- .rplg-pro {
53
- color: #fff;
54
- padding: 6px;
55
- border-radius: 3px;
56
- background: #00bf54;
57
- }
58
-
59
- .rplg-pro a {
60
- color: #fff;
61
- text-decoration: underline;
62
- }
63
-
64
- .rplg-quest {
65
- position: absolute;
66
- top: -2px;
67
- right: 2px;
68
- width: 16px;
69
- cursor: pointer;
70
- font-size: 12px;
71
- font-weight: bold;
72
- text-align: center;
73
- border: 1px solid #ccc;
74
- border-radius: 50px;
75
- background: #eee;
76
- }
77
-
78
- .rplg-quest + div {
79
- padding: 6px;
80
- margin: 5px 0 0;
81
- border-radius: 2px;
82
- background: #eee;
83
- }
84
-
85
- /*-------------------------------- google finder --------------------------------*/
86
- .grw-step {
87
- display: inline-block;
88
- width: 20px;
89
- line-height: 20px;
90
- padding: 2px;
91
- margin: 0 6px 0 0;
92
- text-align: center;
93
- background: #ffe045;
94
- border-radius: 50%;
95
- }
96
-
97
- #shortcode .grw-step,
98
- #shortcode .yrw-step {
99
- width: 28px;
100
- padding: 4px;
101
- }
102
-
103
- .grw-places, .grw-reviews {
104
- max-height: 200px;
105
- overflow: auto;
106
- border: 1px solid #f3f3f3;
107
- }
108
-
109
- .grw-place {
110
- margin: 0;
111
- padding: 6px;
112
- cursor: pointer;
113
- }
114
-
115
- .grw-place img {
116
- border: none;
117
- float: left;
118
- height: 40px;
119
- margin-right: 5px;
120
- width: 40px;
121
- width: 20px;
122
- height: 20px;
123
- border-radius: 50%;
124
- }
125
-
126
- .grw-place .media-body {
127
- overflow: hidden;
128
- }
129
-
130
- .grw-place .media-heading {
131
- margin: 0;
132
- padding-right: 6px;
133
- font-size: 13px;
134
- font-weight: bold;
135
- }
136
-
137
- .grw-place .grw-grating {
138
- font-size: 12px;
139
- font-weight: 700;
140
- color: #e7711b;
141
- margin: 0 6px 0 0;
142
- }
143
-
144
- .grw-place .grw-gstars {
145
- padding-left: 7px;
146
- }
147
-
148
- .grw-place small {
149
- display: block;
150
- font-size: 11px;
151
- overflow: hidden;
152
- white-space: nowrap;
153
- text-overflow: ellipsis;
154
- }
155
-
156
- .grw-place:hover {
157
- background-color: #fafafa;
158
- }
159
-
160
- .grw-place.grw-active {
161
- background-color: #eee;
162
- }
163
-
164
- .grw-place .grw-gtime {
165
- color: #999;
166
- font-size: 13px;
167
- text-decoration: none;
168
- }
169
-
170
- .grw-place .grw-gtext {
171
- color: #222;
172
- font-size: 13px;
173
- line-height: 18px;
174
- max-width: 100%;
175
- overflow: hidden;
176
- white-space: pre-wrap;
177
- }
178
-
179
- .grw-five-reviews-note {
180
- margin: 4px 0;
181
- color: #d32323;
182
- text-align: center;
183
- }
184
-
185
- .grw-save-reviews-container {
186
- position: relative;
187
- }
188
-
189
- .grw-tooltip {
190
- position: absolute;
191
- top: 40px;
192
- right: 0;
193
- width: 100%;
194
- color: #333;
195
- outline: none;
196
- border: 1px solid #ccc;
197
- border-color: rgba(0,0,0,.2);
198
- -webkit-border-radius: 2px;
199
- border-radius: 2px;
200
- opacity: 0;
201
- z-index: 99999;
202
- background: #ffe045;
203
- box-shadow: 0 2px 10px rgba(0,0,0,.2);
204
- transition: all .5s ease-in-out;
205
- }
206
-
207
- .grw-tooltip.grw-tooltip-visible {
208
- opacity: 1;
209
- }
210
-
211
- .grw-tooltip .grw-corn1 {
212
- position: absolute;
213
- top: -9px;
214
- right: 16px;
215
- height: 0;
216
- width: 0;
217
- z-index: 1;
218
- border-color: transparent;
219
- border-style: dashed dashed solid;
220
- border-width: 0 8.5px 8.5px;
221
- border-bottom-color: #ccc;
222
- border-bottom-color: rgba(0,0,0,.2);
223
- }
224
-
225
- .grw-tooltip .grw-corn2 {
226
- position: absolute;
227
- top: -8px;
228
- right: 16px;
229
- height: 0;
230
- width: 0;
231
- z-index: 1;
232
- border-color: transparent;
233
- border-bottom-color: #ffe045;
234
- border-style: dashed dashed solid;
235
- border-width: 0 8.5px 8.5px;
236
- }
237
-
238
- .grw-tooltip .grw-text {
239
- padding: 10px;
240
- }
241
-
242
- .grw-tooltip .grw-close {
243
- position: absolute;
244
- top: 6px;
245
- right: 6px;
246
- color: #777;
247
- padding: 2px;
248
- font-size: 22px;
249
- cursor: pointer;
250
- }
251
-
252
- .grw-tooltip .grw-close:hover {
253
- color: #444;
254
- }
255
-
256
- .grw-error,
257
- .yrw-error {
258
- color: #e60909;
259
- font-size: 13px;
260
- }
261
-
262
- /*-------------------------------- yelp finder --------------------------------*/
263
- .yrw-step {
264
- display: inline-block;
265
- width: 20px;
266
- line-height: 20px;
267
- padding: 2px;
268
- margin: 0 6px 0 0;
269
- text-align: center;
270
- background: #ffe045;
271
- border-radius: 50%;
272
- }
273
-
274
- .yrw-businesses, .yrw-reviews {
275
- max-height: 200px;
276
- overflow: auto;
277
- border: 1px solid #f3f3f3;
278
- }
279
-
280
- .yrw-business {
281
- margin: 0;
282
- padding: 6px;
283
- cursor: pointer;
284
- }
285
-
286
- .yrw-business img {
287
- border: none;
288
- float: left;
289
- height: 40px;
290
- margin-right: 5px;
291
- width: 40px;
292
- width: 20px;
293
- height: 20px;
294
- }
295
-
296
- .yrw-business .media-body {
297
- overflow: hidden;
298
- }
299
-
300
- .yrw-business .media-heading {
301
- margin: 0;
302
- padding-right: 6px;
303
- font-size: 13px;
304
- font-weight: bold;
305
- }
306
-
307
- .yrw-business .yrw-yrating {
308
- font-size: 12px;
309
- font-weight: 700;
310
- color: #d32323;
311
- margin: 0 6px 0 0;
312
- }
313
-
314
- .yrw-business .yrw-ystars {
315
- padding-left: 7px;
316
- }
317
-
318
- .yrw-business small {
319
- display: block;
320
- font-size: 11px;
321
- overflow: hidden;
322
- white-space: nowrap;
323
- text-overflow: ellipsis;
324
- }
325
-
326
- .yrw-business:hover {
327
- background-color: #fafafa;
328
- }
329
-
330
- .yrw-business.yrw-active {
331
- background-color: #eee;
332
- }
333
-
334
- .yrw-business .yrw-ytime {
335
- color: #999;
336
- font-size: 13px;
337
- text-decoration: none;
338
- }
339
-
340
- .yrw-business .yrw-ytext {
341
- color: #222;
342
- font-size: 13px;
343
- line-height: 18px;
344
- max-width: 100%;
345
- overflow: hidden;
346
- white-space: pre-wrap;
347
- }
348
-
349
- .yrw-three-reviews-note {
350
- margin: 4px 0;
351
- color: #d32323;
352
- text-align: center;
353
- }
354
-
355
- .yrw-tooltip {
356
- position: absolute;
357
- top: 44px;
358
- right: 0;
359
- width: 100%;
360
- color: #333;
361
- outline: none;
362
- border: 1px solid #ccc;
363
- border-color: rgba(0,0,0,.2);
364
- -webkit-border-radius: 2px;
365
- border-radius: 2px;
366
- opacity: 0;
367
- z-index: 99999;
368
- background: #ffe045;
369
- box-shadow: 0 2px 10px rgba(0,0,0,.2);
370
- transition: all .5s ease-in-out;
371
- }
372
-
373
- .yrw-tooltip.yrw-tooltip-visible {
374
- opacity: 1;
375
- }
376
-
377
- .yrw-tooltip .yrw-corn1 {
378
- position: absolute;
379
- top: -9px;
380
- right: 16px;
381
- height: 0;
382
- width: 0;
383
- z-index: 1;
384
- border-color: transparent;
385
- border-style: dashed dashed solid;
386
- border-width: 0 8.5px 8.5px;
387
- border-bottom-color: #ccc;
388
- border-bottom-color: rgba(0,0,0,.2);
389
- }
390
-
391
- .yrw-tooltip .yrw-corn2 {
392
- position: absolute;
393
- top: -8px;
394
- right: 16px;
395
- height: 0;
396
- width: 0;
397
- z-index: 1;
398
- border-color: transparent;
399
- border-bottom-color: #ffe045;
400
- border-style: dashed dashed solid;
401
- border-width: 0 8.5px 8.5px;
402
- }
403
-
404
- .yrw-tooltip .yrw-text {
405
- padding: 10px;
406
- }
407
-
408
- .yrw-tooltip .yrw-close {
409
- position: absolute;
410
- top: 6px;
411
- right: 6px;
412
- color: #777;
413
- padding: 2px;
414
- font-size: 22px;
415
- cursor: pointer;
416
- }
417
-
418
- .yrw-tooltip .yrw-close:hover {
419
- color: #444;
420
- }
421
-
422
- /*-------------------------------- facebook finder --------------------------------*/
423
- .fbrev-connect {
424
- color: #fff;
425
- padding: 5px;
426
- border: none;
427
- background: #3b5998;
428
- cursor: pointer;
429
- }
430
-
431
- .fbrev-connect:hover {
432
- background: #4869ad;
433
- }
434
-
435
- #shortcode .fbrev-connect {
436
- margin-top: 15px;
437
- }
438
-
439
- .fbrev-pages .fbrev-page {
440
- margin: 10px 0 0;
441
- padding: 6px;
442
- border: 1px solid #eee;
443
- border-radius: 3px;
444
- cursor: pointer;
445
- }
446
-
447
- .fbrev-pages .fbrev-page.active, .fbrev-page:hover {
448
- background: #eee;
449
- }
450
-
451
- .fbrev-pages .fbrev-page-photo {
452
- width: 32px;
453
- height: 32px;
454
- border-radius: 50%;
455
- vertical-align: middle;
456
- box-shadow: 0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24);
457
- }
458
-
459
- .fbrev-pages span {
460
- display: inline-block;
461
- margin: 4px 16px;
462
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/{feedbuilder.js → builder.js} RENAMED
@@ -8,13 +8,14 @@ var HTML_CONTENT = '' +
8
  '<input type="text" class="grw-connect-id" value="" placeholder="Place ID" />' +
9
  '<span class="grw-quest grw-toggle" title="Click to help">?</span>' +
10
  '<div class="grw-quest-help">' +
11
- 'Enter Place ID of your Google location. If you don\'t know this, you can simply find it by ' +
12
- '<a href="' + GRW_VARS.supportUrl + '" target="_blank">this instruction</a>.' +
 
 
13
  '</div>' +
14
  '</div>' +
15
  '<div class="grw-builder-option">' +
16
  '<select class="grw-connect-lang">' +
17
- '<option value="">Use default language (English) or choose specific</option>' +
18
  '<option value="ar">Arabic</option>' +
19
  '<option value="bg">Bulgarian</option>' +
20
  '<option value="bn">Bengali</option>' +
@@ -23,9 +24,7 @@ var HTML_CONTENT = '' +
23
  '<option value="da">Danish</option>' +
24
  '<option value="de">German</option>' +
25
  '<option value="el">Greek</option>' +
26
- '<option value="en">English</option>' +
27
- //'<option value="en-AU">English (Australian)</option>' +
28
- //'<option value="en-GB">English (Great Britain)</option>' +
29
  '<option value="es">Spanish</option>' +
30
  '<option value="eu">Basque</option>' +
31
  '<option value="eu">Basque</option>' +
@@ -71,13 +70,13 @@ var HTML_CONTENT = '' +
71
  '<option value="zh-TW">Chinese (Traditional)</option>' +
72
  '</select>' +
73
  '</div>' +
74
- '<div class="grw-builder-option">' +
75
  '<input type="text" class="grw-connect-key" value="' + GRW_VARS.googleAPIKey + '" placeholder="Google Places API Key" />' +
76
  '<span class="grw-quest grw-toggle" title="Click to help">?</span>' +
77
  '<div class="grw-quest-help">' +
78
- 'Except a Place ID you should also create your own Google API key, it\'s very simple and won\'t take more than a few minutes, please <a href="' + GRW_VARS.supportUrl + '" target="_blank">read this manual</a>.' +
79
  '</div>' +
80
- '</div>' +
81
  '<div class="grw-builder-option">' +
82
  '<button class="grw-connect-btn">Connect Google</button>' +
83
  '<small class="grw-connect-error"></small>' +
@@ -283,30 +282,30 @@ function grw_connection($, el, platform) {
283
  var connect_btn = el.querySelector('.grw-connect-btn');
284
  $(connect_btn).click(function() {
285
 
286
- var connect_id_el = el.querySelector('.grw-connect-id'),
287
- connect_key_el = el.querySelector('.grw-connect-key');
288
 
289
  if (!connect_id_el.value) {
290
  connect_id_el.focus();
291
  return false;
292
- } else if (!connect_key_el.value) {
293
  connect_key_el.focus();
294
  return false;
295
- }
296
 
297
  var id = (platform == 'yelp' ? /.+\/biz\/(.*?)(\?|\/|$)/.exec(connect_id_el.value)[1] : connect_id_el.value),
298
- lang = el.querySelector('.grw-connect-lang').value,
299
- key = connect_key_el.value;
300
 
301
  connect_btn.innerHTML = 'Please wait...';
302
  connect_btn.disabled = true;
303
 
304
  var url = GRW_VARS.handlerUrl + '&cf_action=grw_connect_' + platform + '&v=' + new Date().getTime();
305
- jQuery.post(url, {
306
  id: decodeURIComponent(id),
307
  lang: lang,
308
- key: key,
309
- grw_wpnonce: jQuery('#grw_nonce').val()
310
  }, function(res) {
311
 
312
  console.log('grw_connect_debug:', res);
@@ -337,9 +336,13 @@ function grw_connection($, el, platform) {
337
 
338
  } else {
339
 
340
- error_el.innerHTML = '<b>Error</b>: ' + res.result.error_message;
341
- if (res.result.status == 'OVER_QUERY_LIMIT') {
342
- error_el.innerHTML += '<br><br>More recently, Google has limited the API to 1 request per day for new users, try to create new <a href="https://developers.google.com/places/web-service/get-api-key#get_an_api_key" target="_blank">Google API key</a>, save in the setting and Connect Google again.';
 
 
 
 
343
  }
344
 
345
  }
8
  '<input type="text" class="grw-connect-id" value="" placeholder="Place ID" />' +
9
  '<span class="grw-quest grw-toggle" title="Click to help">?</span>' +
10
  '<div class="grw-quest-help">' +
11
+ 'The standard way to find your Google Place ID is to go to ' +
12
+ '<a href="https://developers.google.com/places/place-id" target="_blank">https://developers.google.com/places/place-id</a> ' +
13
+ 'and search for your company name.<br><br>But sometimes it may not work, in this case please see ' +
14
+ '<a href="' + GRW_VARS.supportUrl + '&grw_tab=fig#place_id" target="_blank">how to find any Google Place ID</a>.' +
15
  '</div>' +
16
  '</div>' +
17
  '<div class="grw-builder-option">' +
18
  '<select class="grw-connect-lang">' +
 
19
  '<option value="ar">Arabic</option>' +
20
  '<option value="bg">Bulgarian</option>' +
21
  '<option value="bn">Bengali</option>' +
24
  '<option value="da">Danish</option>' +
25
  '<option value="de">German</option>' +
26
  '<option value="el">Greek</option>' +
27
+ '<option value="en" selected="selected">English</option>' +
 
 
28
  '<option value="es">Spanish</option>' +
29
  '<option value="eu">Basque</option>' +
30
  '<option value="eu">Basque</option>' +
70
  '<option value="zh-TW">Chinese (Traditional)</option>' +
71
  '</select>' +
72
  '</div>' +
73
+ /*'<div class="grw-builder-option">' +
74
  '<input type="text" class="grw-connect-key" value="' + GRW_VARS.googleAPIKey + '" placeholder="Google Places API Key" />' +
75
  '<span class="grw-quest grw-toggle" title="Click to help">?</span>' +
76
  '<div class="grw-quest-help">' +
77
+ 'Except a Place ID you should also create your own Google API key, it\'s very simple and won\'t take more than a few minutes, please <a href="' + GRW_VARS.supportUrl + '&grw_tab=fig#fig_api_key" target="_blank">read this manual</a>.' +
78
  '</div>' +
79
+ '</div>' +*/
80
  '<div class="grw-builder-option">' +
81
  '<button class="grw-connect-btn">Connect Google</button>' +
82
  '<small class="grw-connect-error"></small>' +
282
  var connect_btn = el.querySelector('.grw-connect-btn');
283
  $(connect_btn).click(function() {
284
 
285
+ var connect_id_el = el.querySelector('.grw-connect-id');
286
+ //connect_key_el = el.querySelector('.grw-connect-key');
287
 
288
  if (!connect_id_el.value) {
289
  connect_id_el.focus();
290
  return false;
291
+ }/* else if (!connect_key_el.value) {
292
  connect_key_el.focus();
293
  return false;
294
+ }*/
295
 
296
  var id = (platform == 'yelp' ? /.+\/biz\/(.*?)(\?|\/|$)/.exec(connect_id_el.value)[1] : connect_id_el.value),
297
+ lang = el.querySelector('.grw-connect-lang').value;
298
+ //key = connect_key_el.value;
299
 
300
  connect_btn.innerHTML = 'Please wait...';
301
  connect_btn.disabled = true;
302
 
303
  var url = GRW_VARS.handlerUrl + '&cf_action=grw_connect_' + platform + '&v=' + new Date().getTime();
304
+ $.post(url, {
305
  id: decodeURIComponent(id),
306
  lang: lang,
307
+ //key: key,
308
+ grw_wpnonce: $('#grw_nonce').val()
309
  }, function(res) {
310
 
311
  console.log('grw_connect_debug:', res);
336
 
337
  } else {
338
 
339
+ if (res.result.error_message == 'usage_limit') {
340
+ $('#dialog').dialog({width: '50%', maxWidth: '600px'});
341
+ } else {
342
+ error_el.innerHTML = '<b>Error</b>: ' + res.result.error_message;
343
+ if (res.result.status == 'OVER_QUERY_LIMIT') {
344
+ error_el.innerHTML += '<br><br>More recently, Google has limited the API to 1 request per day for new users, try to create new <a href="https://developers.google.com/places/web-service/get-api-key#get_an_api_key" target="_blank">Google API key</a>, save in the setting and Connect Google again.';
345
+ }
346
  }
347
 
348
  }
assets/js/grw-finder.js DELETED
@@ -1,457 +0,0 @@
1
- /*
2
- * Init Google Places finder for Widget or Shortcode
3
- */
4
- function grw_init(data) {
5
-
6
- var el = data.el;
7
- if (!el) return;
8
-
9
- var searchBtn = el.querySelector('.grw-search-btn');
10
- WPacFastjs.on(searchBtn, 'click', function() {
11
- var queryEl = el.querySelector('.grw-place-search');
12
-
13
- if (!queryEl.value) {
14
- queryEl.focus();
15
- return false;
16
- }
17
-
18
- searchBtnText = searchBtn.innerHTML;
19
- searchBtn.disabled = true;
20
- searchBtn.innerHTML = 'Please wait...';
21
-
22
- if (/^ChIJ.*$/.test(queryEl.value)) {
23
- jQuery.get(grw_request_url('reviews'), {
24
- placeid: queryEl.value,
25
- grw_wpnonce: jQuery('#grw_nonce').val()
26
- }, function(place) {
27
- searchBtn.disabled = false;
28
- searchBtn.innerHTML = searchBtnText;
29
- grw_addPlaces(el, [place], data.cb);
30
- }, 'json');
31
- } else {
32
- grw_textsearch(el, queryEl.value, data.cb, function() {
33
- searchBtn.disabled = false;
34
- searchBtn.innerHTML = searchBtnText;
35
- });
36
- }
37
- return false;
38
- });
39
-
40
- var connectBtn = el.querySelector('.grw-connect-btn');
41
- WPacFastjs.on(connectBtn, 'click', function() {
42
-
43
- var placeIdEl = el.querySelector('.grw-place-id'),
44
- placeId = placeIdEl.value;
45
- if (!placeId) {
46
- placeIdEl.focus();
47
- return false;
48
- }
49
-
50
- var errorEl = el.querySelector('.grw-error');
51
- if (/^ChIJ.*$/.test(placeId)) {
52
- errorEl.innerHTML = '';
53
- } else {
54
- errorEl.innerHTML = 'Place ID is incorrect, it should like ChIJ...';
55
- return false;
56
- }
57
-
58
- var langEl = el.querySelector('.grw-lang'),
59
- optionEl = langEl.options[langEl.selectedIndex],
60
- lang = optionEl ? optionEl.value : '';
61
-
62
- connectBtn.innerHTML = 'Please wait...';
63
- connectBtn.disabled = true;
64
-
65
- jQuery.post(grw_request_url('save'), {
66
- placeid : placeId,
67
- lang : lang,
68
- grw_wpnonce : jQuery('#grw_nonce').val()
69
- }, function(res) {
70
-
71
- console.log('grw_debug:', res);
72
-
73
- connectBtn.innerHTML = 'Connect Google';
74
- connectBtn.disabled = false;
75
-
76
- if (res.status == 'success') {
77
-
78
- errorEl.innerHTML = '';
79
-
80
- var nameEl = el.querySelector('.grw-google-place-name'),
81
- placeIdEl = el.querySelector('.grw-google-place-id'),
82
- langEl = el.querySelector('.grw-place-lang'),
83
- photoEl = el.querySelector('.grw-place-photo');
84
-
85
- nameEl.value = res.result.name;
86
- placeIdEl.value = res.result.place_id;
87
- langEl.value = lang;
88
- photoEl.value = res.result.business_photo || res.result.icon;
89
-
90
- var img = el.querySelector('.grw-place-photo-img');
91
- img.src = res.result.business_photo || res.result.icon;
92
- img.style.display = '';
93
-
94
- var controlEl = el.parentNode.parentNode.querySelector('.widget-control-actions');
95
- if (controlEl) {
96
- grw_show_tooltip(controlEl, 'Please don\'t forget to <b>Save</b> the widget.');
97
- }
98
-
99
- jQuery(nameEl).change();
100
-
101
- } else {
102
-
103
- errorEl.innerHTML = '<b>Google error</b>: ' + res.result.error_message;
104
- if (res.result.status == 'OVER_QUERY_LIMIT') {
105
- errorEl.innerHTML += '<br><br>More recently, Google has limited the API to 1 request per day for new users, try to create new <a href="https://developers.google.com/places/web-service/get-api-key#get_an_api_key" target="_blank">Google API key</a>, save in the setting and Connect Google again.';
106
- }
107
-
108
- }
109
-
110
- }, 'json');
111
- return false;
112
- });
113
-
114
- grw_jquery_init(el, data.cb);
115
- }
116
-
117
- /*
118
- * Init Google Places moderation
119
- */
120
- function grw_mod_init(data) {
121
-
122
- var el = document.querySelector('#' + data.widgetId);
123
- if (!el) return;
124
-
125
- jQuery.get(grw_request_url('places'), {
126
- grw_wpnonce: jQuery('#grw_nonce').val()
127
- }, function(res) {
128
-
129
- var placesEl = el.querySelector('.wp-places');
130
- if (res.places.length < 1) {
131
- placesEl.innerHTML = 'There are no Places yet';
132
- return;
133
- } else {
134
- placesEl.innerHTML = '';
135
- }
136
-
137
- WPacFastjs.each(res.places, function(place) {
138
- var placeEl = document.createElement('div');
139
- placeEl.className = 'grw-place media';
140
- placeEl.innerHTML = grw_renderPlace(place);
141
- placeEl.title = place.formatted_address;
142
- placesEl.appendChild(placeEl);
143
-
144
- var stars = placeEl.querySelector('.grw-gstars');
145
- stars.innerHTML = WPacStars.rating_render(place.rating, 14, 'e7711b');
146
-
147
- WPacFastjs.on(placeEl, 'click', function() {
148
- var activeEl = placeEl.parentNode.querySelector('.grw-active');
149
- WPacFastjs.remcl(activeEl, 'grw-active');
150
- WPacFastjs.addcl(placeEl, 'grw-active');
151
-
152
- jQuery.get(grw_request_url('place_reviews'), {
153
- google_place_id: place.id,
154
- grw_wpnonce: jQuery('#grw_nonce').val()
155
- }, function(res) {
156
-
157
- var reviewsEl = el.querySelector('.wp-reviews');
158
- if (res.reviews.length < 1) {
159
- reviewsEl.innerHTML = 'There are no reviews yet for selected Place';
160
- return;
161
- } else {
162
- reviewsEl.innerHTML = '';
163
- }
164
-
165
- el.querySelector('.grw-google-place-name').value = place.name;
166
- el.querySelector('.grw-google-place-id').value = place.place_id;
167
-
168
- WPacFastjs.show2(el.querySelector('#mod-reviews'));
169
- WPacFastjs.show2(el.querySelector('#mod-shortcode-builder'));
170
-
171
- data.cb && data.cb();
172
-
173
- WPacFastjs.each(res.reviews, function(review) {
174
- var reviewEl = document.createElement('div');
175
- reviewEl.className = 'grw-place media';
176
- reviewEl.innerHTML = grw_renderReview(review, true);
177
- reviewsEl.appendChild(reviewEl);
178
-
179
- var stars = reviewEl.querySelector('.grw-gstars');
180
- stars.innerHTML = WPacStars.rating_render(review.rating, 14, 'e7711b');
181
-
182
- WPacFastjs.on2(reviewEl, '.wp-google-delete', 'click', function() {
183
- if (confirm('Are you sure to delete this review?')) {
184
- jQuery.post(grw_request_url('delete_review'), {
185
- google_review_id: review.id,
186
- grw_wpnonce: jQuery('#grw_nonce').val()
187
- }, function(res) {
188
- if (res.status == 'success') {
189
- WPacFastjs.rm(reviewEl);
190
- }
191
- }, 'json');
192
- }
193
- return false;
194
- });
195
- });
196
-
197
- }, 'json');
198
-
199
- return false;
200
- });
201
- });
202
- }, 'json');
203
-
204
- grw_jquery_init(el, data.cb);
205
- }
206
-
207
- /*
208
- * Init photo upload link and options toggles
209
- */
210
- function grw_jquery_init(el, cb) {
211
-
212
- jQuery(document).ready(function($) {
213
-
214
- var file_frame;
215
- $('.grw-place-photo-btn', el).on('click', function(e) {
216
- e.preventDefault();
217
- if (file_frame) {
218
- file_frame.open();
219
- return;
220
- }
221
-
222
- file_frame = wp.media.frames.file_frame = wp.media({
223
- title: $(this).data('uploader_title'),
224
- button: {text: $(this).data('uploader_button_text')},
225
- multiple: false
226
- });
227
-
228
- file_frame.on('select', function() {
229
- var place_photo_hidden = $('.grw-place-photo', el),
230
- place_photo_img = $('.grw-place-photo-img', el);
231
- attachment = file_frame.state().get('selection').first().toJSON();
232
- place_photo_hidden.val(attachment.url);
233
- place_photo_img.attr('src', attachment.url);
234
- place_photo_img.show();
235
-
236
- // To make 'Save' button enable in the widget
237
- jQuery(place_photo_hidden).change();
238
-
239
- cb && cb();
240
- });
241
- file_frame.open();
242
- return false;
243
- });
244
-
245
- $('.rplg-toggle', el).unbind('click').click(function () {
246
- $(this).toggleClass('toggled');
247
- $(this).next().slideToggle();
248
- return false;
249
- });
250
- });
251
- }
252
-
253
- function grw_textsearch(el, query, dataCb, cb) {
254
- jQuery.get(grw_request_url('search'), {
255
- query: query,
256
- grw_wpnonce: jQuery('#grw_nonce').val()
257
- }, function(places) {
258
- cb && cb();
259
- grw_addPlaces(el, places, dataCb);
260
- }, 'json');
261
- }
262
-
263
- function grw_addPlaces(el, places, cb) {
264
- var placesEl = el.querySelector('.grw-places');
265
- if (places && places.length) {
266
- placesEl.innerHTML = '';
267
- WPacFastjs.each(places, function(place) {
268
- var placeEl = document.createElement('div');
269
- placeEl.className = 'grw-place media';
270
- placeEl.innerHTML = grw_renderPlace(place);
271
- placeEl.title = place.formatted_address;
272
- placesEl.appendChild(placeEl);
273
-
274
- var stars = placeEl.querySelector('.grw-gstars');
275
- stars.innerHTML = WPacStars.rating_render(place.rating, 14, 'e7711b');
276
-
277
- grw_selectPlace(el, place.place_id, placeEl, cb);
278
-
279
- if (places.length == 1) {
280
- placeEl.className = 'grw-place grw-active media';
281
- jQuery.get(grw_request_url('reviews'), {
282
- placeid: place.place_id,
283
- grw_wpnonce: jQuery('#grw_nonce').val()
284
- }, function(place) {
285
- grw_addReviews(el, place, cb);
286
- }, 'json');
287
- } else {
288
- el.querySelector('.grw-reviews').innerHTML = '';
289
- }
290
- });
291
- } else {
292
- placesEl.innerHTML = '' +
293
- '<div class="wp-place-info">' +
294
- 'Google Place not found.<br><br>' +
295
- 'Please check that this place can be found in ' +
296
- '<a href="https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder" target="_blank">Google PlaceID Finder</a>, ' +
297
- 'if so, then copy <b>Place ID</b> to a search field and try to find again.' +
298
- '</div>';
299
- }
300
- }
301
-
302
- function grw_selectPlace(el, place_id, placeEl, cb) {
303
- WPacFastjs.on(placeEl, 'click', function() {
304
- var activeEl = placeEl.parentNode.querySelector('.grw-active');
305
- WPacFastjs.remcl(activeEl, 'grw-active');
306
- WPacFastjs.addcl(placeEl, 'grw-active');
307
-
308
- jQuery.get(grw_request_url('reviews'), {
309
- placeid: place_id,
310
- grw_wpnonce: jQuery('#grw_nonce').val()
311
- }, function(place) {
312
- grw_addReviews(el, place, cb);
313
- }, 'json');
314
-
315
- return false;
316
- });
317
- }
318
-
319
- function grw_addReviews(el, place, cb) {
320
- var reviewsEl = el.querySelector('.grw-reviews');
321
- if (place && place.reviews && place.reviews.length) {
322
- reviewsEl.innerHTML = '';
323
- for (var i = 0; i < place.reviews.length; i++) {
324
- var reviewEl = document.createElement('div');
325
- reviewEl.className = 'grw-place media';
326
- reviewEl.innerHTML = grw_renderReview(place.reviews[i]);
327
- reviewsEl.appendChild(reviewEl);
328
-
329
- var stars = reviewEl.querySelector('.grw-gstars');
330
- stars.innerHTML = WPacStars.rating_render(place.reviews[i].rating, 14, 'e7711b');
331
- }
332
- WPacFastjs.show2(el.querySelector('.grw-five-reviews-note'));
333
- grw_saveReviews(el, place, cb);
334
- } else {
335
- reviewsEl.innerHTML = 'There are no reviews yet.';
336
- }
337
- }
338
-
339
- function grw_saveReviews(el, place, cb) {
340
-
341
- var saveBtnContainer = el.querySelector('.grw-save-reviews-container');
342
- saveBtnContainer.innerHTML = '';
343
-
344
- var saveBtn = document.createElement('button');
345
- saveBtn.innerHTML = 'Save Place and Reviews';
346
- saveBtn.className = 'grw-save-reviews btn btn-primary btn-block';
347
- saveBtnContainer.appendChild(saveBtn);
348
-
349
- var placeTooltip = grw_show_tooltip(saveBtnContainer, 'Please click by \'Save Place and Reviews\' button.');
350
-
351
- WPacFastjs.on(saveBtn, 'click', function() {
352
- saveBtn.disabled = true;
353
- jQuery.post(grw_request_url('save'), {
354
- placeid: place.place_id,
355
- grw_wpnonce: jQuery('#grw_nonce').val()
356
- }, function(res) {
357
- saveBtn.disabled = false;
358
- WPacFastjs.rm(placeTooltip);
359
-
360
- el.querySelector('.grw-google-place-name').value = place.name;
361
- el.querySelector('.grw-google-place-id').value = place.place_id;
362
-
363
- var controlEl = el.parentNode.parentNode.querySelector('.widget-control-actions');
364
- if (controlEl) {
365
- grw_show_tooltip(controlEl, 'Please don\'t forget to <b>Save</b> the widget.');
366
- }
367
-
368
- cb && cb(el, place);
369
- }, 'json');
370
- return false;
371
- });
372
- }
373
-
374
- function grw_renderPlace(place) {
375
- return '' +
376
- '<div class="media-left">' +
377
- '<img class="media-object" src="' + (place.business_photo || place.icon) + '" alt="' + place.name + '" style="width:32px;height:32px;">' +
378
- '</div>' +
379
- '<div class="media-body">' +
380
- '<h5 class="media-heading">' + place.name + '</h5>' +
381
- '<div>' +
382
- '<span class="grw-grating">' + place.rating + '</span>' +
383
- '<span class="grw-gstars"></span>' +
384
- '</div>' +
385
- '<small class="text-muted">' + (place.formatted_address || place.address) + '</small>' +
386
- '</div>';
387
- }
388
-
389
- function grw_renderReview(review, withDeleteBtn) {
390
- return '' +
391
- '<div class="media-left">' +
392
- '<img class="media-object" src="' + review.profile_photo_url + '" alt="' + review.author_name + '" ' +
393
- 'onerror="if(this.src!=\'' + grwVars.GOOGLE_AVATAR + '\')this.src=\'' + grwVars.GOOGLE_AVATAR + '\';">' +
394
- '</div>' +
395
- '<div class="media-body">' +
396
- '<div class="media-heading">' +
397
- '<a href="' + review.author_url + '" target="_blank">' + review.author_name + '</a>' +
398
- '</div>' +
399
- '<div class="grw-gtime">' + WPacTime.getTime(parseInt(review.time) * 1000, 'en', 'ago') + '</div>' +
400
- '<div class="grw-gtext">' +
401
- '<span class="grw-gstars"></span> ' + grw_small_text(review.text) +
402
- '</div>' +
403
- (withDeleteBtn ?
404
- '<a class="wp-google-delete" href="#">' +
405
- '<svg width="14" height="14" viewBox="0 0 1792 1792">' +
406
- '<path d="M704 1376v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm-544-992h448l-48-117q-7-9-17-11h-317q-10 2-17 11zm928 32v64q0 14-9 23t-23 9h-96v948q0 83-47 143.5t-113 60.5h-832q-66 0-113-58.5t-47-141.5v-952h-96q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h309l70-167q15-37 54-63t79-26h320q40 0 79 26t54 63l70 167h309q14 0 23 9t9 23z" fill="#666"></path>' +
407
- '</svg> ' +
408
- 'Delete' +
409
- '</a>' : '' ) +
410
- '</div>';
411
- }
412
-
413
- function grw_show_tooltip(el, msg) {
414
- var tooltip = WPacFastjs.create('div', 'grw-tooltip');
415
- tooltip.innerHTML = '<div class="grw-corn1"></div>' +
416
- '<div class="grw-corn2"></div>' +
417
- '<div class="grw-close">×</div>' +
418
- '<div class="grw-text">' + msg + '</div>';
419
- el.appendChild(tooltip);
420
- setTimeout(function() {
421
- WPacFastjs.addcl(tooltip, 'grw-tooltip-visible');
422
- }, 100);
423
- WPacFastjs.on2(tooltip, '.grw-close', 'click', function() {
424
- WPacFastjs.rm(tooltip);
425
- });
426
- return tooltip;
427
- }
428
-
429
- function grw_small_text(text) {
430
- var size = 100, t = text, h = !1;
431
- if (text && text.length > size) {
432
- var idx = text.lastIndexOf(' ', size);
433
- idx = idx > 0 ? idx : size;
434
- if (idx > 0) {
435
- t = text.substring(0, idx);
436
- h = text.substring(idx, text.length);
437
- }
438
- }
439
- var params = {t: t, h: h};
440
- return (doT.template(
441
- '{{!it.t}} ' +
442
- '{{?it.h}}' +
443
- '<span class="wp-more" style="display:none">{{!it.h}}</span>' +
444
- '<span class="wp-more-toggle" ' +
445
- 'onclick="this.previousSibling.style=\'\';this.textContent=\'\';" ' +
446
- 'style="color:#136aaf;cursor:pointer;text-decoration:underline">read more</span>' +
447
- '{{?}}'))(params);
448
- }
449
-
450
- function grw_request_url(action) {
451
- var url = grwVars.handlerUrl;
452
- //Sometimes 'admin_url' returns to 'grwVars.handlerUrl' not https url and if the site is https, the request does not pass, it's a fix
453
- if (url.indexOf('http://') == 0 && window.location.protocol == 'https:' && url.indexOf('http://' + window.location.host) == 0) {
454
- url = url.replace(/^http:/, 'https:');
455
- }
456
- return url + '&cf_action=' + grwVars.actionPrefix + '_' + action + '&v=' + new Date().getTime();
457
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
grw.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Widget for Google Reviews
4
  Plugin URI: https://richplugins.com/business-reviews-bundle-wordpress-plugin
5
  Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
6
- Version: 2.0
7
  Author: RichPlugins <support@richplugins.com>
8
  Author URI: https://richplugins.com
9
  Text Domain: widget-google-reviews
@@ -18,7 +18,7 @@ if (!defined('ABSPATH')) {
18
 
19
  require(ABSPATH . 'wp-includes/version.php');
20
 
21
- define('GRW_VERSION' , '2.0');
22
  define('GRW_PLUGIN_FILE' , __FILE__);
23
  define('GRW_PLUGIN_URL' , plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
24
  define('GRW_ASSETS_URL' , GRW_PLUGIN_URL . '/assets/');
3
  Plugin Name: Widget for Google Reviews
4
  Plugin URI: https://richplugins.com/business-reviews-bundle-wordpress-plugin
5
  Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
6
+ Version: 2.0.1
7
  Author: RichPlugins <support@richplugins.com>
8
  Author URI: https://richplugins.com
9
  Text Domain: widget-google-reviews
18
 
19
  require(ABSPATH . 'wp-includes/version.php');
20
 
21
+ define('GRW_VERSION' , '2.0.1');
22
  define('GRW_PLUGIN_FILE' , __FILE__);
23
  define('GRW_PLUGIN_URL' , plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
24
  define('GRW_ASSETS_URL' , GRW_PLUGIN_URL . '/assets/');
includes/admin/class-admin-rev.php CHANGED
@@ -12,13 +12,13 @@ class Admin_Rev {
12
  $activation_time = get_option('grw_activation_time');
13
 
14
  if ($activation_time == '') {
15
- $activation_time = time() - 86400*3;
16
  update_option('grw_activation_time', $activation_time);
17
  }
18
 
19
  $rev_notice = isset($_GET['grw_rev_notice']) ? $_GET['grw_rev_notice'] : '';
20
  if ($rev_notice == 'later') {
21
- $activation_time = time() - 86400*3;
22
  update_option('grw_activation_time', $activation_time);
23
  update_option('grw_rev_notice_hide', 'later');
24
  } else if ($rev_notice == 'never') {
@@ -30,7 +30,7 @@ class Admin_Rev {
30
 
31
  if ($rev_notice_show == '' || $rev_notice_show == 'grw') {
32
 
33
- if ($rev_notice_hide != 'never' && $activation_time < (time() - 86400*5)) {
34
  update_option('rplg_rev_notice_show', 'grw');
35
  $class = 'notice notice-info is-dismissible';
36
  $url = remove_query_arg(array('taction', 'tid', 'sortby', 'sortdir', 'opt'));
12
  $activation_time = get_option('grw_activation_time');
13
 
14
  if ($activation_time == '') {
15
+ $activation_time = time() - 86400*2;
16
  update_option('grw_activation_time', $activation_time);
17
  }
18
 
19
  $rev_notice = isset($_GET['grw_rev_notice']) ? $_GET['grw_rev_notice'] : '';
20
  if ($rev_notice == 'later') {
21
+ $activation_time = time() - 86400*2;
22
  update_option('grw_activation_time', $activation_time);
23
  update_option('grw_rev_notice_hide', 'later');
24
  } else if ($rev_notice == 'never') {
30
 
31
  if ($rev_notice_show == '' || $rev_notice_show == 'grw') {
32
 
33
+ if ($rev_notice_hide != 'never' && $activation_time < (time() - 86400*3)) {
34
  update_option('rplg_rev_notice_show', 'grw');
35
  $class = 'notice notice-info is-dismissible';
36
  $url = remove_query_arg(array('taction', 'tid', 'sortby', 'sortdir', 'opt'));
includes/admin/class-admin-tophead.php CHANGED
@@ -39,7 +39,7 @@ class Admin_Tophead {
39
  <img src="<?php esc_attr_e(GRW_ASSETS_URL . 'img/logo.png') ?>" alt="logo">
40
  Google Reviews
41
  </div>
42
- <span class="rplg-version">Free Version: <?php echo GRW_VERSION; ?></span>
43
  </div>
44
  <?php
45
  }
39
  <img src="<?php esc_attr_e(GRW_ASSETS_URL . 'img/logo.png') ?>" alt="logo">
40
  Google Reviews
41
  </div>
42
+ <span class="grw-version">Free Version: <?php echo GRW_VERSION; ?></span>
43
  </div>
44
  <?php
45
  }
includes/class-activator.php CHANGED
@@ -1,241 +1,259 @@
1
- <?php
2
-
3
- namespace WP_Rplg_Google_Reviews\Includes;
4
-
5
- use WP_Rplg_Google_Reviews\Includes\Core\Database;
6
-
7
- class Activator {
8
-
9
- public function __construct(Database $database) {
10
- $this->database = $database;
11
- }
12
-
13
- public function options() {
14
- return array(
15
- 'grw_version',
16
- 'grw_active',
17
- 'grw_google_api_key',
18
- 'grw_language',
19
- 'grw_activation_time',
20
- 'grw_rev_notice_hide',
21
- 'rplg_rev_notice_show',
22
- 'grw_debug_refresh',
23
- );
24
- }
25
-
26
- public function register() {
27
- add_action('init', array($this, 'check_version'));
28
- }
29
-
30
- public function check_version() {
31
- if (version_compare(get_option('grw_version'), GRW_VERSION, '<')) {
32
- $this->activate();
33
- }
34
- }
35
-
36
- /**
37
- * Activates the plugin on a multisite
38
- *
39
- * @since 2.0.0
40
- */
41
- public function activate() {
42
- $network_wide = get_option('grw_is_multisite');
43
- if ($network_wide) {
44
- $this->activate_multisite();
45
- } else {
46
- $this->activate_single_site();
47
- }
48
- }
49
-
50
- private function activate_multisite() {
51
- global $wpdb;
52
-
53
- $site_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
54
-
55
- foreach($site_ids as $site_id) {
56
- switch_to_blog($site_id);
57
- $this->activate_single_site();
58
- restore_current_blog();
59
- }
60
- }
61
-
62
- private function activate_single_site() {
63
- $current_version = GRW_VERSION;
64
- $last_active_version = get_option('grw_version');
65
-
66
- if (empty($last_active_version)) {
67
- $this->first_install();
68
- update_option('grw_version', $current_version);
69
- } elseif ($last_active_version !== $current_version) {
70
- $this->exist_install($current_version, $last_active_version);
71
- update_option('grw_version', $current_version);
72
- }
73
- }
74
-
75
- private function first_install() {
76
- $this->database->create();
77
-
78
- add_option('grw_active', '1');
79
- add_option('grw_google_api_key', '');
80
- }
81
-
82
- private function exist_install($current_version, $last_active_version) {
83
- global $wpdb;
84
-
85
- switch($last_active_version) {
86
- case version_compare($last_active_version, '1.8.2', '<'):
87
- $wpdb->query("ALTER TABLE " . $wpdb->prefix . Database::BUSINESS_TABLE . " ADD review_count INTEGER");
88
- $place_ids = $wpdb->get_col("SELECT place_id FROM " . $wpdb->prefix . Database::BUSINESS_TABLE . " WHERE rating > 0 LIMIT 5");
89
- foreach($place_ids as $place_id) {
90
- //TODO: grw_refresh_reviews(array($place_id));
91
- }
92
- break;
93
- case version_compare($last_active_version, '1.8.7', '<'):
94
- $row = $wpdb->get_results(
95
- "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS " .
96
- "WHERE table_name = '" . $wpdb->prefix . Database::REVIEW_TABLE . "' AND column_name = 'hide'"
97
- );
98
- if(empty($row)){
99
- $wpdb->query("ALTER TABLE " . $wpdb->prefix . Database::REVIEW_TABLE . " ADD hide VARCHAR(1) DEFAULT '' NOT NULL");
100
- }
101
- break;
102
- }
103
- }
104
-
105
- /**
106
- * Creates the plugin database on a multisite
107
- *
108
- * @since 2.0.0
109
- */
110
- public function create_db() {
111
- $network_wide = get_option('grw_is_multisite');
112
- if ($network_wide) {
113
- $this->create_db_multisite();
114
- } else {
115
- $this->create_db_single_site();
116
- }
117
- }
118
-
119
- private function create_db_multisite() {
120
- global $wpdb;
121
-
122
- $site_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
123
-
124
- foreach($site_ids as $site_id) {
125
- switch_to_blog($site_id);
126
- $this->create_db_single_site();
127
- restore_current_blog();
128
- }
129
- }
130
-
131
- private function create_db_single_site() {
132
- $this->database->create();
133
- }
134
-
135
- /**
136
- * Drops the plugin database on a multisite
137
- *
138
- * @since 2.0.0
139
- */
140
- public function drop_db($multisite = false) {
141
- $network_wide = get_option('grw_is_multisite');
142
- if ($multisite && $network_wide) {
143
- $this->drop_db_multisite();
144
- } else {
145
- $this->drop_db_single_site();
146
- }
147
- }
148
-
149
- private function drop_db_multisite() {
150
- global $wpdb;
151
-
152
- $site_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
153
-
154
- foreach($site_ids as $site_id) {
155
- switch_to_blog($site_id);
156
- $this->drop_db_single_site();
157
- restore_current_blog();
158
- }
159
- }
160
-
161
- private function drop_db_single_site() {
162
- $this->database->drop();
163
- }
164
-
165
- /**
166
- * Delete all options of the plugin on a multisite
167
- *
168
- * @since 2.0.0
169
- */
170
- public function delete_all_options($multisite = false) {
171
- $network_wide = get_option('grw_is_multisite');
172
- if ($multisite && $network_wide) {
173
- $this->delete_all_options_multisite();
174
- } else {
175
- $this->delete_all_options_single_site();
176
- }
177
- }
178
-
179
- private function delete_all_options_multisite() {
180
- global $wpdb;
181
-
182
- $site_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
183
-
184
- foreach($site_ids as $site_id) {
185
- switch_to_blog($site_id);
186
- $this->delete_all_options_single_site();
187
- restore_current_blog();
188
- }
189
- }
190
-
191
- private function delete_all_options_single_site() {
192
- foreach ($this->options() as $opt) {
193
- delete_option($opt);
194
- }
195
- }
196
-
197
- /**
198
- * Delete all feeds of the plugin on a multisite
199
- *
200
- * @since 2.0.0
201
- */
202
- public function delete_all_feeds($multisite = false) {
203
- $network_wide = get_option('grw_is_multisite');
204
- if ($multisite && $network_wide) {
205
- $this->delete_all_feeds_multisite();
206
- } else {
207
- $this->delete_all_feeds_single_site();
208
- }
209
- }
210
-
211
- private function delete_all_feeds_multisite() {
212
- global $wpdb;
213
-
214
- $site_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
215
-
216
- foreach($site_ids as $site_id) {
217
- switch_to_blog($site_id);
218
- $this->delete_all_feeds_single_site();
219
- restore_current_blog();
220
- }
221
- }
222
-
223
- private function delete_all_feeds_single_site() {
224
- $args = array(
225
- 'post_type' => Post_Types::FEED_POST_TYPE,
226
- 'post_status' => array('any', 'trash'),
227
- 'posts_per_page' => -1,
228
- 'fields' => 'ids',
229
- );
230
-
231
- $query = new \WP_Query($args);
232
- $grw_posts = $query->posts;
233
-
234
- if (!empty($grw_posts)) {
235
- foreach ($grw_posts as $grw_post) {
236
- wp_delete_post($grw_post, true);
237
- }
238
- }
239
- }
240
-
241
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WP_Rplg_Google_Reviews\Includes;
4
+
5
+ use WP_Rplg_Google_Reviews\Includes\Core\Database;
6
+
7
+ class Activator {
8
+
9
+ public function __construct(Database $database) {
10
+ $this->database = $database;
11
+ }
12
+
13
+ public function options() {
14
+ return array(
15
+ 'grw_version',
16
+ 'grw_active',
17
+ 'grw_google_api_key',
18
+ 'grw_language',
19
+ 'grw_activation_time',
20
+ 'grw_rev_notice_hide',
21
+ 'rplg_rev_notice_show',
22
+ 'grw_debug_refresh',
23
+ 'grw_auth_code',
24
+ );
25
+ }
26
+
27
+ public function register() {
28
+ add_action('init', array($this, 'check_version'));
29
+ }
30
+
31
+ public function check_version() {
32
+ if (version_compare(get_option('grw_version'), GRW_VERSION, '<')) {
33
+ $this->activate();
34
+ }
35
+ }
36
+
37
+ /**
38
+ * Activates the plugin on a multisite
39
+ *
40
+ * @since 2.0.0
41
+ */
42
+ public function activate() {
43
+ $network_wide = get_option('grw_is_multisite');
44
+ if ($network_wide) {
45
+ $this->activate_multisite();
46
+ } else {
47
+ $this->activate_single_site();
48
+ }
49
+ }
50
+
51
+ private function activate_multisite() {
52
+ global $wpdb;
53
+
54
+ $site_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
55
+
56
+ foreach($site_ids as $site_id) {
57
+ switch_to_blog($site_id);
58
+ $this->activate_single_site();
59
+ restore_current_blog();
60
+ }
61
+ }
62
+
63
+ private function activate_single_site() {
64
+ $current_version = GRW_VERSION;
65
+ $last_active_version = get_option('grw_version');
66
+
67
+ if (empty($last_active_version)) {
68
+ $this->first_install();
69
+ update_option('grw_version', $current_version);
70
+ update_option('grw_auth_code', $this->random_str(127));
71
+ } elseif ($last_active_version !== $current_version) {
72
+ $this->exist_install($current_version, $last_active_version);
73
+ update_option('grw_version', $current_version);
74
+ }
75
+ }
76
+
77
+ private function first_install() {
78
+ $this->database->create();
79
+
80
+ add_option('grw_active', '1');
81
+ add_option('grw_google_api_key', '');
82
+ }
83
+
84
+ private function exist_install($current_version, $last_active_version) {
85
+ global $wpdb;
86
+
87
+ switch($last_active_version) {
88
+ case version_compare($last_active_version, '1.8.2', '<'):
89
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . Database::BUSINESS_TABLE . " ADD review_count INTEGER");
90
+ $place_ids = $wpdb->get_col("SELECT place_id FROM " . $wpdb->prefix . Database::BUSINESS_TABLE . " WHERE rating > 0 LIMIT 5");
91
+ foreach($place_ids as $place_id) {
92
+ //TODO: grw_refresh_reviews(array($place_id));
93
+ }
94
+ break;
95
+ case version_compare($last_active_version, '1.8.7', '<'):
96
+ $row = $wpdb->get_results(
97
+ "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS " .
98
+ "WHERE table_name = '" . $wpdb->prefix . Database::REVIEW_TABLE . "' AND column_name = 'hide'"
99
+ );
100
+ if(empty($row)){
101
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . Database::REVIEW_TABLE . " ADD hide VARCHAR(1) DEFAULT '' NOT NULL");
102
+ }
103
+ break;
104
+ case version_compare($last_active_version, '2.0.1', '<'):
105
+ $grw_auth_code = get_option('grw_auth_code');
106
+ if (!$grw_auth_code || strlen($grw_auth_code) == 0) {
107
+ update_option('grw_auth_code', $this->random_str(127));
108
+ }
109
+ break;
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Creates the plugin database on a multisite
115
+ *
116
+ * @since 2.0.0
117
+ */
118
+ public function create_db() {
119
+ $network_wide = get_option('grw_is_multisite');
120
+ if ($network_wide) {
121
+ $this->create_db_multisite();
122
+ } else {
123
+ $this->create_db_single_site();
124
+ }
125
+ }
126
+
127
+ private function create_db_multisite() {
128
+ global $wpdb;
129
+
130
+ $site_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
131
+
132
+ foreach($site_ids as $site_id) {
133
+ switch_to_blog($site_id);
134
+ $this->create_db_single_site();
135
+ restore_current_blog();
136
+ }
137
+ }
138
+
139
+ private function create_db_single_site() {
140
+ $this->database->create();
141
+ }
142
+
143
+ /**
144
+ * Drops the plugin database on a multisite
145
+ *
146
+ * @since 2.0.0
147
+ */
148
+ public function drop_db($multisite = false) {
149
+ $network_wide = get_option('grw_is_multisite');
150
+ if ($multisite && $network_wide) {
151
+ $this->drop_db_multisite();
152
+ } else {
153
+ $this->drop_db_single_site();
154
+ }
155
+ }
156
+
157
+ private function drop_db_multisite() {
158
+ global $wpdb;
159
+
160
+ $site_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
161
+
162
+ foreach($site_ids as $site_id) {
163
+ switch_to_blog($site_id);
164
+ $this->drop_db_single_site();
165
+ restore_current_blog();
166
+ }
167
+ }
168
+
169
+ private function drop_db_single_site() {
170
+ $this->database->drop();
171
+ }
172
+
173
+ /**
174
+ * Delete all options of the plugin on a multisite
175
+ *
176
+ * @since 2.0.0
177
+ */
178
+ public function delete_all_options($multisite = false) {
179
+ $network_wide = get_option('grw_is_multisite');
180
+ if ($multisite && $network_wide) {
181
+ $this->delete_all_options_multisite();
182
+ } else {
183
+ $this->delete_all_options_single_site();
184
+ }
185
+ }
186
+
187
+ private function delete_all_options_multisite() {
188
+ global $wpdb;
189
+
190
+ $site_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
191
+
192
+ foreach($site_ids as $site_id) {
193
+ switch_to_blog($site_id);
194
+ $this->delete_all_options_single_site();
195
+ restore_current_blog();
196
+ }
197
+ }
198
+
199
+ private function delete_all_options_single_site() {
200
+ foreach ($this->options() as $opt) {
201
+ delete_option($opt);
202
+ }
203
+ }
204
+
205
+ /**
206
+ * Delete all feeds of the plugin on a multisite
207
+ *
208
+ * @since 2.0.0
209
+ */
210
+ public function delete_all_feeds($multisite = false) {
211
+ $network_wide = get_option('grw_is_multisite');
212
+ if ($multisite && $network_wide) {
213
+ $this->delete_all_feeds_multisite();
214
+ } else {
215
+ $this->delete_all_feeds_single_site();
216
+ }
217
+ }
218
+
219
+ private function delete_all_feeds_multisite() {
220
+ global $wpdb;
221
+
222
+ $site_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
223
+
224
+ foreach($site_ids as $site_id) {
225
+ switch_to_blog($site_id);
226
+ $this->delete_all_feeds_single_site();
227
+ restore_current_blog();
228
+ }
229
+ }
230
+
231
+ private function delete_all_feeds_single_site() {
232
+ $args = array(
233
+ 'post_type' => Post_Types::FEED_POST_TYPE,
234
+ 'post_status' => array('any', 'trash'),
235
+ 'posts_per_page' => -1,
236
+ 'fields' => 'ids',
237
+ );
238
+
239
+ $query = new \WP_Query($args);
240
+ $grw_posts = $query->posts;
241
+
242
+ if (!empty($grw_posts)) {
243
+ foreach ($grw_posts as $grw_post) {
244
+ wp_delete_post($grw_post, true);
245
+ }
246
+ }
247
+ }
248
+
249
+ private function random_str($len) {
250
+ $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
251
+ $charlen = strlen($chars);
252
+ $randstr = '';
253
+ for ($i = 0; $i < $len; $i++) {
254
+ $randstr .= $chars[rand(0, $charlen - 1)];
255
+ }
256
+ return $randstr;
257
+ }
258
+
259
+ }
includes/class-assets.php CHANGED
@@ -9,20 +9,18 @@ class Assets {
9
  private $suffix;
10
 
11
  private static $css_assets = array(
12
- 'feedbuilder' => 'css/feedbuilder',
13
- 'grw-admin-css' => 'css/admin',
14
- 'grw-rplg-css' => 'css/rplg-wp',
15
- 'grw-setting-css' => 'css/rplg-setting',
16
- 'grw-css' => 'css/google-review',
17
  );
18
 
19
  private static $js_assets = array(
20
- 'grw-admin-js' => 'js/admin',
21
- 'feedbuilder' => 'js/feedbuilder',
22
- 'grw-time-js' => 'js/wpac-time',
23
- 'grw-wpac-js' => 'js/wpac',
24
- 'blazy-js' => 'js/blazy.min',
25
- 'grw-js' => 'js/rplg',
26
  );
27
 
28
  public function __construct($url, $version) {
@@ -49,18 +47,17 @@ class Assets {
49
  }
50
 
51
  public function register_styles() {
52
- $this->register_styles_loop(array('feedbuilder', 'grw-admin-css', 'grw-rplg-css', 'grw-setting-css', 'grw-css'));
53
  }
54
 
55
  public function register_scripts() {
56
- $this->register_scripts_loop(array('grw-admin-js', 'feedbuilder', 'grw-time-js', 'grw-wpac-js', 'blazy-js', 'grw-js'));
57
  }
58
 
59
  public function enqueue_admin_styles() {
60
- wp_enqueue_style('feedbuilder');
61
  wp_enqueue_style('grw-admin-css');
62
- wp_enqueue_style('grw-rplg-css');
63
- wp_enqueue_style('grw-setting-css');
64
  wp_enqueue_style('grw-css');
65
  }
66
 
@@ -69,11 +66,12 @@ class Assets {
69
  wp_enqueue_script('jquery-ui-core');
70
  wp_enqueue_script('jquery-ui-draggable');
71
  wp_enqueue_script('jquery-ui-sortable');
 
72
 
73
  wp_enqueue_script('grw-wpac-js');
74
  wp_enqueue_script('grw-admin-js');
75
 
76
- wp_localize_script('feedbuilder', 'GRW_VARS', array(
77
  'googleAPIKey' => get_option('grw_google_api_key'),
78
  'GOOGLE_AVATAR' => GRW_GOOGLE_AVATAR,
79
  'handlerUrl' => admin_url('options-general.php?page=grw'),
@@ -81,7 +79,7 @@ class Assets {
81
  'actionPrefix' => 'grw',
82
  'wordpress' => true,
83
  ));
84
- wp_enqueue_script('feedbuilder');
85
 
86
  wp_enqueue_script('grw-time-js');
87
  wp_enqueue_script('blazy-js');
9
  private $suffix;
10
 
11
  private static $css_assets = array(
12
+ 'grw-admin-css' => 'css/admin',
13
+ 'grw-builder-css' => 'css/builder',
14
+ 'grw-css' => 'css/google-review',
 
 
15
  );
16
 
17
  private static $js_assets = array(
18
+ 'grw-wpac-js' => 'js/wpac',
19
+ 'grw-admin-js' => 'js/admin',
20
+ 'grw-builder-js' => 'js/builder',
21
+ 'grw-time-js' => 'js/wpac-time',
22
+ 'blazy-js' => 'js/blazy.min',
23
+ 'grw-js' => 'js/rplg',
24
  );
25
 
26
  public function __construct($url, $version) {
47
  }
48
 
49
  public function register_styles() {
50
+ $this->register_styles_loop(array('grw-admin-css', 'grw-builder-css', 'grw-css'));
51
  }
52
 
53
  public function register_scripts() {
54
+ $this->register_scripts_loop(array('grw-wpac-js', 'grw-admin-js', 'grw-builder-js', 'grw-time-js', 'blazy-js', 'grw-js'));
55
  }
56
 
57
  public function enqueue_admin_styles() {
58
+ wp_enqueue_style('wp-jquery-ui-dialog');
59
  wp_enqueue_style('grw-admin-css');
60
+ wp_enqueue_style('grw-builder-css');
 
61
  wp_enqueue_style('grw-css');
62
  }
63
 
66
  wp_enqueue_script('jquery-ui-core');
67
  wp_enqueue_script('jquery-ui-draggable');
68
  wp_enqueue_script('jquery-ui-sortable');
69
+ wp_enqueue_script('jquery-ui-dialog');
70
 
71
  wp_enqueue_script('grw-wpac-js');
72
  wp_enqueue_script('grw-admin-js');
73
 
74
+ wp_localize_script('grw-builder-js', 'GRW_VARS', array(
75
  'googleAPIKey' => get_option('grw_google_api_key'),
76
  'GOOGLE_AVATAR' => GRW_GOOGLE_AVATAR,
77
  'handlerUrl' => admin_url('options-general.php?page=grw'),
79
  'actionPrefix' => 'grw',
80
  'wordpress' => true,
81
  ));
82
+ wp_enqueue_script('grw-builder-js');
83
 
84
  wp_enqueue_script('grw-time-js');
85
  wp_enqueue_script('blazy-js');
includes/class-builder-page.php CHANGED
@@ -100,6 +100,19 @@ class Builder_Page {
100
  <div id="grw-builder-option" class="grw-builder-options"></div>
101
  </form>
102
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  <script>
104
  jQuery(document).ready(function($) {
105
  function grw_builder_init_listener(attempts) {
@@ -112,9 +125,7 @@ class Builder_Page {
112
  grw_builder_init($, {
113
  el: '#grw-builder-option',
114
  use_gpa: true,
115
- <?php if (strlen($feed_content) > 0) { ?>
116
- conns: <?php echo $feed_content; ?>
117
- <?php } ?>
118
  });
119
  }
120
  grw_builder_init_listener(20);
100
  <div id="grw-builder-option" class="grw-builder-options"></div>
101
  </form>
102
  </div>
103
+
104
+ <div id="dialog" title="Google API key required" style="display:none;">
105
+ <p style="font-size:14px;">
106
+ This plugin uses our default <b>Google Places API key which is mandatory for retrieving Google reviews</b> through official way approved by Google (without crawling). Our API key can make 5 requests to Google API for each WordPress server and it's exceeded at the moment.
107
+ </p>
108
+ <p style="font-size:14px;">
109
+ To continue working with Google API and daily reviews refreshing, please create your own API key by <a href="<?php echo admin_url('admin.php?page=grw-support&grw_tab=fig#fig_api_key'); ?>" target="_blank">this instruction</a> and save it on the settings page of the plugin.
110
+ </p>
111
+ <p style="font-size:14px;">
112
+ Don’t worry, it will be free because Google is currently giving free credit a month and it should be enough to use the plugin for connecting several Google places and daily refresh of reviews.
113
+ </p>
114
+ </div>
115
+
116
  <script>
117
  jQuery(document).ready(function($) {
118
  function grw_builder_init_listener(attempts) {
125
  grw_builder_init($, {
126
  el: '#grw-builder-option',
127
  use_gpa: true,
128
+ <?php if (strlen($feed_content) > 0) { echo 'conns: ' . $feed_content; } ?>
 
 
129
  });
130
  }
131
  grw_builder_init_listener(20);
includes/class-plugin-support.php CHANGED
@@ -43,17 +43,17 @@ class Plugin_Support {
43
 
44
  <div id="welcome" class="tab-content" style="display:<?php echo $tab == 'welcome' ? 'block' : 'none'?>;">
45
  <h3>Google Reviews Widget for WordPress</h3>
46
- <div class="rplg-flex-row">
47
- <div class="rplg-flex-col">
48
  <span>Google Reviews plugin is an easy and fast way to integrate Google business reviews right into your WordPress website. This plugin works instantly and keep all Google places and reviews in WordPress database thus it has no depend on external services.</span>
49
  <p style="font-size:20px;text-align:center"><b><u>Please read '<a href="<?php echo admin_url('admin.php?page=grw-support&grw_tab=fig'); ?>">Full Installation Guide</a>' to completely understand how it works and set up the plugin</u></b>.</p>
50
  <p>Also you can find most common answers and solutions for most common questions and issues in next tabs.</p>
51
- <div class="rplg-alert rplg-alert-success">
52
  <strong>Try more features in the Business version</strong>: Merge Google, Facebook and Yelp reviews, Beautiful themes (Slider, Grid, Trust Badges), Shortcode support, Rich Snippets, Rating filter, Any sorting, Include/Exclude words filter, Hide/Show any elements, Priority support and many others.
53
  <a class="button-primary button" href="https://richplugins.com/business-reviews-bundle-wordpress-plugin" target="_blank" style="margin-left:10px">Upgrade to Business</a>
54
  </div>
55
  <br>
56
- <div class="rplg-socials">
57
  <div id="fb-root"></div>
58
  <script>(function(d, s, id) {
59
  var js, fjs = d.getElementsByTagName(s)[0];
@@ -78,7 +78,7 @@ class Plugin_Support {
78
  </script>
79
  </div>
80
  </div>
81
- <div class="rplg-flex-col">
82
  <iframe width="100%" height="315" src="https://www.youtube.com/embed/Wbst-UBgXXk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
83
  </div>
84
  </div>
43
 
44
  <div id="welcome" class="tab-content" style="display:<?php echo $tab == 'welcome' ? 'block' : 'none'?>;">
45
  <h3>Google Reviews Widget for WordPress</h3>
46
+ <div class="grw-flex-row">
47
+ <div class="grw-flex-col">
48
  <span>Google Reviews plugin is an easy and fast way to integrate Google business reviews right into your WordPress website. This plugin works instantly and keep all Google places and reviews in WordPress database thus it has no depend on external services.</span>
49
  <p style="font-size:20px;text-align:center"><b><u>Please read '<a href="<?php echo admin_url('admin.php?page=grw-support&grw_tab=fig'); ?>">Full Installation Guide</a>' to completely understand how it works and set up the plugin</u></b>.</p>
50
  <p>Also you can find most common answers and solutions for most common questions and issues in next tabs.</p>
51
+ <div class="grw-alert grw-alert-success">
52
  <strong>Try more features in the Business version</strong>: Merge Google, Facebook and Yelp reviews, Beautiful themes (Slider, Grid, Trust Badges), Shortcode support, Rich Snippets, Rating filter, Any sorting, Include/Exclude words filter, Hide/Show any elements, Priority support and many others.
53
  <a class="button-primary button" href="https://richplugins.com/business-reviews-bundle-wordpress-plugin" target="_blank" style="margin-left:10px">Upgrade to Business</a>
54
  </div>
55
  <br>
56
+ <div class="grw-socials">
57
  <div id="fb-root"></div>
58
  <script>(function(d, s, id) {
59
  var js, fjs = d.getElementsByTagName(s)[0];
78
  </script>
79
  </div>
80
  </div>
81
+ <div class="grw-flex-col">
82
  <iframe width="100%" height="315" src="https://www.youtube.com/embed/Wbst-UBgXXk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
83
  </div>
84
  </div>
includes/core/class-connect-google.php CHANGED
@@ -32,22 +32,40 @@ class Connect_Google {
32
 
33
  $id = sanitize_text_field(wp_unslash($_POST['id']));
34
  $lang = sanitize_text_field(wp_unslash($_POST['lang']));
35
- $url = $this->api_url($id, $google_api_key, $lang);
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  $res = wp_remote_get($url);
38
  $body = wp_remote_retrieve_body($res);
39
  $body_json = json_decode($body);
40
 
41
  if ($body_json && isset($body_json->result)) {
42
- $photo = $this->business_avatar($body_json->result, $google_api_key);
43
- $body_json->result->business_photo = $photo;
 
 
 
44
 
45
  $this->save_reviews($body_json->result);
46
 
47
  $result = array(
48
  'id' => $body_json->result->place_id,
49
  'name' => $body_json->result->name,
50
- 'photo' => strlen($photo) ? $photo : $body_json->result->icon,
 
 
 
 
51
  'reviews' => $body_json->result->reviews
52
  );
53
  $status = 'success';
@@ -165,10 +183,11 @@ class Connect_Google {
165
  foreach ($reviews as $review) {
166
  $google_review_id = 0;
167
  if (isset($review->author_url) && strlen($review->author_url) > 0) {
 
168
  $google_review_id = $wpdb->get_var(
169
  $wpdb->prepare(
170
  "SELECT id FROM " . $wpdb->prefix . Database::REVIEW_TABLE .
171
- " WHERE author_url = %s", $review->author_url
172
  )
173
  );
174
  } else {
@@ -192,7 +211,7 @@ class Connect_Google {
192
  } else {
193
  $wpdb->insert($wpdb->prefix . Database::REVIEW_TABLE, array(
194
  'google_place_id' => $google_place_id,
195
- 'hash' => $review->time, //TODO: workaround to support old versions
196
  'rating' => $review->rating,
197
  'text' => $review->text,
198
  'time' => $review->time,
32
 
33
  $id = sanitize_text_field(wp_unslash($_POST['id']));
34
  $lang = sanitize_text_field(wp_unslash($_POST['lang']));
35
+
36
+ if ($google_api_key && strlen($google_api_key) > 0) {
37
+ $url = $this->api_url($id, $google_api_key, $lang);
38
+ } else {
39
+ $url = 'https://gpaw.widgetpack.com/get/json' .
40
+ '?siteurl=' . get_option('siteurl') .
41
+ '&authcode=' . get_option('grw_auth_code') .
42
+ '&pid=' . $id;
43
+ if ($lang && strlen($lang) > 0) {
44
+ $url = $url . '&lang=' . $lang;
45
+ }
46
+ }
47
 
48
  $res = wp_remote_get($url);
49
  $body = wp_remote_retrieve_body($res);
50
  $body_json = json_decode($body);
51
 
52
  if ($body_json && isset($body_json->result)) {
53
+
54
+ if ($google_api_key && strlen($google_api_key) > 0) {
55
+ $photo = $this->business_avatar($body_json->result, $google_api_key);
56
+ $body_json->result->business_photo = $photo;
57
+ }
58
 
59
  $this->save_reviews($body_json->result);
60
 
61
  $result = array(
62
  'id' => $body_json->result->place_id,
63
  'name' => $body_json->result->name,
64
+ 'photo' => strlen($photo) ? $photo
65
+ : (
66
+ strlen($body_json->result->business_photo) ?
67
+ $body_json->result->business_photo : $body_json->result->icon
68
+ ),
69
  'reviews' => $body_json->result->reviews
70
  );
71
  $status = 'success';
183
  foreach ($reviews as $review) {
184
  $google_review_id = 0;
185
  if (isset($review->author_url) && strlen($review->author_url) > 0) {
186
+ $review_lang = ($review->language == 'en-US' ? 'en' : $review->language);
187
  $google_review_id = $wpdb->get_var(
188
  $wpdb->prepare(
189
  "SELECT id FROM " . $wpdb->prefix . Database::REVIEW_TABLE .
190
+ " WHERE author_url = %s AND language = %s", $review->author_url, $review_lang
191
  )
192
  );
193
  } else {
211
  } else {
212
  $wpdb->insert($wpdb->prefix . Database::REVIEW_TABLE, array(
213
  'google_place_id' => $google_place_id,
214
+ 'hash' => microtime(), //TODO: workaround to support old versions
215
  'rating' => $review->rating,
216
  'text' => $review->text,
217
  'time' => $review->time,
includes/page-setting-fig.php CHANGED
@@ -8,39 +8,39 @@
8
 
9
  <p><b>First of all, you need to find Google Place ID:</b> this is the identification of your Google Place (business). It should be like that: <b>ChIJ..</b>, for instance: ChIJ3TH9CwFZwokRIvNO1SP0WLg. If you know it, go to <a href="#fig_api_key">How to create Google API key</a></p>
10
  <p><b>Please keep in mind: your Google Place must have a physical address</b>, because Google Place API, which is used in this plugin, works only with a phisical Google places, it's not possible to connect area or virtual place. Unfortunately, it's a limitation of Google, not specifically the plugin.</p>
11
- <p>The standard way to find your Google Places ID is to go to <a href="https://developers.google.com/places/place-id" target="_blank">https://developers.google.com/places/place-id</a> and search for your company name. But sometimes it just doesn’t work.</p>
12
 
13
  <h3 class="subheader">How To Find Any Google Place ID…</h3>
14
 
15
- <div class="rplg-flex-row">
16
- <div class="rplg-flex-col3">
17
  <b>1</b> Search for your business on Google.
18
  </div>
19
- <div class="rplg-flex-col7">
20
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_placeid_1.png'; ?>"></div>
21
  </div>
22
  </div>
23
 
24
- <div class="rplg-flex-row">
25
- <div class="rplg-flex-col3">
26
  <b>2</b> Inspect the “<b>Write a Review</b>” button. To do this in Firefox, right-click and choose “<b>Inspect Element</b>“. In Chrome, right-click and choose “<b>Inspect</b>“. (Most browsers follow a similar process.)
27
  </div>
28
- <div class="rplg-flex-col7">
29
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_placeid_2.png'; ?>"></div>
30
  </div>
31
  </div>
32
 
33
- <div class="rplg-flex-row">
34
- <div class="rplg-flex-col3">
35
  <b>3</b> Find “<b>data-pid</b>” as shown above. (This part is a little tricky, but just look inside the <b>&lt;a&gt;</b> tag until you find <b>data-pid=</b>).
36
  </div>
37
- <div class="rplg-flex-col7">
38
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_placeid_3.png'; ?>"></div>
39
  </div>
40
  </div>
41
 
42
- <div class="rplg-flex-row">
43
- <div class="rplg-flex-col3">
44
  <b>4</b> Copy the characters within the quotes (as shown above). You now have your google Places ID. Paste this somewhere you can easily find it.
45
  </div>
46
  </div>
@@ -49,82 +49,82 @@
49
 
50
  <h3 id="fig_api_key"><u>II. Google Places API key</u></h3>
51
 
52
- <div class="rplg-flex-row">
53
- <div class="rplg-flex-col">
54
  <b>1</b> Go to your <a href="https://console.developers.google.com/apis/dashboard?pli=1" target="_blank">Google Console</a> dashboard. If you new user agree Google terms:
55
  </div>
56
- <div class="rplg-flex-col">
57
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_1.png'; ?>"></div>
58
  </div>
59
  </div>
60
 
61
- <div class="rplg-flex-row">
62
- <div class="rplg-flex-col">
63
  <b>2</b> Select your existing project or create new:
64
  </div>
65
- <div class="rplg-flex-col">
66
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_2.png'; ?>"></div>
67
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_2_1.png'; ?>"></div>
68
  </div>
69
  </div>
70
 
71
- <div class="rplg-flex-row">
72
- <div class="rplg-flex-col">
73
  <b>3</b> Wait for creation and then click '<b>ENABLE APIS AND SERVICES</b>':
74
  </div>
75
- <div class="rplg-flex-col">
76
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_3.png'; ?>"></div>
77
  </div>
78
  </div>
79
 
80
- <div class="rplg-flex-row">
81
- <div class="rplg-flex-col">
82
  <b>4</b> Type '<b>Places API</b>' in the search area, select the first result '<b>Places API</b>' and click '<b>ENABLE</b>' button:
83
  </div>
84
- <div class="rplg-flex-col">
85
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_4.png'; ?>"></div>
86
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_4_1.png'; ?>"></div>
87
  </div>
88
  </div>
89
 
90
- <div class="rplg-flex-row">
91
- <div class="rplg-flex-col">
92
  <b>5</b> After enable the Places API, click '<b>Navigation menu</b>', select '<b>APIs & Services</b>' and '<b>Credentials</b>':
93
  </div>
94
- <div class="rplg-flex-col">
95
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_5.png'; ?>"></div>
96
  </div>
97
  </div>
98
 
99
- <div class="rplg-flex-row">
100
- <div class="rplg-flex-col">
101
  <b>6</b> On Credentials page click '<b>+ CREATE CREDENTIALS</b>' and select '<b>API key</b>':
102
  </div>
103
- <div class="rplg-flex-col">
104
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_6.png'; ?>"></div>
105
  </div>
106
  </div>
107
 
108
- <div class="rplg-flex-row">
109
- <div class="rplg-flex-col">
110
  <b>7</b> After creation of API key you need to copy & paste it to the plugin's settings (<b>please do not restrict the key</b>, the plugin can't work with a restricted API key, it's a limitation of Google):
111
  </div>
112
- <div class="rplg-flex-col">
113
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_7.png'; ?>"></div>
114
  </div>
115
  </div>
116
 
117
- <div class="rplg-flex-row">
118
- <div class="rplg-flex-col">
119
  <b>8</b> Now, you need to enable Google Billing. It's mandatory step to use the API key. <b>Don’t worry, <a href="https://developers.google.com/maps/billing-credits" target="_blank">Google is currently giving $200 free credit a month</b></a> and it should be enough to use the plugin for connecting several Google places without additional fees except this free $200 credits. Go to <a href="https://console.cloud.google.com/project/_/billing/enable" target="_blank">https://console.cloud.google.com/project/_/billing/enable</a>, select your recent created project and click '<b>CREATE BILLING ACCOUNT</b>':
120
  </div>
121
- <div class="rplg-flex-col">
122
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_8.png'; ?>"></div>
123
  </div>
124
  </div>
125
 
126
- <div class="rplg-flex-row">
127
- <div class="rplg-flex-col">
128
  <b>9</b> Agree Google terms, fill your contact information and start using your Google API key with the plugin.
129
  </div>
130
  </div>
8
 
9
  <p><b>First of all, you need to find Google Place ID:</b> this is the identification of your Google Place (business). It should be like that: <b>ChIJ..</b>, for instance: ChIJ3TH9CwFZwokRIvNO1SP0WLg. If you know it, go to <a href="#fig_api_key">How to create Google API key</a></p>
10
  <p><b>Please keep in mind: your Google Place must have a physical address</b>, because Google Place API, which is used in this plugin, works only with a phisical Google places, it's not possible to connect area or virtual place. Unfortunately, it's a limitation of Google, not specifically the plugin.</p>
11
+ <p>The standard way to find your Google Place ID is to go to <a href="https://developers.google.com/places/place-id" target="_blank">https://developers.google.com/places/place-id</a> and search for your company name. But sometimes it just doesn’t work.</p>
12
 
13
  <h3 class="subheader">How To Find Any Google Place ID…</h3>
14
 
15
+ <div class="grw-flex-row">
16
+ <div class="grw-flex-col3">
17
  <b>1</b> Search for your business on Google.
18
  </div>
19
+ <div class="grw-flex-col7">
20
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_placeid_1.png'; ?>"></div>
21
  </div>
22
  </div>
23
 
24
+ <div class="grw-flex-row">
25
+ <div class="grw-flex-col3">
26
  <b>2</b> Inspect the “<b>Write a Review</b>” button. To do this in Firefox, right-click and choose “<b>Inspect Element</b>“. In Chrome, right-click and choose “<b>Inspect</b>“. (Most browsers follow a similar process.)
27
  </div>
28
+ <div class="grw-flex-col7">
29
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_placeid_2.png'; ?>"></div>
30
  </div>
31
  </div>
32
 
33
+ <div class="grw-flex-row">
34
+ <div class="grw-flex-col3">
35
  <b>3</b> Find “<b>data-pid</b>” as shown above. (This part is a little tricky, but just look inside the <b>&lt;a&gt;</b> tag until you find <b>data-pid=</b>).
36
  </div>
37
+ <div class="grw-flex-col7">
38
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_placeid_3.png'; ?>"></div>
39
  </div>
40
  </div>
41
 
42
+ <div class="grw-flex-row">
43
+ <div class="grw-flex-col3">
44
  <b>4</b> Copy the characters within the quotes (as shown above). You now have your google Places ID. Paste this somewhere you can easily find it.
45
  </div>
46
  </div>
49
 
50
  <h3 id="fig_api_key"><u>II. Google Places API key</u></h3>
51
 
52
+ <div class="grw-flex-row">
53
+ <div class="grw-flex-col">
54
  <b>1</b> Go to your <a href="https://console.developers.google.com/apis/dashboard?pli=1" target="_blank">Google Console</a> dashboard. If you new user agree Google terms:
55
  </div>
56
+ <div class="grw-flex-col">
57
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_1.png'; ?>"></div>
58
  </div>
59
  </div>
60
 
61
+ <div class="grw-flex-row">
62
+ <div class="grw-flex-col">
63
  <b>2</b> Select your existing project or create new:
64
  </div>
65
+ <div class="grw-flex-col">
66
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_2.png'; ?>"></div>
67
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_2_1.png'; ?>"></div>
68
  </div>
69
  </div>
70
 
71
+ <div class="grw-flex-row">
72
+ <div class="grw-flex-col">
73
  <b>3</b> Wait for creation and then click '<b>ENABLE APIS AND SERVICES</b>':
74
  </div>
75
+ <div class="grw-flex-col">
76
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_3.png'; ?>"></div>
77
  </div>
78
  </div>
79
 
80
+ <div class="grw-flex-row">
81
+ <div class="grw-flex-col">
82
  <b>4</b> Type '<b>Places API</b>' in the search area, select the first result '<b>Places API</b>' and click '<b>ENABLE</b>' button:
83
  </div>
84
+ <div class="grw-flex-col">
85
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_4.png'; ?>"></div>
86
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_4_1.png'; ?>"></div>
87
  </div>
88
  </div>
89
 
90
+ <div class="grw-flex-row">
91
+ <div class="grw-flex-col">
92
  <b>5</b> After enable the Places API, click '<b>Navigation menu</b>', select '<b>APIs & Services</b>' and '<b>Credentials</b>':
93
  </div>
94
+ <div class="grw-flex-col">
95
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_5.png'; ?>"></div>
96
  </div>
97
  </div>
98
 
99
+ <div class="grw-flex-row">
100
+ <div class="grw-flex-col">
101
  <b>6</b> On Credentials page click '<b>+ CREATE CREDENTIALS</b>' and select '<b>API key</b>':
102
  </div>
103
+ <div class="grw-flex-col">
104
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_6.png'; ?>"></div>
105
  </div>
106
  </div>
107
 
108
+ <div class="grw-flex-row">
109
+ <div class="grw-flex-col">
110
  <b>7</b> After creation of API key you need to copy & paste it to the plugin's settings (<b>please do not restrict the key</b>, the plugin can't work with a restricted API key, it's a limitation of Google):
111
  </div>
112
+ <div class="grw-flex-col">
113
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_7.png'; ?>"></div>
114
  </div>
115
  </div>
116
 
117
+ <div class="grw-flex-row">
118
+ <div class="grw-flex-col">
119
  <b>8</b> Now, you need to enable Google Billing. It's mandatory step to use the API key. <b>Don’t worry, <a href="https://developers.google.com/maps/billing-credits" target="_blank">Google is currently giving $200 free credit a month</b></a> and it should be enough to use the plugin for connecting several Google places without additional fees except this free $200 credits. Go to <a href="https://console.cloud.google.com/project/_/billing/enable" target="_blank">https://console.cloud.google.com/project/_/billing/enable</a>, select your recent created project and click '<b>CREATE BILLING ACCOUNT</b>':
120
  </div>
121
+ <div class="grw-flex-col">
122
  <div class="box-img"><img src="<?php echo GRW_ASSETS_URL . 'img/google_key_8.png'; ?>"></div>
123
  </div>
124
  </div>
125
 
126
+ <div class="grw-flex-row">
127
+ <div class="grw-flex-col">
128
  <b>9</b> Agree Google terms, fill your contact information and start using your Google API key with the plugin.
129
  </div>
130
  </div>
includes/page-setting-support.php CHANGED
@@ -1,20 +1,20 @@
1
- <div class="rplg-flex-row">
2
- <div class="rplg-flex-col">
3
- <div class="rplg-support-question">
4
  <h3>I can't connect my Google Place.</h3>
5
  <p>Please check that you correctly found the Place ID of your Google business. It should look like <b>ChIJ</b>3TH9CwFZwokRI... This instruction helps to find any Place ID regardless of whether it has a physical address or it is an area: <a href="<?php echo admin_url('admin.php?page=grw-support&grw_tab=fig#place_id'); ?>">how to find Place ID of any Google business</a></p>
6
  </div>
7
  </div>
8
- <div class="rplg-flex-col">
9
- <div class="rplg-support-question">
10
  <h3>I have some error messages about the Google API key.</h3>
11
  <p>Please make sure that your correctly created the Google Places API key with <b>Places API library and without any restrictions (IP or Referrer)</b>. It should look like <b>AIzaS</b>yB3k4oWDJPF... On the <b>Settings</b> tab there is a detailed instruction and video tutorial how to create the free and correct Google Places API key.</p>
12
  </div>
13
  </div>
14
  </div>
15
- <div class="rplg-flex-row">
16
- <div class="rplg-flex-col">
17
- <div class="rplg-support-question">
18
  <h3>Why I see only 5 Google reviews?</h3>
19
  <p>The plugin uses the Google Places API to get your reviews. The API only returns the 5 most helpful reviews. When Google changes the 5 most helpful the plugin will automatically add the new one to your database. Thus slowly building up a database of reviews. It's a limitation of Google, not specifically the plugin.</p>
20
  <p>The plugin can only download what Google returns in their Places API. It is usually the 5 Most Helpful (not newest) reviews. You can check what the API returns by entering your Place ID and Goolge API key in this url:</p>
@@ -23,8 +23,8 @@
23
  <p>Also, please check that the 'Refresh' option is enable in the widget. It will call the Google API once in three days (to avoid a Google Billing and keeps the API key is free) to check the new most helpful reviews.</p>
24
  </div>
25
  </div>
26
- <div class="rplg-flex-col">
27
- <div class="rplg-support-question">
28
  <h3>Is the plugin compatible with the latest version of PHP? I saw warnings about the compatibility with PHP 7 in the checker plugin.</h3>
29
  <p>Yes, the plugin is absolutely compatible with PHP 7 and by the way, we are using PHP 7 on the demo site.</p>
30
  <p>The warnings come from the code which is needed for compatible with old versions of PHP (&lt; 5.0) which is sometimes found in some users and without this code, the plugin will not work.</p>
@@ -32,9 +32,9 @@
32
  </div>
33
  </div>
34
  </div>
35
- <div class="rplg-flex-row">
36
- <div class="rplg-flex-col">
37
- <div class="rplg-support-question">
38
  <h3>If you still need support</h3>
39
  <p>You can contact us directly by email <a href="mailto:support@richplugins.com">support@richplugins.com</a> and would be great and save us a lot of time if each request to the support will contain the following data:</p>
40
  <ul>
@@ -46,8 +46,8 @@
46
  </ul>
47
  </div>
48
  </div>
49
- <div class="rplg-flex-col">
50
- <div class="rplg-support-question">
51
  </div>
52
  </div>
53
  </div>
1
+ <div class="grw-flex-row">
2
+ <div class="grw-flex-col">
3
+ <div class="grw-support-question">
4
  <h3>I can't connect my Google Place.</h3>
5
  <p>Please check that you correctly found the Place ID of your Google business. It should look like <b>ChIJ</b>3TH9CwFZwokRI... This instruction helps to find any Place ID regardless of whether it has a physical address or it is an area: <a href="<?php echo admin_url('admin.php?page=grw-support&grw_tab=fig#place_id'); ?>">how to find Place ID of any Google business</a></p>
6
  </div>
7
  </div>
8
+ <div class="grw-flex-col">
9
+ <div class="grw-support-question">
10
  <h3>I have some error messages about the Google API key.</h3>
11
  <p>Please make sure that your correctly created the Google Places API key with <b>Places API library and without any restrictions (IP or Referrer)</b>. It should look like <b>AIzaS</b>yB3k4oWDJPF... On the <b>Settings</b> tab there is a detailed instruction and video tutorial how to create the free and correct Google Places API key.</p>
12
  </div>
13
  </div>
14
  </div>
15
+ <div class="grw-flex-row">
16
+ <div class="grw-flex-col">
17
+ <div class="grw-support-question">
18
  <h3>Why I see only 5 Google reviews?</h3>
19
  <p>The plugin uses the Google Places API to get your reviews. The API only returns the 5 most helpful reviews. When Google changes the 5 most helpful the plugin will automatically add the new one to your database. Thus slowly building up a database of reviews. It's a limitation of Google, not specifically the plugin.</p>
20
  <p>The plugin can only download what Google returns in their Places API. It is usually the 5 Most Helpful (not newest) reviews. You can check what the API returns by entering your Place ID and Goolge API key in this url:</p>
23
  <p>Also, please check that the 'Refresh' option is enable in the widget. It will call the Google API once in three days (to avoid a Google Billing and keeps the API key is free) to check the new most helpful reviews.</p>
24
  </div>
25
  </div>
26
+ <div class="grw-flex-col">
27
+ <div class="grw-support-question">
28
  <h3>Is the plugin compatible with the latest version of PHP? I saw warnings about the compatibility with PHP 7 in the checker plugin.</h3>
29
  <p>Yes, the plugin is absolutely compatible with PHP 7 and by the way, we are using PHP 7 on the demo site.</p>
30
  <p>The warnings come from the code which is needed for compatible with old versions of PHP (&lt; 5.0) which is sometimes found in some users and without this code, the plugin will not work.</p>
32
  </div>
33
  </div>
34
  </div>
35
+ <div class="grw-flex-row">
36
+ <div class="grw-flex-col">
37
+ <div class="grw-support-question">
38
  <h3>If you still need support</h3>
39
  <p>You can contact us directly by email <a href="mailto:support@richplugins.com">support@richplugins.com</a> and would be great and save us a lot of time if each request to the support will contain the following data:</p>
40
  <ul>
46
  </ul>
47
  </div>
48
  </div>
49
+ <div class="grw-flex-col">
50
+ <div class="grw-support-question">
51
  </div>
52
  </div>
53
  </div>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://richplugins.com/business-reviews-bundle-wordpress-plugin
4
  Tags: google reviews, google, reviews, rating, widget, google business, testimonials, google places reviews, map reviews
5
  Requires at least: 2.8
6
  Tested up to: 5.8
7
- Stable tag: 2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -83,6 +83,11 @@ Why limit your reviews to just Google Reviews? Check out our other free reviews
83
 
84
  == Changelog ==
85
 
 
 
 
 
 
86
  = 2.0 =
87
  * Plugin keeps the widgets and shortcodes
88
  * Reviews feed builder
4
  Tags: google reviews, google, reviews, rating, widget, google business, testimonials, google places reviews, map reviews
5
  Requires at least: 2.8
6
  Tested up to: 5.8
7
+ Stable tag: 2.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
83
 
84
  == Changelog ==
85
 
86
+ = 2.0.1 =
87
+ * Instantly Google reviews connecting
88
+ * Full Google reviews multi-language support
89
+ * Bug and style fixes
90
+
91
  = 2.0 =
92
  * Plugin keeps the widgets and shortcodes
93
  * Reviews feed builder