Google Reviews Widget - Version 1.9.5

Version Description

  • Remove http in svg type
Download this release

Release Info

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

Code changes from version 1.9.4 to 1.9.5

Files changed (5) hide show
  1. grw-reviews-helper.php +3 -3
  2. grw-reviews.php +1 -1
  3. grw.php +16 -2
  4. readme.txt +4 -1
  5. static/js/grw-finder.js +1 -1
grw-reviews-helper.php CHANGED
@@ -96,11 +96,11 @@ function grw_stars($rating) {
96
  foreach (array(1,2,3,4,5) as $val) {
97
  $score = $rating - $val;
98
  if ($score >= 0) {
99
- ?><span class="wp-star"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="17" height="17" viewBox="0 0 1792 1792"><path d="M1728 647q0 22-26 48l-363 354 86 500q1 7 1 20 0 21-10.5 35.5t-30.5 14.5q-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z" fill="#e7711b"></path></svg></span><?php
100
  } else if ($score > -1 && $score < 0) {
101
- ?><span class="wp-star"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="17" height="17" viewBox="0 0 1792 1792"><path d="M1250 957l257-250-356-52-66-10-30-60-159-322v963l59 31 318 168-60-355-12-66zm452-262l-363 354 86 500q5 33-6 51.5t-34 18.5q-17 0-40-12l-449-236-449 236q-23 12-40 12-23 0-34-18.5t-6-51.5l86-500-364-354q-32-32-23-59.5t54-34.5l502-73 225-455q20-41 49-41 28 0 49 41l225 455 502 73q45 7 54 34.5t-24 59.5z" fill="#e7711b"></path></svg></span><?php
102
  } else {
103
- ?><span class="wp-star"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="17" height="17" viewBox="0 0 1792 1792"><path d="M1201 1004l306-297-422-62-189-382-189 382-422 62 306 297-73 421 378-199 377 199zm527-357q0 22-26 48l-363 354 86 500q1 7 1 20 0 50-41 50-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z" fill="#ccc"></path></svg></span><?php
104
  }
105
  }
106
  ?></span><?php
96
  foreach (array(1,2,3,4,5) as $val) {
97
  $score = $rating - $val;
98
  if ($score >= 0) {
99
+ ?><span class="wp-star"><svg width="17" height="17" viewBox="0 0 1792 1792"><path d="M1728 647q0 22-26 48l-363 354 86 500q1 7 1 20 0 21-10.5 35.5t-30.5 14.5q-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z" fill="#e7711b"></path></svg></span><?php
100
  } else if ($score > -1 && $score < 0) {
101
+ ?><span class="wp-star"><svg width="17" height="17" viewBox="0 0 1792 1792"><path d="M1250 957l257-250-356-52-66-10-30-60-159-322v963l59 31 318 168-60-355-12-66zm452-262l-363 354 86 500q5 33-6 51.5t-34 18.5q-17 0-40-12l-449-236-449 236q-23 12-40 12-23 0-34-18.5t-6-51.5l86-500-364-354q-32-32-23-59.5t54-34.5l502-73 225-455q20-41 49-41 28 0 49 41l225 455 502 73q45 7 54 34.5t-24 59.5z" fill="#e7711b"></path></svg></span><?php
102
  } else {
103
+ ?><span class="wp-star"><svg width="17" height="17" viewBox="0 0 1792 1792"><path d="M1201 1004l306-297-422-62-189-382-189 382-422 62 306 297-73 421 378-199 377 199zm527-357q0 22-26 48l-363 354 86 500q1 7 1 20 0 50-41 50-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z" fill="#ccc"></path></svg></span><?php
104
  }
105
  }
106
  ?></span><?php
grw-reviews.php CHANGED
@@ -96,7 +96,7 @@ if ($view_mode == 'list' || $view_mode == '') { ?>
96
  <div class="wp-google-badge<?php if ($view_mode == 'badge') { ?> wp-google-badge-fixed<?php } ?>">
97
  <div class="wp-google-border"></div>
98
  <div class="wp-google-badge-btn">
99
- <svg xmlns="http://www.w3.org/2000/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>
96
  <div class="wp-google-badge<?php if ($view_mode == 'badge') { ?> wp-google-badge-fixed<?php } ?>">
97
  <div class="wp-google-border"></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 grw_i('Google Rating'); ?></div>
102
  <span class="wp-google-rating"><?php echo $rating; ?></span>
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.4
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.4');
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__)));
@@ -29,6 +29,7 @@ function grw_options() {
29
  'grw_activation_time',
30
  'grw_rev_notice_hide',
31
  'rplg_rev_notice_show',
 
32
  );
33
  }
34
 
