Google Reviews Widget - Version 1.9.9

Version Description

  • Bugfix: PHP 8 problem (vsprintf(): Argument #2 ($values) must be of type array)
Download this release

Release Info

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

Code changes from version 1.9.8 to 1.9.9

Files changed (4) hide show
  1. grw-reviews-helper.php +1 -1
  2. grw-setting.php +1 -1
  3. grw.php +10 -2
  4. readme.txt +4 -1
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 vsprintf(__('Based on %s reviews', 'grw'), $place->review_count); ?></div>
18
  <?php } ?>
19
  <?php if ($show_powered) { ?>
20
  <div class="wp-google-powered">
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'), grw_array($place->review_count)); ?></div>
18
  <?php } ?>
19
  <?php if ($show_powered) { ?>
20
  <div class="wp-google-powered">
grw-setting.php CHANGED
@@ -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 vsprintf(__('Free Version: %s', 'grw'), esc_html(GRW_VERSION)); ?></span>
138
 
139
  <div class="rplg-setting">
140
 
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'), grw_array(esc_html(GRW_VERSION))); ?></span>
138
 
139
  <div class="rplg-setting">
140
 
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.8
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.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__)));
@@ -606,6 +606,14 @@ function grw_business_avatar($response_result_json) {
606
  return null;
607
  }
608
 
 
 
 
 
 
 
 
 
609
  if (!function_exists('esc_html')) {
610
  function esc_html( $text ) {
611
  $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.9
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.9');
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__)));
606
  return null;
607
  }
608
 
609
+ function grw_array($params=null) {
610
+ if (!is_array($params)) {
611
+ $params = func_get_args();
612
+ $params = array_slice($params, 0);
613
+ }
614
+ return $params;
615
+ }
616
+
617
  if (!function_exists('esc_html')) {
618
  function esc_html( $text ) {
619
  $safe_text = wp_check_invalid_utf8( $text );
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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
 
@@ -83,6 +83,9 @@ Why limit your reviews to just Google Reviews? Check out our other free reviews
83
 
84
  == Changelog ==
85
 
 
 
 
86
  = 1.9.8 =
87
  * Improved usability
88
  * Installation guide fixed
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.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
83
 
84
  == Changelog ==
85
 
86
+ = 1.9.9 =
87
+ * Bugfix: PHP 8 problem (vsprintf(): Argument #2 ($values) must be of type array)
88
+
89
  = 1.9.8 =
90
  * Improved usability
91
  * Installation guide fixed