Google Reviews Widget - Version 1.48

Version Description

  • Bugfix, update readme
Download this release

Release Info

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

Code changes from version 1.47 to 1.48

api/grw-api.php CHANGED
@@ -34,12 +34,12 @@ class GoogleReviewsWidgetAPI {
34
  array_push($places, array(
35
  'icon' => $place->icon,
36
  'name' => $place->name,
37
- 'rating' => $place->rating,
38
  'formatted_address' => $place->formatted_address,
39
  'place_id' => $place->place_id,
40
  'reference' => $place->reference,
41
- 'url' => $place->url,
42
- 'website' => $place->website
43
  ));
44
  }
45
  }
@@ -62,7 +62,7 @@ class GoogleReviewsWidgetAPI {
62
  array_push($reviews, array(
63
  'author_name' => $review->author_name,
64
  'author_url' => $review->author_url,
65
- 'profile_photo_url' => $review->profile_photo_url,
66
  'rating' => $review->rating,
67
  'text' => $review->text,
68
  'time' => $review->time,
@@ -73,12 +73,12 @@ class GoogleReviewsWidgetAPI {
73
  $place = array(
74
  'icon' => $result->icon,
75
  'name' => $result->name,
76
- 'rating' => $result->rating,
77
  'formatted_address' => $result->formatted_address,
78
  'place_id' => $result->place_id,
79
  'reference' => $result->reference,
80
  'url' => $result->url,
81
- 'website' => $result->website,
82
  'reviews' => $reviews
83
  );
84
  }
34
  array_push($places, array(
35
  'icon' => $place->icon,
36
  'name' => $place->name,
37
+ 'rating' => isset($place->rating) ? $place->rating : null,
38
  'formatted_address' => $place->formatted_address,
39
  'place_id' => $place->place_id,
40
  'reference' => $place->reference,
41
+ 'url' => isset($place->url) ? $place->url : null,
42
+ 'website' => isset($place->website) ? $place->website : null
43
  ));
44
  }
45
  }
62
  array_push($reviews, array(
63
  'author_name' => $review->author_name,
64
  'author_url' => $review->author_url,
65
+ 'profile_photo_url' => isset($review->profile_photo_url) ? $review->profile_photo_url : null,
66
  'rating' => $review->rating,
67
  'text' => $review->text,
68
  'time' => $review->time,
73
  $place = array(
74
  'icon' => $result->icon,
75
  'name' => $result->name,
76
+ 'rating' => isset($result->rating) ? $result->rating : null,
77
  'formatted_address' => $result->formatted_address,
78
  'place_id' => $result->place_id,
79
  'reference' => $result->reference,
80
  'url' => $result->url,
81
+ 'website' => isset($result->website) ? $result->website : null,
82
  'reviews' => $reviews
83
  );
84
  }
grw-reviews.php CHANGED
@@ -1,20 +1,8 @@
1
  <?php
2
  include_once(dirname(__FILE__) . '/grw-reviews-helper.php');
3
 
4
- if ($min_filter > 0) {
5
- $min_filter_where = ' AND rating >= ' . $min_filter;
6
- } else {
7
- $min_filter_where = '';
8
- }
9
- switch ($sort) {
10
- case '1': $sort_order = ' ORDER BY time DESC'; break;
11
- case '2': $sort_order = ' ORDER BY time ASC'; break;
12
- case '3': $sort_order = ' ORDER BY rating DESC'; break;
13
- case '4': $sort_order = ' ORDER BY rating ASC'; break;
14
- default: $sort_order = '';
15
- }
16
  $place = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "grp_google_place WHERE place_id = %s", $place_id));
17
- $reviews = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "grp_google_review WHERE google_place_id = %d" . $min_filter_where . $sort_order, $place->id));
18
 
19
  $rating = 0;
20
  if ($place->rating > 0) {
@@ -24,6 +12,7 @@ if ($place->rating > 0) {
24
  $rating = $rating + $review->rating;
25
  }
26
  $rating = round($rating / count($reviews), 1);
 
27
  }
28
  ?>
29
 