@@ -488,6 +489,10 @@ function grw_save_reviews($place, $min_filter = 0) {
488
 
489
  /*-------------------------------- Refresh Reviews --------------------------------*/
490
  function grw_refresh_reviews($args) {
 
 
 
 
491
  $google_api_key = get_option('grw_google_api_key');
492
  if (!$google_api_key || strlen($google_api_key) < 1) {
493
  return;
@@ -498,6 +503,9 @@ function grw_refresh_reviews($args) {
498
 
499
  $url = grw_api_url($place_id, $reviews_lang);
500
 
 
 
 
501
  $response = rplg_urlopen($url);
502
 
503
  $response_data = $response['data'];
@@ -506,8 +514,14 @@ function grw_refresh_reviews($args) {
506
  if ($response_json && isset($response_json->result)) {
507
  $response_json->result->business_photo = grw_business_avatar($response_json->result);
508
  grw_save_reviews($response_json->result);
 
 
 
509
  }
510
 
 
 
 
511
  delete_transient('grw_refresh_reviews_' . join('_', $args));
512
  }
513
  add_action('grw_refresh_reviews', 'grw_refresh_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.5
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.5');
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__)));
29
  'grw_activation_time',
30
  'grw_rev_notice_hide',
31
  'rplg_rev_notice_show',
32
+ 'grw_debug_refresh',
33
  );
34
  }
35
 
489
 
490
  /*-------------------------------- Refresh Reviews --------------------------------*/
491
  function grw_refresh_reviews($args) {
492
+
493
+ //DEBUG
494
+ $grw_debug_refresh = get_option('grw_debug_refresh');
495
+
496
  $google_api_key = get_option('grw_google_api_key');
497
  if (!$google_api_key || strlen($google_api_key) < 1) {
498
  return;
503
 
504
  $url = grw_api_url($place_id, $reviews_lang);
505
 
506
+ //DEBUG
507
+ $grw_debug_refresh = $grw_debug_refresh . $url;
508
+
509
  $response = rplg_urlopen($url);
510
 
511
  $response_data = $response['data'];
514
  if ($response_json && isset($response_json->result)) {
515
  $response_json->result->business_photo = grw_business_avatar($response_json->result);
516
  grw_save_reviews($response_json->result);
517
+
518
+ //DEBUG
519
+ $grw_debug_refresh = $grw_debug_refresh . ', save_reviews; ';
520
  }
521
 
522
+ //DEBUG
523
+ update_option('grw_debug_refresh', $grw_debug_refresh);
524
+
525
  delete_transient('grw_refresh_reviews_' . join('_', $args));
526
  }
527
  add_action('grw_refresh_reviews', 'grw_refresh_reviews');
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.7
7
- Stable tag: 1.9.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -79,6 +79,9 @@ Why limit your reviews to just Google Reviews? Check out our other free reviews
79
 
80
  == Changelog ==
81
 
 
 
 
82
  = 1.9.4 =
83
  * Update to WordPress 5.7
84
  * Improve: added Ukrainian language
4
  Tags: Google, reviews, widget, testimonials, Google Places reviews
5
  Requires at least: 2.8
6
  Tested up to: 5.7
7
+ Stable tag: 1.9.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
79
 
80
  == Changelog ==
81
 
82
+ = 1.9.5 =
83
+ * Remove http in svg type
84
+
85
  = 1.9.4 =
86
  * Update to WordPress 5.7
87
  * Improve: added Ukrainian language
static/js/grw-finder.js CHANGED
@@ -402,7 +402,7 @@ function grw_renderReview(review, withDeleteBtn) {
402
  '</div>' +
403
  (withDeleteBtn ?
404
  '<a class="wp-google-delete" href="#">' +
405
- '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="14" height="14" viewBox="0 0 1792 1792">' +
406
  '<path d="M704 1376v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm-544-992h448l-48-117q-7-9-17-11h-317q-10 2-17 11zm928 32v64q0 14-9 23t-23 9h-96v948q0 83-47 143.5t-113 60.5h-832q-66 0-113-58.5t-47-141.5v-952h-96q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h309l70-167q15-37 54-63t79-26h320q40 0 79 26t54 63l70 167h309q14 0 23 9t9 23z" fill="#666"></path>' +
407
  '</svg> ' +
408
  'Delete' +
402
  '</div>' +
403
  (withDeleteBtn ?
404
  '<a class="wp-google-delete" href="#">' +
405
+ '<svg width="14" height="14" viewBox="0 0 1792 1792">' +
406
  '<path d="M704 1376v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm-544-992h448l-48-117q-7-9-17-11h-317q-10 2-17 11zm928 32v64q0 14-9 23t-23 9h-96v948q0 83-47 143.5t-113 60.5h-832q-66 0-113-58.5t-47-141.5v-952h-96q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h309l70-167q15-37 54-63t79-26h320q40 0 79 26t54 63l70 167h309q14 0 23 9t9 23z" fill="#666"></path>' +
407
  '</svg> ' +
408
  'Delete' +