Google Reviews Widget - Version 1.8

Version Description

  • Improve: added advance options panel
  • Bugfix: 404 link to all reviews page for some places
Download this release

Release Info

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

Code changes from version 1.7.9 to 1.8

grw-options.php CHANGED
@@ -70,36 +70,50 @@
70
  </label>
71
  </div>
72
 
73
- <div class="form-group">
74
- <label>
75
- <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); ?>/>
76
- <?php echo grw_i('Reduce avatars size'); ?>
77
- <span class="rplg-quest rplg-toggle" title="Click to help">?</span>
78
- <div style="display:none">
79
- By default the Google Places API returns the reviewer's avatars of 128px in size, this option reduces the size to 50px.
80
- </div>
81
- </label>
82
- </div>
83
 
84
- <div class="form-group">
85
- <label>
86
- <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); ?>/>
87
- <?php echo grw_i('Lazy load images'); ?>
88
- </label>
89
- </div>
 
 
 
 
90
 
91
- <div class="form-group">
92
- <label>
93
- <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); ?>/>
94
- <?php echo grw_i('Open links in new Window'); ?>
95
- </label>
96
- </div>
 
 
 
 
97
 
98
- <div class="form-group">
99
- <label>
100
- <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); ?>/>
101
- <?php echo grw_i('Use no follow links'); ?>
102
- </label>
 
 
 
 
 
 
 
 
103
  </div>
104
 
105
  <div class="form-group">
70
  </label>
71
  </div>
72
 
73
+ <div class="rplg-options-toggle rplg-toggle"><?php echo grw_i('Advance Options'); ?></div>
74
+ <div class="rplg-options" style="display:none">
75
+ <div class="form-group">
76
+ <label>
77
+ <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); ?>/>
78
+ <?php echo grw_i('Lazy load images'); ?>
79
+ </label>
80
+ </div>
 
 
81
 
82
+ <div class="form-group">
83
+ <label>
84
+ <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); ?>/>
85
+ <?php echo grw_i('Reduce avatars size'); ?>
86
+ <span class="rplg-quest rplg-toggle" title="Click to help">?</span>
87
+ <div style="display:none">
88
+ By default the Google Places API returns the reviewer's avatars of 128px in size, this option reduces the size to 50px.
89
+ </div>
90
+ </label>
91
+ </div>
92
 
93
+ <div class="form-group">
94
+ <label>
95
+ <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); ?>/>
96
+ <?php echo grw_i('Use default reviews link'); ?>
97
+ <span class="rplg-quest rplg-toggle" title="Click to help">?</span>
98
+ <div style="display:none">
99
+ 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.
100
+ </div>
101
+ </label>
102
+ </div>
103
 
104
+ <div class="form-group">
105
+ <label>
106
+ <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); ?>/>
107
+ <?php echo grw_i('Open links in new Window'); ?>
108
+ </label>
109
+ </div>
110
+
111
+ <div class="form-group">
112
+ <label>
113
+ <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); ?>/>
114
+ <?php echo grw_i('Use no follow links'); ?>
115
+ </label>
116
+ </div>
117
  </div>
118
 
119
  <div class="form-group">
grw-reviews-helper.php CHANGED
@@ -22,7 +22,7 @@ function grw_place($rating, $place, $place_img, $reviews, $dark_theme, $show_pow
22
  <?php
23
  }
24
 
25
- function grw_place_reviews($place, $reviews, $place_id, $text_size, $pagination, $reduce_avatars_size, $open_link, $nofollow_link, $lazy_load_img) {
26
  ?>
27
  <div class="wp-google-reviews">
28
  <?php
@@ -78,7 +78,8 @@ function grw_place_reviews($place, $reviews, $place_id, $text_size, $pagination,
78
  <?php echo grw_i('Next Reviews'); ?>
79
  </a>
80
  <?php } else {
81
- grw_anchor('https://search.google.com/local/reviews?placeid=' . $place_id, 'wp-google-url', grw_i('See All Reviews'), true, true);
 
82
  }
83
  }
84
 
22
  <?php
23
  }
24
 
25
+ function grw_place_reviews($place, $reviews, $place_id, $text_size, $pagination, $reduce_avatars_size, $open_link, $nofollow_link, $lazy_load_img, $def_reviews_link) {
26
  ?>
27
  <div class="wp-google-reviews">
28
  <?php
78
  <?php echo grw_i('Next Reviews'); ?>
79
  </a>
80
  <?php } else {
81
+ $reviews_link = $def_reviews_link ? $place->url : 'https://search.google.com/local/reviews?placeid=' . $place_id;
82
+ grw_anchor($reviews_link, 'wp-google-url', grw_i('See All Reviews'), true, true);
83
  }
84
  }
85
 