@@ -43,7 +32,7 @@ if ($place->rating > 0) {
43
  </div>
44
  <div class="wp-google-form" style="display:none">
45
  <div class="wp-google-head">
46
- <div class="wp-google-head-inner" <?php if ($rating_snippet) { ?>itemscope itemtype="http://schema.org/Place"<?php } ?>>
47
  <?php grw_place($rating, $place, $reviews, $dark_theme, false); ?>
48
  </div>
49
  <button class="wp-google-close" type="button" onclick="this.parentNode.parentNode.style.display='none'">×</button>
@@ -62,9 +51,9 @@ if ($place->rating > 0) {
62
 
63
  <?php } else { ?>
64
 
65
- <div class="wp-gr wpac"<?php if ($max_width > 0) { ?> style="max-width:<?php echo $max_width;?>!important;"<?php } ?>">
66
  <div class="wp-google-list<?php if ($dark_theme) { ?> wp-dark<?php } ?>">
67
- <div class="wp-google-place" <?php if ($rating_snippet) { ?>itemscope itemtype="http://schema.org/Place"<?php } ?>>
68
  <?php grw_place($rating, $place, $reviews, $dark_theme); ?>
69
  </div>
70
  <div class="wp-google-content-inner">
1
  <?php
2
  include_once(dirname(__FILE__) . '/grw-reviews-helper.php');
3
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  $place = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "grp_google_place WHERE place_id = %s", $place_id));
5
+ $reviews = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "grp_google_review WHERE google_place_id = %d", $place->id));
6
 
7
  $rating = 0;
8
  if ($place->rating > 0) {
12
  $rating = $rating + $review->rating;
13
  }
14
  $rating = round($rating / count($reviews), 1);
15
+ $rating = number_format((float)$rating, 1, '.', '');
16
  }
17
  ?>
18
 
32
  </div>
33
  <div class="wp-google-form" style="display:none">
34
  <div class="wp-google-head">
35
+ <div class="wp-google-head-inner">
36
  <?php grw_place($rating, $place, $reviews, $dark_theme, false); ?>
37
  </div>
38
  <button class="wp-google-close" type="button" onclick="this.parentNode.parentNode.style.display='none'">×</button>
51
 
