Google Maps Widget – Ultimate Google Maps Plugin - Version 0.86

Version Description

  • 2013/10/07
  • fixed a few strict standards errors; thanks Jay!
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Google Maps Widget – Ultimate Google Maps Plugin
Version 0.86
Comparing to
See all releases

Code changes from version 0.85 to 0.86

Files changed (2) hide show
  1. google-maps-widget.php +15 -15
  2. readme.txt +5 -1
google-maps-widget.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Maps Widget
4
  Plugin URI: http://www.googlemapswidget.com/
5
  Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
6
  Author: Web factory Ltd
7
- Version: 0.85
8
  Author URI: http://www.webfactoryltd.com/
9
 
10
  Copyright 2013 Web factory Ltd (email : info@webfactoryltd.com)
@@ -29,14 +29,14 @@ if (!function_exists('add_action')) {
29
  }
30
 
31
 
32
- define('GMW_VER', '0.85');
33
  require_once 'gmw-widget.php';
34
 
35
 
36
 
37
  class GMW {
38
  // hook everything up
39
- function init() {
40
  if (is_admin()) {
41
  // check if minimal required WP version is used
42
  self::check_wp_version(3.3);
@@ -57,19 +57,19 @@ class GMW {
57
 
58
 
59
  // textdomain has to be loaded earlier
60
- function plugins_loaded() {
61
  load_plugin_textdomain('google-maps-widget', false, basename(dirname(__FILE__)) . '/lang');
62
  } // plugins_loaded
63
 
64
 
65
  // initialize widgets
66
- function widgets_init() {
67
  register_widget('GoogleMapsWidget');
68
  } // widgets_init
69
 
70
 
71
  // add settings link to plugins page
72
- function plugin_action_links($links) {
73
  $settings_link = '<a href="' . admin_url('widgets.php') . '" title="' . __('Configure Google Maps Widget', 'google-maps-widget') . '">' . __('Widgets', 'google-maps-widget') . '</a>';
74
  array_unshift($links, $settings_link);
75
 
@@ -78,7 +78,7 @@ class GMW {
78
 
79
 
80
  // add links to plugin's description in plugins table
81
- function plugin_meta_links($links, $file) {
82
  $documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="' . __('View Google Maps Widget documentation', 'google-maps-widget') . '">'. __('Documentation', 'google-maps-widget') . '</a>';
83
  $support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="' . __('Problems? We are here to help!', 'google-maps-widget') . '">' . __('Support', 'google-maps-widget') . '</a>';
84
 
@@ -92,7 +92,7 @@ class GMW {
92
 
93
 
94
  // check if user has the minimal WP version required by the plugin
95
- function check_wp_version($min_version) {
96
  if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
97
  add_action('admin_notices', array(__CLASS__, 'min_version_error'));
98
  }
@@ -100,13 +100,13 @@ class GMW {
100
 
101
 
102
  // display error message if WP version is too low
103
- function min_version_error() {
104
  echo '<div class="error"><p>' . sprintf('Google Maps Widget <b>requires WordPress version 3.3</b> or higher to function properly. You are using WordPress version %s. Please <a href="%s">update it</a>.', get_bloginfo('version'), admin_url('update-core.php')) . '</p></div>';
105
  } // min_version_error
106
 
107
 
108
  // print dialogs markup in footer
109
- function dialogs_markup() {
110
  $out = '';
111
  $widgets = GoogleMapsWidget::$widgets;
112
 
@@ -151,7 +151,7 @@ class GMW {
151
 
152
 
153
  // enqueue frontend scripts if necessary
154
- function enqueue_scripts() {
155
  if (is_active_widget(false, false, 'googlemapswidget', true)) {
156
  wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
157
  wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
@@ -161,7 +161,7 @@ class GMW {
161
 
162
 
163
  // enqueue CSS and JS scripts on widgets page
164
- function admin_enqueue_scripts() {
165
  if (self::is_plugin_admin_page()) {
166
  wp_enqueue_script('jquery-ui-tabs');
167
  wp_enqueue_script('gmw-cookie', plugins_url('js/jquery.cookie.js', __FILE__), array('jquery'), GMW_VER, true);
@@ -172,7 +172,7 @@ class GMW {
172
 
173
 
174
  // check if plugin's admin page is shown
175
- function is_plugin_admin_page() {
176
  $current_screen = get_current_screen();
177
 
178
  if ($current_screen->id == 'widgets') {
@@ -184,7 +184,7 @@ class GMW {
184
 
185
 
186
  // helper function for creating dropdowns
187
- function create_select_options($options, $selected = null, $output = true) {
188
  $out = "\n";
189
 
190
  foreach ($options as $tmp) {
@@ -203,7 +203,7 @@ class GMW {
203
  } // create_select_options
204
 
205
 
206
- function get_coordinates($address, $force_refresh = false) {
207
  $address_hash = md5('gmw' . $address);
208
 
209
  if ($force_refresh || ($coordinates = get_transient($address_hash)) === false) {
4
  Plugin URI: http://www.googlemapswidget.com/
5
  Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
6
  Author: Web factory Ltd
7
+ Version: 0.86
8
  Author URI: http://www.webfactoryltd.com/
9
 
10
  Copyright 2013 Web factory Ltd (email : info@webfactoryltd.com)
29
  }
30
 
31
 
32
+ define('GMW_VER', '0.86');
33
  require_once 'gmw-widget.php';
34
 
35
 
36
 
37
  class GMW {
38
  // hook everything up
39
+ static function init() {
40
  if (is_admin()) {
41
  // check if minimal required WP version is used
42
  self::check_wp_version(3.3);
57
 
58
 
59
  // textdomain has to be loaded earlier
60
+ static function plugins_loaded() {
61
  load_plugin_textdomain('google-maps-widget', false, basename(dirname(__FILE__)) . '/lang');
62
  } // plugins_loaded
63
 
64
 
65
  // initialize widgets
66
+ static function widgets_init() {
67
  register_widget('GoogleMapsWidget');
68
  } // widgets_init
69
 
70
 
71
  // add settings link to plugins page
72
+ static function plugin_action_links($links) {
73
  $settings_link = '<a href="' . admin_url('widgets.php') . '" title="' . __('Configure Google Maps Widget', 'google-maps-widget') . '">' . __('Widgets', 'google-maps-widget') . '</a>';
74
  array_unshift($links, $settings_link);
75
 
78
 
79
 
80
  // add links to plugin's description in plugins table
81
+ static function plugin_meta_links($links, $file) {
82
  $documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="' . __('View Google Maps Widget documentation', 'google-maps-widget') . '">'. __('Documentation', 'google-maps-widget') . '</a>';
83
  $support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="' . __('Problems? We are here to help!', 'google-maps-widget') . '">' . __('Support', 'google-maps-widget') . '</a>';
84
 
92
 
93
 
94
  // check if user has the minimal WP version required by the plugin
95
+ static function check_wp_version($min_version) {
96
  if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
97
  add_action('admin_notices', array(__CLASS__, 'min_version_error'));
98
  }
100
 
101
 
102
  // display error message if WP version is too low
103
+ static function min_version_error() {
104
  echo '<div class="error"><p>' . sprintf('Google Maps Widget <b>requires WordPress version 3.3</b> or higher to function properly. You are using WordPress version %s. Please <a href="%s">update it</a>.', get_bloginfo('version'), admin_url('update-core.php')) . '</p></div>';
105
  } // min_version_error
106
 
107
 
108
  // print dialogs markup in footer
109
+ static function dialogs_markup() {
110
  $out = '';
111
  $widgets = GoogleMapsWidget::$widgets;
112
 
151
 
152
 
153
  // enqueue frontend scripts if necessary
154
+ static function enqueue_scripts() {
155
  if (is_active_widget(false, false, 'googlemapswidget', true)) {
156
  wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
157
  wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
161
 
162
 
163
  // enqueue CSS and JS scripts on widgets page
164
+ static function admin_enqueue_scripts() {
165
  if (self::is_plugin_admin_page()) {
166
  wp_enqueue_script('jquery-ui-tabs');
167
  wp_enqueue_script('gmw-cookie', plugins_url('js/jquery.cookie.js', __FILE__), array('jquery'), GMW_VER, true);
172
 
173
 
174
  // check if plugin's admin page is shown
175
+ static function is_plugin_admin_page() {
176
  $current_screen = get_current_screen();
177
 
178
  if ($current_screen->id == 'widgets') {
184
 
185
 
186
  // helper function for creating dropdowns
187
+ static function create_select_options($options, $selected = null, $output = true) {
188
  $out = "\n";
189
 
190
  foreach ($options as $tmp) {
203
  } // create_select_options
204
 
205
 
206
+ static function get_coordinates($address, $force_refresh = false) {
207
  $address_hash = md5('gmw' . $address);
208
 
209
  if ($force_refresh || ($coordinates = get_transient($address_hash)) === false) {
readme.txt CHANGED
@@ -6,7 +6,7 @@ License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: 3.3
8
  Tested up to: 3.6.1
9
- Stable tag: 0.85
10
 
11
  Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
12
 
@@ -90,6 +90,10 @@ If you can figure it out open a thread in the support forums.
90
  4. Widget options - lightbox map
91
 
92
  == Changelog ==
 
 
 
 
93
  = 0.85 =
94
  * 2013/10/03
95
  * added Croatian translation; thank you Gordan
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: 3.3
8
  Tested up to: 3.6.1
9
+ Stable tag: 0.86
10
 
11
  Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
12
 
90
  4. Widget options - lightbox map
91
 
92
  == Changelog ==
93
+ = 0.86 =
94
+ * 2013/10/07
95
+ * fixed a few strict standards errors; thanks Jay!
96
+
97
  = 0.85 =
98
  * 2013/10/03
99
  * added Croatian translation; thank you Gordan