grw-reviews.php CHANGED
@@ -88,7 +88,7 @@ if ($view_mode != 'list') { ?>
88
  <div class="wp-google-body"></div>
89
  <div class="wp-google-content">
90
  <div class="wp-google-content-inner">
91
- <?php grw_place_reviews($place, $reviews, $place_id, $text_size, $pagination, $reduce_avatars_size, $open_link, $nofollow_link, $lazy_load_img); ?>
92
  </div>
93
  </div>
94
  <div class="wp-google-footer">
@@ -106,7 +106,7 @@ if ($view_mode != 'list') { ?>
106
  <?php grw_place($rating, $place, $place_img, $reviews, $dark_theme); ?>
107
  </div>
108
  <div class="wp-google-content-inner">
109
- <?php grw_place_reviews($place, $reviews, $place_id, $text_size, $pagination, $reduce_avatars_size, $open_link, $nofollow_link, $lazy_load_img); ?>
110
  </div>
111
  </div>
112
  </div>
88
  <div class="wp-google-body"></div>
89
  <div class="wp-google-content">
90
  <div class="wp-google-content-inner">
91
+ <?php grw_place_reviews($place, $reviews, $place_id, $text_size, $pagination, $reduce_avatars_size, $open_link, $nofollow_link, $lazy_load_img, $def_reviews_link); ?>
92
  </div>
93
  </div>
94
  <div class="wp-google-footer">
106
  <?php grw_place($rating, $place, $place_img, $reviews, $dark_theme); ?>
107
  </div>
108
  <div class="wp-google-content-inner">
109
+ <?php grw_place_reviews($place, $reviews, $place_id, $text_size, $pagination, $reduce_avatars_size, $open_link, $nofollow_link, $lazy_load_img, $def_reviews_link); ?>
110
  </div>
111
  </div>
112
  </div>
grw-widget.php CHANGED
@@ -28,6 +28,7 @@ class Goog_Reviews_Widget extends WP_Widget {
28
  'open_link' => true,
29
  'nofollow_link' => true,
30
  'lazy_load_img' => true,
 
31
  'reviews_lang' => '',
32
  );
33
 
28
  'open_link' => true,
29
  'nofollow_link' => true,
30
  'lazy_load_img' => true,
31
+ 'def_reviews_link' => false,
32
  'reviews_lang' => '',
33
  );
34
 
grw.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Reviews Widget
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.7.9
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.7.9');
17
  define('GRW_GOOGLE_PLACE_API', 'https://maps.googleapis.com/maps/api/place/');
18
  define('GRW_GOOGLE_AVATAR', 'https://lh3.googleusercontent.com/-8hepWJzFXpE/AAAAAAAAAAI/AAAAAAAAAAA/I80WzYfIxCQ/s50-c/114307615494839964028.jpg');
19
  define('GRW_PLUGIN_URL', plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
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.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.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/s50-c/114307615494839964028.jpg');
19
  define('GRW_PLUGIN_URL', plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
  === Google Reviews Widget ===
2
  Contributors: richplugins
3
  Donate link: https://richplugins.com/business-reviews-bundle-wordpress-plugin
4
- Tags: google, reviews, google reviews, google places, google places reviews, testimonials, google review widget, google business reviews, slider, google review, review, google place review, google map reviews, google reviews pro, facebook reviews, facebook page reviews, yelp reviews, yelp business reviews
5
  Requires at least: 2.8
6
  Tested up to: 5.2
7
- Stable tag: 1.7.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Google Reviews Widget! Shows Google reviews on your WordPress website to increase user confidence and SEO.
12
 
13
  == Description ==
14
 
@@ -77,6 +77,10 @@ Why limit your reviews to just Google Reviews? Check out our other free reviews
77
 
78
  == Changelog ==
79
 
 
 
 
 
80
  = 1.7.9 =
81
  * Bugfix: is_admin checks for notice
82
 
1
  === Google Reviews Widget ===
2
  Contributors: richplugins
3
  Donate link: https://richplugins.com/business-reviews-bundle-wordpress-plugin
4
+ Tags: Google, reviews, widget, testimonials, Google Places reviews
5
  Requires at least: 2.8
6
  Tested up to: 5.2
7
+ Stable tag: 1.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Google reviews widget and shortcode! Shows Google reviews on your WordPress website to increase user confidence and SEO.
12
 
13
  == Description ==
14
 
77
 
78
  == Changelog ==
79
 
80
+ = 1.8 =
81
+ * Improve: added advance options panel
82
+ * Bugfix: 404 link to all reviews page for some places
83
+
84
  = 1.7.9 =
85
  * Bugfix: is_admin checks for notice
86
 
static/css/rplg-wp.css CHANGED
@@ -32,6 +32,14 @@
32
  margin: 10px 0;
33
  }
34
 
 
 
 
 
 
 
 
 
35
  .rplg-options {
36
  padding: 0px 4px;
37
  }
32
  margin: 10px 0;
33
  }
34
 
35
+ .rplg-options-toggle {
36
+ padding: 10px;
37
+ margin: 10px 0 0;
38
+ cursor: pointer;
39
+ border: 1px solid #dbdbdb;
40
+ background: #eee url('../img/button-down-black.svg') no-repeat right;
41
+ }
42
+
43
  .rplg-options {
44
  padding: 0px 4px;
45
  }