Google Reviews Widget - Version 1.7.1

Version Description

  • Improve: added hook to enqueue scripts and styles
Download this release

Release Info

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

Code changes from version 1.7 to 1.7.1

Files changed (3) hide show
  1. grw-widget.php +3 -0
  2. grw.php +6 -10
  3. readme.txt +4 -1
grw-widget.php CHANGED
@@ -41,8 +41,11 @@ class Goog_Reviews_Widget extends WP_Widget {
41
  )
42
  );
43
 
 
44
  add_action('admin_enqueue_scripts', array($this, 'grw_widget_scripts'));
 
45
 
 
46
  wp_register_script('wpac_time_js', plugins_url('/static/js/wpac-time.js', __FILE__), array(), GRW_VERSION);
47
  wp_enqueue_script('wpac_time_js', plugins_url('/static/js/wpac-time.js', __FILE__));
48
 
41
  )
42
  );
43
 
44
+ add_action('wp_enqueue_scripts', array($this, 'grw_frontend_scripts'));
45
  add_action('admin_enqueue_scripts', array($this, 'grw_widget_scripts'));
46
+ }
47
 
48
+ function grw_frontend_scripts() {
49
  wp_register_script('wpac_time_js', plugins_url('/static/js/wpac-time.js', __FILE__), array(), GRW_VERSION);
50
  wp_enqueue_script('wpac_time_js', plugins_url('/static/js/wpac-time.js', __FILE__));
51
 
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.7
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.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__)));
@@ -28,17 +28,13 @@ function grw_options() {
28
  }
29
 
30
  /*-------------------------------- Widget --------------------------------*/
31
- function grw_init_widget() {
32
- if (!class_exists('Goog_Reviews_Widget' ) ) {
33
  require 'grw-widget.php';
 
34
  }
35
  }
36
- add_action('widgets_init', 'grw_init_widget');
37
-
38
- function grw_register_widget() {
39
- return register_widget("Goog_Reviews_Widget");
40
- }
41
- add_action('widgets_init', 'grw_register_widget');
42
 
43
  /*-------------------------------- Menu --------------------------------*/
44
  function grw_setting_menu() {
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.7.1
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.7.1');
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__)));
28
  }
29
 
30
  /*-------------------------------- Widget --------------------------------*/
31
+ function grw_setup_widget() {
32
+ if (!class_exists('Goog_Reviews_Widget')) {
33
  require 'grw-widget.php';
34
+ register_widget('Goog_Reviews_Widget');
35
  }
36
  }
37
+ add_action('widgets_init', 'grw_setup_widget');
 
 
 
 
 
38
 
39
  /*-------------------------------- Menu --------------------------------*/
40
  function grw_setting_menu() {
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: 5.1
7
- Stable tag: 1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -74,6 +74,9 @@ Why limit your reviews to just Google Reviews? Check out our other free business
74
 
75
  == Changelog ==
76
 
 
 
 
77
  = 1.7 =
78
  * Update to WordPress 5.1
79
  * Bugfix: issue with an empty language
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.1
7
+ Stable tag: 1.7.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
74
 
75
  == Changelog ==
76
 
77
+ = 1.7.1 =
78
+ * Improve: added hook to enqueue scripts and styles
79
+
80
  = 1.7 =
81
  * Update to WordPress 5.1
82
  * Bugfix: issue with an empty language