Google Reviews Widget - Version 1.6.7

Version Description

  • Bugfix: fixed the issues with working on site builders (SiteOrigin, Elementor, Beaver Builder and etc)
  • Bugfix: aseerts loaded with plugin's version to uncached
Download this release

Release Info

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

Code changes from version 1.6.5 to 1.6.7

Files changed (5) hide show
  1. grw-widget.php +9 -12
  2. grw.php +2 -2
  3. readme.txt +5 -1
  4. static/css/rplg-wp.css +2 -2
  5. static/js/grw-finder.js +1 -1
grw-widget.php CHANGED
@@ -42,25 +42,25 @@ class Goog_Reviews_Widget extends WP_Widget {
42
 
43
  add_action('admin_enqueue_scripts', array($this, 'grw_widget_scripts'));
44
 
45
- wp_register_script('wpac_time_js', plugins_url('/static/js/wpac-time.js', __FILE__));
46
  wp_enqueue_script('wpac_time_js', plugins_url('/static/js/wpac-time.js', __FILE__));
47
 
48
- wp_register_style('grw_css', plugins_url('/static/css/google-review.css', __FILE__));
49
  wp_enqueue_style('grw_css', plugins_url('/static/css/google-review.css', __FILE__));
50
  }
51
 
52
  function grw_widget_scripts($hook) {
53
  if ($hook == 'widgets.php' || ($hook == 'post.php' && defined('SITEORIGIN_PANELS_VERSION'))) {
54
 
55
- wp_register_style('rplg_wp_css', plugins_url('/static/css/rplg-wp.css', __FILE__));
56
  wp_enqueue_style('rplg_wp_css', plugins_url('/static/css/rplg-wp.css', __FILE__));
57
 
58
  wp_enqueue_script('jquery');
59
 
60
- wp_register_script('wpac_js', plugins_url('/static/js/wpac.js', __FILE__));
61
  wp_enqueue_script('wpac_js', plugins_url('/static/js/wpac.js', __FILE__));
62
 
63
- wp_register_script('grw_finder_js', plugins_url('/static/js/grw-finder.js', __FILE__));
64
  wp_localize_script('grw_finder_js', 'grwVars', array(
65
  'GOOGLE_AVATAR' => GRW_GOOGLE_AVATAR,
66
  'handlerUrl' => admin_url('options-general.php?page=grw'),
@@ -134,8 +134,7 @@ class Goog_Reviews_Widget extends WP_Widget {
134
  }
135
  include(dirname(__FILE__) . '/grw-options.php'); ?>
136
  </div>
137
- <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-widget-id="<?php echo $this->id; ?>"
138
- onload="grw_init({widgetId: this.getAttribute('data-widget-id')})" style="display:none">
139
  <?php
140
  } else {
141
  ?>
@@ -203,16 +202,14 @@ class Goog_Reviews_Widget extends WP_Widget {
203
  }
204
 
205
  if (!window.grw_init) {
206
- grw_load_css('<?php echo plugins_url('/static/css/rplg-wp.css', __FILE__); ?>');
207
- grw_load_js('<?php echo plugins_url('/static/js/wpac.js', __FILE__); ?>', function() {
208
  window.grwVars = {
209
  GOOGLE_AVATAR : '<?php echo GRW_GOOGLE_AVATAR; ?>',
210
  handlerUrl : '<?php echo admin_url('options-general.php?page=grw'); ?>',
211
  actionPrefix : 'grw'
212
  };
213
- grw_load_js('<?php echo plugins_url('/static/js/grw-finder.js', __FILE__); ?>', function() {
214
- grw_init({widgetId: '<?php echo $this->id; ?>'});
215
- });
216
  });
217
  }
218
  </script>
42
 
43
  add_action('admin_enqueue_scripts', array($this, 'grw_widget_scripts'));
44
 
45
+ wp_register_script('wpac_time_js', plugins_url('/static/js/wpac-time.js', __FILE__), array(), GRW_VERSION);
46
  wp_enqueue_script('wpac_time_js', plugins_url('/static/js/wpac-time.js', __FILE__));
47
 
48
+ wp_register_style('grw_css', plugins_url('/static/css/google-review.css', __FILE__), array(), GRW_VERSION);
49
  wp_enqueue_style('grw_css', plugins_url('/static/css/google-review.css', __FILE__));
50
  }
51
 
52
  function grw_widget_scripts($hook) {
53
  if ($hook == 'widgets.php' || ($hook == 'post.php' && defined('SITEORIGIN_PANELS_VERSION'))) {
54
 
55
+ wp_register_style('rplg_wp_css', plugins_url('/static/css/rplg-wp.css', __FILE__), array(), GRW_VERSION);
56
  wp_enqueue_style('rplg_wp_css', plugins_url('/static/css/rplg-wp.css', __FILE__));
57
 
58
  wp_enqueue_script('jquery');
59
 
60
+ wp_register_script('wpac_js', plugins_url('/static/js/wpac.js', __FILE__), array(), GRW_VERSION);
61
  wp_enqueue_script('wpac_js', plugins_url('/static/js/wpac.js', __FILE__));
62
 
63
+ wp_register_script('grw_finder_js', plugins_url('/static/js/grw-finder.js', __FILE__), array(), GRW_VERSION);
64
  wp_localize_script('grw_finder_js', 'grwVars', array(
65
  'GOOGLE_AVATAR' => GRW_GOOGLE_AVATAR,
66
  'handlerUrl' => admin_url('options-general.php?page=grw'),
134
  }
135
  include(dirname(__FILE__) . '/grw-options.php'); ?>
136
  </div>
137
+ <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onload="(function(el) { var t = setInterval(function () {if (window.grw_init){grw_init({el: el});clearInterval(t);}}, 200); })(this.parentNode);" style="display:none">
 
138
  <?php
139
  } else {
140
  ?>
202
  }
203
 
204
  if (!window.grw_init) {
205
+ grw_load_css('<?php echo plugins_url('/static/css/rplg-wp.css?ver=' . GRW_VERSION, __FILE__); ?>');
206
+ grw_load_js('<?php echo plugins_url('/static/js/wpac.js?ver=' . GRW_VERSION, __FILE__); ?>', function() {
207
  window.grwVars = {
208
  GOOGLE_AVATAR : '<?php echo GRW_GOOGLE_AVATAR; ?>',
209
  handlerUrl : '<?php echo admin_url('options-general.php?page=grw'); ?>',
210
  actionPrefix : 'grw'
211
  };
212
+ grw_load_js('<?php echo plugins_url('/static/js/grw-finder.js?ver=' . GRW_VERSION, __FILE__); ?>');
 
 
213
  });
214
  }
215
  </script>
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.5
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.5');
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.7
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.7');
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
@@ -4,7 +4,7 @@ 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: 4.9
7
- Stable tag: 1.6.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -74,6 +74,10 @@ Why limit your reviews to just Google Reviews? Check out our other free business
74
 
75
  == Changelog ==
76
 
 
 
 
 
77
  = 1.6.5 =
78
  * Bugfix: fill hash in reviews database
79
 
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: 4.9
7
+ Stable tag: 1.6.7
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.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
80
+
81
  = 1.6.5 =
82
  * Bugfix: fill hash in reviews database
83
 
static/css/rplg-wp.css CHANGED
@@ -398,12 +398,12 @@
398
  color: #fff;
399
  padding: 5px;
400
  border: none;
401
- background: #4080ff;
402
  cursor: pointer;
403
  }
404
 
405
  .fbrev-connect:hover {
406
- background: #405fff;
407
  }
408
 
409
  #shortcode .fbrev-connect {
398
  color: #fff;
399
  padding: 5px;
400
  border: none;
401
+ background: #3b5998;
402
  cursor: pointer;
403
  }
404
 
405
  .fbrev-connect:hover {
406
+ background: #4869ad;
407
  }
408
 
409
  #shortcode .fbrev-connect {
static/js/grw-finder.js CHANGED
@@ -3,7 +3,7 @@
3
  */
4
  function grw_init(data) {
5
 
6
- var el = document.querySelector('#' + data.widgetId);
7
  if (!el) return;
8
 
9
  var searchBtn = el.querySelector('.grw-search-btn');
3
  */
4
  function grw_init(data) {
5
 
6
+ var el = data.el;
7
  if (!el) return;
8
 
9
  var searchBtn = el.querySelector('.grw-search-btn');