Version Description
- 2016/06/23
- just a few bug fixes
Download this release
Release Info
| Developer | WebFactory |
| Plugin | |
| Version | 3.38 |
| Comparing to | |
| See all releases | |
Code changes from version 3.36 to 3.38
- google-maps-widget.php +9 -8
- js/gmw-admin.js +98 -1
- js/jquery.cookie.js +0 -95
- readme.txt +5 -1
google-maps-widget.php
CHANGED
|
@@ -4,7 +4,7 @@ Plugin Name: Google Maps Widget
|
|
| 4 |
Plugin URI: http://www.gmapswidget.com/
|
| 5 |
Description: Display a single image super-fast loading Google map in a widget. A larger, full featured map is available in a lightbox. Includes a user-friendly interface and numerous appearance options.
|
| 6 |
Author: Web factory Ltd
|
| 7 |
-
Version: 3.
|
| 8 |
Author URI: http://www.webfactoryltd.com/
|
| 9 |
Text Domain: google-maps-widget
|
| 10 |
Domain Path: lang
|
|
@@ -260,12 +260,10 @@ class GMW {
|
|
| 260 |
'AIzaSyDOobziwX_9-4JuAgqIlTUZgXAss7zIIEM',
|
| 261 |
'AIzaSyAkdW5Zp4O-96nZyFKq13UUgIHY9Yabvg8');
|
| 262 |
|
| 263 |
-
if ($type == '
|
| 264 |
-
return $options['api_key'];
|
| 265 |
-
} elseif ($type == 'fallback') {
|
| 266 |
shuffle($default_api_keys);
|
| 267 |
return $default_api_keys[0];
|
| 268 |
-
} elseif ($type == 'embed') {
|
| 269 |
if (!empty($options['api_key'])) {
|
| 270 |
return $options['api_key'];
|
| 271 |
} else {
|
|
@@ -504,7 +502,7 @@ class GMW {
|
|
| 504 |
} // show upgrade notice
|
| 505 |
|
| 506 |
// API key notification is shown only on GMW settings page
|
| 507 |
-
// disabled as a test in v3.35
|
| 508 |
if (0 && !GMW::get_api_key('static') && GMW::is_plugin_admin_page('settings')) {
|
| 509 |
add_action('admin_notices', array('GMW', 'notice_api_key'));
|
| 510 |
} // show api key notice
|
|
@@ -605,7 +603,6 @@ class GMW {
|
|
| 605 |
wp_enqueue_script('jquery-ui-tabs');
|
| 606 |
wp_enqueue_script('jquery-ui-dialog');
|
| 607 |
wp_enqueue_script('wp-pointer');
|
| 608 |
-
wp_enqueue_script('gmw-cookie', GMW_PLUGIN_URL . 'js/jquery.cookie.js', array('jquery'), GMW::$version, true);
|
| 609 |
wp_enqueue_script('gmw-gmap', '//maps.google.com/maps/api/js?key=' . GMW::get_api_key('fallback'), array(), GMW::$version, true);
|
| 610 |
wp_enqueue_script('gmw-select2', GMW_PLUGIN_URL . 'js/select2.min.js', array('jquery'), GMW::$version, true);
|
| 611 |
wp_enqueue_script('gmw-admin', GMW_PLUGIN_URL . 'js/gmw-admin.js', array('jquery'), GMW::$version, true);
|
|
@@ -675,6 +672,7 @@ class GMW {
|
|
| 675 |
$request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
|
| 676 |
$request_args = array('action' => 'validate_license',
|
| 677 |
'code' => $code,
|
|
|
|
| 678 |
'version' => GMW::$version,
|
| 679 |
'site' => get_home_url());
|
| 680 |
|
|
@@ -863,7 +861,7 @@ class GMW {
|
|
| 863 |
$update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin );
|
| 864 |
$out .= '<div class="after_trial" ' . $visible . '>';
|
| 865 |
$out .= '<p class="center">Your Google Maps Widget <b class="gmw-pro-red">PRO</b> trial has been activated!</p><p class="center">Please <b>click the button below</b> to update plugin files to PRO version.</p>';
|
| 866 |
-
$out .= '<p class="center"><a href="' . esc_url($update_url) . '" class="button button-primary">Update Google Maps Widget</a></p>';
|
| 867 |
$out .= '</div>';
|
| 868 |
|
| 869 |
$out .= '</div>'; // content
|
|
@@ -1047,6 +1045,7 @@ class GMW {
|
|
| 1047 |
$request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
|
| 1048 |
$request_args = array('action' => 'update_info',
|
| 1049 |
'timestamp' => time(),
|
|
|
|
| 1050 |
'version' => GMW::$version,
|
| 1051 |
'code' => $options['activation_code'],
|
| 1052 |
'site' => get_home_url());
|
|
@@ -1095,6 +1094,7 @@ class GMW {
|
|
| 1095 |
$request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
|
| 1096 |
$request_args = array('action' => 'update_info',
|
| 1097 |
'request_details' => serialize($args),
|
|
|
|
| 1098 |
'timestamp' => time(),
|
| 1099 |
'version' => GMW::$version,
|
| 1100 |
'code' => $options['activation_code'],
|
|
@@ -1144,6 +1144,7 @@ class GMW {
|
|
| 1144 |
'email' => $email,
|
| 1145 |
'version' => GMW::$version,
|
| 1146 |
'lang' => $lang,
|
|
|
|
| 1147 |
'ip' => $_SERVER['REMOTE_ADDR'],
|
| 1148 |
'site' => get_home_url());
|
| 1149 |
|
| 4 |
Plugin URI: http://www.gmapswidget.com/
|
| 5 |
Description: Display a single image super-fast loading Google map in a widget. A larger, full featured map is available in a lightbox. Includes a user-friendly interface and numerous appearance options.
|
| 6 |
Author: Web factory Ltd
|
| 7 |
+
Version: 3.38
|
| 8 |
Author URI: http://www.webfactoryltd.com/
|
| 9 |
Text Domain: google-maps-widget
|
| 10 |
Domain Path: lang
|
| 260 |
'AIzaSyDOobziwX_9-4JuAgqIlTUZgXAss7zIIEM',
|
| 261 |
'AIzaSyAkdW5Zp4O-96nZyFKq13UUgIHY9Yabvg8');
|
| 262 |
|
| 263 |
+
if ($type == 'fallback') {
|
|
|
|
|
|
|
| 264 |
shuffle($default_api_keys);
|
| 265 |
return $default_api_keys[0];
|
| 266 |
+
} elseif ($type == 'embed' || $type == 'static') {
|
| 267 |
if (!empty($options['api_key'])) {
|
| 268 |
return $options['api_key'];
|
| 269 |
} else {
|
| 502 |
} // show upgrade notice
|
| 503 |
|
| 504 |
// API key notification is shown only on GMW settings page
|
| 505 |
+
// disabled as a test in v3.35+
|
| 506 |
if (0 && !GMW::get_api_key('static') && GMW::is_plugin_admin_page('settings')) {
|
| 507 |
add_action('admin_notices', array('GMW', 'notice_api_key'));
|
| 508 |
} // show api key notice
|
| 603 |
wp_enqueue_script('jquery-ui-tabs');
|
| 604 |
wp_enqueue_script('jquery-ui-dialog');
|
| 605 |
wp_enqueue_script('wp-pointer');
|
|
|
|
| 606 |
wp_enqueue_script('gmw-gmap', '//maps.google.com/maps/api/js?key=' . GMW::get_api_key('fallback'), array(), GMW::$version, true);
|
| 607 |
wp_enqueue_script('gmw-select2', GMW_PLUGIN_URL . 'js/select2.min.js', array('jquery'), GMW::$version, true);
|
| 608 |
wp_enqueue_script('gmw-admin', GMW_PLUGIN_URL . 'js/gmw-admin.js', array('jquery'), GMW::$version, true);
|
| 672 |
$request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
|
| 673 |
$request_args = array('action' => 'validate_license',
|
| 674 |
'code' => $code,
|
| 675 |
+
'codebase' => 'free',
|
| 676 |
'version' => GMW::$version,
|
| 677 |
'site' => get_home_url());
|
| 678 |
|
| 861 |
$update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin );
|
| 862 |
$out .= '<div class="after_trial" ' . $visible . '>';
|
| 863 |
$out .= '<p class="center">Your Google Maps Widget <b class="gmw-pro-red">PRO</b> trial has been activated!</p><p class="center">Please <b>click the button below</b> to update plugin files to PRO version.</p>';
|
| 864 |
+
$out .= '<p class="center"><a href="' . esc_url($update_url) . '" class="button button-primary">Update Google Maps Widget to PRO</a></p>';
|
| 865 |
$out .= '</div>';
|
| 866 |
|
| 867 |
$out .= '</div>'; // content
|
| 1045 |
$request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
|
| 1046 |
$request_args = array('action' => 'update_info',
|
| 1047 |
'timestamp' => time(),
|
| 1048 |
+
'codebase' => 'free',
|
| 1049 |
'version' => GMW::$version,
|
| 1050 |
'code' => $options['activation_code'],
|
| 1051 |
'site' => get_home_url());
|
| 1094 |
$request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
|
| 1095 |
$request_args = array('action' => 'update_info',
|
| 1096 |
'request_details' => serialize($args),
|
| 1097 |
+
'codebase' => 'free',
|
| 1098 |
'timestamp' => time(),
|
| 1099 |
'version' => GMW::$version,
|
| 1100 |
'code' => $options['activation_code'],
|
| 1144 |
'email' => $email,
|
| 1145 |
'version' => GMW::$version,
|
| 1146 |
'lang' => $lang,
|
| 1147 |
+
'codebase' => 'free',
|
| 1148 |
'ip' => $_SERVER['REMOTE_ADDR'],
|
| 1149 |
'site' => get_home_url());
|
| 1150 |
|
js/gmw-admin.js
CHANGED
|
@@ -566,4 +566,101 @@ jQuery(function($) {
|
|
| 566 |
|
| 567 |
return false;
|
| 568 |
}); // test api key
|
| 569 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 566 |
|
| 567 |
return false;
|
| 568 |
}); // test api key
|
| 569 |
+
}); // onload
|
| 570 |
+
|
| 571 |
+
|
| 572 |
+
/*!
|
| 573 |
+
* jQuery Cookie Plugin v1.3.1
|
| 574 |
+
* https://github.com/carhartl/jquery-cookie
|
| 575 |
+
*
|
| 576 |
+
* Copyright 2013 Klaus Hartl
|
| 577 |
+
* Released under the MIT license
|
| 578 |
+
*/
|
| 579 |
+
(function (factory) {
|
| 580 |
+
if (typeof define === 'function' && define.amd) {
|
| 581 |
+
// AMD. Register as anonymous module.
|
| 582 |
+
define(['jquery'], factory);
|
| 583 |
+
} else {
|
| 584 |
+
// Browser globals.
|
| 585 |
+
factory(jQuery);
|
| 586 |
+
}
|
| 587 |
+
}(function ($) {
|
| 588 |
+
|
| 589 |
+
var pluses = /\+/g;
|
| 590 |
+
|
| 591 |
+
function raw(s) {
|
| 592 |
+
return s;
|
| 593 |
+
}
|
| 594 |
+
|
| 595 |
+
function decoded(s) {
|
| 596 |
+
return decodeURIComponent(s.replace(pluses, ' '));
|
| 597 |
+
}
|
| 598 |
+
|
| 599 |
+
function converted(s) {
|
| 600 |
+
if (s.indexOf('"') === 0) {
|
| 601 |
+
// This is a quoted cookie as according to RFC2068, unescape
|
| 602 |
+
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
| 603 |
+
}
|
| 604 |
+
try {
|
| 605 |
+
return config.json ? JSON.parse(s) : s;
|
| 606 |
+
} catch(er) {}
|
| 607 |
+
}
|
| 608 |
+
|
| 609 |
+
var config = $.cookie = function (key, value, options) {
|
| 610 |
+
|
| 611 |
+
// write
|
| 612 |
+
if (value !== undefined) {
|
| 613 |
+
options = $.extend({}, config.defaults, options);
|
| 614 |
+
|
| 615 |
+
if (typeof options.expires === 'number') {
|
| 616 |
+
var days = options.expires, t = options.expires = new Date();
|
| 617 |
+
t.setDate(t.getDate() + days);
|
| 618 |
+
}
|
| 619 |
+
|
| 620 |
+
value = config.json ? JSON.stringify(value) : String(value);
|
| 621 |
+
|
| 622 |
+
return (document.cookie = [
|
| 623 |
+
config.raw ? key : encodeURIComponent(key),
|
| 624 |
+
'=',
|
| 625 |
+
config.raw ? value : encodeURIComponent(value),
|
| 626 |
+
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
| 627 |
+
options.path ? '; path=' + options.path : '',
|
| 628 |
+
options.domain ? '; domain=' + options.domain : '',
|
| 629 |
+
options.secure ? '; secure' : ''
|
| 630 |
+
].join(''));
|
| 631 |
+
}
|
| 632 |
+
|
| 633 |
+
// read
|
| 634 |
+
var decode = config.raw ? raw : decoded;
|
| 635 |
+
var cookies = document.cookie.split('; ');
|
| 636 |
+
var result = key ? undefined : {};
|
| 637 |
+
for (var i = 0, l = cookies.length; i < l; i++) {
|
| 638 |
+
var parts = cookies[i].split('=');
|
| 639 |
+
var name = decode(parts.shift());
|
| 640 |
+
var cookie = decode(parts.join('='));
|
| 641 |
+
|
| 642 |
+
if (key && key === name) {
|
| 643 |
+
result = converted(cookie);
|
| 644 |
+
break;
|
| 645 |
+
}
|
| 646 |
+
|
| 647 |
+
if (!key) {
|
| 648 |
+
result[name] = converted(cookie);
|
| 649 |
+
}
|
| 650 |
+
}
|
| 651 |
+
|
| 652 |
+
return result;
|
| 653 |
+
};
|
| 654 |
+
|
| 655 |
+
config.defaults = {};
|
| 656 |
+
|
| 657 |
+
$.removeCookie = function (key, options) {
|
| 658 |
+
if ($.cookie(key) !== undefined) {
|
| 659 |
+
// Must not alter options, thus extending a fresh object...
|
| 660 |
+
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
| 661 |
+
return true;
|
| 662 |
+
}
|
| 663 |
+
return false;
|
| 664 |
+
};
|
| 665 |
+
|
| 666 |
+
}));
|
js/jquery.cookie.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
| 1 |
-
/*!
|
| 2 |
-
* jQuery Cookie Plugin v1.3.1
|
| 3 |
-
* https://github.com/carhartl/jquery-cookie
|
| 4 |
-
*
|
| 5 |
-
* Copyright 2013 Klaus Hartl
|
| 6 |
-
* Released under the MIT license
|
| 7 |
-
*/
|
| 8 |
-
(function (factory) {
|
| 9 |
-
if (typeof define === 'function' && define.amd) {
|
| 10 |
-
// AMD. Register as anonymous module.
|
| 11 |
-
define(['jquery'], factory);
|
| 12 |
-
} else {
|
| 13 |
-
// Browser globals.
|
| 14 |
-
factory(jQuery);
|
| 15 |
-
}
|
| 16 |
-
}(function ($) {
|
| 17 |
-
|
| 18 |
-
var pluses = /\+/g;
|
| 19 |
-
|
| 20 |
-
function raw(s) {
|
| 21 |
-
return s;
|
| 22 |
-
}
|
| 23 |
-
|
| 24 |
-
function decoded(s) {
|
| 25 |
-
return decodeURIComponent(s.replace(pluses, ' '));
|
| 26 |
-
}
|
| 27 |
-
|
| 28 |
-
function converted(s) {
|
| 29 |
-
if (s.indexOf('"') === 0) {
|
| 30 |
-
// This is a quoted cookie as according to RFC2068, unescape
|
| 31 |
-
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
| 32 |
-
}
|
| 33 |
-
try {
|
| 34 |
-
return config.json ? JSON.parse(s) : s;
|
| 35 |
-
} catch(er) {}
|
| 36 |
-
}
|
| 37 |
-
|
| 38 |
-
var config = $.cookie = function (key, value, options) {
|
| 39 |
-
|
| 40 |
-
// write
|
| 41 |
-
if (value !== undefined) {
|
| 42 |
-
options = $.extend({}, config.defaults, options);
|
| 43 |
-
|
| 44 |
-
if (typeof options.expires === 'number') {
|
| 45 |
-
var days = options.expires, t = options.expires = new Date();
|
| 46 |
-
t.setDate(t.getDate() + days);
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
value = config.json ? JSON.stringify(value) : String(value);
|
| 50 |
-
|
| 51 |
-
return (document.cookie = [
|
| 52 |
-
config.raw ? key : encodeURIComponent(key),
|
| 53 |
-
'=',
|
| 54 |
-
config.raw ? value : encodeURIComponent(value),
|
| 55 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
| 56 |
-
options.path ? '; path=' + options.path : '',
|
| 57 |
-
options.domain ? '; domain=' + options.domain : '',
|
| 58 |
-
options.secure ? '; secure' : ''
|
| 59 |
-
].join(''));
|
| 60 |
-
}
|
| 61 |
-
|
| 62 |
-
// read
|
| 63 |
-
var decode = config.raw ? raw : decoded;
|
| 64 |
-
var cookies = document.cookie.split('; ');
|
| 65 |
-
var result = key ? undefined : {};
|
| 66 |
-
for (var i = 0, l = cookies.length; i < l; i++) {
|
| 67 |
-
var parts = cookies[i].split('=');
|
| 68 |
-
var name = decode(parts.shift());
|
| 69 |
-
var cookie = decode(parts.join('='));
|
| 70 |
-
|
| 71 |
-
if (key && key === name) {
|
| 72 |
-
result = converted(cookie);
|
| 73 |
-
break;
|
| 74 |
-
}
|
| 75 |
-
|
| 76 |
-
if (!key) {
|
| 77 |
-
result[name] = converted(cookie);
|
| 78 |
-
}
|
| 79 |
-
}
|
| 80 |
-
|
| 81 |
-
return result;
|
| 82 |
-
};
|
| 83 |
-
|
| 84 |
-
config.defaults = {};
|
| 85 |
-
|
| 86 |
-
$.removeCookie = function (key, options) {
|
| 87 |
-
if ($.cookie(key) !== undefined) {
|
| 88 |
-
// Must not alter options, thus extending a fresh object...
|
| 89 |
-
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
| 90 |
-
return true;
|
| 91 |
-
}
|
| 92 |
-
return false;
|
| 93 |
-
};
|
| 94 |
-
|
| 95 |
-
}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: 4.0
|
| 8 |
Tested up to: 4.5
|
| 9 |
-
Stable tag: 3.
|
| 10 |
|
| 11 |
Displays a single image, super-fast loading Google map in a widget. A larger map with all interactive features is available on click in a lightbox.
|
| 12 |
|
|
@@ -141,6 +141,10 @@ Read the <a href="http://wordpress.org/support/plugin/google-maps-widget">suppor
|
|
| 141 |
5. Widget options - Shortcode
|
| 142 |
|
| 143 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
= 3.36 =
|
| 145 |
* 2016/05/11
|
| 146 |
* minor bug fixes
|
| 6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 7 |
Requires at least: 4.0
|
| 8 |
Tested up to: 4.5
|
| 9 |
+
Stable tag: 3.38
|
| 10 |
|
| 11 |
Displays a single image, super-fast loading Google map in a widget. A larger map with all interactive features is available on click in a lightbox.
|
| 12 |
|
| 141 |
5. Widget options - Shortcode
|
| 142 |
|
| 143 |
== Changelog ==
|
| 144 |
+
= 3.38 =
|
| 145 |
+
* 2016/06/23
|
| 146 |
+
* just a few bug fixes
|
| 147 |
+
|
| 148 |
= 3.36 =
|
| 149 |
* 2016/05/11
|
| 150 |
* minor bug fixes
|
