Snazzy Maps - Version 1.0.4

Version Description

Release Date: April 16th, 2015

  • Bug Fix: Moved snazzymaps.js from the footer to the head to support additional themes.
  • Bug Fix: Changed the add_theme_page capability from edit_themes to manage_options.
Download this release

Release Info

Developer atmistinc
Plugin Icon 128x128 Snazzy Maps
Version 1.0.4
Comparing to
See all releases

Code changes from version 1.0.3 to 1.0.4

Files changed (3) hide show
  1. readme.txt +7 -1
  2. snazzymaps.js +1 -1
  3. snazzymaps.php +4 -4
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://snazzymaps.com/about
4
  Tags: google,maps,google maps,styled maps,styles,color,schemes,themes
5
  Requires at least: 2.8
6
  Tested up to: 4.1.1
7
- Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -94,6 +94,12 @@ If you happen to find any other map plugins that don't work please send us an em
94
 
95
  == Changelog ==
96
 
 
 
 
 
 
 
97
  = 1.0.3 =
98
  Release Date: April 8th, 2015
99
 
4
  Tags: google,maps,google maps,styled maps,styles,color,schemes,themes
5
  Requires at least: 2.8
6
  Tested up to: 4.1.1
7
+ Stable tag: 1.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
94
 
95
  == Changelog ==
96
 
97
+ = 1.0.4 =
98
+ Release Date: April 16th, 2015
99
+
100
+ * Bug Fix: Moved snazzymaps.js from the footer to the head to support additional themes.
101
+ * Bug Fix: Changed the add_theme_page capability from edit_themes to manage_options.
102
+
103
  = 1.0.3 =
104
  Release Date: April 8th, 2015
105
 
