Google Reviews Widget - Version 1.9.8

Version Description

  • Improved usability
  • Installation guide fixed
  • Bugfix: __ function instead of grw_i
Download this release

Release Info

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

Code changes from version 1.9.7 to 1.9.8

Files changed (9) hide show
  1. grw-finder.php +57 -57
  2. grw-options.php +22 -22
  3. grw-reviews-helper.php +5 -5
  4. grw-reviews.php +1 -1
  5. grw-setting-fig.php +6 -2
  6. grw-setting.php +16 -16
  7. grw-widget.php +3 -3
  8. grw.php +20 -24
  9. readme.txt +12 -4
grw-finder.php CHANGED
@@ -1,69 +1,69 @@
1
  <div class="form-group">
2
- <h4><?php echo grw_i('Enter Place ID of your Google location. If you don\'t know this, you can simply find it by <a href="' . admin_url('options-general.php?page=grw&grw_tab=fig') . '" target="_blank">this instruction</a>.'); ?></h4>
3
  <input type="text" class="grw-place-id" value="" placeholder="Place ID" />
4
  <small class="grw-error"></small>
5
  </div>
6
 
7
  <div class="form-group">
8
  <select class="grw-lang">
9
- <option value=""><?php echo grw_i('Language disable'); ?></option>
10
- <option value="ar"><?php echo grw_i('Arabic'); ?></option>
11
- <option value="bg"><?php echo grw_i('Bulgarian'); ?></option>
12
- <option value="bn"><?php echo grw_i('Bengali'); ?></option>
13
- <option value="ca"><?php echo grw_i('Catalan'); ?></option>
14
- <option value="cs"><?php echo grw_i('Czech'); ?></option>
15
- <option value="da"><?php echo grw_i('Danish'); ?></option>
16
- <option value="de"><?php echo grw_i('German'); ?></option>
17
- <option value="el"><?php echo grw_i('Greek'); ?></option>
18
- <option value="en"><?php echo grw_i('English'); ?></option>
19
- <!--option value="en-AU"><?php echo grw_i('English (Australian)'); ?></option>
20
- <option value="en-GB"><?php echo grw_i('English (Great Britain)'); ?></option-->
21
- <option value="es"><?php echo grw_i('Spanish'); ?></option>
22
- <option value="eu"><?php echo grw_i('Basque'); ?></option>
23
- <option value="eu"><?php echo grw_i('Basque'); ?></option>
24
- <option value="fa"><?php echo grw_i('Farsi'); ?></option>
25
- <option value="fi"><?php echo grw_i('Finnish'); ?></option>
26
- <option value="fil"><?php echo grw_i('Filipino'); ?></option>
27
- <option value="fr"><?php echo grw_i('French'); ?></option>
28
- <option value="gl"><?php echo grw_i('Galician'); ?></option>
29
- <option value="gu"><?php echo grw_i('Gujarati'); ?></option>
30
- <option value="hi"><?php echo grw_i('Hindi'); ?></option>
31
- <option value="hr"><?php echo grw_i('Croatian'); ?></option>
32
- <option value="hu"><?php echo grw_i('Hungarian'); ?></option>
33
- <option value="id"><?php echo grw_i('Indonesian'); ?></option>
34
- <option value="it"><?php echo grw_i('Italian'); ?></option>
35
- <option value="iw"><?php echo grw_i('Hebrew'); ?></option>
36
- <option value="ja"><?php echo grw_i('Japanese'); ?></option>
37
- <option value="kn"><?php echo grw_i('Kannada'); ?></option>
38
- <option value="ko"><?php echo grw_i('Korean'); ?></option>
39
- <option value="lt"><?php echo grw_i('Lithuanian'); ?></option>
40
- <option value="lv"><?php echo grw_i('Latvian'); ?></option>
41
- <option value="ml"><?php echo grw_i('Malayalam'); ?></option>
42
- <option value="mr"><?php echo grw_i('Marathi'); ?></option>
43
- <option value="nl"><?php echo grw_i('Dutch'); ?></option>
44
- <option value="no"><?php echo grw_i('Norwegian'); ?></option>
45
- <option value="pl"><?php echo grw_i('Polish'); ?></option>
46
- <option value="pt"><?php echo grw_i('Portuguese'); ?></option>
47
- <option value="pt-BR"><?php echo grw_i('Portuguese (Brazil)'); ?></option>
48
- <option value="pt-PT"><?php echo grw_i('Portuguese (Portugal)'); ?></option>
49
- <option value="ro"><?php echo grw_i('Romanian'); ?></option>
50
- <option value="ru"><?php echo grw_i('Russian'); ?></option>
51
- <option value="sk"><?php echo grw_i('Slovak'); ?></option>
52
- <option value="sl"><?php echo grw_i('Slovenian'); ?></option>
53
- <option value="sr"><?php echo grw_i('Serbian'); ?></option>
54
- <option value="sv"><?php echo grw_i('Swedish'); ?></option>
55
- <option value="ta"><?php echo grw_i('Tamil'); ?></option>
56
- <option value="te"><?php echo grw_i('Telugu'); ?></option>
57
- <option value="th"><?php echo grw_i('Thai'); ?></option>
58
- <option value="tl"><?php echo grw_i('Tagalog'); ?></option>
59
- <option value="tr"><?php echo grw_i('Turkish'); ?></option>
60
- <option value="uk"><?php echo grw_i('Ukrainian'); ?></option>
61
- <option value="vi"><?php echo grw_i('Vietnamese'); ?></option>
62
- <option value="zh-CN"><?php echo grw_i('Chinese (Simplified)'); ?></option>
63
- <option value="zh-TW"><?php echo grw_i('Chinese (Traditional)'); ?></option>
64
  </select>
65
  </div>
66
 
67
  <div class="form-group">
68
- <button class="grw-connect-btn btn btn-block btn-primary"><?php echo grw_i('Connect Google'); ?></button>
69
  </div>
1
  <div class="form-group">
2
+ <h4><?php echo __('Enter Place ID of your Google location. If you don\'t know this, you can simply find it by <a href="' . admin_url('options-general.php?page=grw&grw_tab=fig') . '" target="_blank">this instruction</a>.', 'grw'); ?></h4>
3
  <input type="text" class="grw-place-id" value="" placeholder="Place ID" />
4
  <small class="grw-error"></small>
5
  </div>
6
 
7
  <div class="form-group">
8
  <select class="grw-lang">
9
+ <option value=""><?php echo __('Choose language before connecting', 'grw'); ?></option>
10
+ <option value="ar">Arabic</option>
11
+ <option value="bg">Bulgarian</option>
12
+ <option value="bn">Bengali</option>
13
+ <option value="ca">Catalan</option>
14
+ <option value="cs">Czech</option>
15
+ <option value="da">Danish</option>
16
+ <option value="de">German</option>
17
+ <option value="el">Greek</option>
18
+ <option value="en">English</option>
19
+ <!--option value="en-AU">English (Australian)</option>
20
+ <option value="en-GB">English (Great Britain)</option-->
21
+ <option value="es">Spanish</option>
22
+ <option value="eu">Basque</option>
23
+ <option value="eu">Basque</option>
24
+ <option value="fa">Farsi</option>
25
+ <option value="fi">Finnish</option>
26
+ <option value="fil">Filipino</option>
27
+ <option value="fr">French</option>
28
+ <option value="gl">Galician</option>
29
+ <option value="gu">Gujarati</option>
30
+ <option value="hi">Hindi</option>
31
+ <option value="hr">Croatian</option>
32
+ <option value="hu">Hungarian</option>
33
+ <option value="id">Indonesian</option>
34
+ <option value="it">Italian</option>
35
+ <option value="iw">Hebrew</option>
36
+ <option value="ja">Japanese</option>
37
+ <option value="kn">Kannada</option>
38
+ <option value="ko">Korean</option>
39
+ <option value="lt">Lithuanian</option>
40
+ <option value="lv">Latvian</option>
41
+ <option value="ml">Malayalam</option>
42
+ <option value="mr">Marathi</option>
43
+ <option value="nl">Dutch</option>
44
+ <option value="no">Norwegian</option>
45
+ <option value="pl">Polish</option>
46
+ <option value="pt">Portuguese</option>
47
+ <option value="pt-BR">Portuguese (Brazil)</option>
48
+ <option value="pt-PT">Portuguese (Portugal)</option>
49
+ <option value="ro">Romanian</option>
50
+ <option value="ru">Russian</option>
51
+ <option value="sk">Slovak</option>
52
+ <option value="sl">Slovenian</option>
53
+ <option value="sr">Serbian</option>
54
+ <option value="sv">Swedish</option>
55
+ <option value="ta">Tamil</option>
56
+ <option value="te">Telugu</option>
57
+ <option value="th">Thai</option>
58
+ <option value="tl">Tagalog</option>
59
+ <option value="tr">Turkish</option>
60
+ <option value="uk">Ukrainian</option>
61
+ <option value="vi">Vietnamese</option>
62
+ <option value="zh-CN">Chinese (Simplified)</option>
63
+ <option value="zh-TW">Chinese (Traditional)</option>
64
  </select>
