Version Description
- Improve: 'read more' link feature
- Improve: direct link to reviews on Google map
- Improve: language support of Google reviews
- Improve: added centered option
- Improve: update widget design
- Improve: update setting page design
Download this release
Release Info
Developer | widgetpack |
Plugin | Google Reviews Widget |
Version | 1.6.9 |
Comparing to | |
See all releases |
Code changes from version 1.6.8 to 1.6.9
- grw-finder.php +59 -22
- grw-options.php +72 -230
- grw-reviews-helper.php +1 -2
- grw-reviews.php +8 -1
- grw-setting.php +192 -228
- grw-widget.php +4 -3
- grw.php +30 -24
- readme.txt +18 -10
- static/css/rplg-setting.css +150 -1
- static/js/grw-finder.js +8 -2
grw-finder.php
CHANGED
@@ -5,34 +5,71 @@
|
|
5 |
<small class="grw-error"></small>
|
6 |
</div>
|
7 |
</div>
|
8 |
-
<div class="form-group">
|
9 |
-
<div class="col-sm-12">
|
10 |
-
<button class="grw-connect-btn btn btn-block btn-primary"><?php echo grw_i('Connect Google'); ?></button>
|
11 |
-
</div>
|
12 |
-
</div>
|
13 |
|
14 |
-
<!--div class="form-group">
|
15 |
-
<div class="col-sm-12">
|
16 |
-
<h4 class="text-left"><span class="grw-step">1</span><?php echo grw_i('Find Place'); ?></h4>
|
17 |
-
<input type="text" class="grw-place-search form-control" value="" placeholder="Place ID" />
|
18 |
-
</div>
|
19 |
-
</div>
|
20 |
<div class="form-group">
|
21 |
<div class="col-sm-12">
|
22 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
</div>
|
24 |
</div>
|
|
|
25 |
<div class="form-group">
|
26 |
<div class="col-sm-12">
|
27 |
-
<
|
28 |
-
<div class="grw-places"></div>
|
29 |
</div>
|
30 |
</div>
|
31 |
-
<div class="form-group">
|
32 |
-
<div class="col-sm-12">
|
33 |
-
<h4 class="text-left"><span class="grw-step">3</span><?php echo grw_i('Save Place and Reviews'); ?></h4>
|
34 |
-
<div class="grw-reviews"></div>
|
35 |
-
<div class="grw-five-reviews-note" style="display:none"><?php echo grw_i('Google returns 5 reviews only'); ?></div>
|
36 |
-
<div class="grw-save-reviews-container"></div>
|
37 |
-
</div>
|
38 |
-
</div-->
|
5 |
<small class="grw-error"></small>
|
6 |
</div>
|
7 |
</div>
|
|
|
|
|
|
|
|
|
|
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
<div class="form-group">
|
10 |
<div class="col-sm-12">
|
11 |
+
<select class="grw-lang form-control">
|
12 |
+
<option value=""><?php echo grw_i('Language disable'); ?></option>
|
13 |
+
<option value="ar"><?php echo grw_i('Arabic'); ?></option>
|
14 |
+
<option value="bg"><?php echo grw_i('Bulgarian'); ?></option>
|
15 |
+
<option value="bn"><?php echo grw_i('Bengali'); ?></option>
|
16 |
+
<option value="ca"><?php echo grw_i('Catalan'); ?></option>
|
17 |
+
<option value="cs"><?php echo grw_i('Czech'); ?></option>
|
18 |
+
<option value="da"><?php echo grw_i('Danish'); ?></option>
|
19 |
+
<option value="de"><?php echo grw_i('German'); ?></option>
|
20 |
+
<option value="el"><?php echo grw_i('Greek'); ?></option>
|
21 |
+
<option value="en"><?php echo grw_i('English'); ?></option>
|
22 |
+
<option value="en-AU"><?php echo grw_i('English (Australian)'); ?></option>
|
23 |
+
<option value="en-GB"><?php echo grw_i('English (Great Britain)'); ?></option>
|
24 |
+
<option value="es"><?php echo grw_i('Spanish'); ?></option>
|
25 |
+
<option value="eu"><?php echo grw_i('Basque'); ?></option>
|
26 |
+
<option value="eu"><?php echo grw_i('Basque'); ?></option>
|
27 |
+
<option value="fa"><?php echo grw_i('Farsi'); ?></option>
|
28 |
+
<option value="fi"><?php echo grw_i('Finnish'); ?></option>
|
29 |
+
<option value="fil"><?php echo grw_i('Filipino'); ?></option>
|
30 |
+
<option value="fr"><?php echo grw_i('French'); ?></option>
|
31 |
+
<option value="gl"><?php echo grw_i('Galician'); ?></option>
|
32 |
+
<option value="gu"><?php echo grw_i('Gujarati'); ?></option>
|
33 |
+
<option value="hi"><?php echo grw_i('Hindi'); ?></option>
|
34 |
+
<option value="hr"><?php echo grw_i('Croatian'); ?></option>
|
35 |
+
<option value="hu"><?php echo grw_i('Hungarian'); ?></option>
|
36 |
+
<option value="id"><?php echo grw_i('Indonesian'); ?></option>
|
37 |
+
<option value="it"><?php echo grw_i('Italian'); ?></option>
|
38 |
+
<option value="iw"><?php echo grw_i('Hebrew'); ?></option>
|
39 |
+
<option value="ja"><?php echo grw_i('Japanese'); ?></option>
|
40 |
+
<option value="kn"><?php echo grw_i('Kannada'); ?></option>
|
41 |
+
<option value="ko"><?php echo grw_i('Korean'); ?></option>
|
42 |
+
<option value="lt"><?php echo grw_i('Lithuanian'); ?></option>
|
43 |
+
<option value="lv"><?php echo grw_i('Latvian'); ?></option>
|
44 |
+
<option value="ml"><?php echo grw_i('Malayalam'); ?></option>
|
45 |
+
<option value="mr"><?php echo grw_i('Marathi'); ?></option>
|
46 |
+
<option value="nl"><?php echo grw_i('Dutch'); ?></option>
|
47 |
+
<option value="no"><?php echo grw_i('Norwegian'); ?></option>
|
48 |
+
<option value="pl"><?php echo grw_i('Polish'); ?></option>
|
49 |
+
<option value="pt"><?php echo grw_i('Portuguese'); ?></option>
|
50 |
+
<option value="pt-BR"><?php echo grw_i('Portuguese (Brazil)'); ?></option>
|
51 |
+
<option value="pt-PT"><?php echo grw_i('Portuguese (Portugal)'); ?></option>
|
52 |
+
<option value="ro"><?php echo grw_i('Romanian'); ?></option>
|
53 |
+
<option value="ru"><?php echo grw_i('Russian'); ?></option>
|
54 |
+
<option value="sk"><?php echo grw_i('Slovak'); ?></option>
|
55 |
+
<option value="sl"><?php echo grw_i('Slovenian'); ?></option>
|
56 |
+
<option value="sr"><?php echo grw_i('Serbian'); ?></option>
|
57 |
+
<option value="sv"><?php echo grw_i('Swedish'); ?></option>
|
58 |
+
<option value="ta"><?php echo grw_i('Tamil'); ?></option>
|
59 |
+
<option value="te"><?php echo grw_i('Telugu'); ?></option>
|
60 |
+
<option value="th"><?php echo grw_i('Thai'); ?></option>
|
61 |
+
<option value="tl"><?php echo grw_i('Tagalog'); ?></option>
|
62 |
+
<option value="tr"><?php echo grw_i('Turkish'); ?></option>
|
63 |
+
<option value="uk"><?php echo grw_i('Ukrainian'); ?></option>
|
64 |
+
<option value="vi"><?php echo grw_i('Vietnamese'); ?></option>
|
65 |
+
<option value="zh-CN"><?php echo grw_i('Chinese (Simplified)'); ?></option>
|
66 |
+
<option value="zh-TW"><?php echo grw_i('Chinese (Traditional)'); ?></option>
|
67 |
+
</select>
|
68 |
</div>
|
69 |
</div>
|
70 |
+
|
71 |
<div class="form-group">
|
72 |
<div class="col-sm-12">
|
73 |
+
<button class="grw-connect-btn btn btn-block btn-primary"><?php echo grw_i('Connect Google'); ?></button>
|
|
|
74 |
</div>
|
75 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
grw-options.php
CHANGED
@@ -1,11 +1,3 @@
|
|
1 |
-
<?php if (isset($title)) { ?>
|
2 |
-
<div class="form-group">
|
3 |
-
<div class="col-sm-12">
|
4 |
-
<input type="text" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>" class="form-control" placeholder="<?php echo grw_i('Widget title'); ?>" />
|
5 |
-
</div>
|
6 |
-
</div>
|
7 |
-
<?php } ?>
|
8 |
-
|
9 |
<?php global $wp_version; if (version_compare($wp_version, '3.5', '>=')) { wp_enqueue_media(); ?>
|
10 |
<div class="form-group">
|
11 |
<div class="col-sm-12">
|
@@ -28,242 +20,92 @@
|
|
28 |
</div>
|
29 |
</div>
|
30 |
|
31 |
-
|
32 |
-
<
|
33 |
-
<
|
34 |
-
<div class="form-group rplg-disabled">
|
35 |
-
<div class="col-sm-12">
|
36 |
-
<label>
|
37 |
-
<input class="form-control" type="checkbox" disabled />
|
38 |
-
<?php echo grw_i('Try to get more than 5 Google reviews'); ?>
|
39 |
-
</label>
|
40 |
-
</div>
|
41 |
-
</div>
|
42 |
-
<div class="form-group rplg-disabled">
|
43 |
-
<div class="col-sm-12">
|
44 |
-
<label>
|
45 |
-
<input class="form-control" type="checkbox" disabled />
|
46 |
-
<?php echo grw_i('Enable Google Rich Snippet (schema.org)'); ?>
|
47 |
-
</label>
|
48 |
-
</div>
|
49 |
-
</div>
|
50 |
-
<div class="form-group">
|
51 |
-
<div class="col-sm-12">
|
52 |
-
<label><?php echo grw_i('Pagination'); ?></label>
|
53 |
-
<input type="text" id="<?php echo $this->get_field_id('pagination'); ?>" name="<?php echo $this->get_field_name('pagination'); ?>" value="<?php echo $pagination; ?>" placeholder="5" class="form-control"/>
|
54 |
-
</div>
|
55 |
-
</div>
|
56 |
-
<div class="form-group rplg-disabled">
|
57 |
-
<div class="col-sm-12">
|
58 |
-
<?php echo grw_i('Sorting'); ?>
|
59 |
-
<select class="form-control" disabled >
|
60 |
-
<option value=""><?php echo grw_i('Default'); ?></option>
|
61 |
-
<option value="1"><?php echo grw_i('Most recent'); ?></option>
|
62 |
-
<option value="2"><?php echo grw_i('Most oldest'); ?></option>
|
63 |
-
<option value="3"><?php echo grw_i('Highest score'); ?></option>
|
64 |
-
<option value="4"><?php echo grw_i('Lowest score'); ?></option>
|
65 |
-
</select>
|
66 |
-
</div>
|
67 |
-
</div>
|
68 |
-
<div class="form-group rplg-disabled">
|
69 |
-
<div class="col-sm-12">
|
70 |
-
<?php echo grw_i('Minimum Review Rating'); ?>
|
71 |
-
<select class="form-control" disabled >
|
72 |
-
<option value=""><?php echo grw_i('No filter'); ?></option>
|
73 |
-
<option value="5"><?php echo grw_i('5 Stars'); ?></option>
|
74 |
-
<option value="4"><?php echo grw_i('4 Stars'); ?></option>
|
75 |
-
<option value="3"><?php echo grw_i('3 Stars'); ?></option>
|
76 |
-
<option value="2"><?php echo grw_i('2 Stars'); ?></option>
|
77 |
-
<option value="1"><?php echo grw_i('1 Star'); ?></option>
|
78 |
-
</select>
|
79 |
-
</div>
|
80 |
-
</div>
|
81 |
-
<div class="form-group">
|
82 |
-
<div class="rplg-pro">
|
83 |
-
<?php echo grw_i('These features are available in Google Reviews Business plugin: '); ?>
|
84 |
-
<a href="https://richplugins.com/google-reviews-pro-wordpress-plugin" target="_blank">
|
85 |
-
<?php echo grw_i('Upgrade to Business'); ?>
|
86 |
-
</a>
|
87 |
-
</div>
|
88 |
</div>
|
89 |
</div>
|
90 |
|
91 |
-
|
92 |
-
<
|
93 |
-
<div class="
|
94 |
-
|
95 |
-
<
|
96 |
-
<label>
|
97 |
-
<input class="form-control" type="checkbox" disabled />
|
98 |
-
<?php echo grw_i('Hide business photo'); ?>
|
99 |
-
</label>
|
100 |
-
</div>
|
101 |
-
</div>
|
102 |
-
<div class="form-group rplg-disabled">
|
103 |
-
<div class="col-sm-12">
|
104 |
-
<label>
|
105 |
-
<input class="form-control" type="checkbox" disabled />
|
106 |
-
<?php echo grw_i('Hide user avatars'); ?>
|
107 |
-
</label>
|
108 |
-
</div>
|
109 |
-
</div>
|
110 |
-
<div class="form-group rplg-disabled">
|
111 |
-
<div class="col-sm-12">
|
112 |
-
<label>
|
113 |
-
<input class="form-control" type="checkbox" disabled />
|
114 |
-
<?php echo grw_i('Disable links to G+ user profile'); ?>
|
115 |
-
</label>
|
116 |
-
</div>
|
117 |
-
</div>
|
118 |
-
<div class="form-group rplg-disabled">
|
119 |
-
<div class="col-sm-12">
|
120 |
-
<label>
|
121 |
-
<input class="form-control" type="checkbox" disabled />
|
122 |
-
<?php echo grw_i('Enable \'Write a review\' button'); ?>
|
123 |
-
</label>
|
124 |
-
</div>
|
125 |
-
</div>
|
126 |
-
<div class="form-group">
|
127 |
-
<div class="col-sm-12">
|
128 |
-
<label>
|
129 |
-
<input id="<?php echo $this->get_field_id('dark_theme'); ?>" name="<?php echo $this->get_field_name('dark_theme'); ?>" type="checkbox" value="1" <?php checked('1', $dark_theme); ?> class="form-control" />
|
130 |
-
<?php echo grw_i('Dark background'); ?>
|
131 |
-
</label>
|
132 |
-
</div>
|
133 |
</div>
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
139 |
</div>
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
<option value="grid" <?php selected('grid', $view_mode); ?> disabled><?php echo grw_i('Reviews Grid'); ?></option>
|
147 |
-
<option value="badge" <?php selected('badge', $view_mode); ?> disabled><?php echo grw_i('Google Badge: right'); ?></option>
|
148 |
-
<option value="badge_left" <?php selected('badge_left', $view_mode); ?> disabled><?php echo grw_i('Google Badge: left'); ?></option>
|
149 |
-
<option value="badge_inner" <?php selected('badge_inner', $view_mode); ?> disabled><?php echo grw_i('Google Badge: embed'); ?></option>
|
150 |
-
</select>
|
151 |
-
</div>
|
152 |
</div>
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
|
|
158 |
</div>
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
164 |
</div>
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
|
|
172 |
</div>
|
173 |
</div>
|
174 |
|
175 |
-
|
176 |
-
<
|
177 |
-
<
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
<a href="https://richplugins.com/google-reviews-pro-wordpress-plugin" target="_blank">
|
182 |
-
<?php echo grw_i('Upgrade to Business'); ?>
|
183 |
-
</a>
|
184 |
-
</div>
|
185 |
</div>
|
186 |
</div>
|
187 |
|
188 |
-
|
189 |
-
<
|
190 |
-
<
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
<input id="<?php echo $this->get_field_id('open_link'); ?>" name="<?php echo $this->get_field_name('open_link'); ?>" type="checkbox" value="1" <?php checked('1', $open_link); ?> class="form-control" />
|
195 |
-
<?php echo grw_i('Open links in new Window'); ?>
|
196 |
-
</label>
|
197 |
-
</div>
|
198 |
</div>
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
|
|
206 |
</div>
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
<option value="ca" <?php selected('ca', $reviews_lang); ?>><?php echo grw_i('Catalan'); ?></option>
|
216 |
-
<option value="cs" <?php selected('cs', $reviews_lang); ?>><?php echo grw_i('Czech'); ?></option>
|
217 |
-
<option value="da" <?php selected('da', $reviews_lang); ?>><?php echo grw_i('Danish'); ?></option>
|
218 |
-
<option value="de" <?php selected('de', $reviews_lang); ?>><?php echo grw_i('German'); ?></option>
|
219 |
-
<option value="el" <?php selected('el', $reviews_lang); ?>><?php echo grw_i('Greek'); ?></option>
|
220 |
-
<option value="en" <?php selected('en', $reviews_lang); ?>><?php echo grw_i('English'); ?></option>
|
221 |
-
<option value="en-AU" <?php selected('en-AU', $reviews_lang); ?>><?php echo grw_i('English (Australian)'); ?></option>
|
222 |
-
<option value="en-GB" <?php selected('en-GB', $reviews_lang); ?>><?php echo grw_i('English (Great Britain)'); ?></option>
|
223 |
-
<option value="es" <?php selected('es', $reviews_lang); ?>><?php echo grw_i('Spanish'); ?></option>
|
224 |
-
<option value="eu" <?php selected('eu', $reviews_lang); ?>><?php echo grw_i('Basque'); ?></option>
|
225 |
-
<option value="eu" <?php selected('eu', $reviews_lang); ?>><?php echo grw_i('Basque'); ?></option>
|
226 |
-
<option value="fa" <?php selected('fa', $reviews_lang); ?>><?php echo grw_i('Farsi'); ?></option>
|
227 |
-
<option value="fi" <?php selected('fi', $reviews_lang); ?>><?php echo grw_i('Finnish'); ?></option>
|
228 |
-
<option value="fil" <?php selected('fil', $reviews_lang); ?>><?php echo grw_i('Filipino'); ?></option>
|
229 |
-
<option value="fr" <?php selected('fr', $reviews_lang); ?>><?php echo grw_i('French'); ?></option>
|
230 |
-
<option value="gl" <?php selected('gl', $reviews_lang); ?>><?php echo grw_i('Galician'); ?></option>
|
231 |
-
<option value="gu" <?php selected('gu', $reviews_lang); ?>><?php echo grw_i('Gujarati'); ?></option>
|
232 |
-
<option value="hi" <?php selected('hi', $reviews_lang); ?>><?php echo grw_i('Hindi'); ?></option>
|
233 |
-
<option value="hr" <?php selected('hr', $reviews_lang); ?>><?php echo grw_i('Croatian'); ?></option>
|
234 |
-
<option value="hu" <?php selected('hu', $reviews_lang); ?>><?php echo grw_i('Hungarian'); ?></option>
|
235 |
-
<option value="id" <?php selected('id', $reviews_lang); ?>><?php echo grw_i('Indonesian'); ?></option>
|
236 |
-
<option value="it" <?php selected('it', $reviews_lang); ?>><?php echo grw_i('Italian'); ?></option>
|
237 |
-
<option value="iw" <?php selected('iw', $reviews_lang); ?>><?php echo grw_i('Hebrew'); ?></option>
|
238 |
-
<option value="ja" <?php selected('ja', $reviews_lang); ?>><?php echo grw_i('Japanese'); ?></option>
|
239 |
-
<option value="kn" <?php selected('kn', $reviews_lang); ?>><?php echo grw_i('Kannada'); ?></option>
|
240 |
-
<option value="ko" <?php selected('ko', $reviews_lang); ?>><?php echo grw_i('Korean'); ?></option>
|
241 |
-
<option value="lt" <?php selected('lt', $reviews_lang); ?>><?php echo grw_i('Lithuanian'); ?></option>
|
242 |
-
<option value="lv" <?php selected('lv', $reviews_lang); ?>><?php echo grw_i('Latvian'); ?></option>
|
243 |
-
<option value="ml" <?php selected('ml', $reviews_lang); ?>><?php echo grw_i('Malayalam'); ?></option>
|
244 |
-
<option value="mr" <?php selected('mr', $reviews_lang); ?>><?php echo grw_i('Marathi'); ?></option>
|
245 |
-
<option value="nl" <?php selected('nl', $reviews_lang); ?>><?php echo grw_i('Dutch'); ?></option>
|
246 |
-
<option value="no" <?php selected('no', $reviews_lang); ?>><?php echo grw_i('Norwegian'); ?></option>
|
247 |
-
<option value="pl" <?php selected('pl', $reviews_lang); ?>><?php echo grw_i('Polish'); ?></option>
|
248 |
-
<option value="pt" <?php selected('pt', $reviews_lang); ?>><?php echo grw_i('Portuguese'); ?></option>
|
249 |
-
<option value="pt-BR" <?php selected('pt-BR', $reviews_lang); ?>><?php echo grw_i('Portuguese (Brazil)'); ?></option>
|
250 |
-
<option value="pt-PT" <?php selected('pt-PT', $reviews_lang); ?>><?php echo grw_i('Portuguese (Portugal)'); ?></option>
|
251 |
-
<option value="ro" <?php selected('ro', $reviews_lang); ?>><?php echo grw_i('Romanian'); ?></option>
|
252 |
-
<option value="ru" <?php selected('ru', $reviews_lang); ?>><?php echo grw_i('Russian'); ?></option>
|
253 |
-
<option value="sk" <?php selected('sk', $reviews_lang); ?>><?php echo grw_i('Slovak'); ?></option>
|
254 |
-
<option value="sl" <?php selected('sl', $reviews_lang); ?>><?php echo grw_i('Slovenian'); ?></option>
|
255 |
-
<option value="sr" <?php selected('sr', $reviews_lang); ?>><?php echo grw_i('Serbian'); ?></option>
|
256 |
-
<option value="sv" <?php selected('sv', $reviews_lang); ?>><?php echo grw_i('Swedish'); ?></option>
|
257 |
-
<option value="ta" <?php selected('ta', $reviews_lang); ?>><?php echo grw_i('Tamil'); ?></option>
|
258 |
-
<option value="te" <?php selected('te', $reviews_lang); ?>><?php echo grw_i('Telugu'); ?></option>
|
259 |
-
<option value="th" <?php selected('th', $reviews_lang); ?>><?php echo grw_i('Thai'); ?></option>
|
260 |
-
<option value="tl" <?php selected('tl', $reviews_lang); ?>><?php echo grw_i('Tagalog'); ?></option>
|
261 |
-
<option value="tr" <?php selected('tr', $reviews_lang); ?>><?php echo grw_i('Turkish'); ?></option>
|
262 |
-
<option value="uk" <?php selected('uk', $reviews_lang); ?>><?php echo grw_i('Ukrainian'); ?></option>
|
263 |
-
<option value="vi" <?php selected('vi', $reviews_lang); ?>><?php echo grw_i('Vietnamese'); ?></option>
|
264 |
-
<option value="zh-CN" <?php selected('zh-CN', $reviews_lang); ?>><?php echo grw_i('Chinese (Simplified)'); ?></option>
|
265 |
-
<option value="zh-TW" <?php selected('zh-TW', $reviews_lang); ?>><?php echo grw_i('Chinese (Traditional)'); ?></option>
|
266 |
-
</select>
|
267 |
-
</div>
|
268 |
</div>
|
269 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php global $wp_version; if (version_compare($wp_version, '3.5', '>=')) { wp_enqueue_media(); ?>
|
2 |
<div class="form-group">
|
3 |
<div class="col-sm-12">
|
20 |
</div>
|
21 |
</div>
|
22 |
|
23 |
+
<div class="form-group">
|
24 |
+
<div class="col-sm-12">
|
25 |
+
<input type="text" id="<?php echo $this->get_field_id('reviews_lang'); ?>" name="<?php echo $this->get_field_name('reviews_lang'); ?>" value="<?php echo $reviews_lang; ?>" class="form-control grw-place-lang" placeholder="<?php echo grw_i('Language'); ?>" readonly />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
</div>
|
27 |
</div>
|
28 |
|
29 |
+
<?php if (isset($title)) { ?>
|
30 |
+
<div class="form-group">
|
31 |
+
<div class="col-sm-12">
|
32 |
+
<label><?php echo grw_i('Title'); ?></label>
|
33 |
+
<input type="text" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>" class="form-control" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
</div>
|
35 |
+
</div>
|
36 |
+
<?php } ?>
|
37 |
+
|
38 |
+
<div class="form-group">
|
39 |
+
<div class="col-sm-12">
|
40 |
+
<label><?php echo grw_i('Pagination'); ?></label>
|
41 |
+
<input type="text" id="<?php echo $this->get_field_id('pagination'); ?>" name="<?php echo $this->get_field_name('pagination'); ?>" value="<?php echo $pagination; ?>" class="form-control"/>
|
42 |
</div>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<div class="form-group">
|
46 |
+
<div class="col-sm-12">
|
47 |
+
<label><?php echo grw_i('Characters before \'read more\' link'); ?></label>
|
48 |
+
<input type="text" id="<?php echo $this->get_field_id('text_size'); ?>" name="<?php echo $this->get_field_name('text_size'); ?>" value="<?php echo $text_size; ?>" class="form-control"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
</div>
|
50 |
+
</div>
|
51 |
+
|
52 |
+
<div class="form-group">
|
53 |
+
<div class="col-sm-12">
|
54 |
+
<label for="<?php echo $this->get_field_id('max_width'); ?>"><?php echo grw_i('Widget width'); ?></label>
|
55 |
+
<input id="<?php echo $this->get_field_id('max_width'); ?>" name="<?php echo $this->get_field_name('max_width'); ?>" value="<?php echo $max_width; ?>" class="form-control" type="text" />
|
56 |
</div>
|
57 |
+
</div>
|
58 |
+
|
59 |
+
<div class="form-group">
|
60 |
+
<div class="col-sm-12">
|
61 |
+
<label for="<?php echo $this->get_field_id('max_height'); ?>"><?php echo grw_i('Widget height'); ?></label>
|
62 |
+
<input id="<?php echo $this->get_field_id('max_height'); ?>" name="<?php echo $this->get_field_name('max_height'); ?>" value="<?php echo $max_height; ?>" class="form-control" type="text" />
|
63 |
</div>
|
64 |
+
</div>
|
65 |
+
|
66 |
+
<div class="form-group">
|
67 |
+
<div class="col-sm-12">
|
68 |
+
<label>
|
69 |
+
<input id="<?php echo $this->get_field_id('centered'); ?>" name="<?php echo $this->get_field_name('centered'); ?>" type="checkbox" value="1" <?php checked('1', $centered); ?> class="form-control" />
|
70 |
+
<?php echo grw_i('Place by center (only if Width is set)'); ?>
|
71 |
+
</label>
|
72 |
</div>
|
73 |
</div>
|
74 |
|
75 |
+
<div class="form-group">
|
76 |
+
<div class="col-sm-12">
|
77 |
+
<label>
|
78 |
+
<input id="<?php echo $this->get_field_id('dark_theme'); ?>" name="<?php echo $this->get_field_name('dark_theme'); ?>" type="checkbox" value="1" <?php checked('1', $dark_theme); ?> class="form-control" />
|
79 |
+
<?php echo grw_i('Dark background'); ?>
|
80 |
+
</label>
|
|
|
|
|
|
|
|
|
81 |
</div>
|
82 |
</div>
|
83 |
|
84 |
+
<div class="form-group">
|
85 |
+
<div class="col-sm-12">
|
86 |
+
<label>
|
87 |
+
<input id="<?php echo $this->get_field_id('open_link'); ?>" name="<?php echo $this->get_field_name('open_link'); ?>" type="checkbox" value="1" <?php checked('1', $open_link); ?> class="form-control" />
|
88 |
+
<?php echo grw_i('Open links in new Window'); ?>
|
89 |
+
</label>
|
|
|
|
|
|
|
|
|
90 |
</div>
|
91 |
+
</div>
|
92 |
+
|
93 |
+
<div class="form-group">
|
94 |
+
<div class="col-sm-12">
|
95 |
+
<label>
|
96 |
+
<input id="<?php echo $this->get_field_id('nofollow_link'); ?>" name="<?php echo $this->get_field_name('nofollow_link'); ?>" type="checkbox" value="1" <?php checked('1', $nofollow_link); ?> class="form-control" />
|
97 |
+
<?php echo grw_i('Use no follow links'); ?>
|
98 |
+
</label>
|
99 |
</div>
|
100 |
+
</div>
|
101 |
+
|
102 |
+
<div class="form-group">
|
103 |
+
<div class="rplg-pro">
|
104 |
+
<?php echo grw_i('Try more features in the Business version: '); ?>
|
105 |
+
<a href="https://richplugins.com/google-reviews-pro-wordpress-plugin" target="_blank">
|
106 |
+
<?php echo grw_i('Upgrade to Business'); ?>
|
107 |
+
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
</div>
|
109 |
+
</div>
|
110 |
+
|
111 |
+
<input id="<?php echo $this->get_field_id('view_mode'); ?>" name="<?php echo $this->get_field_name('view_mode'); ?>" type="hidden" value="list" />
|
grw-reviews-helper.php
CHANGED
@@ -75,8 +75,7 @@ function grw_place_reviews($place, $reviews, $place_id, $text_size, $pagination)
|
|
75 |
<?php echo grw_i('Next Reviews'); ?>
|
76 |
</a>
|
77 |
<?php } else {
|
78 |
-
$
|
79 |
-
grw_anchor($place->url, 'wp-google-url', $seeAllReviews, true, true);
|
80 |
}
|
81 |
}
|
82 |
|
75 |
<?php echo grw_i('Next Reviews'); ?>
|
76 |
</a>
|
77 |
<?php } else {
|
78 |
+
grw_anchor('https://search.google.com/local/reviews?placeid=' . $place_id, 'wp-google-url', grw_i('See All Reviews'), true, true);
|
|
|
79 |
}
|
80 |
}
|
81 |
|
grw-reviews.php
CHANGED
@@ -23,6 +23,13 @@ if ($place->rating > 0) {
|
|
23 |
}
|
24 |
$rating = number_format((float)$rating, 1, '.', '');
|
25 |
$place_img = strlen($place_photo) > 0 ? $place_photo : (strlen($place->photo) > 0 ? $place->photo : $place->icon);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
?>
|
27 |
|
28 |
<?php if ($view_mode != 'list') { ?>
|
@@ -76,7 +83,7 @@ $place_img = strlen($place_photo) > 0 ? $place_photo : (strlen($place->photo) >
|
|
76 |
|
77 |
<?php } else { ?>
|
78 |
|
79 |
-
<div class="wp-gr wpac" style="<?php if (isset($max_width) && strlen($max_width) > 0) { ?>
|
80 |
<div class="wp-google-list<?php if ($dark_theme) { ?> wp-dark<?php } ?>">
|
81 |
<div class="wp-google-place">
|
82 |
<?php grw_place($rating, $place, $place_img, $reviews, $dark_theme); ?>
|
23 |
}
|
24 |
$rating = number_format((float)$rating, 1, '.', '');
|
25 |
$place_img = strlen($place_photo) > 0 ? $place_photo : (strlen($place->photo) > 0 ? $place->photo : $place->icon);
|
26 |
+
|
27 |
+
if (is_numeric($max_width)) {
|
28 |
+
$max_width = $max_width . 'px';
|
29 |
+
}
|
30 |
+
if (is_numeric($max_height)) {
|
31 |
+
$max_height = $max_height . 'px';
|
32 |
+
}
|
33 |
?>
|
34 |
|
35 |
<?php if ($view_mode != 'list') { ?>
|
83 |
|
84 |
<?php } else { ?>
|
85 |
|
86 |
+
<div class="wp-gr wpac" style="<?php if (isset($max_width) && strlen($max_width) > 0) { ?>width:<?php echo $max_width;?>!important;<?php } ?><?php if (isset($max_height) && strlen($max_height) > 0) { ?>height:<?php echo $max_height;?>!important;overflow-y:auto!important;<?php } ?><?php if ($centered) { ?>margin:0 auto!important;<?php } ?>">
|
87 |
<div class="wp-google-list<?php if ($dark_theme) { ?> wp-dark<?php } ?>">
|
88 |
<div class="wp-google-place">
|
89 |
<?php grw_place($rating, $place, $place_img, $reviews, $dark_theme); ?>
|
grw-setting.php
CHANGED
@@ -5,7 +5,7 @@ if (!current_user_can('manage_options')) {
|
|
5 |
}
|
6 |
|
7 |
function grw_has_valid_nonce() {
|
8 |
-
$nonce_actions = array('grw_reset', 'grw_settings', 'grw_active');
|
9 |
$nonce_form_prefix = 'grw-form_nonce_';
|
10 |
$nonce_action_prefix = 'grw-wpnonce_';
|
11 |
foreach ($nonce_actions as $key => $value) {
|
@@ -41,7 +41,7 @@ if (!empty($_POST)) {
|
|
41 |
}
|
42 |
|
43 |
// Reset
|
44 |
-
if (isset($_POST['
|
45 |
grw_reset(isset($_POST['reset_db']));
|
46 |
unset($_POST);
|
47 |
?>
|
@@ -109,8 +109,7 @@ if (isset($_POST['grw_active']) && isset($_GET['grw_active'])) {
|
|
109 |
}
|
110 |
|
111 |
if (isset($_POST['grw_setting'])) {
|
112 |
-
update_option('
|
113 |
-
update_option('grw_google_api_key', $_POST['grw_google_api_key']);
|
114 |
|
115 |
/*$grw_google_api_key = $_POST['grw_google_api_key'];
|
116 |
if (strlen($grw_google_api_key) > 0) {
|
@@ -123,67 +122,58 @@ if (isset($_POST['grw_setting'])) {
|
|
123 |
}
|
124 |
update_option('grw_google_api_key', $grw_google_api_key);
|
125 |
}*/
|
126 |
-
$grw_setting_page = true;
|
127 |
-
} else {
|
128 |
-
$grw_setting_page = false;
|
129 |
}
|
130 |
|
131 |
-
if (isset($
|
132 |
-
$grw_setting_page = true;
|
133 |
-
}
|
134 |
-
|
135 |
-
if (isset($_POST['grw_install_db'])) {
|
136 |
grw_install_db();
|
137 |
}
|
138 |
|
139 |
-
|
140 |
-
|
|
|
|
|
141 |
|
142 |
wp_register_style('rplg_setting_css', plugins_url('/static/css/rplg-setting.css', __FILE__));
|
143 |
wp_enqueue_style('rplg_setting_css', plugins_url('/static/css/rplg-setting.css', __FILE__));
|
144 |
|
145 |
wp_enqueue_script('jquery');
|
146 |
|
147 |
-
$
|
|
|
148 |
$grw_google_api_key = get_option('grw_google_api_key');
|
149 |
-
$grw_language = get_option('grw_language');
|
150 |
?>
|
151 |
|
152 |
<span class="rplg-version"><?php echo grw_i('Free Version: %s', esc_html(GRW_VERSION)); ?></span>
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
<
|
163 |
-
<
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
<div class="
|
172 |
-
<
|
173 |
-
|
174 |
-
<
|
175 |
-
|
176 |
-
|
177 |
-
<
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
<
|
182 |
-
|
183 |
-
<p><?php echo grw_i('Feel free to contact us by email <a href="mailto:support@richplugins.com">support@richplugins.com</a>.'); ?></p>
|
184 |
-
<p><?php echo grw_i('<b>Like this plugin? Give it a like on social:</b>'); ?></p>
|
185 |
-
<div class="row">
|
186 |
-
<div class="col-sm-4">
|
187 |
<div id="fb-root"></div>
|
188 |
<script>(function(d, s, id) {
|
189 |
var js, fjs = d.getElementsByTagName(s)[0];
|
@@ -193,20 +183,7 @@ $grw_language = get_option('grw_language');
|
|
193 |
fjs.parentNode.insertBefore(js, fjs);
|
194 |
}(document, 'script', 'facebook-jssdk'));</script>
|
195 |
<div class="fb-like" data-href="https://richplugins.com/" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>
|
196 |
-
|
197 |
-
<div class="col-sm-4 twitter">
|
198 |
-
<a href="https://twitter.com/richplugins" class="twitter-follow-button" data-show-count="false">Follow @RichPlugins</a>
|
199 |
-
<script>!function (d, s, id) {
|
200 |
-
var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
|
201 |
-
if (!d.getElementById(id)) {
|
202 |
-
js = d.createElement(s);
|
203 |
-
js.id = id;
|
204 |
-
js.src = p + '://platform.twitter.com/widgets.js';
|
205 |
-
fjs.parentNode.insertBefore(js, fjs);
|
206 |
-
}
|
207 |
-
}(document, 'script', 'twitter-wjs');</script>
|
208 |
-
</div>
|
209 |
-
<div class="col-sm-4 googleplus">
|
210 |
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="200" data-href="https://plus.google.com/101080686931597182099"></div>
|
211 |
<script type="text/javascript">
|
212 |
window.___gcfg = { lang: 'en-US' };
|
@@ -221,185 +198,172 @@ $grw_language = get_option('grw_language');
|
|
221 |
</script>
|
222 |
</div>
|
223 |
</div>
|
224 |
-
|
225 |
-
|
226 |
-
<br>
|
227 |
-
<div class="embed-responsive embed-responsive-16by9">
|
228 |
-
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/lmaTBmvDPKk?rel=0" allowfullscreen=""></iframe>
|
229 |
</div>
|
230 |
</div>
|
231 |
</div>
|
232 |
-
|
233 |
-
<
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
<div class="
|
260 |
-
|
261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
</div>
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
<p>3. Create new project or select existing</p>
|
269 |
-
<p>4. On the project page click '<b>ENABLE APIS AND SERVICES</b>'</p>
|
270 |
-
<p>5. Type '<b>Places API</b>' in the search area</p>
|
271 |
-
<p>6. Select the first result '<b>Places API</b>' and click '<b>ENABLE</b>' button</p>
|
272 |
-
<p>7. On the 'Places API' page select '<b>Credential</b>' tab and '<b>Create credential</b>' / '<b>API key</b>' option</p>
|
273 |
-
<p>8. Copy created API key, paste to this setting and save</p>
|
274 |
-
<p><b>Video instruction</b></p>
|
275 |
-
<iframe src="//www.youtube.com/embed/Kf_bkg7WeC0?rel=0" allowfullscreen=""></iframe>
|
276 |
</div>
|
277 |
</div>
|
278 |
-
<div class="
|
279 |
-
<
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
<
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
<option value="es" <?php selected('es', $grw_language); ?>><?php echo grw_i('Spanish'); ?></option>
|
294 |
-
<option value="eu" <?php selected('eu', $grw_language); ?>><?php echo grw_i('Basque'); ?></option>
|
295 |
-
<option value="eu" <?php selected('eu', $grw_language); ?>><?php echo grw_i('Basque'); ?></option>
|
296 |
-
<option value="fa" <?php selected('fa', $grw_language); ?>><?php echo grw_i('Farsi'); ?></option>
|
297 |
-
<option value="fi" <?php selected('fi', $grw_language); ?>><?php echo grw_i('Finnish'); ?></option>
|
298 |
-
<option value="fil" <?php selected('fil', $grw_language); ?>><?php echo grw_i('Filipino'); ?></option>
|
299 |
-
<option value="fr" <?php selected('fr', $grw_language); ?>><?php echo grw_i('French'); ?></option>
|
300 |
-
<option value="gl" <?php selected('gl', $grw_language); ?>><?php echo grw_i('Galician'); ?></option>
|
301 |
-
<option value="gu" <?php selected('gu', $grw_language); ?>><?php echo grw_i('Gujarati'); ?></option>
|
302 |
-
<option value="hi" <?php selected('hi', $grw_language); ?>><?php echo grw_i('Hindi'); ?></option>
|
303 |
-
<option value="hr" <?php selected('hr', $grw_language); ?>><?php echo grw_i('Croatian'); ?></option>
|
304 |
-
<option value="hu" <?php selected('hu', $grw_language); ?>><?php echo grw_i('Hungarian'); ?></option>
|
305 |
-
<option value="id" <?php selected('id', $grw_language); ?>><?php echo grw_i('Indonesian'); ?></option>
|
306 |
-
<option value="it" <?php selected('it', $grw_language); ?>><?php echo grw_i('Italian'); ?></option>
|
307 |
-
<option value="iw" <?php selected('iw', $grw_language); ?>><?php echo grw_i('Hebrew'); ?></option>
|
308 |
-
<option value="ja" <?php selected('ja', $grw_language); ?>><?php echo grw_i('Japanese'); ?></option>
|
309 |
-
<option value="kn" <?php selected('kn', $grw_language); ?>><?php echo grw_i('Kannada'); ?></option>
|
310 |
-
<option value="ko" <?php selected('ko', $grw_language); ?>><?php echo grw_i('Korean'); ?></option>
|
311 |
-
<option value="lt" <?php selected('lt', $grw_language); ?>><?php echo grw_i('Lithuanian'); ?></option>
|
312 |
-
<option value="lv" <?php selected('lv', $grw_language); ?>><?php echo grw_i('Latvian'); ?></option>
|
313 |
-
<option value="ml" <?php selected('ml', $grw_language); ?>><?php echo grw_i('Malayalam'); ?></option>
|
314 |
-
<option value="mr" <?php selected('mr', $grw_language); ?>><?php echo grw_i('Marathi'); ?></option>
|
315 |
-
<option value="nl" <?php selected('nl', $grw_language); ?>><?php echo grw_i('Dutch'); ?></option>
|
316 |
-
<option value="no" <?php selected('no', $grw_language); ?>><?php echo grw_i('Norwegian'); ?></option>
|
317 |
-
<option value="pl" <?php selected('pl', $grw_language); ?>><?php echo grw_i('Polish'); ?></option>
|
318 |
-
<option value="pt" <?php selected('pt', $grw_language); ?>><?php echo grw_i('Portuguese'); ?></option>
|
319 |
-
<option value="pt-BR" <?php selected('pt-BR', $grw_language); ?>><?php echo grw_i('Portuguese (Brazil)'); ?></option>
|
320 |
-
<option value="pt-PT" <?php selected('pt-PT', $grw_language); ?>><?php echo grw_i('Portuguese (Portugal)'); ?></option>
|
321 |
-
<option value="ro" <?php selected('ro', $grw_language); ?>><?php echo grw_i('Romanian'); ?></option>
|
322 |
-
<option value="ru" <?php selected('ru', $grw_language); ?>><?php echo grw_i('Russian'); ?></option>
|
323 |
-
<option value="sk" <?php selected('sk', $grw_language); ?>><?php echo grw_i('Slovak'); ?></option>
|
324 |
-
<option value="sl" <?php selected('sl', $grw_language); ?>><?php echo grw_i('Slovenian'); ?></option>
|
325 |
-
<option value="sr" <?php selected('sr', $grw_language); ?>><?php echo grw_i('Serbian'); ?></option>
|
326 |
-
<option value="sv" <?php selected('sv', $grw_language); ?>><?php echo grw_i('Swedish'); ?></option>
|
327 |
-
<option value="ta" <?php selected('ta', $grw_language); ?>><?php echo grw_i('Tamil'); ?></option>
|
328 |
-
<option value="te" <?php selected('te', $grw_language); ?>><?php echo grw_i('Telugu'); ?></option>
|
329 |
-
<option value="th" <?php selected('th', $grw_language); ?>><?php echo grw_i('Thai'); ?></option>
|
330 |
-
<option value="tl" <?php selected('tl', $grw_language); ?>><?php echo grw_i('Tagalog'); ?></option>
|
331 |
-
<option value="tr" <?php selected('tr', $grw_language); ?>><?php echo grw_i('Turkish'); ?></option>
|
332 |
-
<option value="uk" <?php selected('uk', $grw_language); ?>><?php echo grw_i('Ukrainian'); ?></option>
|
333 |
-
<option value="vi" <?php selected('vi', $grw_language); ?>><?php echo grw_i('Vietnamese'); ?></option>
|
334 |
-
<option value="zh-CN" <?php selected('zh-CN', $grw_language); ?>><?php echo grw_i('Chinese (Simplified)'); ?></option>
|
335 |
-
<option value="zh-TW" <?php selected('zh-TW', $grw_language); ?>><?php echo grw_i('Chinese (Traditional)'); ?></option>
|
336 |
-
</select>
|
337 |
</div>
|
338 |
-
<div class="
|
339 |
-
<
|
340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
</div>
|
342 |
-
<p class="submit" style="text-align: left">
|
343 |
-
<input name="grw_setting" type="submit" value="Save" class="button-primary button" tabindex="4">
|
344 |
-
</p>
|
345 |
-
</form>
|
346 |
-
<hr>
|
347 |
-
<!-- Enable/disable Google Reviews Widget toggle -->
|
348 |
-
<form method="POST" action="?page=grw&grw_active=<?php echo (string)((int)($grw_enabled != true)); ?>">
|
349 |
-
<?php wp_nonce_field('grw-wpnonce_grw_active', 'grw-form_nonce_grw_active'); ?>
|
350 |
-
<span class="status">
|
351 |
-
<?php echo grw_i('Google Reviews Widget is currently '). '<b>' .($grw_enabled ? grw_i('enabled') : grw_i('disabled')). '</b>'; ?>
|
352 |
-
</span>
|
353 |
-
<input type="submit" name="grw_active" class="button" value="<?php echo $grw_enabled ? grw_i('Disable') : grw_i('Enable'); ?>" />
|
354 |
-
</form>
|
355 |
-
<hr>
|
356 |
-
<!-- Debug information -->
|
357 |
-
<button class="btn btn-primary btn-small" type="button" data-toggle="collapse" data-target="#debug" aria-expanded="false" aria-controls="debug">
|
358 |
-
<?php echo grw_i('Debug Information'); ?>
|
359 |
-
</button>
|
360 |
-
<div id="debug" class="collapse">
|
361 |
-
<textarea style="width:90%; height:200px;" onclick="this.select();return false;" readonly><?php
|
362 |
-
rplg_debug(GRW_VERSION, grw_options(), 'widget_grw_widget');
|
363 |
-
grw_debug();
|
364 |
-
?></textarea>
|
365 |
</div>
|
366 |
-
|
367 |
-
<
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
</div>
|
|
|
389 |
</div>
|
|
|
390 |
</div>
|
391 |
<script type="text/javascript">
|
392 |
jQuery(document).ready(function($) {
|
393 |
-
$('a
|
394 |
-
var
|
395 |
-
$(
|
396 |
-
$
|
397 |
e.preventDefault();
|
398 |
});
|
399 |
-
$('button[data-toggle="collapse"]').click(function () {
|
400 |
-
$target = $(this);
|
401 |
-
$collapse = $target.next();
|
402 |
-
$collapse.slideToggle(500);
|
403 |
-
});
|
404 |
});
|
405 |
</script>
|
5 |
}
|
6 |
|
7 |
function grw_has_valid_nonce() {
|
8 |
+
$nonce_actions = array('grw_reset', 'grw_settings', 'grw_active', 'grw_advance');
|
9 |
$nonce_form_prefix = 'grw-form_nonce_';
|
10 |
$nonce_action_prefix = 'grw-wpnonce_';
|
11 |
foreach ($nonce_actions as $key => $value) {
|
41 |
}
|
42 |
|
43 |
// Reset
|
44 |
+
if (isset($_POST['reset_all'])) {
|
45 |
grw_reset(isset($_POST['reset_db']));
|
46 |
unset($_POST);
|
47 |
?>
|
109 |
}
|
110 |
|
111 |
if (isset($_POST['grw_setting'])) {
|
112 |
+
update_option('grw_google_api_key', trim($_POST['grw_google_api_key']));
|
|
|
113 |
|
114 |
/*$grw_google_api_key = $_POST['grw_google_api_key'];
|
115 |
if (strlen($grw_google_api_key) > 0) {
|
122 |
}
|
123 |
update_option('grw_google_api_key', $grw_google_api_key);
|
124 |
}*/
|
|
|
|
|
|
|
125 |
}
|
126 |
|
127 |
+
if (isset($_POST['create_db'])) {
|
|
|
|
|
|
|
|
|
128 |
grw_install_db();
|
129 |
}
|
130 |
|
131 |
+
if (isset($_POST['install'])) {
|
132 |
+
grw_reset(true);
|
133 |
+
grw_install();
|
134 |
+
}
|
135 |
|
136 |
wp_register_style('rplg_setting_css', plugins_url('/static/css/rplg-setting.css', __FILE__));
|
137 |
wp_enqueue_style('rplg_setting_css', plugins_url('/static/css/rplg-setting.css', __FILE__));
|
138 |
|
139 |
wp_enqueue_script('jquery');
|
140 |
|
141 |
+
$tab = isset($_GET['grw_tab']) && strlen($_GET['grw_tab']) > 0 ? $_GET['grw_tab'] : 'about';
|
142 |
+
$grw_enabled = get_option('grw_active') == '1';
|
143 |
$grw_google_api_key = get_option('grw_google_api_key');
|
|
|
144 |
?>
|
145 |
|
146 |
<span class="rplg-version"><?php echo grw_i('Free Version: %s', esc_html(GRW_VERSION)); ?></span>
|
147 |
+
|
148 |
+
<div class="rplg-setting">
|
149 |
+
|
150 |
+
<div class="rplg-page-title">
|
151 |
+
<img src="<?php echo GRW_PLUGIN_URL . '/static/img/google.png'; ?>" alt="Google"> Reviews Widget
|
152 |
+
</div>
|
153 |
+
|
154 |
+
<div class="rplg-settings-workspace">
|
155 |
+
|
156 |
+
<div data-nav-tabs="">
|
157 |
+
<div class="nav-tab-wrapper">
|
158 |
+
<a href="#about" class="nav-tab<?php if ($tab == 'about') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('About'); ?></a>
|
159 |
+
<a href="#setting" class="nav-tab<?php if ($tab == 'setting') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('Settings'); ?></a>
|
160 |
+
<a href="#shortcode" class="nav-tab<?php if ($tab == 'shortcode') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('Shortcode Builder'); ?></a>
|
161 |
+
<a href="#support" class="nav-tab<?php if ($tab == 'support') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('Support'); ?></a>
|
162 |
+
<a href="#advance" class="nav-tab<?php if ($tab == 'advance') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('Advance'); ?></a>
|
163 |
+
</div>
|
164 |
+
|
165 |
+
<div id="about" class="tab-content" style="display:<?php echo $tab == 'about' ? 'block' : 'none'?>;">
|
166 |
+
<h3>Google Reviews Widget for WordPress</h3>
|
167 |
+
<div class="rplg-flex-row">
|
168 |
+
<div class="rplg-flex-col">
|
169 |
+
<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>
|
170 |
+
<p>Please see Introduction Video to understand how it works. Also you can find most common answers and solutions for most common questions and issues in next tabs.</p>
|
171 |
+
<div class="rplg-alert rplg-alert-success">
|
172 |
+
<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.
|
173 |
+
<a class="button-primary button" href="https://richplugins.com/google-reviews-pro-wordpress-plugin" target="_blank" style="margin-left:10px">Upgrade to Business</a>
|
174 |
+
</div>
|
175 |
+
<br>
|
176 |
+
<div class="rplg-socials">
|
|
|
|
|
|
|
|
|
177 |
<div id="fb-root"></div>
|
178 |
<script>(function(d, s, id) {
|
179 |
var js, fjs = d.getElementsByTagName(s)[0];
|
183 |
fjs.parentNode.insertBefore(js, fjs);
|
184 |
}(document, 'script', 'facebook-jssdk'));</script>
|
185 |
<div class="fb-like" data-href="https://richplugins.com/" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>
|
186 |
+
<a href="https://twitter.com/richplugins?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-show-count="false">Follow @richplugins</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="200" data-href="https://plus.google.com/101080686931597182099"></div>
|
188 |
<script type="text/javascript">
|
189 |
window.___gcfg = { lang: 'en-US' };
|
198 |
</script>
|
199 |
</div>
|
200 |
</div>
|
201 |
+
<div class="rplg-flex-col">
|
202 |
+
<iframe width="100%" height="315" src="https://www.youtube.com/embed/lmaTBmvDPKk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
|
|
|
|
|
|
203 |
</div>
|
204 |
</div>
|
205 |
</div>
|
206 |
+
|
207 |
+
<div id="setting" class="tab-content" style="display:<?php echo $tab == 'setting' ? 'block' : 'none'?>;">
|
208 |
+
<h3>General Settings</h3>
|
209 |
+
<form method="post" action="?page=grw&grw_tab=setting&grw_active=<?php echo (string)((int)($grw_enabled != true)); ?>">
|
210 |
+
<div class="rplg-field">
|
211 |
+
<div class="rplg-field-label">
|
212 |
+
<label>The plugin is currently <b><?php echo $grw_enabled ? 'enabled' : 'disabled' ?></b></label>
|
213 |
+
</div>
|
214 |
+
<div class="wp-review-field-option">
|
215 |
+
<?php wp_nonce_field('grw-wpnonce_grw_active', 'grw-form_nonce_grw_active'); ?>
|
216 |
+
<input type="submit" name="grw_active" class="button" value="<?php echo $grw_enabled ? grw_i('Disable') : grw_i('Enable'); ?>" />
|
217 |
+
</div>
|
218 |
+
</div>
|
219 |
+
</form>
|
220 |
+
<form method="POST" action="?page=grw&grw_tab=setting" enctype="multipart/form-data">
|
221 |
+
<?php wp_nonce_field('grw-wpnonce_grw_settings', 'grw-form_nonce_grw_settings'); ?>
|
222 |
+
<div class="rplg-field">
|
223 |
+
<div class="rplg-field-label">
|
224 |
+
<label>Google Places API key</label>
|
225 |
+
</div>
|
226 |
+
<div class="wp-review-field-option">
|
227 |
+
<input type="text" id="grw_google_api_key" name="grw_google_api_key" class="regular-text" value="<?php echo esc_attr($grw_google_api_key); ?>">
|
228 |
+
<div style="padding-top:15px">
|
229 |
+
<input type="submit" value="Save" name="grw_setting" class="button" />
|
230 |
+
</div>
|
231 |
+
</div>
|
232 |
+
</div>
|
233 |
+
<div class="rplg-field">
|
234 |
+
<div class="rplg-field-label">
|
235 |
+
<label>Instruction: how to create Google Places API key</label>
|
236 |
+
</div>
|
237 |
+
<div class="wp-review-field-option">
|
238 |
+
<p>1. Go to your <a href="https://console.developers.google.com/apis/dashboard?pli=1" target="_blank">Google Console</a></p>
|
239 |
+
<p>2. Click '<b>Create Project</b>' or '<b>Select Project</b>' button</p>
|
240 |
+
<p>3. Create new project or select existing</p>
|
241 |
+
<p>4. On the project page click '<b>ENABLE APIS AND SERVICES</b>'</p>
|
242 |
+
<p>5. Type '<b>Places API</b>' in the search area</p>
|
243 |
+
<p>6. Select the first result '<b>Places API</b>' and click '<b>ENABLE</b>' button</p>
|
244 |
+
<p>7. On the 'Places API' page select '<b>Credential</b>' tab and '<b>Create credential</b>' / '<b>API key</b>' option</p>
|
245 |
+
<p>8. Copy created API key, paste to this setting and save</p>
|
246 |
+
<h3>Video instruction</h3>
|
247 |
+
<iframe src="//www.youtube.com/embed/Kf_bkg7WeC0?rel=0" allowfullscreen=""></iframe>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
</form>
|
251 |
+
</div>
|
252 |
+
|
253 |
+
<div id="shortcode" class="tab-content" style="display:<?php echo $tab == 'shortcode' ? 'block' : 'none'?>;">
|
254 |
+
<h3>Shortcode Builder is available in the Business version of the plugin</h3>
|
255 |
+
<a href="https://richplugins.com/google-reviews-pro-wordpress-plugin" target="_blank" style="color:#00bf54;font-size:16px;text-decoration:underline;"><?php echo grw_i('Upgrade to Business'); ?></a>
|
256 |
+
</div>
|
257 |
+
|
258 |
+
<div id="support" class="tab-content" style="display:<?php echo $tab == 'support' ? 'block' : 'none'?>;">
|
259 |
+
<h3>Most Common Questions</h3>
|
260 |
+
<div class="brb-flex-row">
|
261 |
+
<div class="brb-flex-col">
|
262 |
+
<div class="brb-support-question">
|
263 |
+
<h3>I can't connect my Google Place.</h3>
|
264 |
+
<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="https://www.launch2success.com/guide/find-any-google-id/" target="_blank">how to find Place ID of any Google business</a></p>
|
265 |
+
</div>
|
266 |
</div>
|
267 |
+
<div class="brb-flex-col">
|
268 |
+
<div class="brb-support-question">
|
269 |
+
<h3>I have some error messages about the Google API key.</h3>
|
270 |
+
<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>
|
271 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
</div>
|
273 |
</div>
|
274 |
+
<div class="brb-flex-row">
|
275 |
+
<div class="brb-flex-col">
|
276 |
+
<div class="brb-support-question">
|
277 |
+
<h3>Why I see only 5 Google reviews?</h3>
|
278 |
+
<p>The plugin uses the Google Places API to get your reviews. The API only returns the 5 most helpful reviews. Unfortunately, it is a limitation of Google, not specifically the plugin.</p>
|
279 |
+
</div>
|
280 |
+
</div>
|
281 |
+
<div class="brb-flex-col">
|
282 |
+
<div class="brb-support-question">
|
283 |
+
<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>
|
284 |
+
<p>Yes, the plugin is absolutely compatible with PHP 7 and by the way, we are using PHP 7 on the demo site.</p>
|
285 |
+
<p>The warnings come from the code which is needed for compatible with old versions of PHP (< 5.0) which is sometimes found in some users and without this code, the plugin will not work.</p>
|
286 |
+
<p>The problem is that the plugin which you’re using to test compatibility with PHP 7 cannot understand that this code is not used under PHP 7 or greater. The compatibility plugin just search some keywords which deprecated in the latest version PHP and show warnings about it (without understanding that this is not used).</p>
|
287 |
+
</div>
|
288 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
</div>
|
290 |
+
<div class="brb-flex-row">
|
291 |
+
<div class="brb-flex-col">
|
292 |
+
<div class="brb-support-question">
|
293 |
+
<h3>If you need support</h3>
|
294 |
+
<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>
|
295 |
+
<ul>
|
296 |
+
<li><b>1.</b> Clear and understandable description of the issue;</li>
|
297 |
+
<li><b>2.</b> Direct links to your reviews on: Google map;</li>
|
298 |
+
<li><b>3.</b> Link to the page of your site where the plugin installed;</li>
|
299 |
+
<li><b>4.</b> Better if you attach a screenshot(s) (or screencast) how you determine the issue;</li>
|
300 |
+
<li><b>5. The most important:</b> please always copy & paste the DEBUG INFORMATION from the <b>Advance</b> tab.</li>
|
301 |
+
</ul>
|
302 |
+
</div>
|
303 |
+
</div>
|
304 |
+
<div class="brb-flex-col">
|
305 |
+
<div class="brb-support-question">
|
306 |
+
</div>
|
307 |
+
</div>
|
308 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
</div>
|
310 |
+
|
311 |
+
<div id="advance" class="tab-content" style="display:<?php echo $tab == 'advance' ? 'block' : 'none'?>;">
|
312 |
+
<h3>Advance Options</h3>
|
313 |
+
<form method="post" action="?page=grw&grw_tab=advance">
|
314 |
+
<?php wp_nonce_field('grw-wpnonce_grw_advance', 'grw-form_nonce_grw_advance'); ?>
|
315 |
+
<div class="rplg-field">
|
316 |
+
<div class="rplg-field-label">
|
317 |
+
<label>Re-create the database tables of the plugin (service option)</label>
|
318 |
+
</div>
|
319 |
+
<div class="wp-review-field-option">
|
320 |
+
<input type="submit" value="Re-create Database" name="create_db" onclick="return confirm('Are you sure you want to re-create database tables?')" class="button" />
|
321 |
+
</div>
|
322 |
+
</div>
|
323 |
+
<div class="rplg-field">
|
324 |
+
<div class="rplg-field-label">
|
325 |
+
<label><b>Please be careful</b>: this removes all settings, reviews and install the plugin from scratch</label>
|
326 |
+
</div>
|
327 |
+
<div class="wp-review-field-option">
|
328 |
+
<input type="submit" value="Install from scratch" name="install" onclick="return confirm('It will delete all current reviews, are you sure you want to install the plugin from scratch?')" class="button" />
|
329 |
+
</div>
|
330 |
+
</div>
|
331 |
+
<div class="rplg-field">
|
332 |
+
<div class="rplg-field-label">
|
333 |
+
<label><b>Please be careful</b>: this removes all plugin-specific settings (and reviews if 'Remove all reviews' checkbox is set)</label>
|
334 |
+
</div>
|
335 |
+
<div class="wp-review-field-option">
|
336 |
+
<input type="submit" value="Delete the plugin" name="reset_all" onclick="return confirm('Are you sure you want to reset all plugin data' + (window.reset_db.checked ? ' including reviews' : '') + '?')" class="button" />
|
337 |
+
<br><br>
|
338 |
+
<label>
|
339 |
+
<input type="checkbox" id="reset_db" name="reset_db"> Remove all reviews
|
340 |
+
</label>
|
341 |
+
</div>
|
342 |
+
</div>
|
343 |
+
<div id="debug_info" class="rplg-field">
|
344 |
+
<div class="rplg-field-label">
|
345 |
+
<label>DEBUG INFORMATION</label>
|
346 |
+
</div>
|
347 |
+
<div class="wp-review-field-option">
|
348 |
+
<input type="button" value="Copy Debug Information" name="reset_all" onclick="window.rplg_debug_info.select();document.execCommand('copy');window.rplg_debug_msg.innerHTML='Debug Information copied, please paste it to your email to support';" class="button" />
|
349 |
+
<textarea id="rplg_debug_info" style="display:block;width:30em;height:100px;margin-top:10px" onclick="window.rplg_debug_info.select();document.execCommand('copy');window.rplg_debug_msg.innerHTML='Debug Information copied, please paste it to your email to support';" readonly><?php rplg_debug(GRW_VERSION, grw_options(), 'widget_grw_widget'); grw_debug(); ?></textarea>
|
350 |
+
<p id="rplg_debug_msg"></p>
|
351 |
+
</div>
|
352 |
+
</div>
|
353 |
+
</form>
|
354 |
+
</div>
|
355 |
</div>
|
356 |
+
|
357 |
</div>
|
358 |
+
|
359 |
</div>
|
360 |
<script type="text/javascript">
|
361 |
jQuery(document).ready(function($) {
|
362 |
+
$('a.nav-tab').on('click', function(e) {
|
363 |
+
var $this = $(this), activeId = $this.attr('href');
|
364 |
+
$(activeId).show().siblings('.tab-content').hide();
|
365 |
+
$this.addClass('nav-tab-active').siblings().removeClass('nav-tab-active');
|
366 |
e.preventDefault();
|
367 |
});
|
|
|
|
|
|
|
|
|
|
|
368 |
});
|
369 |
</script>
|
grw-widget.php
CHANGED
@@ -19,12 +19,13 @@ class Goog_Reviews_Widget extends WP_Widget {
|
|
19 |
'place_name' => '',
|
20 |
'place_id' => '',
|
21 |
'place_photo' => '',
|
22 |
-
'text_size' => '',
|
23 |
'dark_theme' => '',
|
24 |
-
'view_mode' => '',
|
25 |
'pagination' => '',
|
26 |
'max_width' => '',
|
27 |
'max_height' => '',
|
|
|
28 |
'open_link' => true,
|
29 |
'nofollow_link' => true,
|
30 |
'reviews_lang' => '',
|
@@ -138,7 +139,7 @@ class Goog_Reviews_Widget extends WP_Widget {
|
|
138 |
<?php
|
139 |
} else {
|
140 |
?>
|
141 |
-
<h4 class="text-left">First of all, please create and save the Google API Key on <a href="<?php echo admin_url('options-general.php?page=grw&
|
142 |
<script type="text/javascript">
|
143 |
var apikey = document.querySelectorAll('.grw-apikey');
|
144 |
if (apikey) {
|
19 |
'place_name' => '',
|
20 |
'place_id' => '',
|
21 |
'place_photo' => '',
|
22 |
+
'text_size' => '120',
|
23 |
'dark_theme' => '',
|
24 |
+
'view_mode' => 'list',
|
25 |
'pagination' => '',
|
26 |
'max_width' => '',
|
27 |
'max_height' => '',
|
28 |
+
'centered' => false,
|
29 |
'open_link' => true,
|
30 |
'nofollow_link' => true,
|
31 |
'reviews_lang' => '',
|
139 |
<?php
|
140 |
} else {
|
141 |
?>
|
142 |
+
<h4 class="text-left">First of all, please create and save the Google API Key on <a href="<?php echo admin_url('options-general.php?page=grw&grw_tab=setting'); ?>">the setting page</a> of the plugin</h4>
|
143 |
<script type="text/javascript">
|
144 |
var apikey = document.querySelectorAll('.grw-apikey');
|
145 |
if (apikey) {
|
grw.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Reviews Widget
|
|
4 |
Plugin URI: https://richplugins.com/google-reviews-pro-wordpress-plugin
|
5 |
Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
|
6 |
Author: RichPlugins <support@richplugins.com>
|
7 |
-
Version: 1.6.
|
8 |
Author URI: https://richplugins.com
|
9 |
*/
|
10 |
|
@@ -13,10 +13,10 @@ require(ABSPATH . 'wp-includes/version.php');
|
|
13 |
include_once(dirname(__FILE__) . '/api/urlopen.php');
|
14 |
include_once(dirname(__FILE__) . '/helper/debug.php');
|
15 |
|
16 |
-
define('GRW_VERSION',
|
17 |
-
define('GRW_GOOGLE_PLACE_API',
|
18 |
-
define('GRW_GOOGLE_AVATAR',
|
19 |
-
define('GRW_PLUGIN_URL',
|
20 |
|
21 |
function grw_options() {
|
22 |
return array(
|
@@ -76,7 +76,7 @@ function grw_plugin_row_meta($input, $file) {
|
|
76 |
|
77 |
$links = array(
|
78 |
'<a href="' . esc_url('https://richplugins.com/documentation') . '" target="_blank">' . grw_i('View Documentation') . '</a>',
|
79 |
-
'<a href="' . esc_url('https://richplugins.com/google-reviews-pro-wordpress-plugin') . '" target="_blank">' . grw_i('Upgrade to
|
80 |
);
|
81 |
$input = array_merge($input, $links);
|
82 |
return $input;
|
@@ -84,34 +84,40 @@ function grw_plugin_row_meta($input, $file) {
|
|
84 |
add_filter('plugin_row_meta', 'grw_plugin_row_meta', 10, 2);
|
85 |
|
86 |
/*-------------------------------- Database --------------------------------*/
|
87 |
-
function grw_activation($network_wide) {
|
|
|
88 |
if (grw_does_need_update()) {
|
89 |
-
grw_install(
|
90 |
}
|
91 |
}
|
92 |
register_activation_hook(__FILE__, 'grw_activation');
|
93 |
|
94 |
-
function grw_install(
|
95 |
-
global $wpdb, $userdata;
|
96 |
|
97 |
$version = (string)get_option('grw_version');
|
98 |
if (!$version) {
|
99 |
$version = '0';
|
100 |
}
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
switch_to_blog($
|
111 |
-
|
112 |
-
|
113 |
}
|
|
|
|
|
114 |
}
|
|
|
|
|
|
|
|
|
115 |
|
116 |
if (version_compare($version, GRW_VERSION, '=')) {
|
117 |
return;
|
@@ -188,8 +194,8 @@ function grw_reset_data($reset_db) {
|
|
188 |
delete_option($opt);
|
189 |
}
|
190 |
if ($reset_db) {
|
191 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "grp_google_place;");
|
192 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "grp_google_review;");
|
193 |
}
|
194 |
}
|
195 |
|
@@ -282,7 +288,7 @@ function grw_request_handler() {
|
|
282 |
} else {
|
283 |
check_admin_referer('grw_wpnonce', 'grw_wpnonce');
|
284 |
|
285 |
-
$url = grw_api_url($_POST['placeid']);
|
286 |
|
287 |
$response = rplg_urlopen($url);
|
288 |
|
4 |
Plugin URI: https://richplugins.com/google-reviews-pro-wordpress-plugin
|
5 |
Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
|
6 |
Author: RichPlugins <support@richplugins.com>
|
7 |
+
Version: 1.6.9
|
8 |
Author URI: https://richplugins.com
|
9 |
*/
|
10 |
|
13 |
include_once(dirname(__FILE__) . '/api/urlopen.php');
|
14 |
include_once(dirname(__FILE__) . '/helper/debug.php');
|
15 |
|
16 |
+
define('GRW_VERSION', '1.6.9');
|
17 |
+
define('GRW_GOOGLE_PLACE_API', 'https://maps.googleapis.com/maps/api/place/');
|
18 |
+
define('GRW_GOOGLE_AVATAR', 'https://lh3.googleusercontent.com/-8hepWJzFXpE/AAAAAAAAAAI/AAAAAAAAAAA/I80WzYfIxCQ/s64-c/114307615494839964028.jpg');
|
19 |
+
define('GRW_PLUGIN_URL', plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
|
20 |
|
21 |
function grw_options() {
|
22 |
return array(
|
76 |
|
77 |
$links = array(
|
78 |
'<a href="' . esc_url('https://richplugins.com/documentation') . '" target="_blank">' . grw_i('View Documentation') . '</a>',
|
79 |
+
'<a href="' . esc_url('https://richplugins.com/google-reviews-pro-wordpress-plugin') . '" target="_blank">' . grw_i('Upgrade to Business') . ' »</a>',
|
80 |
);
|
81 |
$input = array_merge($input, $links);
|
82 |
return $input;
|
84 |
add_filter('plugin_row_meta', 'grw_plugin_row_meta', 10, 2);
|
85 |
|
86 |
/*-------------------------------- Database --------------------------------*/
|
87 |
+
function grw_activation($network_wide = false) {
|
88 |
+
add_option('grw_is_multisite', $network_wide);
|
89 |
if (grw_does_need_update()) {
|
90 |
+
grw_install();
|
91 |
}
|
92 |
}
|
93 |
register_activation_hook(__FILE__, 'grw_activation');
|
94 |
|
95 |
+
function grw_install() {
|
|
|
96 |
|
97 |
$version = (string)get_option('grw_version');
|
98 |
if (!$version) {
|
99 |
$version = '0';
|
100 |
}
|
101 |
|
102 |
+
$network_wide = get_option('grw_is_multisite');
|
103 |
+
|
104 |
+
if ($network_wide) {
|
105 |
+
$site_ids = get_sites(array(
|
106 |
+
'fields' => 'ids',
|
107 |
+
'network_id' => get_current_network_id()
|
108 |
+
));
|
109 |
+
foreach($site_ids as $site_id) {
|
110 |
+
switch_to_blog($site_id);
|
111 |
+
grw_install_single_site($version);
|
112 |
+
restore_current_blog();
|
113 |
}
|
114 |
+
} else {
|
115 |
+
grw_install_single_site($version);
|
116 |
}
|
117 |
+
}
|
118 |
+
|
119 |
+
function grw_install_single_site($version) {
|
120 |
+
grw_install_db();
|
121 |
|
122 |
if (version_compare($version, GRW_VERSION, '=')) {
|
123 |
return;
|
194 |
delete_option($opt);
|
195 |
}
|
196 |
if ($reset_db) {
|
197 |
+
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "grp_google_place;");
|
198 |
+
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "grp_google_review;");
|
199 |
}
|
200 |
}
|
201 |
|
288 |
} else {
|
289 |
check_admin_referer('grw_wpnonce', 'grw_wpnonce');
|
290 |
|
291 |
+
$url = grw_api_url($_POST['placeid'], $_POST['lang']);
|
292 |
|
293 |
$response = rplg_urlopen($url);
|
294 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://richplugins.com/google-reviews-pro-wordpress-plugin
|
|
4 |
Tags: google, reviews, google reviews, google places, google places reviews, testimonials, google review widget, google business reviews, slider, google review, review, google place review, google map reviews, google reviews pro, facebook reviews, facebook page reviews, yelp reviews, yelp business reviews
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 5.0
|
7 |
-
Stable tag: 1.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -24,10 +24,12 @@ This plugin display Google Business Reviews on your websites in sidebar widget.
|
|
24 |
|
25 |
* Free!
|
26 |
* SEO
|
|
|
27 |
* Display up to 5 Google business reviews per location
|
28 |
* Keep all reviews in WordPress database
|
29 |
* Shows real reviews from G+ users to increase user confidence
|
30 |
* Easy search of place and instantly show reviews
|
|
|
31 |
* Review list theme
|
32 |
* Pagination
|
33 |
* Support dark websites
|
@@ -35,23 +37,21 @@ This plugin display Google Business Reviews on your websites in sidebar widget.
|
|
35 |
* Zero load time regardless of your site
|
36 |
* Works even if Google is unavailable
|
37 |
|
38 |
-
= Get More Features with
|
39 |
|
40 |
-
[Upgrade to
|
41 |
|
|
|
42 |
* Trying to get more than 5 Google reviews
|
43 |
* Google Rich Snippets (schema.org)
|
44 |
* Support shortcode, powerful <b>Shortcode Builder</b>
|
45 |
* Slider/Grid themes to show G+ reviews like testimonials
|
46 |
-
* Google Trust Badge (right/left fixed or
|
47 |
* 'Write a review' button to available leave Google review directly on your website
|
48 |
-
*
|
49 |
-
*
|
50 |
-
*
|
51 |
-
* Custom business place photo
|
52 |
* Minimum rating filter
|
53 |
-
* Pagination, Sorting
|
54 |
-
* Moderation G+ reviews
|
55 |
* Priority support
|
56 |
|
57 |
= Additional Business Reviews Plugins =
|
@@ -74,6 +74,14 @@ Why limit your reviews to just Google Reviews? Check out our other free business
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
= 1.6.8 =
|
78 |
* Update plugin to WordPress 5.0
|
79 |
* Improve: added a default sorting by recent
|
4 |
Tags: google, reviews, google reviews, google places, google places reviews, testimonials, google review widget, google business reviews, slider, google review, review, google place review, google map reviews, google reviews pro, facebook reviews, facebook page reviews, yelp reviews, yelp business reviews
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 5.0
|
7 |
+
Stable tag: 1.6.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
24 |
|
25 |
* Free!
|
26 |
* SEO
|
27 |
+
* Trim long reviews with "read more" link
|
28 |
* Display up to 5 Google business reviews per location
|
29 |
* Keep all reviews in WordPress database
|
30 |
* Shows real reviews from G+ users to increase user confidence
|
31 |
* Easy search of place and instantly show reviews
|
32 |
+
* Custom business place photo
|
33 |
* Review list theme
|
34 |
* Pagination
|
35 |
* Support dark websites
|
37 |
* Zero load time regardless of your site
|
38 |
* Works even if Google is unavailable
|
39 |
|
40 |
+
= Get More Features with Business version! =
|
41 |
|
42 |
+
[Upgrade to Business](https://richplugins.com/google-reviews-pro-wordpress-plugin)
|
43 |
|
44 |
+
* Merge reviews between each other from different platforms (Google, Facebook, Yelp) and places
|
45 |
* Trying to get more than 5 Google reviews
|
46 |
* Google Rich Snippets (schema.org)
|
47 |
* Support shortcode, powerful <b>Shortcode Builder</b>
|
48 |
* Slider/Grid themes to show G+ reviews like testimonials
|
49 |
+
* Google Trust Badge (right/left fixed or embedded)
|
50 |
* 'Write a review' button to available leave Google review directly on your website
|
51 |
+
* Show/hide any elements (business, reviews, avatars, names, time and etc)
|
52 |
+
* Any Sorting: recent, oldest, rating, striped
|
53 |
+
* Include/Exclude words filter
|
|
|
54 |
* Minimum rating filter
|
|
|
|
|
55 |
* Priority support
|
56 |
|
57 |
= Additional Business Reviews Plugins =
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 1.6.9 =
|
78 |
+
* Improve: 'read more' link feature
|
79 |
+
* Improve: direct link to reviews on Google map
|
80 |
+
* Improve: language support of Google reviews
|
81 |
+
* Improve: added centered option
|
82 |
+
* Improve: update widget design
|
83 |
+
* Improve: update setting page design
|
84 |
+
|
85 |
= 1.6.8 =
|
86 |
* Update plugin to WordPress 5.0
|
87 |
* Improve: added a default sorting by recent
|
static/css/rplg-setting.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
font-size: 14px;
|
3 |
background-color:#fafafa;
|
4 |
}
|
@@ -213,4 +213,153 @@ input[type="checkbox"]:checked:before {
|
|
213 |
.bs-sidebar.affix,.bs-sidebar.affix-bottom {
|
214 |
width:263px
|
215 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
}
|
1 |
+
/*#wpcontent {
|
2 |
font-size: 14px;
|
3 |
background-color:#fafafa;
|
4 |
}
|
213 |
.bs-sidebar.affix,.bs-sidebar.affix-bottom {
|
214 |
width:263px
|
215 |
}
|
216 |
+
}*/
|
217 |
+
|
218 |
+
#wpcontent {
|
219 |
+
padding: 0;
|
220 |
+
}
|
221 |
+
|
222 |
+
.rplg-version {
|
223 |
+
position: absolute;
|
224 |
+
top: 6px;
|
225 |
+
right: 16px;
|
226 |
+
-webkit-border-radius: 3px;
|
227 |
+
-moz-border-radius: 3px;
|
228 |
+
border-radius: 3px;
|
229 |
+
display: inline-block;
|
230 |
+
margin: 20px 0 0;
|
231 |
+
padding: 6px 10px;
|
232 |
+
font-size: 12px;
|
233 |
+
line-height: 14px;
|
234 |
+
color: #FFF;
|
235 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
236 |
+
white-space: nowrap;
|
237 |
+
vertical-align: baseline;
|
238 |
+
background-color: #999;
|
239 |
+
}
|
240 |
+
|
241 |
+
.rplg-page-title {
|
242 |
+
font-size: 23px;
|
243 |
+
font-weight: 400;
|
244 |
+
margin: 0;
|
245 |
+
padding: 20px 0 0 20px;
|
246 |
+
line-height: 29px;
|
247 |
+
}
|
248 |
+
|
249 |
+
.rplg-page-title img {
|
250 |
+
vertical-align: middle;
|
251 |
+
}
|
252 |
+
|
253 |
+
.rplg-settings-workspace {
|
254 |
+
font-size: 14px;
|
255 |
+
margin: 20px;
|
256 |
+
padding: 20px;
|
257 |
+
background: #fff;
|
258 |
+
}
|
259 |
+
|
260 |
+
.rplg-settings-workspace p {
|
261 |
+
font-size: 14px;
|
262 |
+
}
|
263 |
+
|
264 |
+
.nav-tab.nav-tab-active {
|
265 |
+
box-shadow: none;
|
266 |
+
background: #fff;
|
267 |
+
border-bottom-color: #fff;
|
268 |
+
}
|
269 |
+
|
270 |
+
.rplg-field,
|
271 |
+
.rplg-field * {
|
272 |
+
box-sizing: border-box;
|
273 |
+
}
|
274 |
+
|
275 |
+
.rplg-field {
|
276 |
+
padding: 0 0 15px 0;
|
277 |
+
margin-top: 1em;
|
278 |
+
margin-bottom: 1em;
|
279 |
+
border-bottom: 1px dashed #ddd;
|
280 |
+
}
|
281 |
+
|
282 |
+
@media (min-width: 600px) {
|
283 |
+
.rplg-field {
|
284 |
+
display: flex;
|
285 |
+
flex-wrap: wrap;
|
286 |
+
}
|
287 |
+
.rplg-field-label {
|
288 |
+
flex: 0 0 25%;
|
289 |
+
padding-right: 4%;
|
290 |
+
}
|
291 |
+
.rplg-field-option {
|
292 |
+
flex: 0 0 75%;
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
.rplg-field input[type="text"] {
|
297 |
+
margin: 0;
|
298 |
+
padding: 5px 8px;
|
299 |
+
border-radius: 2px;
|
300 |
+
}
|
301 |
+
|
302 |
+
.rplg-field select {
|
303 |
+
width: 15em;
|
304 |
+
margin-left: 0;
|
305 |
+
}
|
306 |
+
|
307 |
+
.rplg-flex-row {
|
308 |
+
display: flex;
|
309 |
+
flex-flow: row wrap;
|
310 |
+
width: 100%;
|
311 |
+
}
|
312 |
+
|
313 |
+
.rplg-flex-col,
|
314 |
+
.rplg-flex-col3 {
|
315 |
+
box-sizing: border-box;
|
316 |
+
}
|
317 |
+
|
318 |
+
.rplg-flex-col:first-child,
|
319 |
+
.rplg-flex-col3:first-child {
|
320 |
+
padding-right: 10px;
|
321 |
+
}
|
322 |
+
|
323 |
+
@media (min-width: 700px) {
|
324 |
+
.rplg-flex-col {
|
325 |
+
width: 50%;
|
326 |
+
}
|
327 |
+
.rplg-flex-col3 {
|
328 |
+
width: 33.3%;
|
329 |
+
}
|
330 |
+
}
|
331 |
+
|
332 |
+
.rplg-support-question {
|
333 |
+
padding-bottom: 10px;
|
334 |
+
}
|
335 |
+
|
336 |
+
.rplg-alert {
|
337 |
+
font-size: 14px;
|
338 |
+
line-height: 1.846;
|
339 |
+
border: none;
|
340 |
+
color: #fff;
|
341 |
+
padding: 15px;
|
342 |
+
border: 1px solid transparent;
|
343 |
+
border-radius: 3px;
|
344 |
+
}
|
345 |
+
|
346 |
+
.rplg-alert-dismissable,
|
347 |
+
.rplg-alert-dismissible {
|
348 |
+
padding-right: 35px;
|
349 |
+
}
|
350 |
+
|
351 |
+
.rplg-alert-success {
|
352 |
+
color: #fff;
|
353 |
+
border-color: #d6e9c6;
|
354 |
+
background-color: #4caf50;
|
355 |
+
}
|
356 |
+
|
357 |
+
.rplg-alert a:not(.close),
|
358 |
+
.rplg-alert .alert-link {
|
359 |
+
color: #fff;
|
360 |
+
font-weight: bold;
|
361 |
+
}
|
362 |
+
|
363 |
+
.rplg-socials > * {
|
364 |
+
vertical-align: middle!important;
|
365 |
}
|
static/js/grw-finder.js
CHANGED
@@ -55,12 +55,16 @@ function grw_init(data) {
|
|
55 |
return false;
|
56 |
}
|
57 |
|
|
|
|
|
|
|
58 |
connectBtn.innerHTML = 'Please wait...';
|
59 |
connectBtn.disabled = true;
|
60 |
|
61 |
jQuery.post(grw_request_url('save'), {
|
62 |
-
placeid: placeId,
|
63 |
-
|
|
|
64 |
}, function(res) {
|
65 |
|
66 |
console.log('grw_debug:', res);
|
@@ -74,10 +78,12 @@ function grw_init(data) {
|
|
74 |
|
75 |
var nameEl = el.querySelector('.grw-google-place-name'),
|
76 |
placeIdEl = el.querySelector('.grw-google-place-id'),
|
|
|
77 |
photoEl = el.querySelector('.grw-place-photo');
|
78 |
|
79 |
nameEl.value = res.result.name;
|
80 |
placeIdEl.value = res.result.place_id;
|
|
|
81 |
photoEl.value = res.result.business_photo || res.result.icon;
|
82 |
|
83 |
var img = el.querySelector('.grw-place-photo-img');
|
55 |
return false;
|
56 |
}
|
57 |
|
58 |
+
var langEl = el.querySelector('.grw-lang'),
|
59 |
+
lang = langEl.options[langEl.selectedIndex].value;
|
60 |
+
|
61 |
connectBtn.innerHTML = 'Please wait...';
|
62 |
connectBtn.disabled = true;
|
63 |
|
64 |
jQuery.post(grw_request_url('save'), {
|
65 |
+
placeid : placeId,
|
66 |
+
lang : lang,
|
67 |
+
grw_wpnonce : jQuery('#grw_nonce').val()
|
68 |
}, function(res) {
|
69 |
|
70 |
console.log('grw_debug:', res);
|
78 |
|
79 |
var nameEl = el.querySelector('.grw-google-place-name'),
|
80 |
placeIdEl = el.querySelector('.grw-google-place-id'),
|
81 |
+
langEl = el.querySelector('.grw-place-lang'),
|
82 |
photoEl = el.querySelector('.grw-place-photo');
|
83 |
|
84 |
nameEl.value = res.result.name;
|
85 |
placeIdEl.value = res.result.place_id;
|
86 |
+
langEl.value = lang;
|
87 |
photoEl.value = res.result.business_photo || res.result.icon;
|
88 |
|
89 |
var img = el.querySelector('.grw-place-photo-img');
|