Version Description
- Update plugin to WordPress 5.0
- Improve: added a default sorting by recent
- Improve: added a detailed instruction how to create a Google Places API key
Download this release
Release Info
Developer | widgetpack |
Plugin | Google Reviews Widget |
Version | 1.6.8 |
Comparing to | |
See all releases |
Code changes from version 1.6.7 to 1.6.8
- grw-reviews.php +2 -2
- grw-setting.php +17 -8
- grw-widget.php +1 -27
- grw.php +2 -2
- readme.txt +7 -2
- static/css/rplg-wp.css +2 -1
- static/js/grw-finder.js +10 -3
grw-reviews.php
CHANGED
@@ -10,7 +10,7 @@ if (strlen($reviews_lang) > 0) {
|
|
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) {
|
@@ -71,7 +71,7 @@ $place_img = strlen($place_photo) > 0 ? $place_photo : (strlen($place->photo) >
|
|
71 |
<img src="<?php echo GRW_PLUGIN_URL; ?>/static/img/powered_by_google_on_<?php if ($dark_theme) { ?>non_<?php } ?>white.png" alt="powered by Google">
|
72 |
</div>
|
73 |
</div>
|
74 |
-
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onload="(function(el) { document.addEventListener('DOMContentLoaded', function() { grw_badge_init(el); }); })(this.parentNode);" style="display:none">
|
75 |
</div>
|
76 |
|
77 |
<?php } else { ?>
|
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 . " ORDER BY time DESC", $place->id));
|
14 |
|
15 |
$rating = 0;
|
16 |
if ($place->rating > 0) {
|
71 |
<img src="<?php echo GRW_PLUGIN_URL; ?>/static/img/powered_by_google_on_<?php if ($dark_theme) { ?>non_<?php } ?>white.png" alt="powered by Google">
|
72 |
</div>
|
73 |
</div>
|
74 |
+
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="" onload="(function(el) { document.addEventListener('DOMContentLoaded', function() { grw_badge_init(el); }); })(this.parentNode);" style="display:none">
|
75 |
</div>
|
76 |
|
77 |
<?php } else { ?>
|
grw-setting.php
CHANGED
@@ -128,6 +128,10 @@ if (isset($_POST['grw_setting'])) {
|
|
128 |
$grw_setting_page = false;
|
129 |
}
|
130 |
|
|
|
|
|
|
|
|
|
131 |
if (isset($_POST['grw_install_db'])) {
|
132 |
grw_install_db();
|
133 |
}
|
@@ -257,14 +261,19 @@ $grw_language = get_option('grw_language');
|
|
257 |
Please get the correct key by instruction below ↓
|
258 |
</div>
|
259 |
<?php } ?>
|
260 |
-
<
|
261 |
-
<b>
|
262 |
-
1. Go to <a href="https://developers.google.com/
|
263 |
-
2. Click
|
264 |
-
3.
|
265 |
-
4.
|
266 |
-
<
|
267 |
-
|
|
|
|
|
|
|
|
|
|
|
268 |
</div>
|
269 |
<div class="form-group">
|
270 |
<label class="control-label"><?php echo grw_i('Google Places API language'); ?></label>
|
128 |
$grw_setting_page = false;
|
129 |
}
|
130 |
|
131 |
+
if (isset($_GET['setting_tab'])) {
|
132 |
+
$grw_setting_page = true;
|
133 |
+
}
|
134 |
+
|
135 |
if (isset($_POST['grw_install_db'])) {
|
136 |
grw_install_db();
|
137 |
}
|
261 |
Please get the correct key by instruction below ↓
|
262 |
</div>
|
263 |
<?php } ?>
|
264 |
+
<div style="margin-top:10px">
|
265 |
+
<p><b>Instruction: how to create Google Places API key</b></p>
|
266 |
+
<p>1. Go to the <a href="https://console.developers.google.com/apis/dashboard?pli=1" target="_blank">Google Console</a></p>
|
267 |
+
<p>2. Click '<b>Create Project</b>' or '<b>Select Project</b>' button</p>
|
268 |
+
<p>3. Create new project or select existing</p>
|
269 |
+
<p>4. On the project page click '<b>ENABLE APIS AND SERVICES</b>'</p>
|
270 |
+
<p>5. Type '<b>Places API</b>' in the search area</p>
|
271 |
+
<p>6. Select the first result '<b>Places API</b>' and click '<b>ENABLE</b>' button</p>
|
272 |
+
<p>7. On the 'Places API' page select '<b>Credential</b>' tab and '<b>Create credential</b>' / '<b>API key</b>' option</p>
|
273 |
+
<p>8. Copy created API key, paste to this setting and save</p>
|
274 |
+
<p><b>Video instruction</b></p>
|
275 |
+
<iframe src="//www.youtube.com/embed/Kf_bkg7WeC0?rel=0" allowfullscreen=""></iframe>
|
276 |
+
</div>
|
277 |
</div>
|
278 |
<div class="form-group">
|
279 |
<label class="control-label"><?php echo grw_i('Google Places API language'); ?></label>
|
grw-widget.php
CHANGED
@@ -138,33 +138,7 @@ class Goog_Reviews_Widget extends WP_Widget {
|
|
138 |
<?php
|
139 |
} else {
|
140 |
?>
|
141 |
-
<h4 class="text-left"
|
142 |
-
<ul style="line-height:20px">
|
143 |
-
<li>
|
144 |
-
<span class="grw-step">1</span>
|
145 |
-
<?php echo grw_i('Go to '); ?>
|
146 |
-
<a href="https://developers.google.com/places/web-service/get-api-key#get_an_api_key" target="_blank">
|
147 |
-
<?php echo grw_i('Google Places API Key'); ?>
|
148 |
-
</a>
|
149 |
-
</li>
|
150 |
-
<li>
|
151 |
-
<span class="grw-step">2</span>
|
152 |
-
<?php echo grw_i('Click by \'<b>GET A KEY</b>\' button'); ?>
|
153 |
-
</li>
|
154 |
-
<li>
|
155 |
-
<span class="grw-step">3</span>
|
156 |
-
<?php echo grw_i('Fill the name, agree term and click by \'<b>NEXT</b>\' button'); ?>
|
157 |
-
</li>
|
158 |
-
<li>
|
159 |
-
<span class="grw-step">4</span>
|
160 |
-
<?php echo grw_i('Copy & paste generated key to the field: '); ?>
|
161 |
-
<input type="text" class="grw-apikey" name="grw_google_api_key" placeholder="<?php echo grw_i('Google Places API Key'); ?>" />
|
162 |
-
</li>
|
163 |
-
<li>
|
164 |
-
<span class="grw-step">5</span>
|
165 |
-
<?php echo grw_i('Save the widget'); ?>
|
166 |
-
</li>
|
167 |
-
</ul>
|
168 |
<script type="text/javascript">
|
169 |
var apikey = document.querySelectorAll('.grw-apikey');
|
170 |
if (apikey) {
|
138 |
<?php
|
139 |
} else {
|
140 |
?>
|
141 |
+
<h4 class="text-left">First of all, please create and save the Google API Key on <a href="<?php echo admin_url('options-general.php?page=grw&setting_tab=active'); ?>">the setting page</a> of the plugin</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
<script type="text/javascript">
|
143 |
var apikey = document.querySelectorAll('.grw-apikey');
|
144 |
if (apikey) {
|
grw.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Reviews Widget
|
|
4 |
Plugin URI: https://richplugins.com/google-reviews-pro-wordpress-plugin
|
5 |
Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
|
6 |
Author: RichPlugins <support@richplugins.com>
|
7 |
-
Version: 1.6.
|
8 |
Author URI: https://richplugins.com
|
9 |
*/
|
10 |
|
@@ -13,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.6.
|
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__)));
|
4 |
Plugin URI: https://richplugins.com/google-reviews-pro-wordpress-plugin
|
5 |
Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
|
6 |
Author: RichPlugins <support@richplugins.com>
|
7 |
+
Version: 1.6.8
|
8 |
Author URI: https://richplugins.com
|
9 |
*/
|
10 |
|
13 |
include_once(dirname(__FILE__) . '/api/urlopen.php');
|
14 |
include_once(dirname(__FILE__) . '/helper/debug.php');
|
15 |
|
16 |
+
define('GRW_VERSION', '1.6.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__)));
|
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:
|
7 |
-
Stable tag: 1.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -74,6 +74,11 @@ Why limit your reviews to just Google Reviews? Check out our other free business
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
|
|
|
|
77 |
= 1.6.7 =
|
78 |
* Bugfix: fixed the issues with working on site builders (SiteOrigin, Elementor, Beaver Builder and etc)
|
79 |
* Bugfix: aseerts loaded with plugin's version to uncached
|
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: 5.0
|
7 |
+
Stable tag: 1.6.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 1.6.8 =
|
78 |
+
* Update plugin to WordPress 5.0
|
79 |
+
* Improve: added a default sorting by recent
|
80 |
+
* Improve: added a detailed instruction how to create a Google Places API key
|
81 |
+
|
82 |
= 1.6.7 =
|
83 |
* Bugfix: fixed the issues with working on site builders (SiteOrigin, Elementor, Beaver Builder and etc)
|
84 |
* Bugfix: aseerts loaded with plugin's version to uncached
|
static/css/rplg-wp.css
CHANGED
@@ -228,7 +228,8 @@
|
|
228 |
color: #444;
|
229 |
}
|
230 |
|
231 |
-
.grw-error
|
|
|
232 |
color: #e60909;
|
233 |
font-size: 13px;
|
234 |
}
|
228 |
color: #444;
|
229 |
}
|
230 |
|
231 |
+
.grw-error,
|
232 |
+
.yrw-error {
|
233 |
color: #e60909;
|
234 |
font-size: 13px;
|
235 |
}
|
static/js/grw-finder.js
CHANGED
@@ -71,9 +71,14 @@ function grw_init(data) {
|
|
71 |
if (res.status == 'success') {
|
72 |
|
73 |
errorEl.innerHTML = '';
|
74 |
-
|
75 |
-
el.querySelector('.grw-google-place-
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
var img = el.querySelector('.grw-place-photo-img');
|
79 |
img.src = res.result.business_photo || res.result.icon;
|
@@ -84,6 +89,8 @@ function grw_init(data) {
|
|
84 |
grw_show_tooltip(controlEl, 'Please don\'t forget to <b>Save</b> the widget.');
|
85 |
}
|
86 |
|
|
|
|
|
87 |
} else {
|
88 |
|
89 |
errorEl.innerHTML = '<b>Google error</b>: ' + res.result.error_message;
|
71 |
if (res.status == 'success') {
|
72 |
|
73 |
errorEl.innerHTML = '';
|
74 |
+
|
75 |
+
var nameEl = el.querySelector('.grw-google-place-name'),
|
76 |
+
placeIdEl = el.querySelector('.grw-google-place-id'),
|
77 |
+
photoEl = el.querySelector('.grw-place-photo');
|
78 |
+
|
79 |
+
nameEl.value = res.result.name;
|
80 |
+
placeIdEl.value = res.result.place_id;
|
81 |
+
photoEl.value = res.result.business_photo || res.result.icon;
|
82 |
|
83 |
var img = el.querySelector('.grw-place-photo-img');
|
84 |
img.src = res.result.business_photo || res.result.icon;
|
89 |
grw_show_tooltip(controlEl, 'Please don\'t forget to <b>Save</b> the widget.');
|
90 |
}
|
91 |
|
92 |
+
jQuery(nameEl).change();
|
93 |
+
|
94 |
} else {
|
95 |
|
96 |
errorEl.innerHTML = '<b>Google error</b>: ' + res.result.error_message;
|