snazzymaps.js CHANGED
@@ -1 +1 @@
1
- !function(){"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(e){return 10>e?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var r,n,o,a,i,u=gap,s=t[e];switch(s&&"object"==typeof s&&"function"==typeof s.toJSON&&(s=s.toJSON(e)),"function"==typeof rep&&(s=rep.call(t,e,s)),typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,i=[],"[object Array]"===Object.prototype.toString.apply(s)){for(a=s.length,r=0;a>r;r+=1)i[r]=str(r,s)||"null";return o=0===i.length?"[]":gap?"[\n"+gap+i.join(",\n"+gap)+"\n"+u+"]":"["+i.join(",")+"]",gap=u,o}if(rep&&"object"==typeof rep)for(a=rep.length,r=0;a>r;r+=1)"string"==typeof rep[r]&&(n=rep[r],o=str(n,s),o&&i.push(quote(n)+(gap?": ":":")+o));else for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(o=str(n,s),o&&i.push(quote(n)+(gap?": ":":")+o));return o=0===i.length?"{}":gap?"{\n"+gap+i.join(",\n"+gap)+"\n"+u+"}":"{"+i.join(",")+"}",gap=u,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var cx,escapable,gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;r>n;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,JSON.parse=function(text,reviver){function walk(e,t){var r,n,o=e[t];if(o&&"object"==typeof o)for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n=walk(o,r),void 0!==n?o[r]=n:delete o[r]);return reviver.call(e,t,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();var _setRepeater=function(e,t){e();var r=setInterval(e,1);setTimeout(function(){clearInterval(r)},t)},indexOf=function(e){return indexOf="function"==typeof Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t=-1,r=-1;for(t=0;t<this.length;t++)if(this[t]===e){r=t;break}return r},indexOf.call(this,e)},_scripts=[],_scriptListeners=[],_notifyListeners=function(){for(var e=0;e<_scriptListeners.length;e++)_scriptListeners[e](this)},_registerScript=function(e){-1==indexOf.call(_scripts,e)&&(_scripts.push(e),e.addEventListener?e.addEventListener("load",_notifyListeners):e.readyState&&(e.onreadystatechange=_notifyListeners))};if("undefined"==typeof MutationObserver)_setRepeater(function(){for(var e=document.getElementsByTagName("script"),t=0;t<e.length;t++)_registerScript(e[t])},1e4);else{var observer=new MutationObserver(function(e){e.forEach(function(e){for(var t=0;t<e.addedNodes.length;t++)"SCRIPT"==e.addedNodes[t].tagName&&_registerScript(e.addedNodes[t])})});observer.observe(document,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),setTimeout(function(){observer.disconnect()},1e4)}var _tryWrapper=function(e){return function(){try{e()}catch(t){}}},_repeatAndForget=function(e){_tryWrapper(e)(),jQuery&&jQuery(document).ready(_tryWrapper(e)),_scriptListeners.push(_tryWrapper(e)),_setRepeater(_tryWrapper(e),3e3)};_tryWrapper(function(){var e=JSON.parse(SnazzyDataForSnazzyMaps.json),t=null,r=function(r,n){n||(n={styles:e});var o=new t(r,n);return _repeatAndForget(function(){o.styles!=e&&o.setOptions({styles:e})}),o};_repeatAndForget(function(){google&&google.maps&&google.maps.Map&&google.maps.Map!=r&&(t=google.maps.Map,google.maps.Map=r)})})()}();
1
+ !function(){"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(e){return 10>e?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var r,n,o,a,i,s=gap,u=t[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),"function"==typeof rep&&(u=rep.call(t,e,u)),typeof u){case"string":return quote(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(gap+=indent,i=[],"[object Array]"===Object.prototype.toString.apply(u)){for(a=u.length,r=0;a>r;r+=1)i[r]=str(r,u)||"null";return o=0===i.length?"[]":gap?"[\n"+gap+i.join(",\n"+gap)+"\n"+s+"]":"["+i.join(",")+"]",gap=s,o}if(rep&&"object"==typeof rep)for(a=rep.length,r=0;a>r;r+=1)"string"==typeof rep[r]&&(n=rep[r],o=str(n,u),o&&i.push(quote(n)+(gap?": ":":")+o));else for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(o=str(n,u),o&&i.push(quote(n)+(gap?": ":":")+o));return o=0===i.length?"{}":gap?"{\n"+gap+i.join(",\n"+gap)+"\n"+s+"}":"{"+i.join(",")+"}",gap=s,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var cx,escapable,gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;r>n;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,JSON.parse=function(text,reviver){function walk(e,t){var r,n,o=e[t];if(o&&"object"==typeof o)for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n=walk(o,r),void 0!==n?o[r]=n:delete o[r]);return reviver.call(e,t,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();var _setRepeater=function(e,t){e();var r=setInterval(e,1);setTimeout(function(){clearInterval(r)},t)},indexOf=function(e){return indexOf="function"==typeof Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t=-1,r=-1;for(t=0;t<this.length;t++)if(this[t]===e){r=t;break}return r},indexOf.call(this,e)},_scripts=[],_scriptListeners=[],_notifyListeners=function(){for(var e=0;e<_scriptListeners.length;e++)_scriptListeners[e](this)},_registerScript=function(e){-1==indexOf.call(_scripts,e)&&(_scripts.push(e),e.addEventListener?e.addEventListener("load",_notifyListeners):e.readyState&&(e.onreadystatechange=_notifyListeners),_notifyListeners())};if("undefined"==typeof MutationObserver)_setRepeater(function(){for(var e=document.getElementsByTagName("script"),t=0;t<e.length;t++)_registerScript(e[t])},1e4);else{var observer=new MutationObserver(function(e){e.forEach(function(e){for(var t=0;t<e.addedNodes.length;t++)"SCRIPT"==e.addedNodes[t].tagName&&_registerScript(e.addedNodes[t])})});observer.observe(document,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),setTimeout(function(){observer.disconnect()},1e4)}var _tryWrapper=function(e){return function(){try{e()}catch(t){}}},_repeatAndForget=function(e){_tryWrapper(e)(),jQuery&&jQuery(document).ready(_tryWrapper(e)),_scriptListeners.push(_tryWrapper(e)),_setRepeater(_tryWrapper(e),3e3)};_tryWrapper(function(){var e=JSON.parse(SnazzyDataForSnazzyMaps.json),t=null,r=function(r,n){n||(n={styles:e});var o=new t(r,n);return _repeatAndForget(function(){o.styles!=e&&o.setOptions({styles:e})}),o};_repeatAndForget(function(){google&&google.maps&&google.maps.Map&&google.maps.Map!=r&&(t=google.maps.Map,google.maps.Map=r)})})()}();
snazzymaps.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Snazzy Maps
4
  * Plugin URI: https://snazzymaps.com/plugins
5
  * Description: Apply styles to your Google Maps with the official Snazzy Maps WordPress plugin.
6
- * Version: 1.0.3
7
  * Author: Atmist
8
  * Author URI: http://atmist.com/
9
  * License: GPL2
@@ -30,7 +30,7 @@ defined( 'ABSPATH' ) OR exit;
30
  //This API key is used to explore the styles in snazzy maps
31
  define('API_BASE', 'https://snazzymaps.com/');
32
  define('API_KEY', 'ecaccc3c-44fa-486c-9503-5d473587a493');
33
- define('SNAZZY_VERSION_NUMBER', '1.0.3');
34
 
35
  if(!defined('_DS')) {
36
  define('_DS', '/');
@@ -73,7 +73,7 @@ function enqueue_script() {
73
  plugins_url('snazzymaps.js', __FILE__),
74
  $deps = array('jquery'),
75
  $ver = SNAZZY_VERSION_NUMBER,
76
- $in_footer = true);
77
 
78
  //We have to use l10n_print_after so we can support older versions of WordPress
79
  $json = new Services_JSON();
@@ -88,7 +88,7 @@ add_action( 'wp_enqueue_scripts', 'enqueue_script');
88
  add_action( 'admin_enqueue_scripts', 'admin_enqueue_script');
89
 
90
  function admin_add_custom_menu(){
91
- add_theme_page('Snazzy Maps', 'Snazzy Maps', 'edit_themes', 'snazzy_maps', 'admin_add_custom_content');
92
  }
93
  add_action( 'admin_menu', 'admin_add_custom_menu');
94
 
3
  * Plugin Name: Snazzy Maps
4
  * Plugin URI: https://snazzymaps.com/plugins
5
  * Description: Apply styles to your Google Maps with the official Snazzy Maps WordPress plugin.
6
+ * Version: 1.0.4
7
  * Author: Atmist
8
  * Author URI: http://atmist.com/
9
  * License: GPL2
30
  //This API key is used to explore the styles in snazzy maps
31
  define('API_BASE', 'https://snazzymaps.com/');
32
  define('API_KEY', 'ecaccc3c-44fa-486c-9503-5d473587a493');
33
+ define('SNAZZY_VERSION_NUMBER', '1.0.4');
34
 
35
  if(!defined('_DS')) {
36
  define('_DS', '/');
73
  plugins_url('snazzymaps.js', __FILE__),
74
  $deps = array('jquery'),
75
  $ver = SNAZZY_VERSION_NUMBER,
76
+ $in_footer = false);
77
 
78
  //We have to use l10n_print_after so we can support older versions of WordPress
79
  $json = new Services_JSON();
88
  add_action( 'admin_enqueue_scripts', 'admin_enqueue_script');
89
 
90
  function admin_add_custom_menu(){
91
+ add_theme_page('Snazzy Maps', 'Snazzy Maps', 'manage_options', 'snazzy_maps', 'admin_add_custom_content');
92
  }
93
  add_action( 'admin_menu', 'admin_add_custom_menu');
94