65
  </div>
66
 
67
  <div class="form-group">
68
+ <button class="grw-connect-btn btn btn-block btn-primary"><?php echo __('Connect Google', 'grw'); ?></button>
69
  </div>
grw-options.php CHANGED
@@ -1,54 +1,54 @@
1
  <?php global $wp_version; if (version_compare($wp_version, '3.5', '>=')) { wp_enqueue_media(); ?>
2
  <div class="form-group">
3
  <img id="<?php echo $this->get_field_id('place_photo_img'); ?>" src="<?php echo $place_photo; ?>" alt="<?php echo $place_name; ?>" class="grw-place-photo-img" style="display:<?php if ($place_photo) { ?>inline-block<?php } else { ?>none<?php } ?>;width:32px;height:32px;border-radius:50%;">
4
- <a id="<?php echo $this->get_field_id('place_photo_btn'); ?>" href="#" class="grw-place-photo-btn"><?php echo grw_i('Change Place photo'); ?></a>
5
  <input type="hidden" id="<?php echo $this->get_field_id('place_photo'); ?>" name="<?php echo $this->get_field_name('place_photo'); ?>" value="<?php echo $place_photo; ?>" class="grw-place-photo" tabindex="2"/>
6
  </div>
7
  <?php } ?>
8
 
9
  <div class="form-group">
10
- <input type="text" id="<?php echo $this->get_field_id('place_name'); ?>" name="<?php echo $this->get_field_name('place_name'); ?>" value="<?php echo $place_name; ?>" class="grw-google-place-name" placeholder="<?php echo grw_i('Google Place Name'); ?>" readonly />
11
  </div>
12
 
13
  <div class="form-group">
14
- <input type="text" id="<?php echo $this->get_field_id('place_id'); ?>" name="<?php echo $this->get_field_name('place_id'); ?>" value="<?php echo $place_id; ?>" class="grw-google-place-id" placeholder="<?php echo grw_i('Google Place ID'); ?>" readonly />
15
  </div>
16
 
17
  <div class="form-group">
18
- <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="grw-place-lang" placeholder="<?php echo grw_i('Language'); ?>" readonly />
19
  </div>
20
 
21
  <?php if (isset($title)) { ?>
22
  <div class="form-group">
23
- <label><?php echo grw_i('Title'); ?></label>
24
  <input type="text" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>"/>
25
  </div>
26
  <?php } ?>
27
 
28
  <div class="form-group">
29
- <label><?php echo grw_i('Pagination'); ?></label>
30
  <input type="text" id="<?php echo $this->get_field_id('pagination'); ?>" name="<?php echo $this->get_field_name('pagination'); ?>" value="<?php echo $pagination; ?>"/>
31
  </div>
32
 
33
  <div class="form-group">
34
- <label><?php echo grw_i('Characters before \'read more\' link'); ?></label>
35
  <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; ?>"/>
36
  </div>
37
 
38
  <div class="form-group">
39
- <label for="<?php echo $this->get_field_id('max_width'); ?>"><?php echo grw_i('Widget width'); ?></label>
40
  <input id="<?php echo $this->get_field_id('max_width'); ?>" name="<?php echo $this->get_field_name('max_width'); ?>" value="<?php echo $max_width; ?>" type="text" />
41
  </div>
42
 
43
  <div class="form-group">
44
- <label for="<?php echo $this->get_field_id('max_height'); ?>"><?php echo grw_i('Widget height'); ?></label>
45
  <input id="<?php echo $this->get_field_id('max_height'); ?>" name="<?php echo $this->get_field_name('max_height'); ?>" value="<?php echo $max_height; ?>" type="text" />
46
  </div>
47
 
48
  <div class="form-group">
49
  <label>
50
  <input id="<?php echo $this->get_field_id('refresh_reviews'); ?>" name="<?php echo $this->get_field_name('refresh_reviews'); ?>" type="checkbox" value="1" <?php checked('1', $refresh_reviews); ?>/>
51
- <?php echo grw_i('Refresh reviews'); ?>
52
  <span class="rplg-quest rplg-toggle" title="Click to help">?</span>
53
  <div style="display:none">
54
  The plugin uses the Google Places API to get your reviews. <b>The API only returns the 5 most helpful reviews (it's a limitation of Google, not the plugin)</b>. This option calls the Places API once in three days (to avoid a Google Billing) to check for a new reviews and if there are, adds to the plugin.<br><br>Also if you see the new reviews on Google map, but after some time it's not added to the plugin, it means that Google does not include these reviews to the API and the plugin can't get this.<br><br>If you need to get all reviews, please use <a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin" target="_blank">the Business plugin</a> which uses a Google My Business API, but this GMB API is available only for verified Google business owner accounts.
@@ -59,44 +59,44 @@
59
  <div class="form-group">
60
  <label>
61
  <input id="<?php echo $this->get_field_id('hide_based_on'); ?>" name="<?php echo $this->get_field_name('hide_based_on'); ?>" type="checkbox" value="1" <?php checked('1', $hide_based_on); ?>/>
62
- <?php echo grw_i('Hide \'Based on ... reviews\''); ?>
63
  </label>
64
  </div>
65
 
66
  <div class="form-group">
67
  <label>
68
  <input id="<?php echo $this->get_field_id('hide_reviews'); ?>" name="<?php echo $this->get_field_name('hide_reviews'); ?>" type="checkbox" value="1" <?php checked('1', $hide_reviews); ?>/>
69
- <?php echo grw_i('Hide reviews, leave only rating header'); ?>
70
  </label>
71
  </div>
72
 
73
  <div class="form-group">
74
  <label>
75
  <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); ?>/>
76
- <?php echo grw_i('Place by center (only if Width is set)'); ?>
77
  </label>
78
  </div>
79
 
80
  <div class="form-group">
81
  <label>
82
  <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); ?>/>
83
- <?php echo grw_i('Dark background'); ?>
84
  </label>
85
  </div>
86
 
87
- <div class="rplg-options-toggle rplg-toggle"><?php echo grw_i('Advance Options'); ?></div>
88
  <div class="rplg-options" style="display:none">
89
  <div class="form-group">
90
  <label>
91
  <input id="<?php echo $this->get_field_id('lazy_load_img'); ?>" name="<?php echo $this->get_field_name('lazy_load_img'); ?>" type="checkbox" value="1" <?php checked('1', $lazy_load_img); ?>/>
92
- <?php echo grw_i('Lazy load images'); ?>
93
  </label>
94
  </div>
95
 
96
  <div class="form-group">
