Version Description
- 2014/05/06
- finished up a few todos
Download this release
Release Info
Developer | WebFactory |
Plugin | Google Maps Widget – Ultimate Google Maps Plugin |
Version | 1.65 |
Comparing to | |
See all releases |
Code changes from version 1.60 to 1.65
- google-maps-widget.php +9 -14
- 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: 1.
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: google-maps-widget
|
10 |
Domain Path: lang
|
@@ -91,13 +91,13 @@ class GMW {
|
|
91 |
|
92 |
// add links to plugin's description in plugins table
|
93 |
static function plugin_meta_links($links, $file) {
|
94 |
-
|
95 |
-
//$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="' . __('View Google Maps Widget documentation', 'google-maps-widget') . '">'. __('Documentation', 'google-maps-widget') . '</a>';
|
96 |
$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>';
|
97 |
$review_link = '<a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/google-maps-widget" title="' . __('If you like it, please review the plugin', 'google-maps-widget') . '">' . __('Review the plugin', 'google-maps-widget') . '</a>';
|
98 |
$donate_link = '<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=gordan%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest" title="' . __('If you feel we deserve it, buy us coffee', 'google-maps-widget') . '">' . __('Donate', 'google-maps-widget') . '</a>';
|
99 |
|
100 |
if ($file == plugin_basename(__FILE__)) {
|
|
|
101 |
$links[] = $support_link;
|
102 |
$links[] = $review_link;
|
103 |
$links[] = $donate_link;
|
@@ -220,23 +220,18 @@ class GMW {
|
|
220 |
}
|
221 |
} // create_select_options
|
222 |
|
223 |
-
|
|
|
224 |
static function get_coordinates($address, $force_refresh = false) {
|
225 |
$address_hash = md5('gmw' . $address);
|
226 |
|
227 |
if ($force_refresh || ($coordinates = get_transient($address_hash)) === false) {
|
228 |
$url = 'http://maps.googleapis.com/maps/api/geocode/xml?address=' . urlencode($address) . '&sensor=false';
|
|
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
234 |
-
$xml = curl_exec($ch);
|
235 |
-
$ch_info = curl_getinfo($ch);
|
236 |
-
curl_close($ch);
|
237 |
-
|
238 |
-
if ($ch_info['http_code'] == 200) {
|
239 |
-
$data = new SimpleXMLElement($xml);
|
240 |
if ($data->status == 'OK') {
|
241 |
$cache_value['lat'] = (string) $data->result->geometry->location->lat;
|
242 |
$cache_value['lng'] = (string) $data->result->geometry->location->lng;
|
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: 1.65
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: google-maps-widget
|
10 |
Domain Path: lang
|
91 |
|
92 |
// add links to plugin's description in plugins table
|
93 |
static function plugin_meta_links($links, $file) {
|
94 |
+
$documentation_link = '<a target="_blank" href="http://www.googlemapswidget.com/documentation/" title="' . __('View Google Maps Widget documentation', 'google-maps-widget') . '">'. __('Documentation', 'google-maps-widget') . '</a>';
|
|
|
95 |
$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>';
|
96 |
$review_link = '<a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/google-maps-widget" title="' . __('If you like it, please review the plugin', 'google-maps-widget') . '">' . __('Review the plugin', 'google-maps-widget') . '</a>';
|
97 |
$donate_link = '<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=gordan%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest" title="' . __('If you feel we deserve it, buy us coffee', 'google-maps-widget') . '">' . __('Donate', 'google-maps-widget') . '</a>';
|
98 |
|
99 |
if ($file == plugin_basename(__FILE__)) {
|
100 |
+
$links[] = $documentation_link;
|
101 |
$links[] = $support_link;
|
102 |
$links[] = $review_link;
|
103 |
$links[] = $donate_link;
|
220 |
}
|
221 |
} // create_select_options
|
222 |
|
223 |
+
|
224 |
+
// fetch coordinates based on the address
|
225 |
static function get_coordinates($address, $force_refresh = false) {
|
226 |
$address_hash = md5('gmw' . $address);
|
227 |
|
228 |
if ($force_refresh || ($coordinates = get_transient($address_hash)) === false) {
|
229 |
$url = 'http://maps.googleapis.com/maps/api/geocode/xml?address=' . urlencode($address) . '&sensor=false';
|
230 |
+
$result = wp_remote_get($url);
|
231 |
|
232 |
+
if (!is_wp_error($result) && $result['response']['code'] == 200) {
|
233 |
+
$data = new SimpleXMLElement($result['body']);
|
234 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
if ($data->status == 'OK') {
|
236 |
$cache_value['lat'] = (string) $data->result->geometry->location->lat;
|
237 |
$cache_value['lng'] = (string) $data->result->geometry->location->lng;
|
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.9
|
9 |
-
Stable tag: 1.
|
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 |
|
@@ -100,6 +100,10 @@ If you can figure it out open a thread in the support forums.
|
|
100 |
4. Widget options - lightbox map
|
101 |
|
102 |
== Changelog ==
|
|
|
|
|
|
|
|
|
103 |
= 1.60 =
|
104 |
* 2014/04/17
|
105 |
* update for WordPress v3.9, widget edit GUI now works in theme customizer
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Requires at least: 3.3
|
8 |
Tested up to: 3.9
|
9 |
+
Stable tag: 1.65
|
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 |
|
100 |
4. Widget options - lightbox map
|
101 |
|
102 |
== Changelog ==
|
103 |
+
= 1.65 =
|
104 |
+
* 2014/05/06
|
105 |
+
* finished up a few todos
|
106 |
+
|
107 |
= 1.60 =
|
108 |
* 2014/04/17
|
109 |
* update for WordPress v3.9, widget edit GUI now works in theme customizer
|