52
  <?php } else { ?>
53
 
54
+ <div class="wp-gr wpac">
55
  <div class="wp-google-list<?php if ($dark_theme) { ?> wp-dark<?php } ?>">
56
+ <div class="wp-google-place">
57
  <?php grw_place($rating, $place, $reviews, $dark_theme); ?>
58
  </div>
59
  <div class="wp-google-content-inner">
grw.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Reviews Widget
4
  Plugin URI: https://googlereviews.pro/
5
  Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
6
  Author: WidgetPack <contact@widgetpack.com>
7
- Version: 1.47
8
  Author URI: https://googlereviews.pro/
9
  */
10
 
@@ -12,7 +12,7 @@ require(ABSPATH . 'wp-includes/version.php');
12
 
13
  require_once(dirname(__FILE__) . '/api/grw-api.php');
14
 
15
- define('GRW_VERSION', '1.47');
16
  define('GRW_GOOGLE_PLACE_API', 'https://maps.googleapis.com/maps/api/place/');
17
  define('GRW_GOOGLE_AVATAR', 'https://lh3.googleusercontent.com/-8hepWJzFXpE/AAAAAAAAAAI/AAAAAAAAAAA/I80WzYfIxCQ/s64-c/114307615494839964028.jpg');
18
  define('GRW_PLUGIN_URL', plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
4
  Plugin URI: https://googlereviews.pro/
5
  Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
6
  Author: WidgetPack <contact@widgetpack.com>
7
+ Version: 1.48
8
  Author URI: https://googlereviews.pro/
9
  */
10
 
12
 
13
  require_once(dirname(__FILE__) . '/api/grw-api.php');
14
 
15
+ define('GRW_VERSION', '1.48');
16
  define('GRW_GOOGLE_PLACE_API', 'https://maps.googleapis.com/maps/api/place/');
17
  define('GRW_GOOGLE_AVATAR', 'https://lh3.googleusercontent.com/-8hepWJzFXpE/AAAAAAAAAAI/AAAAAAAAAAA/I80WzYfIxCQ/s64-c/114307615494839964028.jpg');
18
  define('GRW_PLUGIN_URL', plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
languages/grw-de_DE.mo CHANGED
Binary file
languages/grw-de_DE.po CHANGED
@@ -15,7 +15,7 @@ msgid "Google Rating"
15
  msgstr "Google Bewertung"
16
 
17
  msgid "See All Reviews"
18
- msgstr "Alle Rezensionen Anzeigen"
19
 
20
  msgid "Google User"
21
  msgstr "Google Benutzer"
15
  msgstr "Google Bewertung"
16
 
17
  msgid "See All Reviews"
18
+ msgstr "Alle Rezensionen anzeigen"
19
 
20
  msgid "Google User"
21
  msgstr "Google Benutzer"
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Google Reviews Widget ===
2
  Contributors: widgetpack
3
  Donate link: https://googlereviews.pro/
4
- Tags: google, google reviews, google business reviews, google place review, Google Places, google places reviews, google review, google review widget, google map reviews, map reviews, review, reviews, google reviews widget, google plus reviews, g+ reviews, comment, comments, sidebar, widget, widgetpack
5
  Requires at least: 2.8
6
  Tested up to: 4.6
7
- Stable tag: 1.47
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,12 +12,14 @@ Google Reviews Widget show Google Business Reviews on your WordPress website to
12
 
13
  == Description ==
14
 
15
- This plugin display Google Places Reviews on your websites in sidebar widget. A unique feature of the plugin is that it save all reviews in WordPress database and have no depend on any services like Google to show these reviews. To get more unique features we have [Pro and Business version](https://googlereviews.pro/) of plugin.
16
 
17
- Live demo: [http://widgetsforsite.com/](http://widgetsforsite.com/)
18
 
19
  [youtube https://www.youtube.com/watch?v=YccWFCkz6H4]
20
 
 
 
21
  = Plugin Features =
22
 
23
  * Free!
@@ -40,11 +42,11 @@ Live demo: [http://widgetsforsite.com/](http://widgetsforsite.com/)
40
  * Collect and display more than 5 Google reviews
41
  * Trim long reviews and add "read more" link
42
  * Support schema.org/AggregateRating microdata to display Google Snippet for rating
 
43
  * Powerful <b>Shortcode Builder</b>
44
  * Moderation panel, delete any reviews
45
  * Change business place photo
46
  * Minimum review rating filter
47
- * Leave Google review link
48
  * Pagination, Sorting (by default, recent, oldest, highest score, lowest score)
49
  * Disable profile G+ links, nofollow, target="_blank"
50
  * Priority support
@@ -62,6 +64,9 @@ Live demo: [http://widgetsforsite.com/](http://widgetsforsite.com/)
62
 
63
  == Changelog ==
64
 
 
 
 
65
  = 1.47 =
66
  * Added localization for German (de_DE)
67
 
1
  === Google Reviews Widget ===
2
  Contributors: widgetpack
3
  Donate link: https://googlereviews.pro/
4
+ Tags: google, google reviews, google business reviews, google place review, Google Places, google places reviews, google review, google review widget, google map reviews, map reviews, review, reviews, google reviews widget, google plus reviews, g+ reviews, comment, comments, sidebar, widget, widgetpack, facebook, facebook reviews, facebook business reviews, google reviews pro
5
  Requires at least: 2.8
6
  Tested up to: 4.6
7
+ Stable tag: 1.48
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ This plugin display Google Places Reviews on your websites in sidebar widget. A unique feature of the plugin is that it save all reviews in WordPress database and have no depend on any services like Google to show these reviews.
16
 
17
+ To get more unique features we have [Pro and Business version](https://googlereviews.pro/) of plugin.
18
 
19
  [youtube https://www.youtube.com/watch?v=YccWFCkz6H4]
20
 
21
+ [Online demo](http://wordpress.widgetpack.com/) (more than <b>30 reviews</b> in sidebar)
22
+
23
  = Plugin Features =
24
 
25
  * Free!
42
  * Collect and display more than 5 Google reviews
43
  * Trim long reviews and add "read more" link
44
  * Support schema.org/AggregateRating microdata to display Google Snippet for rating
45
+ * Leave Google review link to available submit Google review on your website
46
  * Powerful <b>Shortcode Builder</b>
47
  * Moderation panel, delete any reviews
48
  * Change business place photo
49
  * Minimum review rating filter
 
50
  * Pagination, Sorting (by default, recent, oldest, highest score, lowest score)
51
  * Disable profile G+ links, nofollow, target="_blank"
52
  * Priority support
64
 
65
  == Changelog ==
66
 
67
+ = 1.48 =
68
+ * Bugfix, update readme
69
+
70
  = 1.47 =
71
  * Added localization for German (de_DE)
72