97
  <label>
98
  <input id="<?php echo $this->get_field_id('reduce_avatars_size'); ?>" name="<?php echo $this->get_field_name('reduce_avatars_size'); ?>" type="checkbox" value="1" <?php checked('1', $reduce_avatars_size); ?>/>
99
- <?php echo grw_i('Reduce avatars size'); ?>
100
  <span class="rplg-quest rplg-toggle" title="Click to help">?</span>
101
  <div style="display:none">
102
  By default the Google Places API returns the reviewer's avatars of 128px in size, this option reduces the size to 50px.
@@ -107,7 +107,7 @@
107
  <div class="form-group">
108
  <label>
109
  <input id="<?php echo $this->get_field_id('def_reviews_link'); ?>" name="<?php echo $this->get_field_name('def_reviews_link'); ?>" type="checkbox" value="1" <?php checked('1', $def_reviews_link); ?>/>
110
- <?php echo grw_i('Use default reviews link'); ?>
111
  <span class="rplg-quest rplg-toggle" title="Click to help">?</span>
112
  <div style="display:none">
113
  If the direct link to all reviews <b>https://search.google.com/local/reviews?placeid=&lt;PLACE_ID&gt;</b> does not work with your Google place, please use this option to use the default reviews link to Google map.
@@ -118,23 +118,23 @@
118
  <div class="form-group">
119
  <label>
120
  <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); ?>/>
121
- <?php echo grw_i('Open links in new Window'); ?>
122
  </label>
123
  </div>
124
 
125
  <div class="form-group">
126
  <label>
127
  <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); ?>/>
128
- <?php echo grw_i('Use no follow links'); ?>
129
  </label>
130
  </div>
131
  </div>
132
 
133
  <div class="form-group">
134
  <div class="rplg-pro">
135
- <?php echo grw_i('Try more features in the Business version: '); ?>
136
  <a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin" target="_blank">
137
- <?php echo grw_i('Upgrade to Business'); ?>
138
  </a>
139
  </div>
140
  </div>
1
  <?php global $wp_version; if (version_compare($wp_version, '3.5', '>=')) { wp_enqueue_media(); ?>
2
  <div class="form-group">
3
  <img id="<?php echo $this->get_field_id('place_photo_img'); ?>" src="<?php echo $place_photo; ?>" alt="<?php echo $place_name; ?>" class="grw-place-photo-img" style="display:<?php if ($place_photo) { ?>inline-block<?php } else { ?>none<?php } ?>;width:32px;height:32px;border-radius:50%;">
4
+ <a id="<?php echo $this->get_field_id('place_photo_btn'); ?>" href="#" class="grw-place-photo-btn"><?php echo __('Change Place photo', 'grw'); ?></a>
5
  <input type="hidden" id="<?php echo $this->get_field_id('place_photo'); ?>" name="<?php echo $this->get_field_name('place_photo'); ?>" value="<?php echo $place_photo; ?>" class="grw-place-photo" tabindex="2"/>
6
  </div>
7
  <?php } ?>
8
 
9
  <div class="form-group">
10
+ <input type="text" id="<?php echo $this->get_field_id('place_name'); ?>" name="<?php echo $this->get_field_name('place_name'); ?>" value="<?php echo $place_name; ?>" class="grw-google-place-name" placeholder="<?php echo __('Google Place Name', 'grw'); ?>" readonly />
11
  </div>
12
 
13
  <div class="form-group">
14
+ <input type="text" id="<?php echo $this->get_field_id('place_id'); ?>" name="<?php echo $this->get_field_name('place_id'); ?>" value="<?php echo $place_id; ?>" class="grw-google-place-id" placeholder="<?php echo __('Google Place ID', 'grw'); ?>" readonly />
15
  </div>
16
 
17
  <div class="form-group">
18
+ <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="grw-place-lang" placeholder="<?php echo __('Language', 'grw'); ?>" readonly />
19
  </div>
20
 
21
  <?php if (isset($title)) { ?>
22
  <div class="form-group">
23
+ <label><?php echo __('Title', 'grw'); ?></label>
24
  <input type="text" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>"/>
25
  </div>
26
  <?php } ?>
27
 
28
  <div class="form-group">
29
+ <label><?php echo __('Pagination', 'grw'); ?></label>
30
  <input type="text" id="<?php echo $this->get_field_id('pagination'); ?>" name="<?php echo $this->get_field_name('pagination'); ?>" value="<?php echo $pagination; ?>"/>
31
  </div>
32
 
33
  <div class="form-group">
34
+ <label><?php echo __('Characters before \'read more\' link', 'grw'); ?></label>
35
  <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; ?>"/>
36
  </div>
37
 
38
  <div class="form-group">
39
+ <label for="<?php echo $this->get_field_id('max_width'); ?>"><?php echo __('Widget width', 'grw'); ?></label>
40
  <input id="<?php echo $this->get_field_id('max_width'); ?>" name="<?php echo $this->get_field_name('max_width'); ?>" value="<?php echo $max_width; ?>" type="text" />
41
  </div>
42
 
43
  <div class="form-group">
44
+ <label for="<?php echo $this->get_field_id('max_height'); ?>"><?php echo __('Widget height', 'grw'); ?></label>
45
  <input id="<?php echo $this->get_field_id('max_height'); ?>" name="<?php echo $this->get_field_name('max_height'); ?>" value="<?php echo $max_height; ?>" type="text" />
46
  </div>
47
 
48
  <div class="form-group">
49
  <label>
50
  <input id="<?php echo $this->get_field_id('refresh_reviews'); ?>" name="<?php echo $this->get_field_name('refresh_reviews'); ?>" type="checkbox" value="1" <?php checked('1', $refresh_reviews); ?>/>
51
+ <?php echo __('Refresh reviews', 'grw'); ?>
52
  <span class="rplg-quest rplg-toggle" title="Click to help">?</span>
53
  <div style="display:none">
54
  The plugin uses the Google Places API to get your reviews. <b>The API only returns the 5 most helpful reviews (it's a limitation of Google, not the plugin)</b>. This option calls the Places API once in three days (to avoid a Google Billing) to check for a new reviews and if there are, adds to the plugin.<br><br>Also if you see the new reviews on Google map, but after some time it's not added to the plugin, it means that Google does not include these reviews to the API and the plugin can't get this.<br><br>If you need to get all reviews, please use <a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin" target="_blank">the Business plugin</a> which uses a Google My Business API, but this GMB API is available only for verified Google business owner accounts.
59
  <div class="form-group">
60
  <label>
61
  <input id="<?php echo $this->get_field_id('hide_based_on'); ?>" name="<?php echo $this->get_field_name('hide_based_on'); ?>" type="checkbox" value="1" <?php checked('1', $hide_based_on); ?>/>
62
+ <?php echo __('Hide \'Based on ... reviews\'', 'grw'); ?>
63
  </label>
64
  </div>
65
 
66
  <div class="form-group">
67
  <label>
68
  <input id="<?php echo $this->get_field_id('hide_reviews'); ?>" name="<?php echo $this->get_field_name('hide_reviews'); ?>" type="checkbox" value="1" <?php checked('1', $hide_reviews); ?>/>
69
+ <?php echo __('Hide reviews, leave only rating header', 'grw'); ?>
70
  </label>
71
  </div>
72
 
73
  <div class="form-group">
74
  <label>
75
  <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); ?>/>
76
+ <?php echo __('Place by center (only if Width is set)', 'grw'); ?>
77
  </label>
78
  </div>
79
 
80
  <div class="form-group">
81
  <label>
82
  <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); ?>/>
83
+ <?php echo __('Dark background', 'grw'); ?>
84
  </label>
85
  </div>
86
 
87
+ <div class="rplg-options-toggle rplg-toggle"><?php echo __('Advance Options', 'grw'); ?></div>
88
  <div class="rplg-options" style="display:none">
