Version Description
- Improve: Added language setting
- Added Polish language (pl_PL)
- Added Portuguese language (pt_PT)
- Update plugin to WP 4.9
Download this release
Release Info
Developer | widgetpack |
Plugin | Google Reviews Widget |
Version | 1.5.8 |
Comparing to | |
See all releases |
Code changes from version 1.5.7 to 1.5.8
- grw-options.php +63 -1
- grw-reviews.php +6 -1
- grw-setting.php +64 -2
- grw-widget.php +1 -0
- grw.php +25 -6
- languages/grw-pl_PL.mo +0 -0
- languages/grw-pl_PL.po +30 -0
- languages/grw-pt_BR.mo +0 -0
- languages/grw-pt_BR.po +30 -0
- readme.txt +8 -2
- static/css/google-review.css +1 -1
- static/css/grw-setting.css +9 -2
- static/js/rplg.js +45 -9
- static/js/wpac-time.js +4 -1
grw-options.php
CHANGED
@@ -41,7 +41,7 @@
|
|
41 |
<div class="col-sm-12">
|
42 |
<?php echo grw_i('Pagination'); ?>
|
43 |
<select class="form-control" disabled >
|
44 |
-
<option value=""><?php echo grw_i('
|
45 |
<option value="10"><?php echo grw_i('10'); ?></option>
|
46 |
<option value="5"><?php echo grw_i('5'); ?></option>
|
47 |
<option value="4"><?php echo grw_i('4'); ?></option>
|
@@ -213,4 +213,66 @@
|
|
213 |
</label>
|
214 |
</div>
|
215 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
</div>
|
41 |
<div class="col-sm-12">
|
42 |
<?php echo grw_i('Pagination'); ?>
|
43 |
<select class="form-control" disabled >
|
44 |
+
<option value=""><?php echo grw_i('Disable'); ?></option>
|
45 |
<option value="10"><?php echo grw_i('10'); ?></option>
|
46 |
<option value="5"><?php echo grw_i('5'); ?></option>
|
47 |
<option value="4"><?php echo grw_i('4'); ?></option>
|
213 |
</label>
|
214 |
</div>
|
215 |
</div>
|
216 |
+
<div class="form-group">
|
217 |
+
<div class="col-sm-12">
|
218 |
+
<?php echo grw_i('Language of reviews'); ?>
|
219 |
+
<select id="<?php echo $this->get_field_id('reviews_lang'); ?>" name="<?php echo $this->get_field_name('reviews_lang'); ?>" class="form-control">
|
220 |
+
<option value="" <?php selected('', $reviews_lang); ?>><?php echo grw_i('Disable'); ?></option>
|
221 |
+
<option value="ar" <?php selected('ar', $reviews_lang); ?>><?php echo grw_i('Arabic'); ?></option>
|
222 |
+
<option value="bg" <?php selected('bg', $reviews_lang); ?>><?php echo grw_i('Bulgarian'); ?></option>
|
223 |
+
<option value="bn" <?php selected('bn', $reviews_lang); ?>><?php echo grw_i('Bengali'); ?></option>
|
224 |
+
<option value="ca" <?php selected('ca', $reviews_lang); ?>><?php echo grw_i('Catalan'); ?></option>
|
225 |
+
<option value="cs" <?php selected('cs', $reviews_lang); ?>><?php echo grw_i('Czech'); ?></option>
|
226 |
+
<option value="da" <?php selected('da', $reviews_lang); ?>><?php echo grw_i('Danish'); ?></option>
|
227 |
+
<option value="de" <?php selected('de', $reviews_lang); ?>><?php echo grw_i('German'); ?></option>
|
228 |
+
<option value="el" <?php selected('el', $reviews_lang); ?>><?php echo grw_i('Greek'); ?></option>
|
229 |
+
<option value="en" <?php selected('en', $reviews_lang); ?>><?php echo grw_i('English'); ?></option>
|
230 |
+
<option value="en-AU" <?php selected('en-AU', $reviews_lang); ?>><?php echo grw_i('English (Australian)'); ?></option>
|
231 |
+
<option value="en-GB" <?php selected('en-GB', $reviews_lang); ?>><?php echo grw_i('English (Great Britain)'); ?></option>
|
232 |
+
<option value="es" <?php selected('es', $reviews_lang); ?>><?php echo grw_i('Spanish'); ?></option>
|
233 |
+
<option value="eu" <?php selected('eu', $reviews_lang); ?>><?php echo grw_i('Basque'); ?></option>
|
234 |
+
<option value="eu" <?php selected('eu', $reviews_lang); ?>><?php echo grw_i('Basque'); ?></option>
|
235 |
+
<option value="fa" <?php selected('fa', $reviews_lang); ?>><?php echo grw_i('Farsi'); ?></option>
|
236 |
+
<option value="fi" <?php selected('fi', $reviews_lang); ?>><?php echo grw_i('Finnish'); ?></option>
|
237 |
+
<option value="fil" <?php selected('fil', $reviews_lang); ?>><?php echo grw_i('Filipino'); ?></option>
|
238 |
+
<option value="fr" <?php selected('fr', $reviews_lang); ?>><?php echo grw_i('French'); ?></option>
|
239 |
+
<option value="gl" <?php selected('gl', $reviews_lang); ?>><?php echo grw_i('Galician'); ?></option>
|
240 |
+
<option value="gu" <?php selected('gu', $reviews_lang); ?>><?php echo grw_i('Gujarati'); ?></option>
|
241 |
+
<option value="hi" <?php selected('hi', $reviews_lang); ?>><?php echo grw_i('Hindi'); ?></option>
|
242 |
+
<option value="hr" <?php selected('hr', $reviews_lang); ?>><?php echo grw_i('Croatian'); ?></option>
|
243 |
+
<option value="hu" <?php selected('hu', $reviews_lang); ?>><?php echo grw_i('Hungarian'); ?></option>
|
244 |
+
<option value="id" <?php selected('id', $reviews_lang); ?>><?php echo grw_i('Indonesian'); ?></option>
|
245 |
+
<option value="it" <?php selected('it', $reviews_lang); ?>><?php echo grw_i('Italian'); ?></option>
|
246 |
+
<option value="iw" <?php selected('iw', $reviews_lang); ?>><?php echo grw_i('Hebrew'); ?></option>
|
247 |
+
<option value="ja" <?php selected('ja', $reviews_lang); ?>><?php echo grw_i('Japanese'); ?></option>
|
248 |
+
<option value="kn" <?php selected('kn', $reviews_lang); ?>><?php echo grw_i('Kannada'); ?></option>
|
249 |
+
<option value="ko" <?php selected('ko', $reviews_lang); ?>><?php echo grw_i('Korean'); ?></option>
|
250 |
+
<option value="lt" <?php selected('lt', $reviews_lang); ?>><?php echo grw_i('Lithuanian'); ?></option>
|
251 |
+
<option value="lv" <?php selected('lv', $reviews_lang); ?>><?php echo grw_i('Latvian'); ?></option>
|
252 |
+
<option value="ml" <?php selected('ml', $reviews_lang); ?>><?php echo grw_i('Malayalam'); ?></option>
|
253 |
+
<option value="mr" <?php selected('mr', $reviews_lang); ?>><?php echo grw_i('Marathi'); ?></option>
|
254 |
+
<option value="nl" <?php selected('nl', $reviews_lang); ?>><?php echo grw_i('Dutch'); ?></option>
|
255 |
+
<option value="no" <?php selected('no', $reviews_lang); ?>><?php echo grw_i('Norwegian'); ?></option>
|
256 |
+
<option value="pl" <?php selected('pl', $reviews_lang); ?>><?php echo grw_i('Polish'); ?></option>
|
257 |
+
<option value="pt" <?php selected('pt', $reviews_lang); ?>><?php echo grw_i('Portuguese'); ?></option>
|
258 |
+
<option value="pt-BR" <?php selected('pt-BR', $reviews_lang); ?>><?php echo grw_i('Portuguese (Brazil)'); ?></option>
|
259 |
+
<option value="pt-PT" <?php selected('pt-PT', $reviews_lang); ?>><?php echo grw_i('Portuguese (Portugal)'); ?></option>
|
260 |
+
<option value="ro" <?php selected('ro', $reviews_lang); ?>><?php echo grw_i('Romanian'); ?></option>
|
261 |
+
<option value="ru" <?php selected('ru', $reviews_lang); ?>><?php echo grw_i('Russian'); ?></option>
|
262 |
+
<option value="sk" <?php selected('sk', $reviews_lang); ?>><?php echo grw_i('Slovak'); ?></option>
|
263 |
+
<option value="sl" <?php selected('sl', $reviews_lang); ?>><?php echo grw_i('Slovenian'); ?></option>
|
264 |
+
<option value="sr" <?php selected('sr', $reviews_lang); ?>><?php echo grw_i('Serbian'); ?></option>
|
265 |
+
<option value="sv" <?php selected('sv', $reviews_lang); ?>><?php echo grw_i('Swedish'); ?></option>
|
266 |
+
<option value="ta" <?php selected('ta', $reviews_lang); ?>><?php echo grw_i('Tamil'); ?></option>
|
267 |
+
<option value="te" <?php selected('te', $reviews_lang); ?>><?php echo grw_i('Telugu'); ?></option>
|
268 |
+
<option value="th" <?php selected('th', $reviews_lang); ?>><?php echo grw_i('Thai'); ?></option>
|
269 |
+
<option value="tl" <?php selected('tl', $reviews_lang); ?>><?php echo grw_i('Tagalog'); ?></option>
|
270 |
+
<option value="tr" <?php selected('tr', $reviews_lang); ?>><?php echo grw_i('Turkish'); ?></option>
|
271 |
+
<option value="uk" <?php selected('uk', $reviews_lang); ?>><?php echo grw_i('Ukrainian'); ?></option>
|
272 |
+
<option value="vi" <?php selected('vi', $reviews_lang); ?>><?php echo grw_i('Vietnamese'); ?></option>
|
273 |
+
<option value="zh-CN" <?php selected('zh-CN', $reviews_lang); ?>><?php echo grw_i('Chinese (Simplified)'); ?></option>
|
274 |
+
<option value="zh-TW" <?php selected('zh-TW', $reviews_lang); ?>><?php echo grw_i('Chinese (Traditional)'); ?></option>
|
275 |
+
</select>
|
276 |
+
</div>
|
277 |
+
</div>
|
278 |
</div>
|
grw-reviews.php
CHANGED
@@ -4,8 +4,13 @@ wp_enqueue_script('rplg_js', plugins_url('/static/js/rplg.js', __FILE__));
|
|
4 |
|
5 |
include_once(dirname(__FILE__) . '/grw-reviews-helper.php');
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
$place = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "grp_google_place WHERE place_id = %s", $place_id));
|
8 |
-
$reviews = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "grp_google_review WHERE google_place_id = %d", $place->id));
|
9 |
|
10 |
$rating = 0;
|
11 |
if ($place->rating > 0) {
|
4 |
|
5 |
include_once(dirname(__FILE__) . '/grw-reviews-helper.php');
|
6 |
|
7 |
+
$reviews_where = '';
|
8 |
+
if (strlen($reviews_lang) > 0) {
|
9 |
+
$reviews_where = $reviews_where . ' AND language = \'' . $reviews_lang . '\'';
|
10 |
+
}
|
11 |
+
|
12 |
$place = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "grp_google_place WHERE place_id = %s", $place_id));
|
13 |
+
$reviews = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "grp_google_review WHERE google_place_id = %d" . $reviews_where, $place->id));
|
14 |
|
15 |
$rating = 0;
|
16 |
if ($place->rating > 0) {
|
grw-setting.php
CHANGED
@@ -115,6 +115,7 @@ if (isset($_POST['grw_active']) && isset($_GET['grw_active'])) {
|
|
115 |
|
116 |
if (isset($_POST['grw_setting'])) {
|
117 |
update_option('grw_google_api_key', $_POST['grw_google_api_key']);
|
|
|
118 |
}
|
119 |
|
120 |
if (isset($_POST['grw_install_db'])) {
|
@@ -133,6 +134,7 @@ wp_enqueue_style('grw_setting_css', plugins_url('/static/css/grw-setting.css', _
|
|
133 |
|
134 |
$grw_enabled = get_option('grw_active') == '1';
|
135 |
$grw_google_api_key = get_option('grw_google_api_key');
|
|
|
136 |
?>
|
137 |
|
138 |
<span class="version"><?php echo grw_i('Free Version: %s', esc_html(GRW_VERSION)); ?></span>
|
@@ -250,9 +252,69 @@ $grw_google_api_key = get_option('grw_google_api_key');
|
|
250 |
<iframe src="//www.youtube.com/embed/uW-PTKeZAXs?rel=0" allowfullscreen=""></iframe>
|
251 |
</small>
|
252 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
<div class="form-group">
|
254 |
<input class="form-control" type="checkbox" id="grw_install_db" name="grw_install_db" >
|
255 |
-
<label class="control-label" for="grw_install_db"><?php echo grw_i('
|
256 |
</div>
|
257 |
<p class="submit" style="text-align: left">
|
258 |
<input name="grw_setting" type="submit" value="Save" class="button-primary button" tabindex="4">
|
@@ -263,7 +325,7 @@ $grw_google_api_key = get_option('grw_google_api_key');
|
|
263 |
<form method="POST" action="?page=grw&grw_active=<?php echo (string)((int)($grw_enabled != true)); ?>">
|
264 |
<?php wp_nonce_field('grw-wpnonce_grw_active', 'grw-form_nonce_grw_active'); ?>
|
265 |
<span class="status">
|
266 |
-
<?php echo grw_i('Google Reviews Widget are currently '). ($grw_enabled ? grw_i('enable') : grw_i('disable')); ?>
|
267 |
</span>
|
268 |
<input type="submit" name="grw_active" class="button" value="<?php echo $grw_enabled ? grw_i('Disable') : grw_i('Enable'); ?>" />
|
269 |
</form>
|
115 |
|
116 |
if (isset($_POST['grw_setting'])) {
|
117 |
update_option('grw_google_api_key', $_POST['grw_google_api_key']);
|
118 |
+
update_option('grw_language', $_POST['grw_language']);
|
119 |
}
|
120 |
|
121 |
if (isset($_POST['grw_install_db'])) {
|
134 |
|
135 |
$grw_enabled = get_option('grw_active') == '1';
|
136 |
$grw_google_api_key = get_option('grw_google_api_key');
|
137 |
+
$grw_language = get_option('grw_language');
|
138 |
?>
|
139 |
|
140 |
<span class="version"><?php echo grw_i('Free Version: %s', esc_html(GRW_VERSION)); ?></span>
|
252 |
<iframe src="//www.youtube.com/embed/uW-PTKeZAXs?rel=0" allowfullscreen=""></iframe>
|
253 |
</small>
|
254 |
</div>
|
255 |
+
<div class="form-group">
|
256 |
+
<label class="control-label"><?php echo grw_i('Google Places API language'); ?></label>
|
257 |
+
<select class="form-control" id="grw_language" name="grw_language">
|
258 |
+
<option value="" <?php selected('', $grw_language); ?>><?php echo grw_i('Disable'); ?></option>
|
259 |
+
<option value="ar" <?php selected('ar', $grw_language); ?>><?php echo grw_i('Arabic'); ?></option>
|
260 |
+
<option value="bg" <?php selected('bg', $grw_language); ?>><?php echo grw_i('Bulgarian'); ?></option>
|
261 |
+
<option value="bn" <?php selected('bn', $grw_language); ?>><?php echo grw_i('Bengali'); ?></option>
|
262 |
+
<option value="ca" <?php selected('ca', $grw_language); ?>><?php echo grw_i('Catalan'); ?></option>
|
263 |
+
<option value="cs" <?php selected('cs', $grw_language); ?>><?php echo grw_i('Czech'); ?></option>
|
264 |
+
<option value="da" <?php selected('da', $grw_language); ?>><?php echo grw_i('Danish'); ?></option>
|
265 |
+
<option value="de" <?php selected('de', $grw_language); ?>><?php echo grw_i('German'); ?></option>
|
266 |
+
<option value="el" <?php selected('el', $grw_language); ?>><?php echo grw_i('Greek'); ?></option>
|
267 |
+
<option value="en" <?php selected('en', $grw_language); ?>><?php echo grw_i('English'); ?></option>
|
268 |
+
<option value="en-AU" <?php selected('en-AU', $grw_language); ?>><?php echo grw_i('English (Australian)'); ?></option>
|
269 |
+
<option value="en-GB" <?php selected('en-GB', $grw_language); ?>><?php echo grw_i('English (Great Britain)'); ?></option>
|
270 |
+
<option value="es" <?php selected('es', $grw_language); ?>><?php echo grw_i('Spanish'); ?></option>
|
271 |
+
<option value="eu" <?php selected('eu', $grw_language); ?>><?php echo grw_i('Basque'); ?></option>
|
272 |
+
<option value="eu" <?php selected('eu', $grw_language); ?>><?php echo grw_i('Basque'); ?></option>
|
273 |
+
<option value="fa" <?php selected('fa', $grw_language); ?>><?php echo grw_i('Farsi'); ?></option>
|
274 |
+
<option value="fi" <?php selected('fi', $grw_language); ?>><?php echo grw_i('Finnish'); ?></option>
|
275 |
+
<option value="fil" <?php selected('fil', $grw_language); ?>><?php echo grw_i('Filipino'); ?></option>
|
276 |
+
<option value="fr" <?php selected('fr', $grw_language); ?>><?php echo grw_i('French'); ?></option>
|
277 |
+
<option value="gl" <?php selected('gl', $grw_language); ?>><?php echo grw_i('Galician'); ?></option>
|
278 |
+
<option value="gu" <?php selected('gu', $grw_language); ?>><?php echo grw_i('Gujarati'); ?></option>
|
279 |
+
<option value="hi" <?php selected('hi', $grw_language); ?>><?php echo grw_i('Hindi'); ?></option>
|
280 |
+
<option value="hr" <?php selected('hr', $grw_language); ?>><?php echo grw_i('Croatian'); ?></option>
|
281 |
+
<option value="hu" <?php selected('hu', $grw_language); ?>><?php echo grw_i('Hungarian'); ?></option>
|
282 |
+
<option value="id" <?php selected('id', $grw_language); ?>><?php echo grw_i('Indonesian'); ?></option>
|
283 |
+
<option value="it" <?php selected('it', $grw_language); ?>><?php echo grw_i('Italian'); ?></option>
|
284 |
+
<option value="iw" <?php selected('iw', $grw_language); ?>><?php echo grw_i('Hebrew'); ?></option>
|
285 |
+
<option value="ja" <?php selected('ja', $grw_language); ?>><?php echo grw_i('Japanese'); ?></option>
|
286 |
+
<option value="kn" <?php selected('kn', $grw_language); ?>><?php echo grw_i('Kannada'); ?></option>
|
287 |
+
<option value="ko" <?php selected('ko', $grw_language); ?>><?php echo grw_i('Korean'); ?></option>
|
288 |
+
<option value="lt" <?php selected('lt', $grw_language); ?>><?php echo grw_i('Lithuanian'); ?></option>
|
289 |
+
<option value="lv" <?php selected('lv', $grw_language); ?>><?php echo grw_i('Latvian'); ?></option>
|
290 |
+
<option value="ml" <?php selected('ml', $grw_language); ?>><?php echo grw_i('Malayalam'); ?></option>
|
291 |
+
<option value="mr" <?php selected('mr', $grw_language); ?>><?php echo grw_i('Marathi'); ?></option>
|
292 |
+
<option value="nl" <?php selected('nl', $grw_language); ?>><?php echo grw_i('Dutch'); ?></option>
|
293 |
+
<option value="no" <?php selected('no', $grw_language); ?>><?php echo grw_i('Norwegian'); ?></option>
|
294 |
+
<option value="pl" <?php selected('pl', $grw_language); ?>><?php echo grw_i('Polish'); ?></option>
|
295 |
+
<option value="pt" <?php selected('pt', $grw_language); ?>><?php echo grw_i('Portuguese'); ?></option>
|
296 |
+
<option value="pt-BR" <?php selected('pt-BR', $grw_language); ?>><?php echo grw_i('Portuguese (Brazil)'); ?></option>
|
297 |
+
<option value="pt-PT" <?php selected('pt-PT', $grw_language); ?>><?php echo grw_i('Portuguese (Portugal)'); ?></option>
|
298 |
+
<option value="ro" <?php selected('ro', $grw_language); ?>><?php echo grw_i('Romanian'); ?></option>
|
299 |
+
<option value="ru" <?php selected('ru', $grw_language); ?>><?php echo grw_i('Russian'); ?></option>
|
300 |
+
<option value="sk" <?php selected('sk', $grw_language); ?>><?php echo grw_i('Slovak'); ?></option>
|
301 |
+
<option value="sl" <?php selected('sl', $grw_language); ?>><?php echo grw_i('Slovenian'); ?></option>
|
302 |
+
<option value="sr" <?php selected('sr', $grw_language); ?>><?php echo grw_i('Serbian'); ?></option>
|
303 |
+
<option value="sv" <?php selected('sv', $grw_language); ?>><?php echo grw_i('Swedish'); ?></option>
|
304 |
+
<option value="ta" <?php selected('ta', $grw_language); ?>><?php echo grw_i('Tamil'); ?></option>
|
305 |
+
<option value="te" <?php selected('te', $grw_language); ?>><?php echo grw_i('Telugu'); ?></option>
|
306 |
+
<option value="th" <?php selected('th', $grw_language); ?>><?php echo grw_i('Thai'); ?></option>
|
307 |
+
<option value="tl" <?php selected('tl', $grw_language); ?>><?php echo grw_i('Tagalog'); ?></option>
|
308 |
+
<option value="tr" <?php selected('tr', $grw_language); ?>><?php echo grw_i('Turkish'); ?></option>
|
309 |
+
<option value="uk" <?php selected('uk', $grw_language); ?>><?php echo grw_i('Ukrainian'); ?></option>
|
310 |
+
<option value="vi" <?php selected('vi', $grw_language); ?>><?php echo grw_i('Vietnamese'); ?></option>
|
311 |
+
<option value="zh-CN" <?php selected('zh-CN', $grw_language); ?>><?php echo grw_i('Chinese (Simplified)'); ?></option>
|
312 |
+
<option value="zh-TW" <?php selected('zh-TW', $grw_language); ?>><?php echo grw_i('Chinese (Traditional)'); ?></option>
|
313 |
+
</select>
|
314 |
+
</div>
|
315 |
<div class="form-group">
|
316 |
<input class="form-control" type="checkbox" id="grw_install_db" name="grw_install_db" >
|
317 |
+
<label class="control-label" for="grw_install_db"><?php echo grw_i('Re-create the DB tables for the plugin (service option)'); ?></label>
|
318 |
</div>
|
319 |
<p class="submit" style="text-align: left">
|
320 |
<input name="grw_setting" type="submit" value="Save" class="button-primary button" tabindex="4">
|
325 |
<form method="POST" action="?page=grw&grw_active=<?php echo (string)((int)($grw_enabled != true)); ?>">
|
326 |
<?php wp_nonce_field('grw-wpnonce_grw_active', 'grw-form_nonce_grw_active'); ?>
|
327 |
<span class="status">
|
328 |
+
<?php echo grw_i('Google Reviews Widget are currently '). '<b>' .($grw_enabled ? grw_i('enable') : grw_i('disable')). '</b>'; ?>
|
329 |
</span>
|
330 |
<input type="submit" name="grw_active" class="button" value="<?php echo $grw_enabled ? grw_i('Disable') : grw_i('Enable'); ?>" />
|
331 |
</form>
|
grw-widget.php
CHANGED
@@ -23,6 +23,7 @@ class Goog_Reviews_Widget extends WP_Widget {
|
|
23 |
'view_mode' => '',
|
24 |
'open_link' => true,
|
25 |
'nofollow_link' => true,
|
|
|
26 |
);
|
27 |
|
28 |
public function __construct() {
|
23 |
'view_mode' => '',
|
24 |
'open_link' => true,
|
25 |
'nofollow_link' => true,
|
26 |
+
'reviews_lang' => '',
|
27 |
);
|
28 |
|
29 |
public function __construct() {
|
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.5.
|
8 |
Author URI: https://richplugins.com
|
9 |
*/
|
10 |
|
@@ -13,7 +13,7 @@ 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', '1.5.
|
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__)));
|
@@ -23,6 +23,7 @@ function grw_options() {
|
|
23 |
'grw_version',
|
24 |
'grw_active',
|
25 |
'grw_google_api_key',
|
|
|
26 |
);
|
27 |
}
|
28 |
|
@@ -187,6 +188,12 @@ function grw_request_handler() {
|
|
187 |
|
188 |
$grw_google_api_key = get_option('grw_google_api_key');
|
189 |
$url = GRW_GOOGLE_PLACE_API . 'textsearch/json?query=' . $_GET['query'] . '&key=' . $grw_google_api_key;
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
$response = rplg_urlopen($url);
|
191 |
|
192 |
$response_data = $response['data'];
|
@@ -206,8 +213,8 @@ function grw_request_handler() {
|
|
206 |
} else {
|
207 |
check_admin_referer('grw_wpnonce', 'grw_wpnonce');
|
208 |
|
209 |
-
$
|
210 |
-
|
211 |
$response = rplg_urlopen($url);
|
212 |
|
213 |
$response_data = $response['data'];
|
@@ -227,8 +234,8 @@ function grw_request_handler() {
|
|
227 |
} else {
|
228 |
check_admin_referer('grw_wpnonce', 'grw_wpnonce');
|
229 |
|
230 |
-
$
|
231 |
-
|
232 |
$response = rplg_urlopen($url);
|
233 |
|
234 |
$response_data = $response['data'];
|
@@ -315,6 +322,18 @@ function grw_enabled() {
|
|
315 |
return true;
|
316 |
}
|
317 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
function grw_does_need_update() {
|
319 |
$version = (string)get_option('grw_version');
|
320 |
if (empty($version)) {
|
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.5.8
|
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.5.8');
|
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__)));
|
23 |
'grw_version',
|
24 |
'grw_active',
|
25 |
'grw_google_api_key',
|
26 |
+
'grw_language',
|
27 |
);
|
28 |
}
|
29 |
|
188 |
|
189 |
$grw_google_api_key = get_option('grw_google_api_key');
|
190 |
$url = GRW_GOOGLE_PLACE_API . 'textsearch/json?query=' . $_GET['query'] . '&key=' . $grw_google_api_key;
|
191 |
+
|
192 |
+
$grw_language = get_option('grw_language');
|
193 |
+
if (strlen($grw_language) > 0) {
|
194 |
+
$url = $url . '&language=' . $grw_language;
|
195 |
+
}
|
196 |
+
|
197 |
$response = rplg_urlopen($url);
|
198 |
|
199 |
$response_data = $response['data'];
|
213 |
} else {
|
214 |
check_admin_referer('grw_wpnonce', 'grw_wpnonce');
|
215 |
|
216 |
+
$url = grw_api_url($_GET['placeid']);
|
217 |
+
|
218 |
$response = rplg_urlopen($url);
|
219 |
|
220 |
$response_data = $response['data'];
|
234 |
} else {
|
235 |
check_admin_referer('grw_wpnonce', 'grw_wpnonce');
|
236 |
|
237 |
+
$url = grw_api_url($_POST['placeid']);
|
238 |
+
|
239 |
$response = rplg_urlopen($url);
|
240 |
|
241 |
$response_data = $response['data'];
|
322 |
return true;
|
323 |
}
|
324 |
|
325 |
+
function grw_api_url($placeid, $reviews_lang = '') {
|
326 |
+
$grw_google_api_key = get_option('grw_google_api_key');
|
327 |
+
$url = GRW_GOOGLE_PLACE_API . 'details/json?placeid=' . $placeid . '&key=' . $grw_google_api_key;
|
328 |
+
|
329 |
+
$grw_language = strlen($reviews_lang) > 0 ? $reviews_lang : get_option('grw_language');
|
330 |
+
if (strlen($grw_language) > 0) {
|
331 |
+
$url = $url . '&language=' . $grw_language;
|
332 |
+
}
|
333 |
+
return $url;
|
334 |
+
}
|
335 |
+
|
336 |
+
|
337 |
function grw_does_need_update() {
|
338 |
$version = (string)get_option('grw_version');
|
339 |
if (empty($version)) {
|
languages/grw-pl_PL.mo
ADDED
Binary file
|
languages/grw-pl_PL.po
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Language: pl_PL\n"
|
4 |
+
"MIME-Version: 1.0\n"
|
5 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
6 |
+
"Content-Transfer-Encoding: 8bit\n"
|
7 |
+
"X-Generator: Poedit 1.8.11\n"
|
8 |
+
"Project-Id-Version: \n"
|
9 |
+
"POT-Creation-Date: \n"
|
10 |
+
"PO-Revision-Date: \n"
|
11 |
+
"Last-Translator: \n"
|
12 |
+
"Language-Team: \n"
|
13 |
+
|
14 |
+
msgid "Google Rating"
|
15 |
+
msgstr "Ocena Google"
|
16 |
+
|
17 |
+
msgid "See All Reviews"
|
18 |
+
msgstr "Zobacz wszystkie opinie"
|
19 |
+
|
20 |
+
msgid "Google User"
|
21 |
+
msgstr "Użytkownik Google"
|
22 |
+
|
23 |
+
msgid "read more"
|
24 |
+
msgstr "czytaj więcej"
|
25 |
+
|
26 |
+
msgid "Next Reviews"
|
27 |
+
msgstr "Następne Opinie"
|
28 |
+
|
29 |
+
msgid "Write a review"
|
30 |
+
msgstr "Napisz Opinię"
|
languages/grw-pt_BR.mo
ADDED
Binary file
|
languages/grw-pt_BR.po
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Language: pt_BR\n"
|
4 |
+
"MIME-Version: 1.0\n"
|
5 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
6 |
+
"Content-Transfer-Encoding: 8bit\n"
|
7 |
+
"X-Generator: Poedit 1.8.11\n"
|
8 |
+
"Project-Id-Version: \n"
|
9 |
+
"POT-Creation-Date: \n"
|
10 |
+
"PO-Revision-Date: \n"
|
11 |
+
"Last-Translator: \n"
|
12 |
+
"Language-Team: \n"
|
13 |
+
|
14 |
+
msgid "Google Rating"
|
15 |
+
msgstr "Classificação no Google"
|
16 |
+
|
17 |
+
msgid "See All Reviews"
|
18 |
+
msgstr "Veja todas as avaliações"
|
19 |
+
|
20 |
+
msgid "Google User"
|
21 |
+
msgstr "Usuário do Google"
|
22 |
+
|
23 |
+
msgid "read more"
|
24 |
+
msgstr "leia mais"
|
25 |
+
|
26 |
+
msgid "Next Reviews"
|
27 |
+
msgstr "Próximas avaliações"
|
28 |
+
|
29 |
+
msgid "Write a review"
|
30 |
+
msgstr "Escreva uma avaliação"
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: richplugins
|
|
3 |
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: 4.
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -73,6 +73,12 @@ Why limit your reviews to just Google Reviews? Check out our other free business
|
|
73 |
|
74 |
== Changelog ==
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
= 1.5.7 =
|
77 |
* Widget options description corrected
|
78 |
* Bugfix: widget options loop
|
3 |
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: 4.9
|
7 |
+
Stable tag: 1.5.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
73 |
|
74 |
== Changelog ==
|
75 |
|
76 |
+
= 1.5.8 =
|
77 |
+
* Improve: Added language setting
|
78 |
+
* Added Polish language (pl_PL)
|
79 |
+
* Added Portuguese language (pt_PT)
|
80 |
+
* Update plugin to WP 4.9
|
81 |
+
|
82 |
= 1.5.7 =
|
83 |
* Widget options description corrected
|
84 |
* Bugfix: widget options loop
|
static/css/google-review.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wpac,.wpac h1,.wpac h2,.wpac h3,.wpac h4,.wpac h5,.wpac h6,.wpac p,.wpac td,.wpac dl,.wpac tr,.wpac dt,.wpac ol,.wpac form,.wpac select,.wpac option,.wpac pre,.wpac div,.wpac table,.wpac th,.wpac tbody,.wpac tfoot,.wpac caption,.wpac thead,.wpac ul,.wpac li,.wpac address,.wpac blockquote,.wpac dd,.wpac fieldset,.wpac li,.wpac strong,.wpac legend,.wpac em,.wpac s,.wpac cite,.wpac span,.wpac input,.wpac sup,.wpac label,.wpac dfn,.wpac object,.wpac big,.wpac q,.wpac font,.wpac samp,.wpac acronym,.wpac small,.wpac img,.wpac strike,.wpac code,.wpac sub,.wpac ins,.wpac textarea,.wpac var,.wpac a,.wpac abbr,.wpac applet,.wpac del,.wpac kbd,.wpac tt,.wpac b,.wpac i,.wpac hr{background-attachment:scroll!important;background-color:transparent!important;background-image:none!important;background-position:0 0!important;background-repeat:repeat!important;border-color:black!important;border-color:currentColor!important;border-radius:0!important;border-style:none!important;border-width:medium!important;bottom:auto!important;clear:none!important;clip:auto!important;color:inherit!important;counter-increment:none!important;counter-reset:none!important;cursor:auto!important;direction:inherit!important;display:inline;float:none!important;font-family:inherit!important;font-size:inherit!important;font-style:inherit!important;font-variant:normal!important;font-weight:inherit!important;height:auto;left:auto!important;letter-spacing:normal!important;line-height:inherit!important;list-style-type:inherit!important;list-style-position:outside!important;list-style-image:none!important;margin:0!important;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:1;outline:invert none medium!important;overflow:visible!important;padding:0!important;position:static!important;quotes:"" ""!important;right:auto!important;table-layout:auto!important;text-align:inherit!important;text-decoration:inherit!important;text-indent:0!important;text-transform:none!important;top:auto!important;unicode-bidi:normal!important;vertical-align:baseline!important;visibility:inherit!important;white-space:normal!important;width:auto!important;word-spacing:normal!important;z-index:auto!important;-moz-border-radius:0!important;-webkit-border-radius:0!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important;box-sizing:border-box!important;text-shadow:none!important;-webkit-transition:none!important;transition:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.wpac,.wpac h3,.wpac h5,.wpac p,.wpac h1,.wpac dl,.wpac dt,.wpac h6,.wpac ol,.wpac form,.wpac select,.wpac option,.wpac pre,.wpac div,.wpac h2,.wpac caption,.wpac h4,.wpac ul,.wpac address,.wpac blockquote,.wpac dd,.wpac fieldset,.wpac textarea,.wpac hr{display:block}.wpac table{display:table}.wpac tbody{display:table-row-group}.wpac tr{display:table-row}.wpac td{display:table-cell}.wpac ul{list-style-type:none!important}.wpac li{display:list-item;min-height:auto!important;min-width:auto!important}.wpac a,.wpac a *,.wpac input[type=submit],.wpac input[type=radio],.wpac input[type=checkbox],.wpac select{cursor:pointer!important}.wpac a:hover{text-decoration:none!important}.wpac button,.wpac input[type=submit]{height:auto!important;text-align:center!important}.wpac input[type=hidden]{display:none}.wpac select{-webkit-appearance:menulist!important;-moz-appearance:menulist!important;appearance:menulist!important}.wpac input[type=checkbox]{-webkit-appearance:checkbox!important;-moz-appearance:checkbox!important;appearance:checkbox!important}.wpac input[type="checkbox"]:before,.wpac input[type="checkbox"]:after{content:none!important;border:0!important}.wpac input[type=radio]{-webkit-appearance:radio!important;-moz-appearance:radio!important;appearance:radio!important}.wpac input[type="radio"]:before,.wpac input[type="radio"]:after{content:none!important;border:0!important}.wpac li:before,.wpac li:after{content:""!important}.wpac input,.wpac select{vertical-align:middle!important}.wpac select,.wpac textarea,.wpac input{border:1px solid #ccc!important}.wpac table{border-collapse:collapse!important;border-spacing:0!important}.wpac *[dir=rtl]{direction:rtl!important}.wpac img{border:0!important}.wpac svg{vertical-align:middle!important;-moz-box-sizing:content-box!important;-webkit-box-sizing:content-box!important;box-sizing:content-box!important}.wpac{font-size:14px!important;line-height:20px!important;direction:ltr!important;text-align:left!important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important;color:#333!important;font-style:normal!important;font-weight:normal!important;text-decoration:none!important;list-style-type:disc!important}.wpac .wp-sheet{position:fixed!important;bottom:0!important;right:0!important;height:100%!important;width:368px!important;z-index:1999999000!important;transition:all .2s ease-in-out!important}@media(max-width:460px){.wpac .wp-sheet{width:100%!important}}.wpac .wp-sheet-head{position:absolute!important;top:0!important;right:0!important;width:100%!important;height:48px!important;background:#fff!important;box-shadow:0 1px 2px 0 rgba(0,0,0,.12)!important;z-index:1999999002!important}.wpac .wp-sheet-head-inner{position:absolute!important;left:20px!important;top:0!important;width:100%!important;height:100%!important;line-height:48px!important;z-index:1999999000!important}.wpac .wp-sheet-head-close{position:relative!important;height:49px!important;float:right!important;color:#aaa!important;font-size:28px!important;line-height:48px!important;margin:0 20px 0 15px!important;z-index:1999999001!important;transition:all .2s ease-in-out!important}.wpac .wp-sheet-head-close:hover{color:#555!important}.wpac .wp-sheet-body{position:absolute!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;background:rgba(250,250,251,.98)!important;border-left:1px solid #dadee2!important;box-shadow:0 0 4px 1px rgba(0,0,0,.08)!important;z-index:1999999000!important}.wpac .wp-sheet-content{position:absolute!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;opacity:0!important;overflow-y:auto!important;z-index:1999999001!important;transition:all .2s ease-in-out!important;-webkit-transform:translateZ(0)!important}.wpac .wp-sheet-content.wp-sheet-ready{opacity:1.0!important}.wpac .wp-sheet-content-inner{position:relative!important;min-height:100%!important;margin:0 auto!important}.wpac .wp-sheet-footer{position:absolute!important;bottom:0!important;right:0!important;left:1px!important;width:100%!important;z-index:1999999002!important;background:rgba(250,250,251,.98)!important}.wp-gr .wp-google-badge{display:inline-block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;box-shadow:0 2px 5px 0 rgba(0,0,0,.26)!important;}.wp-gr .wp-google-badge-fixed{position:fixed!important;right:30px!important;bottom:30px!important;max-width:none!important;z-index:2147482999!important;box-shadow:0 2px 5px 0 rgba(0,0,0,.26)!important;}.wp-gr .wp-google-badge_left-fixed{position:fixed!important;left:30px!important;bottom:30px!important;max-width:none!important;z-index:2147482999!important}.wp-gr .wp-google-badge *{cursor:pointer!important}.wp-gr .wp-google-border{width:100%!important;height:6px!important;background:#4fce6a!important;border-radius:2px 2px 0 0!important;}.wp-gr .wp-google-badge-btn{position:relative!important;padding:10px!important;background:#fff!important;transition:all .2s ease-in-out!important;border-radius:2px!important;}.wp-gr .wp-google-badge-btn:hover{background:#f3f3f5!important}.wp-gr .wp-google-logo{position:absolute!important;top:10px!important}.wp-gr .wp-google-badge-score{display:inline-block;margin:0 0 0 4px!important;vertical-align:middle!important;}.wp-gr .wp-google-rating{color:#e7711b!important;font-size:20px!important;margin:0 6px 0 0!important;vertical-align:middle!important}.wp-gr .wp-google-stars .wp-star{padding:0 4px 0 0!important;line-height:22px!important}.wp-gr .wp-google-powered{margin:6px 0 0!important}.wp-gr .wp-google-form .wp-google-reviews{padding:16px 16px 0!important}.wp-gr .wp-google-review{margin-top:15px!important}.wp-gr .wp-google-left{display:table-cell!important;padding-right:10px!important;vertical-align:top!important}.wp-gr .wp-google-left img{border:none!important;float:left!important;height:50px!important;width:50px!important;margin-right:5px!important;border-radius:50%!important}.wp-gr .wp-google-reviews img{border-radius:50%!important}.wp-gr .wp-google-right{display:table-cell!important;vertical-align:top!important;width:10000px!important}.wp-gr .wp-google-place .wp-star svg{width:18px!important;height:18px!important}.wp-gr .wp-google-review .wp-star svg{width:16px!important;height:16px!important}.wp-gr .wp-google-name{color:black!important;font-size:100%!important;font-weight:bold!important;margin:0 0 2px!important;padding-right:6px!important;text-decoration:none!important}.wp-gr a.wp-google-name{color:#427fed!important;text-decoration:none!important}.wp-gr .wp-google-time{color:#999!important;font-size:13px!important}.wp-gr .wp-google-text{color:#222!important;font-size:13px!important;line-height:18px!important;max-width:100%!important;overflow:hidden!important;white-space:pre-wrap!important}.wp-gr .wp-google-text .wp-google-stars{padding-right:7px!important}.wp-gr .wp-more{display:none}.wp-gr .wp-more-toggle{color:#136aaf!important;cursor:pointer!important;text-decoration:underline!important}.wp-gr .wp-google-url{display:block;margin:10px 0!important;color:#2c7cff!important;text-align:center!important}.wp-gr .wp-google-form{position:fixed!important;bottom:0!important;right:0!important;height:100%!important;width:368px!important;z-index:2147483000!important}.wp-gr .wp-google-form.wp-google-form-left{left:0!important;}@media(max-width:460px){.wp-gr .wp-google-form{width:100%!important}}.wp-gr .wp-google-head{position:absolute!important;top:0!important;right:0!important;width:100%!important;height:80px!important;background:#fff!important;padding:10px 16px!important;overflow:hidden!important;box-shadow:0 1px 2px 0 rgba(0,0,0,.12)!important;z-index:2147483002!important}.wp-gr .wp-google-head-inner{z-index:2147483000!important;position:absolute!important;left:20px!important;top:20px!important;width:100%!important;height:100%!important;pointer-events:none!important}.wp-gr .wp-google-close{padding:0!important;cursor:pointer!important;outline:0!important;border:0!important;background:0 0!important;min-height:0!important;width:auto!important;float:right!important;font-size:32px!important;font-weight:500!important;line-height:.6!important;color:#999!important;-webkit-appearance:none!important}.wp-gr .wp-google-close:hover{color:#555!important}.wp-gr .wp-google-body{position:absolute!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;background:rgba(250,250,251,.98)!important;border-left:1px solid #dadee2!important;box-shadow:0 0 4px 1px rgba(0,0,0,.08)!important;z-index:2147483000!important}.wp-gr .wp-google-content{position:absolute!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;overflow-y:auto!important;z-index:2147483001!important;-webkit-transform:translateZ(0)!important}.wp-gr .wp-google-content{top:80px!important;bottom:48px!important}.wp-gr .wp-google-content-inner{position:relative!important;min-height:100%!important;margin:0 auto!important}.wp-gr .wp-google-footer{position:absolute!important;bottom:0!important;right:0!important;width:100%!important;height:48px!important;text-align:center!important;z-index:2147483002!important;background:#fff!important;box-shadow:0 -1px 2px 0 rgba(0,0,0,.06)!important;-moz-text-align-last:center!important;text-align-last:center!important}.wp-gr .wp-google-footer img{float:right!important;padding:16px!important}.wp-gr .wp-dark .wp-google-name{color:#eee!important}.wp-gr .wp-dark .wp-google-time{color:#bbb!important}.wp-gr .wp-dark .wp-google-text{color:#ececec!important}.wp-gr.wpac .wp-google-name{font-size:100%!important}.wp-gr.wpac .wp-google-hide{display:none}.wp-gr.wpac .wp-google-name a{color:#333!important;font-size:100%!important;text-decoration:none!important}.wp-gr.wpac .wp-google-left img{width:50px!important;height:50px!important;border-radius:50%!important}.wp-gr.wpac a.wp-google-name{color:#427fed!important;text-decoration:none!important}.wp-gr.wpac .wp-google-place .wp-star svg{width:18px;height:18px}.wp-gr.wpac .wp-google-review .wp-google-stars{display:inline-block;margin-right:4px!important}.wp-gr.wpac .wp-google-review .wp-star svg{width:16px;height:16px}.wp-gr.wpac .wp-dark .wp-google-name a{color:#eee!important}.wp-gr .wp-google-richsnippet{color:#999!important;font-size:12px!important;line-height:16px!important;margin-top:6px!important;border-top:1px solid #eee!important;padding-top:4px!important;}
|
1 |
+
.wpac,.wpac h1,.wpac h2,.wpac h3,.wpac h4,.wpac h5,.wpac h6,.wpac p,.wpac td,.wpac dl,.wpac tr,.wpac dt,.wpac ol,.wpac form,.wpac select,.wpac option,.wpac pre,.wpac div,.wpac table,.wpac th,.wpac tbody,.wpac tfoot,.wpac caption,.wpac thead,.wpac ul,.wpac li,.wpac address,.wpac blockquote,.wpac dd,.wpac fieldset,.wpac li,.wpac strong,.wpac legend,.wpac em,.wpac s,.wpac cite,.wpac span,.wpac input,.wpac sup,.wpac label,.wpac dfn,.wpac object,.wpac big,.wpac q,.wpac font,.wpac samp,.wpac acronym,.wpac small,.wpac img,.wpac strike,.wpac code,.wpac sub,.wpac ins,.wpac textarea,.wpac var,.wpac a,.wpac abbr,.wpac applet,.wpac del,.wpac kbd,.wpac tt,.wpac b,.wpac i,.wpac hr{background-attachment:scroll!important;background-color:transparent!important;background-image:none!important;background-position:0 0!important;background-repeat:repeat!important;border-color:black!important;border-color:currentColor!important;border-radius:0!important;border-style:none!important;border-width:medium!important;bottom:auto!important;clear:none!important;clip:auto!important;color:inherit!important;counter-increment:none!important;counter-reset:none!important;cursor:auto!important;direction:inherit!important;display:inline;float:none!important;font-family:inherit!important;font-size:inherit!important;font-style:inherit!important;font-variant:normal!important;font-weight:inherit!important;height:auto;left:auto!important;letter-spacing:normal!important;line-height:inherit!important;list-style-type:inherit!important;list-style-position:outside!important;list-style-image:none!important;margin:0!important;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:1;outline:invert none medium!important;overflow:visible!important;padding:0!important;position:static!important;quotes:"" ""!important;right:auto!important;table-layout:auto!important;text-align:inherit!important;text-decoration:inherit!important;text-indent:0!important;text-transform:none!important;top:auto!important;unicode-bidi:normal!important;vertical-align:baseline!important;visibility:inherit!important;white-space:normal!important;width:auto!important;word-spacing:normal!important;z-index:auto!important;-moz-border-radius:0!important;-webkit-border-radius:0!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important;box-sizing:border-box!important;text-shadow:none!important;-webkit-transition:none!important;transition:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.wpac,.wpac h3,.wpac h5,.wpac p,.wpac h1,.wpac dl,.wpac dt,.wpac h6,.wpac ol,.wpac form,.wpac select,.wpac option,.wpac pre,.wpac div,.wpac h2,.wpac caption,.wpac h4,.wpac ul,.wpac address,.wpac blockquote,.wpac dd,.wpac fieldset,.wpac textarea,.wpac hr{display:block}.wpac table{display:table}.wpac tbody{display:table-row-group}.wpac tr{display:table-row}.wpac td{display:table-cell}.wpac ul{list-style-type:none!important}.wpac li{display:list-item;min-height:auto!important;min-width:auto!important}.wpac a,.wpac a *,.wpac input[type=submit],.wpac input[type=radio],.wpac input[type=checkbox],.wpac select{cursor:pointer!important}.wpac a:hover{text-decoration:none!important}.wpac button,.wpac input[type=submit]{height:auto!important;text-align:center!important}.wpac input[type=hidden]{display:none}.wpac select{-webkit-appearance:menulist!important;-moz-appearance:menulist!important;appearance:menulist!important}.wpac input[type=checkbox]{-webkit-appearance:checkbox!important;-moz-appearance:checkbox!important;appearance:checkbox!important}.wpac input[type="checkbox"]:before,.wpac input[type="checkbox"]:after{content:none!important;border:0!important}.wpac input[type=radio]{-webkit-appearance:radio!important;-moz-appearance:radio!important;appearance:radio!important}.wpac input[type="radio"]:before,.wpac input[type="radio"]:after{content:none!important;border:0!important}.wpac li:before,.wpac li:after{content:""!important}.wpac input,.wpac select{vertical-align:middle!important}.wpac select,.wpac textarea,.wpac input{border:1px solid #ccc!important}.wpac table{border-collapse:collapse!important;border-spacing:0!important}.wpac *[dir=rtl]{direction:rtl!important}.wpac img{border:0!important}.wpac svg{vertical-align:middle!important;-moz-box-sizing:content-box!important;-webkit-box-sizing:content-box!important;box-sizing:content-box!important}.wpac{font-size:14px!important;line-height:20px!important;direction:ltr!important;text-align:left!important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important;color:#333!important;font-style:normal!important;font-weight:normal!important;text-decoration:none!important;list-style-type:disc!important}.wpac .wp-sheet{position:fixed!important;bottom:0!important;right:0!important;height:100%!important;width:368px!important;z-index:1999999000!important;transition:all .2s ease-in-out!important}@media(max-width:460px){.wpac .wp-sheet{width:100%!important}}.wpac .wp-sheet-head{position:absolute!important;top:0!important;right:0!important;width:100%!important;height:48px!important;background:#fff!important;box-shadow:0 1px 2px 0 rgba(0,0,0,.12)!important;z-index:1999999002!important}.wpac .wp-sheet-head-inner{position:absolute!important;left:20px!important;top:0!important;width:100%!important;height:100%!important;line-height:48px!important;z-index:1999999000!important}.wpac .wp-sheet-head-close{position:relative!important;height:49px!important;float:right!important;color:#aaa!important;font-size:28px!important;line-height:48px!important;margin:0 20px 0 15px!important;z-index:1999999001!important;transition:all .2s ease-in-out!important}.wpac .wp-sheet-head-close:hover{color:#555!important}.wpac .wp-sheet-body{position:absolute!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;background:rgba(250,250,251,.98)!important;border-left:1px solid #dadee2!important;box-shadow:0 0 4px 1px rgba(0,0,0,.08)!important;z-index:1999999000!important}.wpac .wp-sheet-content{position:absolute!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;opacity:0!important;overflow-y:auto!important;z-index:1999999001!important;transition:all .2s ease-in-out!important;-webkit-transform:translateZ(0)!important}.wpac .wp-sheet-content.wp-sheet-ready{opacity:1.0!important}.wpac .wp-sheet-content-inner{position:relative!important;min-height:100%!important;margin:0 auto!important}.wpac .wp-sheet-footer{position:absolute!important;bottom:0!important;right:0!important;left:1px!important;width:100%!important;z-index:1999999002!important;background:rgba(250,250,251,.98)!important}.wp-gr .wp-google-badge{display:inline-block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;box-shadow:0 2px 5px 0 rgba(0,0,0,.26)!important;}.wp-gr .wp-google-badge-fixed{position:fixed!important;right:30px!important;bottom:30px!important;max-width:none!important;z-index:2147482999!important;box-shadow:0 2px 5px 0 rgba(0,0,0,.26)!important;}.wp-gr .wp-google-badge_left-fixed{position:fixed!important;left:30px!important;bottom:30px!important;max-width:none!important;z-index:2147482999!important}.wp-gr .wp-google-badge *{cursor:pointer!important}.wp-gr .wp-google-border{width:100%!important;height:6px!important;background:#4fce6a!important;border-radius:2px 2px 0 0!important;}.wp-gr .wp-google-badge-btn{position:relative!important;padding:10px!important;background:#fff!important;transition:all .2s ease-in-out!important;border-radius:2px!important;}.wp-gr .wp-google-badge-btn:hover{background:#f3f3f5!important}.wp-gr .wp-google-logo{position:absolute!important;top:10px!important}.wp-gr .wp-google-badge-score{display:inline-block;margin:0 0 0 4px!important;vertical-align:middle!important;}.wp-gr .wp-google-rating{color:#e7711b!important;font-size:20px!important;margin:0 6px 0 0!important;vertical-align:middle!important}.wp-gr .wp-google-stars .wp-star{padding:0 4px 0 0!important;line-height:22px!important}.wp-gr .wp-google-powered{margin:6px 0 0!important}.wp-gr .wp-google-form .wp-google-reviews{padding:16px 16px 0!important}.wp-gr .wp-google-review{margin-top:15px!important}.wp-gr .wp-google-left{display:table-cell!important;padding-right:10px!important;vertical-align:top!important}.wp-gr .wp-google-left img{border:none!important;float:left!important;height:50px!important;width:50px!important;margin-right:5px!important;border-radius:50%!important}.wp-gr .wp-google-reviews img{border-radius:50%!important}.wp-gr .wp-google-right{display:table-cell!important;vertical-align:top!important;width:10000px!important}.wp-gr .wp-google-place .wp-star svg{width:18px!important;height:18px!important}.wp-gr .wp-google-review .wp-star svg{width:16px!important;height:16px!important}.wp-gr .wp-google-name{color:black!important;font-size:100%!important;font-weight:bold!important;margin:0 0 2px!important;padding-right:6px!important;text-decoration:none!important}.wp-gr a.wp-google-name{color:#427fed!important;text-decoration:none!important}.wp-gr .wp-google-time{color:#999!important;font-size:13px!important}.wp-gr .wp-google-text{color:#222!important;font-size:13px!important;line-height:18px!important;max-width:100%!important;overflow:hidden!important;white-space:pre-wrap!important}.wp-gr .wp-google-text .wp-google-stars{padding-right:7px!important}.wp-gr .wp-more{display:none}.wp-gr .wp-more-toggle{color:#136aaf!important;cursor:pointer!important;text-decoration:underline!important}.wp-gr .wp-google-url{display:block;margin:10px 0!important;color:#2c7cff!important;text-align:center!important}.wp-gr .wp-google-form{position:fixed!important;bottom:0!important;right:0!important;height:100%!important;width:368px!important;z-index:2147483000!important}.wp-gr .wp-google-form.wp-google-form-left{left:0!important;}@media(max-width:460px){.wp-gr .wp-google-form{width:100%!important}}.wp-gr .wp-google-head{position:absolute!important;top:0!important;right:0!important;width:100%!important;height:80px!important;background:#fff!important;padding:10px 16px!important;overflow:hidden!important;box-shadow:0 1px 2px 0 rgba(0,0,0,.12)!important;z-index:2147483002!important}.wp-gr .wp-google-head-inner{z-index:2147483000!important;position:absolute!important;left:20px!important;top:20px!important;width:100%!important;height:100%!important;pointer-events:none!important}.wp-gr .wp-google-close{padding:0!important;cursor:pointer!important;outline:0!important;border:0!important;background:0 0!important;min-height:0!important;width:auto!important;float:right!important;font-size:32px!important;font-weight:500!important;line-height:.6!important;color:#999!important;-webkit-appearance:none!important}.wp-gr .wp-google-close:hover{color:#555!important}.wp-gr .wp-google-body{position:absolute!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;background:rgba(250,250,251,.98)!important;border-left:1px solid #dadee2!important;box-shadow:0 0 4px 1px rgba(0,0,0,.08)!important;z-index:2147483000!important}.wp-gr .wp-google-content{position:absolute!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;overflow-y:auto!important;z-index:2147483001!important;-webkit-transform:translateZ(0)!important}.wp-gr .wp-google-content{top:80px!important;bottom:48px!important}.wp-gr .wp-google-content-inner{position:relative!important;min-height:100%!important;margin:0 auto!important}.wp-gr .wp-google-footer{position:absolute!important;bottom:0!important;right:0!important;width:100%!important;height:48px!important;text-align:center!important;z-index:2147483002!important;background:#fff!important;box-shadow:0 -1px 2px 0 rgba(0,0,0,.06)!important;-moz-text-align-last:center!important;text-align-last:center!important}.wp-gr .wp-google-footer img{float:right!important;padding:16px!important}.wp-gr .wp-dark .wp-google-name{color:#eee!important}.wp-gr .wp-dark .wp-google-time{color:#bbb!important}.wp-gr .wp-dark .wp-google-text{color:#ececec!important}.wp-gr.wpac .wp-google-name{font-size:100%!important}.wp-gr.wpac .wp-google-hide{display:none}.wp-gr.wpac .wp-google-name a{color:#333!important;font-size:100%!important;text-decoration:none!important}.wp-gr.wpac .wp-google-left img{width:50px!important;height:50px!important;border-radius:50%!important}.wp-gr.wpac a.wp-google-name{color:#427fed!important;text-decoration:none!important}.wp-gr.wpac .wp-google-place .wp-star svg{width:18px;height:18px}.wp-gr.wpac .wp-google-review .wp-google-stars{display:inline-block;margin-right:4px!important}.wp-gr.wpac .wp-google-review .wp-star svg{width:16px;height:16px}.wp-gr.wpac .wp-dark .wp-google-name a{color:#eee!important}.wp-gr .wp-google-richsnippet{color:#999!important;font-size:12px!important;line-height:16px!important;margin-top:6px!important;border-top:1px solid #eee!important;padding-top:4px!important;}.grw-slider{position:relative}.grw-slider .swiper-wrapper{opacity:1;-moz-opacity:1;filter:alpha(opacity=1)}.grw-slider .grw-slider-prev,.grw-slider .grw-slider-next{position:absolute!important;top:50%!important;width:30px;height:30px;background:#eee;border-radius:50%;margin-top:-22px!important;z-index:10!important;cursor:pointer!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.grw-slider .grw-slider-prev{left:-35px!important}.grw-slider .grw-slider-next{right:-35px!important}.grw-slider .grw-slider-prev span,.grw-slider .grw-slider-next span{position:absolute!important;top:48%!important;left:40%!important;color:#777!important;direction:ltr!important;font:normal 300 28px / 0 "Muli",Helvetica,Arial,Verdana,sans-serif!important}.grw-slider .grw-review{margin:20px 0 40px!important}.grw-slider .wp-google-feedback{position:relative!important;margin:2px!important;color:#777!important;font-size:18px!important;border:1px solid #ededed!important;background-color:#fafafa!important;border-radius:4px!important}.grw-slider .wp-google-feedback:before{position:absolute!important;bottom:-7px!important;left:35px!important;display:block!important;width:14px!important;height:14px!important;border:1px solid #ededed!important;border-top:none!important;border-left:none!important;background-color:#fafafa!important;content:""!important;-webkit-transform:rotate(45deg)!important;-ms-transform:rotate(45deg)!important;transform:rotate(45deg)!important}.grw-slider .wp-google-content2{position:static!important;height:150px!important;overflow-y:auto!important;font-size:14px!important;text-align:left!important;padding:0 2px 0 0!important;margin:20px 20px 20px 40px!important}.grw-slider .wp-google-content2::-webkit-scrollbar{width:4px!important}.grw-slider .wp-google-content2::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3)!important;-webkit-border-radius:4px!important;border-radius:4px!important}.grw-slider .wp-google-content2::-webkit-scrollbar-thumb{-webkit-border-radius:10px!important;border-radius:10px!important;background:#ccc!important;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.5)!important}.grw-slider .wp-google-content2::-webkit-scrollbar-thumb:window-inactive{background:#ccc!important}.grw-slider .wp-google-content2:before{bottom:47px!important;box-sizing:border-box!important;color:#bbb!important;content:'\201C'!important;display:block!important;height:96px!important;left:50px!important;position:absolute!important;right:515.391px!important;text-size-adjust:100%!important;top:20px!important;width:24.6094px!important;column-rule-color:#bbb!important;perspective-origin:12.2969px 48px!important;transform-origin:12.2969px 48px!important;border:0 none #bbb!important;font:normal normal normal normal 60px / 96px Georgia,serif!important;margin:-25px 0 0 -40px!important;outline:#bbb none 0!important}.grw-slider .wp-google-content2>svg{position:absolute!important;bottom:8px!important;right:8px!important;width:24px!important;height:24px!important;background:#fff!important;padding:2px!important;border-radius:50%!important}.grw-slider .wp-google-text{color:#777!important;line-height:22px!important}.grw-slider .wp-google-stars{display:inline-block!important;margin-right:4px!important}.grw-slider .wp-google-stars .wp-star{padding:0 4px 0 0!important;line-height:22px!important}.grw-slider .wp-google-stars .wp-star svg{width:18px!important;height:18px!important;vertical-align:middle!important}.grw-slider .wp-google-user{display:flex!important;position:relative!important;padding:20px!important}.grw-slider .wp-google-user img{width:50px!important;height:50px!important;padding:0!important;margin:0!important;border-radius:100%!important;box-shadow:0 0 1px #a9a9a9!important;vertical-align:middle!important;box-shadow:0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24)!important}.grw-slider .wp-google-info{margin:0 0 0 10px!important;text-align:left!important;vertical-align:middle!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.grw-slider .wp-google-name{display:block!important;margin-bottom:3px!important;font-size:100%!important;font-weight:bold!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;color:#427fed!important;text-decoration:none!important;box-shadow:none!important}.grw-slider .wp-google-time{display:block!important;color:#999!important;font-size:13px!important;line-height:14px}.grw-slider .wp-more{display:none}.grw-slider .wp-more-toggle{color:#136aaf!important;cursor:pointer!important;text-decoration:underline!important}@media(max-width: 480px){.wp-google-badge.wp-google-badge-fixed.wp-google-badge-hide{display:none!important;}}@media(max-width: 480px){.wp-google-badge.wp-google-badge_left-fixed.wp-google-badge-hide{display:none!important;}}
|
static/css/grw-setting.css
CHANGED
@@ -164,11 +164,18 @@ a:hover {
|
|
164 |
padding-top: 0;
|
165 |
}
|
166 |
|
167 |
-
#setting input[type="text"] {
|
168 |
height: 30px;
|
169 |
width: 400px;
|
170 |
-
box-shadow: none;
|
171 |
padding: 4px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
}
|
173 |
|
174 |
input[type="checkbox"] {
|
164 |
padding-top: 0;
|
165 |
}
|
166 |
|
167 |
+
#setting input[type="text"], #setting select {
|
168 |
height: 30px;
|
169 |
width: 400px;
|
|
|
170 |
padding: 4px;
|
171 |
+
background: #fff;
|
172 |
+
box-shadow: none;
|
173 |
+
border: 1px solid #ccc;
|
174 |
+
}
|
175 |
+
|
176 |
+
#setting .alert {
|
177 |
+
max-width: 500px;
|
178 |
+
word-wrap: break-word;
|
179 |
}
|
180 |
|
181 |
input[type="checkbox"] {
|
static/js/rplg.js
CHANGED
@@ -1,9 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
function rplg_next_reviews(name, pagin) {
|
2 |
var parent = this.parentNode,
|
3 |
selector = '.wp-' + name + '-review.wp-' + name + '-hide';
|
4 |
reviews = parent.querySelectorAll(selector);
|
5 |
for (var i = 0; i < pagin && i < reviews.length; i++) {
|
6 |
-
|
|
|
|
|
|
|
7 |
}
|
8 |
reviews = parent.querySelectorAll(selector);
|
9 |
if (reviews.length < 1) {
|
@@ -28,18 +60,22 @@ function _rplg_popup(url, width, height, prms, top, left) {
|
|
28 |
return window.open(url, '', 'location=1,status=1,resizable=yes,width='+width+',height='+height+',top='+top+',left='+left);
|
29 |
}
|
30 |
|
31 |
-
|
32 |
-
var
|
33 |
-
|
34 |
-
var clss = reviewTimes[i].className, time;
|
35 |
if (clss.indexOf('google') > -1) {
|
36 |
-
time = parseInt(
|
37 |
time *= 1000;
|
38 |
} else if (clss.indexOf('facebook') > -1) {
|
39 |
-
time = new Date(
|
40 |
} else {
|
41 |
-
time = new Date(
|
42 |
}
|
43 |
-
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
45 |
});
|
1 |
+
function rplg_badge_init(el, name, root_class) {
|
2 |
+
var btn = el.querySelector('.wp-' + name + '-badge'),
|
3 |
+
form = el.querySelector('.wp-' + name + '-form');
|
4 |
+
|
5 |
+
if (!btn || !form) return;
|
6 |
+
|
7 |
+
var wpac = document.createElement('div');
|
8 |
+
wpac.className = root_class + ' wpac';
|
9 |
+
|
10 |
+
if (btn.className.indexOf('-fixed') > -1) {
|
11 |
+
wpac.appendChild(btn);
|
12 |
+
}
|
13 |
+
wpac.appendChild(form);
|
14 |
+
document.body.appendChild(wpac);
|
15 |
+
|
16 |
+
btn.onclick = function() {
|
17 |
+
rplg_load_imgs(wpac);
|
18 |
+
form.style.display='block';
|
19 |
+
};
|
20 |
+
}
|
21 |
+
|
22 |
+
function rplg_load_imgs(el) {
|
23 |
+
var imgs = el.querySelectorAll('img.rplg-blazy[data-src]');
|
24 |
+
for (var i = 0; i < imgs.length; i++) {
|
25 |
+
imgs[i].setAttribute('src', imgs[i].getAttribute('data-src'));
|
26 |
+
imgs[i].removeAttribute('data-src');
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
function rplg_next_reviews(name, pagin) {
|
31 |
var parent = this.parentNode,
|
32 |
selector = '.wp-' + name + '-review.wp-' + name + '-hide';
|
33 |
reviews = parent.querySelectorAll(selector);
|
34 |
for (var i = 0; i < pagin && i < reviews.length; i++) {
|
35 |
+
if (reviews[i]) {
|
36 |
+
reviews[i].className = reviews[i].className.replace('wp-' + name + '-hide', ' ');
|
37 |
+
rplg_load_imgs(reviews[i]);
|
38 |
+
}
|
39 |
}
|
40 |
reviews = parent.querySelectorAll(selector);
|
41 |
if (reviews.length < 1) {
|
60 |
return window.open(url, '', 'location=1,status=1,resizable=yes,width='+width+',height='+height+',top='+top+',left='+left);
|
61 |
}
|
62 |
|
63 |
+
function _rplg_timeago(els) {
|
64 |
+
for (var i = 0; i < els.length; i++) {
|
65 |
+
var clss = els[i].className, time;
|
|
|
66 |
if (clss.indexOf('google') > -1) {
|
67 |
+
time = parseInt(els[i].getAttribute('data-time'));
|
68 |
time *= 1000;
|
69 |
} else if (clss.indexOf('facebook') > -1) {
|
70 |
+
time = new Date(els[i].getAttribute('data-time').replace(/\+\d+$/, '')).getTime();
|
71 |
} else {
|
72 |
+
time = new Date(els[i].getAttribute('data-time').replace(/ /, 'T')).getTime();
|
73 |
}
|
74 |
+
els[i].innerHTML = WPacTime.getTime(time, _rplg_lang(), 'ago');
|
75 |
}
|
76 |
+
}
|
77 |
+
|
78 |
+
document.addEventListener('DOMContentLoaded', function() {
|
79 |
+
_rplg_timeago(document.querySelectorAll('.wpac [data-time]'));
|
80 |
+
if (window.Blazy) var bLazy = new Blazy({selector: 'img.rplg-blazy'});
|
81 |
});
|
static/js/wpac-time.js
CHANGED
@@ -34,4 +34,7 @@ years:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u043e\u0434 \
|
|
34 |
" g\u00fcn \u00f6nce"},month:"ay \u00f6nce",months:function(a){return Math.round(a/30)+" ay \u00f6nce"},year:"y\u0131l \u00f6nce",years:function(a){return Math.round(a)+" y\u0131l \u00f6nce"}},nb:{second:"n\u00e5 nettopp",minute:"ett minutt siden",minutes:function(a){return Math.round(a)+" minutter siden"},hour:"en time siden",hours:function(a){return Math.round(a)+" timer siden"},day:"en dag siden",days:function(a){return Math.round(a)+" dager siden"},month:"en m\u00e5ned siden",months:function(a){return Math.round(a/
|
35 |
30)+" m\u00e5neder siden"},year:"ett \u00e5r siden",years:function(a){return Math.round(a)+" \u00e5r siden"}},da:{second:"lige nu",minute:"et minut siden",minutes:function(a){return Math.round(a)+" minutter siden"},hour:"en time siden",hours:function(a){return Math.round(a)+" timer siden"},day:"en dag siden",days:function(a){return Math.round(a)+" dage siden"},month:"en m\u00e5ned siden",months:function(a){return Math.round(a/30)+" m\u00e5neder siden"},year:"et \u00e5r siden",years:function(a){return Math.round(a)+
|
36 |
" \u00e5r siden"}},nl:{second:"zojuist",minute:"minuten geleden",minutes:function(a){return Math.round(a)+" minuten geleden"},hour:"uur geleden",hours:function(a){return Math.round(a)+" uur geleden"},day:"dagen geleden",days:function(a){return Math.round(a)+" dagen geleden"},month:"maand geleden",months:function(a){return Math.round(a/30)+" maanden geleden"},year:"jaar geleden",years:function(a){return Math.round(a)+" jaar geleden"}},ca:{second:"ara mateix",minute:"fa un minut",minutes:function(a){return"fa "+
|
37 |
-
Math.round(a)+" minuts"},hour:"fa una hora",hours:function(a){return"fa "+Math.round(a)+" hores"},day:"fa un dia",days:function(a){return"fa "+Math.round(a)+" dies"},month:"fa un mes",months:function(a){return"fa "+Math.round(a/30)+" mesos"},year:"fa un any",years:function(a){return"fa "+Math.round(a)+" anys"}}}
|
|
|
|
|
|
34 |
" g\u00fcn \u00f6nce"},month:"ay \u00f6nce",months:function(a){return Math.round(a/30)+" ay \u00f6nce"},year:"y\u0131l \u00f6nce",years:function(a){return Math.round(a)+" y\u0131l \u00f6nce"}},nb:{second:"n\u00e5 nettopp",minute:"ett minutt siden",minutes:function(a){return Math.round(a)+" minutter siden"},hour:"en time siden",hours:function(a){return Math.round(a)+" timer siden"},day:"en dag siden",days:function(a){return Math.round(a)+" dager siden"},month:"en m\u00e5ned siden",months:function(a){return Math.round(a/
|
35 |
30)+" m\u00e5neder siden"},year:"ett \u00e5r siden",years:function(a){return Math.round(a)+" \u00e5r siden"}},da:{second:"lige nu",minute:"et minut siden",minutes:function(a){return Math.round(a)+" minutter siden"},hour:"en time siden",hours:function(a){return Math.round(a)+" timer siden"},day:"en dag siden",days:function(a){return Math.round(a)+" dage siden"},month:"en m\u00e5ned siden",months:function(a){return Math.round(a/30)+" m\u00e5neder siden"},year:"et \u00e5r siden",years:function(a){return Math.round(a)+
|
36 |
" \u00e5r siden"}},nl:{second:"zojuist",minute:"minuten geleden",minutes:function(a){return Math.round(a)+" minuten geleden"},hour:"uur geleden",hours:function(a){return Math.round(a)+" uur geleden"},day:"dagen geleden",days:function(a){return Math.round(a)+" dagen geleden"},month:"maand geleden",months:function(a){return Math.round(a/30)+" maanden geleden"},year:"jaar geleden",years:function(a){return Math.round(a)+" jaar geleden"}},ca:{second:"ara mateix",minute:"fa un minut",minutes:function(a){return"fa "+
|
37 |
+
Math.round(a)+" minuts"},hour:"fa una hora",hours:function(a){return"fa "+Math.round(a)+" hores"},day:"fa un dia",days:function(a){return"fa "+Math.round(a)+" dies"},month:"fa un mes",months:function(a){return"fa "+Math.round(a/30)+" mesos"},year:"fa un any",years:function(a){return"fa "+Math.round(a)+" anys"}},sv:{second:"just nu",minute:"en minut sen",minutes:function(a){return Math.round(a)+" minuter sen"},hour:"en timme sen",hours:function(a){return Math.round(a)+" timmar sen"},day:"en dag sen",
|
38 |
+
days:function(a){return Math.round(a)+" dagar sen"},month:"en m\u00e5nad sen",months:function(a){return Math.round(a/30)+" m\u00e5nader sen"},year:"en \u00e5r sen",years:function(a){return Math.round(a)+" \u00e5r sen"}},pl:{second:"w\u0142a\u015bnie teraz",minute:"minut\u0119 temu",minutes:function(a){return Math.round(a)+" minut temu"},hour:"godzin\u0119 temu",hours:function(a){return Math.round(a)+" godzin temu"},day:"wczoraj",days:function(a){return Math.round(a)+" dni temu"},month:"miesi\u0105c temu",
|
39 |
+
months:function(a){return Math.round(a/30)+" miesi\u0119cy temu"},year:"rok temu",years:function(a){return Math.round(a)+" lat temu"}},pt:{second:"agora",minute:"1 minuto atr\u00e1s",minutes:function(a){return Math.round(a)+" minutos atr\u00e1s"},hour:"1 hora atr\u00e1s",hours:function(a){return Math.round(a)+" horas atr\u00e1s"},day:"1 dia atr\u00e1s",days:function(a){return Math.round(a)+" dias atr\u00e1s"},month:"1 m\u00eas atr\u00e1s",months:function(a){return Math.round(a/30)+" meses atr\u00e1s"},
|
40 |
+
year:"1 ano atr\u00e1s",years:function(a){return Math.round(a)+" anos atr\u00e1s"}}};
|