89
  <div class="form-group">
90
  <label>
91
  <input id="<?php echo $this->get_field_id('lazy_load_img'); ?>" name="<?php echo $this->get_field_name('lazy_load_img'); ?>" type="checkbox" value="1" <?php checked('1', $lazy_load_img); ?>/>
92
+ <?php echo __('Lazy load images', 'grw'); ?>
93
  </label>
94
  </div>
95
 
96
  <div class="form-group">
97
  <label>
98
  <input id="<?php echo $this->get_field_id('reduce_avatars_size'); ?>" name="<?php echo $this->get_field_name('reduce_avatars_size'); ?>" type="checkbox" value="1" <?php checked('1', $reduce_avatars_size); ?>/>
99
+ <?php echo __('Reduce avatars size', 'grw'); ?>
100
  <span class="rplg-quest rplg-toggle" title="Click to help">?</span>
101
  <div style="display:none">
102
  By default the Google Places API returns the reviewer's avatars of 128px in size, this option reduces the size to 50px.
107
  <div class="form-group">
108
  <label>
109
  <input id="<?php echo $this->get_field_id('def_reviews_link'); ?>" name="<?php echo $this->get_field_name('def_reviews_link'); ?>" type="checkbox" value="1" <?php checked('1', $def_reviews_link); ?>/>
110
+ <?php echo __('Use default reviews link', 'grw'); ?>
111
  <span class="rplg-quest rplg-toggle" title="Click to help">?</span>
112
  <div style="display:none">
113
  If the direct link to all reviews <b>https://search.google.com/local/reviews?placeid=&lt;PLACE_ID&gt;</b> does not work with your Google place, please use this option to use the default reviews link to Google map.
118
  <div class="form-group">
119
  <label>
120
  <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); ?>/>
121
+ <?php echo __('Open links in new Window', 'grw'); ?>
122
  </label>
123
  </div>
124
 
125
  <div class="form-group">
126
  <label>
127
  <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); ?>/>
128
+ <?php echo __('Use no follow links', 'grw'); ?>
129
  </label>
130
  </div>
131
  </div>
132
 
133
  <div class="form-group">
134
  <div class="rplg-pro">
135
+ <?php echo __('Try more features in the Business version: ', 'grw'); ?>
136
  <a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin" target="_blank">
137
+ <?php echo __('Upgrade to Business', 'grw'); ?>
138
  </a>
139
  </div>
140
  </div>
grw-reviews-helper.php CHANGED
@@ -14,7 +14,7 @@ function grw_place($rating, $place, $place_img, $reviews, $dark_theme, $hide_bas
14
  <span class="wp-google-stars"><?php grw_stars($rating); ?></span>
15
  </div>
16
  <?php if (!$hide_based_on && isset($place->review_count)) { ?>
17
- <div class="wp-google-powered"><?php echo grw_i('Based on %s reviews', $place->review_count); ?></div>
18
  <?php } ?>
19
  <?php if ($show_powered) { ?>
20
  <div class="wp-google-powered">
@@ -61,7 +61,7 @@ function grw_place_reviews($place, $reviews, $place_id, $text_size, $pagination,
61
  if (strlen($review->author_name) > 0) {
62
  $author_name = $review->author_name;
63
  } else {
64
- $author_name = grw_i('Google User');
65
  }
66
  ?><div class="wp-google-name"><?php echo $author_name; ?></div><?php
67
  }
@@ -83,11 +83,11 @@ function grw_place_reviews($place, $reviews, $place_id, $text_size, $pagination,
83
  </div>
84
  <?php if ($pagination > 0 && $hr) { ?>
85
  <a class="wp-google-url" href="#" onclick="return rplg_next_reviews.call(this, 'google', <?php echo $pagination; ?>);">
86
- <?php echo grw_i('Next Reviews'); ?>
87
  </a>
88
  <?php } else {
89
  $reviews_link = $def_reviews_link ? $place->url : 'https://search.google.com/local/reviews?placeid=' . $place_id;
90
- grw_anchor($reviews_link, 'wp-google-url', grw_i('See All Reviews'), true, true);
91
  }
92
  }
93
 
@@ -128,7 +128,7 @@ function grw_trim_text($text, $size) {
128
  }
129
  echo $visible_text;
130
  if (grw_strlen($invisible_text) > 0) {
131
- ?><span>... </span><span class="wp-more"><?php echo $invisible_text; ?></span><span class="wp-more-toggle"><?php echo grw_i('read more'); ?></span><?php
132
  }
133
  } else {
134
  echo $text;
14
  <span class="wp-google-stars"><?php grw_stars($rating); ?></span>
15
  </div>
16
  <?php if (!$hide_based_on && isset($place->review_count)) { ?>
17
+ <div class="wp-google-powered"><?php echo vsprintf(__('Based on %s reviews', 'grw'), $place->review_count); ?></div>
18
  <?php } ?>
19
  <?php if ($show_powered) { ?>
20
  <div class="wp-google-powered">
61
  if (strlen($review->author_name) > 0) {
62
  $author_name = $review->author_name;
63
  } else {
64
+ $author_name = __('Google User', 'grw');
65
  }
66
  ?><div class="wp-google-name"><?php echo $author_name; ?></div><?php
67
  }
83
  </div>
84
  <?php if ($pagination > 0 && $hr) { ?>
85
  <a class="wp-google-url" href="#" onclick="return rplg_next_reviews.call(this, 'google', <?php echo $pagination; ?>);">
86
+ <?php echo __('Next Reviews', 'grw'); ?>
87
  </a>
88
  <?php } else {
89
  $reviews_link = $def_reviews_link ? $place->url : 'https://search.google.com/local/reviews?placeid=' . $place_id;
90
+ grw_anchor($reviews_link, 'wp-google-url', __('See All Reviews', 'grw'), true, true);
91
  }
92
  }
93
 
128
  }
129
  echo $visible_text;
130
  if (grw_strlen($invisible_text) > 0) {
131
+ ?><span>... </span><span class="wp-more"><?php echo $invisible_text; ?></span><span class="wp-more-toggle"><?php echo __('read more', 'grw'); ?></span><?php
132
  }
133
  } else {
134
  echo $text;
grw-reviews.php CHANGED
@@ -98,7 +98,7 @@ if ($view_mode == 'list' || $view_mode == '') { ?>
98
  <div class="wp-google-badge-btn">
99
  <svg viewBox="0 0 512 512" height="44" width="44"><g fill="none" fill-rule="evenodd"><path d="M482.56 261.36c0-16.73-1.5-32.83-4.29-48.27H256v91.29h127.01c-5.47 29.5-22.1 54.49-47.09 71.23v59.21h76.27c44.63-41.09 70.37-101.59 70.37-173.46z" fill="#4285f4"/><path d="M256 492c63.72 0 117.14-21.13 156.19-57.18l-76.27-59.21c-21.13 14.16-48.17 22.53-79.92 22.53-61.47 0-113.49-41.51-132.05-97.3H45.1v61.15c38.83 77.13 118.64 130.01 210.9 130.01z" fill="#34a853"/><path d="M123.95 300.84c-4.72-14.16-7.4-29.29-7.4-44.84s2.68-30.68 7.4-44.84V150.01H45.1C29.12 181.87 20 217.92 20 256c0 38.08 9.12 74.13 25.1 105.99l78.85-61.15z" fill="#fbbc05"/><path d="M256 113.86c34.65 0 65.76 11.91 90.22 35.29l67.69-67.69C373.03 43.39 319.61 20 256 20c-92.25 0-172.07 52.89-210.9 130.01l78.85 61.15c18.56-55.78 70.59-97.3 132.05-97.3z" fill="#ea4335"/><path d="M20 20h472v472H20V20z"/></g></svg>
100
  <div class="wp-google-badge-score">
101
- <div><?php echo grw_i('Google Rating'); ?></div>
102
  <span class="wp-google-rating"><?php echo $rating; ?></span>
103
  <span class="wp-google-stars"><?php grw_stars($rating); ?></span>
104
  </div>
98
  <div class="wp-google-badge-btn">
99
  <svg viewBox="0 0 512 512" height="44" width="44"><g fill="none" fill-rule="evenodd"><path d="M482.56 261.36c0-16.73-1.5-32.83-4.29-48.27H256v91.29h127.01c-5.47 29.5-22.1 54.49-47.09 71.23v59.21h76.27c44.63-41.09 70.37-101.59 70.37-173.46z" fill="#4285f4"/><path d="M256 492c63.72 0 117.14-21.13 156.19-57.18l-76.27-59.21c-21.13 14.16-48.17 22.53-79.92 22.53-61.47 0-113.49-41.51-132.05-97.3H45.1v61.15c38.83 77.13 118.64 130.01 210.9 130.01z" fill="#34a853"/><path d="M123.95 300.84c-4.72-14.16-7.4-29.29-7.4-44.84s2.68-30.68 7.4-44.84V150.01H45.1C29.12 181.87 20 217.92 20 256c0 38.08 9.12 74.13 25.1 105.99l78.85-61.15z" fill="#fbbc05"/><path d="M256 113.86c34.65 0 65.76 11.91 90.22 35.29l67.69-67.69C373.03 43.39 319.61 20 256 20c-92.25 0-172.07 52.89-210.9 130.01l78.85 61.15c18.56-55.78 70.59-97.3 132.05-97.3z" fill="#ea4335"/><path d="M20 20h472v472H20V20z"/></g></svg>
100
  <div class="wp-google-badge-score">
101
+ <div><?php echo __('Google Rating', 'grw'); ?></div>
102
  <span class="wp-google-rating"><?php echo $rating; ?></span>
103
  <span class="wp-google-stars"><?php grw_stars($rating); ?></span>
104
  </div>
grw-setting-fig.php CHANGED
@@ -1,4 +1,6 @@
1
- <p>To correctly use this plugin you need to find and create two things - <b><u>Google Place ID</u></b> and <b><u>Google Places API key</u></b> respectively. These are two different values, please do not confuse them.</p>
 
 
2
 
3
  <hr></hr>
4
 
@@ -114,7 +116,7 @@
114
 
115
  <div class="rplg-flex-row">
116
  <div class="rplg-flex-col">
117
- <b>8</b> Now, you need to enable Google Billing. It's mandatory step to use the API key. Don’t worry, <a href="https://developers.google.com/maps/billing-credits" target="_blank">Google is currently giving $200 free credit a month</a> and it should be enough to use the plugin for connecting several Google places without additional fees except this free $200 credits. Go to <a href="https://console.cloud.google.com/project/_/billing/enable" target="_blank">https://console.cloud.google.com/project/_/billing/enable</a>, select your recent created project and click '<b>CREATE BILLING ACCOUNT</b>':
118
  </div>
119
  <div class="rplg-flex-col">
120
  <div class="box-img"><img src="<?php echo GRW_PLUGIN_URL . '/static/img/google_key_8.png'; ?>"></div>
@@ -126,3 +128,5 @@
126
  <b>9</b> Agree Google terms, fill your contact information and start using your Google API key with the plugin.
127
  </div>
128
  </div>
 
 
1
+ <p>To correctly use this plugin you need to get two things - <b><u>Google Place ID</u></b> and <b><u>Google Places API key</u></b>. These are two different values, please do not confuse them.</p>
2
+
3
+ <p style="background: #eee; padding: 4px 10px; border-radius: 4px; border: 1px solid #ccc; font-size: 16px; text-align: center; line-height: 32px;">There is nothing complicated and the whole process will not take even 5 minutes,<br>and as a reward you receive a constantly updated your connected Google Rating and Reviews!</p>
4
 
5
  <hr></hr>
6
 
116
 
117
  <div class="rplg-flex-row">
118
  <div class="rplg-flex-col">
119
+ <b>8</b> Now, you need to enable Google Billing. It's mandatory step to use the API key. <b>Don’t worry, <a href="https://developers.google.com/maps/billing-credits" target="_blank">Google is currently giving $200 free credit a month</b></a> and it should be enough to use the plugin for connecting several Google places without additional fees except this free $200 credits. Go to <a href="https://console.cloud.google.com/project/_/billing/enable" target="_blank">https://console.cloud.google.com/project/_/billing/enable</a>, select your recent created project and click '<b>CREATE BILLING ACCOUNT</b>':
120
  </div>
121
  <div class="rplg-flex-col">
122
  <div class="box-img"><img src="<?php echo GRW_PLUGIN_URL . '/static/img/google_key_8.png'; ?>"></div>
128
  <b>9</b> Agree Google terms, fill your contact information and start using your Google API key with the plugin.
129
  </div>
130
  </div>
131
+
132
+ <p style="text-align:center"><b>Congratulation! Now you can connect and show your Google reviews through <a href="<?php echo admin_url('widgets.php'); ?>" target="_blank">Widget on a sidebar</a> or <a href="<?php echo admin_url('options-general.php?page=grw&grw_tab=shortcode'); ?>" target="_blank">Shortcode</a> on the any page of your website.</b></p>
grw-setting.php CHANGED
@@ -46,16 +46,16 @@ if (isset($_POST['reset_all'])) {
46
  unset($_POST);
47
  ?>
48
  <div class="wrap">
49
- <h3><?php echo grw_i('Google Reviews Widget Reset'); ?></h3>
50
  <form method="POST" action="?page=grw">
51
  <?php wp_nonce_field('grw-wpnonce_grw_reset', 'grw-form_nonce_grw_reset'); ?>
52
- <p><?php echo grw_i('Google Reviews Widget has been reset successfully.') ?></p>
53
  <ul style="list-style: circle;padding-left:20px;">
54
- <li><?php echo grw_i('Local settings for the plugin were removed.') ?></li>
55
  </ul>
56
  <p>
57
- <?php echo grw_i('If you wish to reinstall, you can do that now.') ?>
58
- <a href="?page=grw">&nbsp;<?php echo grw_i('Reinstall') ?></a>
59
  </p>
60
  </form>
61
  </div>
@@ -134,7 +134,7 @@ $grw_enabled = get_option('grw_active') == '1';
134
  $grw_google_api_key = get_option('grw_google_api_key');
135
  ?>
136
 
137
- <span class="rplg-version"><?php echo grw_i('Free Version: %s', esc_html(GRW_VERSION)); ?></span>
138
 
139
  <div class="rplg-setting">
140
 
@@ -146,13 +146,13 @@ $grw_google_api_key = get_option('grw_google_api_key');
146
 
147
  <div data-nav-tabs="">
148
  <div class="nav-tab-wrapper">
149
- <a href="#about" class="nav-tab<?php if ($tab == 'about') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('About'); ?></a>
150
- <a href="#setting" class="nav-tab<?php if ($tab == 'setting') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('Settings'); ?></a>
151
- <a href="#shortcode" class="nav-tab<?php if ($tab == 'shortcode') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('Shortcode'); ?></a>
152
- <a href="#reviews" class="nav-tab<?php if ($tab == 'reviews') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('Reviews'); ?></a>
153
- <a href="#fig" class="nav-tab<?php if ($tab == 'fig') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('Full Installation Guide'); ?></a>
154
- <a href="#support" class="nav-tab<?php if ($tab == 'support') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('Support'); ?></a>
155
- <a href="#advance" class="nav-tab<?php if ($tab == 'advance') { ?> nav-tab-active<?php } ?>"><?php echo grw_i('Advance'); ?></a>
156
  </div>
157
 
158
  <div id="about" class="tab-content" style="display:<?php echo $tab == 'about' ? 'block' : 'none'?>;">
@@ -207,7 +207,7 @@ $grw_google_api_key = get_option('grw_google_api_key');
207
  </div>
208
  <div class="wp-review-field-option">
209
  <?php wp_nonce_field('grw-wpnonce_grw_active', 'grw-form_nonce_grw_active'); ?>
210
- <input type="submit" name="grw_active" class="button" value="<?php echo $grw_enabled ? grw_i('Disable') : grw_i('Enable'); ?>" />
211
  </div>
212
  </div>
213
  </form>
@@ -245,8 +245,8 @@ $grw_google_api_key = get_option('grw_google_api_key');
245
  </div>
246
  <div class="rplg-flex-col6">
247
  <div class="shortcode-content">
248
- <textarea id="rplg_shortcode" style="display:block;width:100%;height:200px;padding:10px" onclick="window.rplg_shortcode.select();document.execCommand('copy');window.rplg_shortcode_msg.innerHTML='Shortcode copied, please paste it to the page content';" readonly>Connect Google place to show the shortcode</textarea>
249
- <p id="rplg_shortcode_msg"></p>
250
  </div>
251
  </div>
252
  </div>
46
  unset($_POST);
47
  ?>
48
  <div class="wrap">
49
+ <h3><?php echo __('Google Reviews Widget Reset', 'grw'); ?></h3>
50
  <form method="POST" action="?page=grw">
51
  <?php wp_nonce_field('grw-wpnonce_grw_reset', 'grw-form_nonce_grw_reset'); ?>
52
+ <p><?php echo __('Google Reviews Widget has been reset successfully.', 'grw') ?></p>
53
  <ul style="list-style: circle;padding-left:20px;">
54
+ <li><?php echo __('Local settings for the plugin were removed.', 'grw') ?></li>
55
  </ul>
56
  <p>
57
+ <?php echo __('If you wish to reinstall, you can do that now.', 'grw') ?>
58
+ <a href="?page=grw">&nbsp;<?php echo __('Reinstall', 'grw') ?></a>
59
  </p>
60
  </form>
61
  </div>
134
  $grw_google_api_key = get_option('grw_google_api_key');
135
  ?>
136
 
137
+ <span class="rplg-version"><?php echo vsprintf(__('Free Version: %s', 'grw'), esc_html(GRW_VERSION)); ?></span>
138
 
139
  <div class="rplg-setting">
140
 
146
 
147
  <div data-nav-tabs="">
148
  <div class="nav-tab-wrapper">
149
+ <a href="#about" class="nav-tab<?php if ($tab == 'about') { ?> nav-tab-active<?php } ?>"><?php echo __('About', 'grw'); ?></a>
150
+ <a href="#setting" class="nav-tab<?php if ($tab == 'setting') { ?> nav-tab-active<?php } ?>"><?php echo __('Settings', 'grw'); ?></a>
151
+ <a href="#shortcode" class="nav-tab<?php if ($tab == 'shortcode') { ?> nav-tab-active<?php } ?>"><?php echo __('Shortcode', 'grw'); ?></a>
152
+ <a href="#reviews" class="nav-tab<?php if ($tab == 'reviews') { ?> nav-tab-active<?php } ?>"><?php echo __('Reviews', 'grw'); ?></a>
153
+ <a href="#fig" class="nav-tab<?php if ($tab == 'fig') { ?> nav-tab-active<?php } ?>"><?php echo __('Full Installation Guide', 'grw'); ?></a>
154
+ <a href="#support" class="nav-tab<?php if ($tab == 'support') { ?> nav-tab-active<?php } ?>"><?php echo __('Support', 'grw'); ?></a>
155
+ <a href="#advance" class="nav-tab<?php if ($tab == 'advance') { ?> nav-tab-active<?php } ?>"><?php echo __('Advance', 'grw'); ?></a>
156
  </div>
157
 
158
  <div id="about" class="tab-content" style="display:<?php echo $tab == 'about' ? 'block' : 'none'?>;">
207
  </div>
208
  <div class="wp-review-field-option">
209
  <?php wp_nonce_field('grw-wpnonce_grw_active', 'grw-form_nonce_grw_active'); ?>
210
+ <input type="submit" name="grw_active" class="button" value="<?php echo $grw_enabled ? __('Disable', 'grw') : __('Enable', 'grw'); ?>" />
211
  </div>
212
  </div>
213
  </form>
245
  </div>
246
  <div class="rplg-flex-col6">
247
  <div class="shortcode-content">
248
+ <textarea id="rplg_shortcode" style="display:block;width:100%;height:200px;padding:10px" onclick="if (rplg_shortcode.value.indexOf('[grw')==0){window.rplg_shortcode.select();document.execCommand('copy');window.rplg_shortcode_msg.innerHTML='Shortcode copied, please paste it to the page content';}" readonly>Connect Google place to show the shortcode</textarea>
249
+ <p id="rplg_shortcode_msg">After shortcode created, click by it to copy</p>
250
  </div>
251
  </div>
252
  </div>
grw-widget.php CHANGED
@@ -40,7 +40,7 @@ class Goog_Reviews_Widget extends WP_Widget {
40
  'Google Reviews Widget', // Name
41
  array(
42
  'classname' => 'google-reviews-widget',
43
- 'description' => grw_i('Display Google Places Reviews on your website.', 'grw')
44
  )
45
  );
46
 
@@ -103,7 +103,7 @@ class Goog_Reviews_Widget extends WP_Widget {
103
  }
104
  } else { ?>
105
  <div class="grw-error" style="padding:10px;color:#B94A48;background-color:#F2DEDE;border-color:#EED3D7;">
106
- <?php echo grw_i('Please check that this widget <b>Google Reviews</b> has a Google Place ID set.'); ?>
107
  </div>
108
  <?php }
109
  echo $after_widget;
@@ -145,7 +145,7 @@ class Goog_Reviews_Widget extends WP_Widget {
145
  <?php
146
  } else {
147
  ?>
148
- <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>
149
  <script type="text/javascript">
150
  var apikey = document.querySelectorAll('.grw-apikey');
151
  if (apikey) {
40
  'Google Reviews Widget', // Name
41
  array(
42
  'classname' => 'google-reviews-widget',
43
+ 'description' => __('Display Google Places Reviews on your website.', 'grw')
44
  )
45
  );
46
 
103
  }
104
  } else { ?>
105
  <div class="grw-error" style="padding:10px;color:#B94A48;background-color:#F2DEDE;border-color:#EED3D7;">
106
+ <?php echo __('Please check that this widget <b>Google Reviews</b> has a Google Place ID set.', 'grw'); ?>
107
  </div>
108
  <?php }
109
  echo $after_widget;
145
  <?php
146
  } else {
147
  ?>
148
+ <h4 class="text-left">First of all, please <a href="<?php echo admin_url('options-general.php?page=grw&grw_tab=fig'); ?>">create and save your own Google API Key</a> in the Settings</h4>
149
  <script type="text/javascript">
150
  var apikey = document.querySelectorAll('.grw-apikey');
151
  if (apikey) {
grw.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Widget for Google Reviews
4
  Plugin URI: https://richplugins.com/business-reviews-bundle-wordpress-plugin
5
  Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
6
  Author: RichPlugins <support@richplugins.com>
7
- Version: 1.9.7
8
  Author URI: https://richplugins.com
9
  Text Domain: widget-google-reviews
10
  Domain Path: /languages
@@ -15,7 +15,7 @@ require(ABSPATH . 'wp-includes/version.php');
15
  include_once(dirname(__FILE__) . '/api/urlopen.php');
16
  include_once(dirname(__FILE__) . '/helper/debug.php');
17
 
18
- define('GRW_VERSION', '1.9.7');
19
  define('GRW_GOOGLE_PLACE_API', 'https://maps.googleapis.com/maps/api/place/');
20
  define('GRW_GOOGLE_AVATAR', 'https://lh3.googleusercontent.com/-8hepWJzFXpE/AAAAAAAAAAI/AAAAAAAAAAA/I80WzYfIxCQ/s128-c/114307615494839964028.jpg');
21
  define('GRW_PLUGIN_URL', plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
@@ -63,7 +63,11 @@ function grw_setting() {
63
  function grw_plugin_action_links($links, $file) {
64
  $plugin_file = basename(__FILE__);
65
  if (basename($file) == $plugin_file) {
66
- $settings_link = '<a href="' . admin_url('options-general.php?page=grw') . '">'.grw_i('Settings') . '</a>';
 
 
 
 
67
  array_unshift($links, $settings_link);
68
  }
69
  return $links;
@@ -77,8 +81,8 @@ function grw_plugin_row_meta($input, $file) {
77
  }
78
 
79
  $links = array(
80
- '<a href="' . admin_url('options-general.php?page=grw&grw_tab=fig') . '" target="_blank">' . grw_i('View Documentation') . '</a>',
81
- '<a href="' . esc_url('https://richplugins.com/business-reviews-bundle-wordpress-plugin') . '" target="_blank">' . grw_i('Upgrade to Business') . ' &raquo;</a>',
82
  );
83
  $input = array_merge($input, $links);
84
  return $input;
@@ -254,7 +258,7 @@ function grw_shortcode($atts) {
254
  if (empty($place_id)) {
255
  ?>
256
  <div class="grw-error" style="padding:10px;color:#b94a48;background-color:#f2dede;border-color:#eed3d7;max-width:200px;">
257
- <?php echo grw_i('<b>Google Reviews Widget</b>: required attribute place_id is not defined'); ?>
258
  </div>
259
  <?php
260
  } else {
@@ -274,7 +278,7 @@ function grw_request_handler() {
274
  case 'grw_google_api_key':
275
  if (current_user_can('manage_options')) {
276
  if (isset($_POST['grw_wpnonce']) === false) {
277
- $error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
278
  $response = compact('error');
279
  } else {
280
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
@@ -292,7 +296,7 @@ function grw_request_handler() {
292
  case 'grw_search':
293
  if (current_user_can('manage_options')) {
294
  if (isset($_GET['grw_wpnonce']) === false) {
295
- $error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
296
  $response = compact('error');
297
  } else {
298
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
@@ -323,7 +327,7 @@ function grw_request_handler() {
323
  case 'grw_reviews':
324
  if (current_user_can('manage_options')) {
325
  if (isset($_GET['grw_wpnonce']) === false) {
326
- $error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
327
  $response = compact('error');
328
  } else {
329
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
@@ -348,7 +352,7 @@ function grw_request_handler() {
348
  case 'grw_save':
349
  if (current_user_can('manage_options')) {
350
  if (isset($_POST['grw_wpnonce']) === false) {
351
- $error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
352
  $response = compact('error');
353
  } else {
354
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
@@ -379,7 +383,7 @@ function grw_request_handler() {
379
  case 'grw_db_reviews':
380
  if (current_user_can('manage_options')) {
381
  if (isset($_GET['grw_wpnonce']) === false) {
382
- $error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
383
  $response = compact('error');
384
  } else {
385
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
@@ -401,7 +405,7 @@ function grw_request_handler() {
401
  case 'grw_hide_review':
402
  if (current_user_can('manage_options')) {
403
  if (isset($_POST['grw_wpnonce']) === false) {
404
- $error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
405
  $response = compact('error');
406
  } else {
407
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
@@ -526,13 +530,13 @@ function grw_admin_notice() {
526
  $activation_time = get_option('grw_activation_time');
527
 
528
  if ($activation_time == '') {
529
- $activation_time = time() - 86400*28;
530
  update_option('grw_activation_time', $activation_time);
531
  }
532
 
533
  $rev_notice = isset($_GET['grw_rev_notice']) ? $_GET['grw_rev_notice'] : '';
534
  if ($rev_notice == 'later') {
535
- $activation_time = time() - 86400*23;
536
  update_option('grw_activation_time', $activation_time);
537
  update_option('grw_rev_notice_hide', 'later');
538
  } else if ($rev_notice == 'never') {
@@ -544,14 +548,14 @@ function grw_admin_notice() {
544
 
545
  if ($rev_notice_show == '' || $rev_notice_show == 'grw') {
546
 
547
- if ($rev_notice_hide != 'never' && $activation_time < (time() - 86400*30)) {
548
  update_option('rplg_rev_notice_show', 'grw');
549
  $class = 'notice notice-info is-dismissible';
550
  $url = remove_query_arg(array('taction', 'tid', 'sortby', 'sortdir', 'opt'));
551
  $url_later = esc_url(add_query_arg('grw_rev_notice', 'later', $url));
552
  $url_never = esc_url(add_query_arg('grw_rev_notice', 'never', $url));
553
 
554
- $notice = '<p style="font-weight:normal;color:#156315">Hey, I noticed you have been using my <b>Google Reviews Widget</b> plugin for a while now – that’s awesome!<br>Could you please do me a BIG favor and give it a 5-star rating on WordPress?<br><br>--<br>Thanks!<br>Daniel K.<br></p><ul style="font-weight:bold;"><li><a href="https://wordpress.org/support/plugin/widget-google-reviews/reviews/#new-post" target="_blank">OK, you deserve it</a></li><li><a href="' . $url_later . '">Not now, maybe later</a></li><li><a href="' . $url_never . '">Do not remind me again</a></li></ul><p>By the way, if you have been thinking about upgrading to the <a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin" target="_blank">Business</a> version, here is a 25% off onboard coupon -> <b>business25off</b></p>';
555
 
556
  printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), $notice);
557
  } else {
@@ -602,14 +606,6 @@ function grw_business_avatar($response_result_json) {
602
  return null;
603
  }
604
 
605
- function grw_i($text, $params=null) {
606
- if (!is_array($params)) {
607
- $params = func_get_args();
608
- $params = array_slice($params, 1);
609
- }
610
- return vsprintf(__($text, 'grw'), $params);
611
- }
612
-
613
  if (!function_exists('esc_html')) {
614
  function esc_html( $text ) {
615
  $safe_text = wp_check_invalid_utf8( $text );
4
  Plugin URI: https://richplugins.com/business-reviews-bundle-wordpress-plugin
5
  Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
6
  Author: RichPlugins <support@richplugins.com>
7
+ Version: 1.9.8
8
  Author URI: https://richplugins.com
9
  Text Domain: widget-google-reviews
10
  Domain Path: /languages
15
  include_once(dirname(__FILE__) . '/api/urlopen.php');
16
  include_once(dirname(__FILE__) . '/helper/debug.php');
17
 
18
+ define('GRW_VERSION', '1.9.8');
19
  define('GRW_GOOGLE_PLACE_API', 'https://maps.googleapis.com/maps/api/place/');
20
  define('GRW_GOOGLE_AVATAR', 'https://lh3.googleusercontent.com/-8hepWJzFXpE/AAAAAAAAAAI/AAAAAAAAAAA/I80WzYfIxCQ/s128-c/114307615494839964028.jpg');
21
  define('GRW_PLUGIN_URL', plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
63
  function grw_plugin_action_links($links, $file) {
64
  $plugin_file = basename(__FILE__);
65
  if (basename($file) == $plugin_file) {
66
+ $settings_link = '<a href="' . admin_url('options-general.php?page=grw&grw_tab=fig') . '">' .
67
+ '<span style="background-color:#e7711b;color:#fff;font-weight:bold;padding:0px 8px 2px">' .
68
+ 'Connect Reviews' .
69
+ '</span>' .
70
+ '</a>';
71
  array_unshift($links, $settings_link);
72
  }
73
  return $links;
81
  }
82
 
83
  $links = array(
84
+ '<a href="' . admin_url('options-general.php?page=grw&grw_tab=fig') . '" target="_blank">' . __('View Documentation', 'grw') . '</a>',
85
+ '<a href="' . esc_url('https://richplugins.com/business-reviews-bundle-wordpress-plugin') . '" target="_blank">' . __('Upgrade to Business', 'grw') . ' &raquo;</a>',
86
  );
87
  $input = array_merge($input, $links);
88
  return $input;
258
  if (empty($place_id)) {
259
  ?>
260
  <div class="grw-error" style="padding:10px;color:#b94a48;background-color:#f2dede;border-color:#eed3d7;max-width:200px;">
261
+ <?php echo __('<b>Google Reviews Widget</b>: required attribute place_id is not defined', 'grw'); ?>
262
  </div>
263
  <?php
264
  } else {
278
  case 'grw_google_api_key':
279
  if (current_user_can('manage_options')) {
280
  if (isset($_POST['grw_wpnonce']) === false) {
281
+ $error = __('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.', 'grw');
282
  $response = compact('error');
283
  } else {
284
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
296
  case 'grw_search':
297
  if (current_user_can('manage_options')) {
298
  if (isset($_GET['grw_wpnonce']) === false) {
299
+ $error = __('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.', 'grw');
300
  $response = compact('error');
301
  } else {
302
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
327
  case 'grw_reviews':
328
  if (current_user_can('manage_options')) {
329
  if (isset($_GET['grw_wpnonce']) === false) {
330
+ $error = __('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.', 'grw');
331
  $response = compact('error');
332
  } else {
333
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
352
  case 'grw_save':
353
  if (current_user_can('manage_options')) {
354
  if (isset($_POST['grw_wpnonce']) === false) {
355
+ $error = __('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.', 'grw');
356
  $response = compact('error');
357
  } else {
358
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
383
  case 'grw_db_reviews':
384
  if (current_user_can('manage_options')) {
385
  if (isset($_GET['grw_wpnonce']) === false) {
386
+ $error = __('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.', 'grw');
387
  $response = compact('error');
388
  } else {
389
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
405
  case 'grw_hide_review':
406
  if (current_user_can('manage_options')) {
407
  if (isset($_POST['grw_wpnonce']) === false) {
408
+ $error = __('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.', 'grw');
409
  $response = compact('error');
410
  } else {
411
  check_admin_referer('grw_wpnonce', 'grw_wpnonce');
530
  $activation_time = get_option('grw_activation_time');
531
 
532
  if ($activation_time == '') {
533
+ $activation_time = time() - 86400*2;
534
  update_option('grw_activation_time', $activation_time);
535
  }
536
 
537
  $rev_notice = isset($_GET['grw_rev_notice']) ? $_GET['grw_rev_notice'] : '';
538
  if ($rev_notice == 'later') {
539
+ $activation_time = time() - 86400*2;
540
  update_option('grw_activation_time', $activation_time);
541
  update_option('grw_rev_notice_hide', 'later');
542
  } else if ($rev_notice == 'never') {
548
 
549
  if ($rev_notice_show == '' || $rev_notice_show == 'grw') {
550
 
551
+ if ($rev_notice_hide != 'never' && $activation_time < (time() - 86400*3)) {
552
  update_option('rplg_rev_notice_show', 'grw');
553
  $class = 'notice notice-info is-dismissible';
554
  $url = remove_query_arg(array('taction', 'tid', 'sortby', 'sortdir', 'opt'));
555
  $url_later = esc_url(add_query_arg('grw_rev_notice', 'later', $url));
556
  $url_never = esc_url(add_query_arg('grw_rev_notice', 'never', $url));
557
 
558
+ $notice = '<p style="font-weight:normal;color:#156315">Hey, I am happy to see that you\'ve been using our <b>Google Reviews Widget</b> plugin for a while now – that’s awesome!<br>Could you please do me a BIG favor and give it a 5-star rating on WordPress?<br><br>--<br>Thanks!<br>Daniel K.<br></p><ul style="font-weight:bold;"><li><a href="https://wordpress.org/support/plugin/widget-google-reviews/reviews/#new-post" target="_blank">OK, you deserve it</a></li><li><a href="' . $url_later . '">Not now, maybe later</a></li><li><a href="' . $url_never . '">Do not remind me again</a></li></ul><p>By the way, if you have been thinking about upgrading to the <a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin" target="_blank">Business</a> version, here is a 25% off onboard coupon -> <b>business25off</b></p>';
559
 
560
  printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), $notice);
561
  } else {
606
  return null;
607
  }
608
 
 
 
 
 
 
 
 
 
609
  if (!function_exists('esc_html')) {
610
  function esc_html( $text ) {
611
  $safe_text = wp_check_invalid_utf8( $text );
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Widget for Google Reviews ===
2
  Contributors: richplugins
3
  Donate link: https://richplugins.com/business-reviews-bundle-wordpress-plugin
4
- Tags: google, google reviews, reviews, rating, widget, google business, testimonials, google places reviews
5
  Requires at least: 2.8
6
  Tested up to: 5.8
7
- Stable tag: 1.9.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -24,6 +24,8 @@ This plugin display Google Business Reviews on your websites in sidebar widget.
24
 
25
  * Free!
26
  * SEO
 
 
27
  * Shortcode support!
28
  * Auto refresh reviews
29
  * Shows "Based on ... reviews" section
@@ -46,9 +48,10 @@ This plugin display Google Business Reviews on your websites in sidebar widget.
46
  [Upgrade to Business](https://richplugins.com/business-reviews-bundle-wordpress-plugin)
47
 
48
  * New awesome flash theme!
49
- * Displays all reviews through Google My Business (GMB) API
 
 
50
  * Merge reviews between each other from different platforms (Google, Facebook, Yelp) and places
51
- * Google Rich Snippets (schema.org)
52
  * Powerful <b>Collection Builder</b>
53
  * Slider/Grid themes to show G+ reviews like testimonials
54
  * Google Trust Badge (right/left fixed or embedded)
@@ -80,6 +83,11 @@ Why limit your reviews to just Google Reviews? Check out our other free reviews
80
 
81
  == Changelog ==
82
 
 
 
 
 
 
83
  = 1.9.7 =
84
  * Update to WordPress 5.8
85
  * Update settings page and Full Installation Guide
1
  === Widget for Google Reviews ===
2
  Contributors: richplugins
3
  Donate link: https://richplugins.com/business-reviews-bundle-wordpress-plugin
4
+ Tags: google reviews, google, reviews, rating, widget, google business, testimonials, google places reviews, map reviews
5
  Requires at least: 2.8
6
  Tested up to: 5.8
7
+ Stable tag: 1.9.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
24
 
25
  * Free!
26
  * SEO
27
+ * Multiple Google places connection
28
+ * Reviews auto-updating
29
  * Shortcode support!
30
  * Auto refresh reviews
31
  * Shows "Based on ... reviews" section
48
  [Upgrade to Business](https://richplugins.com/business-reviews-bundle-wordpress-plugin)
49
 
50
  * New awesome flash theme!
51
+ * Possibility to connect multiple locations
52
+ * Displays ALL reviews through Google My Business (GMB) API
53
+ * Automatically reviews sync
54
  * Merge reviews between each other from different platforms (Google, Facebook, Yelp) and places
 
55
  * Powerful <b>Collection Builder</b>
56
  * Slider/Grid themes to show G+ reviews like testimonials
57
  * Google Trust Badge (right/left fixed or embedded)
83
 
84
  == Changelog ==
85
 
86
+ = 1.9.8 =
87
+ * Improved usability
88
+ * Installation guide fixed
89
+ * Bugfix: __ function instead of grw_i
90
+
91
  = 1.9.7 =
92
  * Update to WordPress 5.8
93
  * Update settings page and Full Installation Guide