Changeset 2782883 for leaflet-map
- Timestamp:
- 09/11/2022 03:37:34 AM (4 years ago)
- Location:
- leaflet-map
- Files:
-
- 16 edited
- 1 copied
-
tags/3.0.5 (copied) (copied from leaflet-map/trunk)
-
tags/3.0.5/class.admin.php (modified) (1 diff)
-
tags/3.0.5/class.plugin-settings.php (modified) (1 diff)
-
tags/3.0.5/leaflet-map.php (modified) (2 diffs)
-
tags/3.0.5/readme.txt (modified) (3 diffs)
-
tags/3.0.5/scripts/construct-leaflet-map.js (modified) (1 diff)
-
tags/3.0.5/scripts/construct-leaflet-map.min.js (modified) (1 diff)
-
tags/3.0.5/shortcodes/class.geojson-shortcode.php (modified) (1 diff)
-
tags/3.0.5/templates/settings.php (modified) (2 diffs)
-
trunk/class.admin.php (modified) (1 diff)
-
trunk/class.plugin-settings.php (modified) (1 diff)
-
trunk/leaflet-map.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/scripts/construct-leaflet-map.js (modified) (1 diff)
-
trunk/scripts/construct-leaflet-map.min.js (modified) (1 diff)
-
trunk/shortcodes/class.geojson-shortcode.php (modified) (1 diff)
-
trunk/templates/settings.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
leaflet-map/tags/3.0.5/class.admin.php
r2401199 r2782883 82 82 83 83 add_menu_page("Leaflet Map", "Leaflet Map", $author, $main_link, $main_page, $leaf); 84 add_submenu_page("leaflet-map", "Settings", "Settings", $admin, "leaflet-map", array($this, "settings_page"));85 add_submenu_page("leaflet-map", "Shortcode Helper", "Shortcode Helper", $author, "leaflet-shortcode-helper", array($this, "shortcode_page"));84 add_submenu_page("leaflet-map", __('Settings', 'leaflet-map'), __('Settings', 'leaflet-map'), $admin, "leaflet-map", array($this, "settings_page")); 85 add_submenu_page("leaflet-map", __('Shortcode helper', 'leaflet-map'), __('Shortcode helper', 'leaflet-map'), $author, "leaflet-shortcode-helper", array($this, "shortcode_page")); 86 86 } 87 87 -
leaflet-map/tags/3.0.5/class.plugin-settings.php
r2556149 r2782883 72 72 $leaflet_version = Leaflet_Map::$leaflet_version; 73 73 74 $foreachmap = __('You can also change this for each map' );74 $foreachmap = __('You can also change this for each map', 'leaflet-map'); 75 75 76 76 /* -
leaflet-map/tags/3.0.5/leaflet-map.php
r2625537 r2782883 9 9 * Text Domain: leaflet-map 10 10 * Domain Path: /languages/ 11 * Version: 3.0. 411 * Version: 3.0.5 12 12 * License: GPL2 13 13 * Leaflet Map is free software: you can redistribute it and/or modify … … 30 30 } 31 31 32 define('LEAFLET_MAP__PLUGIN_VERSION', '3.0. 4');32 define('LEAFLET_MAP__PLUGIN_VERSION', '3.0.5'); 33 33 define('LEAFLET_MAP__PLUGIN_FILE', __FILE__); 34 34 define('LEAFLET_MAP__PLUGIN_DIR', plugin_dir_path(__FILE__)); -
leaflet-map/tags/3.0.5/readme.txt
r2728637 r2782883 7 7 Tags: leaflet, map, mobile, javascript, openstreetmap, mapquest, interactive 8 8 Requires at least: 4.6 9 Tested up to: 6.0 10 Version: 3.0. 411 Stable tag: 3.0. 49 Tested up to: 6.0.2 10 Version: 3.0.5 11 Stable tag: 3.0.5 12 12 License: GPLv2 13 13 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 150 150 == Changelog == 151 151 152 = 3.0.5 = 153 * Fixes ampersands in geojson/gpx/kml urls 154 152 155 = 3.0.4 = 153 156 * Fixes markers so that they can accept `0` as a value for x/y and lat/lng coordinates … … 438 441 == Upgrade Notice == 439 442 443 = 3.0.5 = 444 Fixes ampersands/querystrings in geojson/gpx/kml urls 445 440 446 = 3.0.4 = 441 447 Fixes markers so that they can accept `0` as a value for x/y and lat/lng coordinates -
leaflet-map/tags/3.0.5/scripts/construct-leaflet-map.js
r2625537 r2782883 2 2 // holds a function queue to call once page is loaded 3 3 function Main() { 4 // TODO: figure out how to derive this from php or package.json instead 5 var VERSION = 'v3.0.4'; 4 var VERSION = '{{VERSION}}'; 6 5 this.VERSION = VERSION; 7 6 -
leaflet-map/tags/3.0.5/scripts/construct-leaflet-map.min.js
r2625537 r2782883 1 !function(){var t=window.WPLeafletMapPlugin;if(window.WPLeafletMapPlugin=new function(){function t(t){try{t()}catch(t){console.log("-- version --"," v3.0.4"),console.error(t)}}this.VERSION="v3.0.4";var n=!1,i=[];this.push=function(e){n?t(e):i.push(e)},this.unshift=function(e){n?t(e):i.unshift(e)},this.init=function(){n=!0;for(var e=0,r=i.length;e<r;e++)t(i[e])},this.createMap=function(t){var n=document.getElementsByClassName("WPLeafletMap")[this.maps.length],i=L.map(n,t);return t.fitBounds&&(i._shouldFitBounds=!0),t.attribution&&function(t,n){if(!t)return;for(var i=t.split(";"),e=L.control.attribution({prefix:!1}).addTo(n),r=0,o=i.length;r<o;r++){var a=(u=i[r]).trim?u.trim():u.replace(/^\s+|\s+$/gm,"");e.addAttribution(a)}var u}(t.attribution,i),this.maps.push(i),i},this.createImageMap=function(t){var n=this.createMap(t);return n.is_image_map=!0,this.images.push(n),n},this.getCurrentMap=function(){return this.maps[this.maps.length-1]},this.getCurrentGroup=function(){var t=this.maps.length;return this.markergroups[t]||(this.markergroups[t]=this.newMarkerGroup(this.maps[t-1])),this.markergroups[t]},this.getCurrentMarkerGroup=this.getCurrentGroup,this.getGroup=function(t){return(new L.FeatureGroup).addTo(t)},this.newMarkerGroup=function(t){var n=this.getGroup(t);return n.timeout=null,t._shouldFitBounds&&n.on("layeradd",(function(i){i.layer instanceof L.FeatureGroup&&i.layer.on("ready",(function(){t.fitBounds(n.getBounds())})),window.clearTimeout(this.timeout),this.timeout=window.setTimeout((function(){try{t.fitBounds(n.getBounds())}catch(t){}}),100)}),n),n},this.propsToTable=function(t){var n,i=[];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&i.push(n);for(var e="<table>",r=0,o=(i=i.sort()).length;r<o;r++){var a=i[r];e+="<tr><td>"+a+"</td>",e+="<td>"+t[a]+"</td></tr>"}return e+="</table>"};var e=this.unescape=function(t){var n=document.createElement("div");return n.innerHTML=t,n.innerText||t},r=/\{ *(.*?) *\}/g;this.template=function(t,n){return null==n?t:t.replace(r,(function(t,i){var r=function(t){for(var n=t.split(" | "),i={},e=n.shift(),r=0,o=n.length;r<o;r++){var a=n[r].split(": "),u=a.shift(),s=a.join(": ")||!0;i[u]=s}return i.key=e,i}(i),a=function(t,n){for(var i=function(t){if(null==t)return[];for(var n=t.split(o),i=[],e=0,r=n.length;e<r;e++)""!==n[e]&&i.push(n[e]);return i}(e(n)),r=t,a=0,u=i.length;a<u;a++)if(!(r=r[i[a]]))return;return r}(n,r.key);return null==a?r.default||t:a}))};var o=/[.‘’'“”"\[\]]+/g;function a(t,n){"undefined"!=typeof L&&void 0!==L[t]?n():setTimeout((function(){a(t,n)}),100)}this.waitForSVG=function(t){a("SVGIcon",t)},this.waitForAjax=function(t){a("AjaxGeoJSON",t)},this.createScale=function(t){L.control.scale(t).addTo(this.getCurrentMap())},this.getIconOptions=function(t){for(var n,i=t||{},e=["iconSize","iconAnchor","shadowSize","shadowAnchor","popupAnchor"],r=L.Icon.Default.prototype.options,o=0,a=e.length;o<a;o++){var u=e[o],s=i[u];if(s){for(var h=s.split(","),c=0,p=h.length;c<p;c++)h[c]=Number(h[c]);i[u]=h}}return i.popupAnchor||(i.popupAnchor=((n=(n=i.iconSize||r.iconSize).slice())[0]=0,n[1]*=-1,n[1]-=3,n)),i.iconUrl&&(i.icon=new L.Icon(i)),i},this.maps=[],this.images=[],this.markergroups={},this.markers=[],this.lines=[],this.polygons=[],this.circles=[],this.geojsons=[]},t){for(var n=0,i=t.length;n<i;n++)window.WPLeafletMapPlugin.push(t[n]);for(var e in t.splice(0),t)t.hasOwnProperty(e)&&(window.WPLeafletMapPlugin[e]=t[e])}window.addEventListener?window.addEventListener("load",window.WPLeafletMapPlugin.init,!1):window.attachEvent&&window.attachEvent("onload",window.WPLeafletMapPlugin.init)}();1 !function(){var t=window.WPLeafletMapPlugin;if(window.WPLeafletMapPlugin=new function(){function t(t){try{t()}catch(t){console.log("-- version --","{{VERSION}}"),console.error(t)}}this.VERSION="{{VERSION}}";var n=!1,i=[];this.push=function(e){n?t(e):i.push(e)},this.unshift=function(e){n?t(e):i.unshift(e)},this.init=function(){n=!0;for(var e=0,r=i.length;e<r;e++)t(i[e])},this.createMap=function(t){var n=document.getElementsByClassName("WPLeafletMap")[this.maps.length],i=L.map(n,t);return t.fitBounds&&(i._shouldFitBounds=!0),t.attribution&&function(t,n){if(!t)return;for(var i=t.split(";"),e=L.control.attribution({prefix:!1}).addTo(n),r=0,o=i.length;r<o;r++){var a=(u=i[r]).trim?u.trim():u.replace(/^\s+|\s+$/gm,"");e.addAttribution(a)}var u}(t.attribution,i),this.maps.push(i),i},this.createImageMap=function(t){var n=this.createMap(t);return n.is_image_map=!0,this.images.push(n),n},this.getCurrentMap=function(){return this.maps[this.maps.length-1]},this.getCurrentGroup=function(){var t=this.maps.length;return this.markergroups[t]||(this.markergroups[t]=this.newMarkerGroup(this.maps[t-1])),this.markergroups[t]},this.getCurrentMarkerGroup=this.getCurrentGroup,this.getGroup=function(t){return(new L.FeatureGroup).addTo(t)},this.newMarkerGroup=function(t){var n=this.getGroup(t);return n.timeout=null,t._shouldFitBounds&&n.on("layeradd",(function(i){i.layer instanceof L.FeatureGroup&&i.layer.on("ready",(function(){t.fitBounds(n.getBounds())})),window.clearTimeout(this.timeout),this.timeout=window.setTimeout((function(){try{t.fitBounds(n.getBounds())}catch(t){}}),100)}),n),n},this.propsToTable=function(t){var n,i=[];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&i.push(n);for(var e="<table>",r=0,o=(i=i.sort()).length;r<o;r++){var a=i[r];e+="<tr><td>"+a+"</td>",e+="<td>"+t[a]+"</td></tr>"}return e+="</table>"};var e=this.unescape=function(t){var n=document.createElement("div");return n.innerHTML=t,n.innerText||t},r=/\{ *(.*?) *\}/g;this.template=function(t,n){return null==n?t:t.replace(r,(function(t,i){var r=function(t){for(var n=t.split(" | "),i={},e=n.shift(),r=0,o=n.length;r<o;r++){var a=n[r].split(": "),u=a.shift(),s=a.join(": ")||!0;i[u]=s}return i.key=e,i}(i),a=function(t,n){for(var i=function(t){if(null==t)return[];for(var n=t.split(o),i=[],e=0,r=n.length;e<r;e++)""!==n[e]&&i.push(n[e]);return i}(e(n)),r=t,a=0,u=i.length;a<u;a++)if(!(r=r[i[a]]))return;return r}(n,r.key);return null==a?r.default||t:a}))};var o=/[.‘’'“”"\[\]]+/g;function a(t,n){"undefined"!=typeof L&&void 0!==L[t]?n():setTimeout((function(){a(t,n)}),100)}this.waitForSVG=function(t){a("SVGIcon",t)},this.waitForAjax=function(t){a("AjaxGeoJSON",t)},this.createScale=function(t){L.control.scale(t).addTo(this.getCurrentMap())},this.getIconOptions=function(t){for(var n,i=t||{},e=["iconSize","iconAnchor","shadowSize","shadowAnchor","popupAnchor"],r=L.Icon.Default.prototype.options,o=0,a=e.length;o<a;o++){var u=e[o],s=i[u];if(s){for(var h=s.split(","),c=0,p=h.length;c<p;c++)h[c]=Number(h[c]);i[u]=h}}return i.popupAnchor||(i.popupAnchor=((n=(n=i.iconSize||r.iconSize).slice())[0]=0,n[1]*=-1,n[1]-=3,n)),i.iconUrl&&(i.icon=new L.Icon(i)),i},this.maps=[],this.images=[],this.markergroups={},this.markers=[],this.lines=[],this.polygons=[],this.circles=[],this.geojsons=[]},t){for(var n=0,i=t.length;n<i;n++)window.WPLeafletMapPlugin.push(t[n]);for(var e in t.splice(0),t)t.hasOwnProperty(e)&&(window.WPLeafletMapPlugin[e]=t[e])}window.addEventListener?window.addEventListener("load",window.WPLeafletMapPlugin.init,!1):window.attachEvent&&window.attachEvent("onload",window.WPLeafletMapPlugin.init)}(); -
leaflet-map/tags/3.0.5/shortcodes/class.geojson-shortcode.php
r2608363 r2782883 109 109 'fill-opacity' : 'fillOpacity', 110 110 }; 111 var layer = L.ajaxGeoJson(src, { 111 // htmlspecialchars converts & to "&"; maybe unnecessarily, and maybe 3x 112 var ampersandRegex = /&(?:amp;){1,3}/g 113 var layer = L.ajaxGeoJson(src.replace(ampersandRegex, '&'), { 112 114 type: '<?php echo $this->type; ?>', 113 115 style : layerStyle, -
leaflet-map/tags/3.0.5/templates/settings.php
r2556149 r2782883 83 83 84 84 <p><?php echo $description; ?></p> 85 <h3> Found an issue?</h3>86 <p> Post it to <b>WordPress Support</b>: <a href="https://wordpress.org/support/plugin/leaflet-map/" target="_blank">Leaflet Map (WordPress)</a></p>87 <p> Add an issue on<b>GitHub</b>: <a href="https://github.com/bozdoz/wp-plugin-leaflet-map/issues" target="_blank">Leaflet Map (GitHub)</a></p>85 <h3><?php _e('Found an issue?', 'leaflet-map') ?></h3> 86 <p><?php _e('Post it to ', 'leaflet-map') ?><b><?php _e('WordPress Support', 'leaflet-map') ?></b>: <a href="https://wordpress.org/support/plugin/leaflet-map/" target="_blank">Leaflet Map (WordPress)</a></p> 87 <p><?php _e('Add an issue on ', 'leaflet-map') ?><b>GitHub</b>: <a href="https://github.com/bozdoz/wp-plugin-leaflet-map/issues" target="_blank">Leaflet Map (GitHub)</a></p> 88 88 89 89 <div class="wrap"> … … 143 143 144 144 <div> 145 <p> Leaf icon provided by <a href="https://fontawesome.com/" target="_blank">Font Awesome</a>, under their free license.</p>145 <p><?php _e('Leaf icon provided by ', 'leaflet-map') ?><a href="https://fontawesome.com/" target="_blank">Font Awesome</a><?php _e( ', under their free license.', 'leaflet-map' ) ?></p> 146 146 </div> 147 147 -
leaflet-map/trunk/class.admin.php
r2401199 r2782883 82 82 83 83 add_menu_page("Leaflet Map", "Leaflet Map", $author, $main_link, $main_page, $leaf); 84 add_submenu_page("leaflet-map", "Settings", "Settings", $admin, "leaflet-map", array($this, "settings_page"));85 add_submenu_page("leaflet-map", "Shortcode Helper", "Shortcode Helper", $author, "leaflet-shortcode-helper", array($this, "shortcode_page"));84 add_submenu_page("leaflet-map", __('Settings', 'leaflet-map'), __('Settings', 'leaflet-map'), $admin, "leaflet-map", array($this, "settings_page")); 85 add_submenu_page("leaflet-map", __('Shortcode helper', 'leaflet-map'), __('Shortcode helper', 'leaflet-map'), $author, "leaflet-shortcode-helper", array($this, "shortcode_page")); 86 86 } 87 87 -
leaflet-map/trunk/class.plugin-settings.php
r2556149 r2782883 72 72 $leaflet_version = Leaflet_Map::$leaflet_version; 73 73 74 $foreachmap = __('You can also change this for each map' );74 $foreachmap = __('You can also change this for each map', 'leaflet-map'); 75 75 76 76 /* -
leaflet-map/trunk/leaflet-map.php
r2625537 r2782883 9 9 * Text Domain: leaflet-map 10 10 * Domain Path: /languages/ 11 * Version: 3.0. 411 * Version: 3.0.5 12 12 * License: GPL2 13 13 * Leaflet Map is free software: you can redistribute it and/or modify … … 30 30 } 31 31 32 define('LEAFLET_MAP__PLUGIN_VERSION', '3.0. 4');32 define('LEAFLET_MAP__PLUGIN_VERSION', '3.0.5'); 33 33 define('LEAFLET_MAP__PLUGIN_FILE', __FILE__); 34 34 define('LEAFLET_MAP__PLUGIN_DIR', plugin_dir_path(__FILE__)); -
leaflet-map/trunk/readme.txt
r2728637 r2782883 7 7 Tags: leaflet, map, mobile, javascript, openstreetmap, mapquest, interactive 8 8 Requires at least: 4.6 9 Tested up to: 6.0 10 Version: 3.0. 411 Stable tag: 3.0. 49 Tested up to: 6.0.2 10 Version: 3.0.5 11 Stable tag: 3.0.5 12 12 License: GPLv2 13 13 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 150 150 == Changelog == 151 151 152 = 3.0.5 = 153 * Fixes ampersands in geojson/gpx/kml urls 154 152 155 = 3.0.4 = 153 156 * Fixes markers so that they can accept `0` as a value for x/y and lat/lng coordinates … … 438 441 == Upgrade Notice == 439 442 443 = 3.0.5 = 444 Fixes ampersands/querystrings in geojson/gpx/kml urls 445 440 446 = 3.0.4 = 441 447 Fixes markers so that they can accept `0` as a value for x/y and lat/lng coordinates -
leaflet-map/trunk/scripts/construct-leaflet-map.js
r2625537 r2782883 2 2 // holds a function queue to call once page is loaded 3 3 function Main() { 4 // TODO: figure out how to derive this from php or package.json instead 5 var VERSION = 'v3.0.4'; 4 var VERSION = '{{VERSION}}'; 6 5 this.VERSION = VERSION; 7 6 -
leaflet-map/trunk/scripts/construct-leaflet-map.min.js
r2625537 r2782883 1 !function(){var t=window.WPLeafletMapPlugin;if(window.WPLeafletMapPlugin=new function(){function t(t){try{t()}catch(t){console.log("-- version --"," v3.0.4"),console.error(t)}}this.VERSION="v3.0.4";var n=!1,i=[];this.push=function(e){n?t(e):i.push(e)},this.unshift=function(e){n?t(e):i.unshift(e)},this.init=function(){n=!0;for(var e=0,r=i.length;e<r;e++)t(i[e])},this.createMap=function(t){var n=document.getElementsByClassName("WPLeafletMap")[this.maps.length],i=L.map(n,t);return t.fitBounds&&(i._shouldFitBounds=!0),t.attribution&&function(t,n){if(!t)return;for(var i=t.split(";"),e=L.control.attribution({prefix:!1}).addTo(n),r=0,o=i.length;r<o;r++){var a=(u=i[r]).trim?u.trim():u.replace(/^\s+|\s+$/gm,"");e.addAttribution(a)}var u}(t.attribution,i),this.maps.push(i),i},this.createImageMap=function(t){var n=this.createMap(t);return n.is_image_map=!0,this.images.push(n),n},this.getCurrentMap=function(){return this.maps[this.maps.length-1]},this.getCurrentGroup=function(){var t=this.maps.length;return this.markergroups[t]||(this.markergroups[t]=this.newMarkerGroup(this.maps[t-1])),this.markergroups[t]},this.getCurrentMarkerGroup=this.getCurrentGroup,this.getGroup=function(t){return(new L.FeatureGroup).addTo(t)},this.newMarkerGroup=function(t){var n=this.getGroup(t);return n.timeout=null,t._shouldFitBounds&&n.on("layeradd",(function(i){i.layer instanceof L.FeatureGroup&&i.layer.on("ready",(function(){t.fitBounds(n.getBounds())})),window.clearTimeout(this.timeout),this.timeout=window.setTimeout((function(){try{t.fitBounds(n.getBounds())}catch(t){}}),100)}),n),n},this.propsToTable=function(t){var n,i=[];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&i.push(n);for(var e="<table>",r=0,o=(i=i.sort()).length;r<o;r++){var a=i[r];e+="<tr><td>"+a+"</td>",e+="<td>"+t[a]+"</td></tr>"}return e+="</table>"};var e=this.unescape=function(t){var n=document.createElement("div");return n.innerHTML=t,n.innerText||t},r=/\{ *(.*?) *\}/g;this.template=function(t,n){return null==n?t:t.replace(r,(function(t,i){var r=function(t){for(var n=t.split(" | "),i={},e=n.shift(),r=0,o=n.length;r<o;r++){var a=n[r].split(": "),u=a.shift(),s=a.join(": ")||!0;i[u]=s}return i.key=e,i}(i),a=function(t,n){for(var i=function(t){if(null==t)return[];for(var n=t.split(o),i=[],e=0,r=n.length;e<r;e++)""!==n[e]&&i.push(n[e]);return i}(e(n)),r=t,a=0,u=i.length;a<u;a++)if(!(r=r[i[a]]))return;return r}(n,r.key);return null==a?r.default||t:a}))};var o=/[.‘’'“”"\[\]]+/g;function a(t,n){"undefined"!=typeof L&&void 0!==L[t]?n():setTimeout((function(){a(t,n)}),100)}this.waitForSVG=function(t){a("SVGIcon",t)},this.waitForAjax=function(t){a("AjaxGeoJSON",t)},this.createScale=function(t){L.control.scale(t).addTo(this.getCurrentMap())},this.getIconOptions=function(t){for(var n,i=t||{},e=["iconSize","iconAnchor","shadowSize","shadowAnchor","popupAnchor"],r=L.Icon.Default.prototype.options,o=0,a=e.length;o<a;o++){var u=e[o],s=i[u];if(s){for(var h=s.split(","),c=0,p=h.length;c<p;c++)h[c]=Number(h[c]);i[u]=h}}return i.popupAnchor||(i.popupAnchor=((n=(n=i.iconSize||r.iconSize).slice())[0]=0,n[1]*=-1,n[1]-=3,n)),i.iconUrl&&(i.icon=new L.Icon(i)),i},this.maps=[],this.images=[],this.markergroups={},this.markers=[],this.lines=[],this.polygons=[],this.circles=[],this.geojsons=[]},t){for(var n=0,i=t.length;n<i;n++)window.WPLeafletMapPlugin.push(t[n]);for(var e in t.splice(0),t)t.hasOwnProperty(e)&&(window.WPLeafletMapPlugin[e]=t[e])}window.addEventListener?window.addEventListener("load",window.WPLeafletMapPlugin.init,!1):window.attachEvent&&window.attachEvent("onload",window.WPLeafletMapPlugin.init)}();1 !function(){var t=window.WPLeafletMapPlugin;if(window.WPLeafletMapPlugin=new function(){function t(t){try{t()}catch(t){console.log("-- version --","{{VERSION}}"),console.error(t)}}this.VERSION="{{VERSION}}";var n=!1,i=[];this.push=function(e){n?t(e):i.push(e)},this.unshift=function(e){n?t(e):i.unshift(e)},this.init=function(){n=!0;for(var e=0,r=i.length;e<r;e++)t(i[e])},this.createMap=function(t){var n=document.getElementsByClassName("WPLeafletMap")[this.maps.length],i=L.map(n,t);return t.fitBounds&&(i._shouldFitBounds=!0),t.attribution&&function(t,n){if(!t)return;for(var i=t.split(";"),e=L.control.attribution({prefix:!1}).addTo(n),r=0,o=i.length;r<o;r++){var a=(u=i[r]).trim?u.trim():u.replace(/^\s+|\s+$/gm,"");e.addAttribution(a)}var u}(t.attribution,i),this.maps.push(i),i},this.createImageMap=function(t){var n=this.createMap(t);return n.is_image_map=!0,this.images.push(n),n},this.getCurrentMap=function(){return this.maps[this.maps.length-1]},this.getCurrentGroup=function(){var t=this.maps.length;return this.markergroups[t]||(this.markergroups[t]=this.newMarkerGroup(this.maps[t-1])),this.markergroups[t]},this.getCurrentMarkerGroup=this.getCurrentGroup,this.getGroup=function(t){return(new L.FeatureGroup).addTo(t)},this.newMarkerGroup=function(t){var n=this.getGroup(t);return n.timeout=null,t._shouldFitBounds&&n.on("layeradd",(function(i){i.layer instanceof L.FeatureGroup&&i.layer.on("ready",(function(){t.fitBounds(n.getBounds())})),window.clearTimeout(this.timeout),this.timeout=window.setTimeout((function(){try{t.fitBounds(n.getBounds())}catch(t){}}),100)}),n),n},this.propsToTable=function(t){var n,i=[];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&i.push(n);for(var e="<table>",r=0,o=(i=i.sort()).length;r<o;r++){var a=i[r];e+="<tr><td>"+a+"</td>",e+="<td>"+t[a]+"</td></tr>"}return e+="</table>"};var e=this.unescape=function(t){var n=document.createElement("div");return n.innerHTML=t,n.innerText||t},r=/\{ *(.*?) *\}/g;this.template=function(t,n){return null==n?t:t.replace(r,(function(t,i){var r=function(t){for(var n=t.split(" | "),i={},e=n.shift(),r=0,o=n.length;r<o;r++){var a=n[r].split(": "),u=a.shift(),s=a.join(": ")||!0;i[u]=s}return i.key=e,i}(i),a=function(t,n){for(var i=function(t){if(null==t)return[];for(var n=t.split(o),i=[],e=0,r=n.length;e<r;e++)""!==n[e]&&i.push(n[e]);return i}(e(n)),r=t,a=0,u=i.length;a<u;a++)if(!(r=r[i[a]]))return;return r}(n,r.key);return null==a?r.default||t:a}))};var o=/[.‘’'“”"\[\]]+/g;function a(t,n){"undefined"!=typeof L&&void 0!==L[t]?n():setTimeout((function(){a(t,n)}),100)}this.waitForSVG=function(t){a("SVGIcon",t)},this.waitForAjax=function(t){a("AjaxGeoJSON",t)},this.createScale=function(t){L.control.scale(t).addTo(this.getCurrentMap())},this.getIconOptions=function(t){for(var n,i=t||{},e=["iconSize","iconAnchor","shadowSize","shadowAnchor","popupAnchor"],r=L.Icon.Default.prototype.options,o=0,a=e.length;o<a;o++){var u=e[o],s=i[u];if(s){for(var h=s.split(","),c=0,p=h.length;c<p;c++)h[c]=Number(h[c]);i[u]=h}}return i.popupAnchor||(i.popupAnchor=((n=(n=i.iconSize||r.iconSize).slice())[0]=0,n[1]*=-1,n[1]-=3,n)),i.iconUrl&&(i.icon=new L.Icon(i)),i},this.maps=[],this.images=[],this.markergroups={},this.markers=[],this.lines=[],this.polygons=[],this.circles=[],this.geojsons=[]},t){for(var n=0,i=t.length;n<i;n++)window.WPLeafletMapPlugin.push(t[n]);for(var e in t.splice(0),t)t.hasOwnProperty(e)&&(window.WPLeafletMapPlugin[e]=t[e])}window.addEventListener?window.addEventListener("load",window.WPLeafletMapPlugin.init,!1):window.attachEvent&&window.attachEvent("onload",window.WPLeafletMapPlugin.init)}(); -
leaflet-map/trunk/shortcodes/class.geojson-shortcode.php
r2608363 r2782883 109 109 'fill-opacity' : 'fillOpacity', 110 110 }; 111 var layer = L.ajaxGeoJson(src, { 111 // htmlspecialchars converts & to "&"; maybe unnecessarily, and maybe 3x 112 var ampersandRegex = /&(?:amp;){1,3}/g 113 var layer = L.ajaxGeoJson(src.replace(ampersandRegex, '&'), { 112 114 type: '<?php echo $this->type; ?>', 113 115 style : layerStyle, -
leaflet-map/trunk/templates/settings.php
r2556149 r2782883 83 83 84 84 <p><?php echo $description; ?></p> 85 <h3> Found an issue?</h3>86 <p> Post it to <b>WordPress Support</b>: <a href="https://wordpress.org/support/plugin/leaflet-map/" target="_blank">Leaflet Map (WordPress)</a></p>87 <p> Add an issue on<b>GitHub</b>: <a href="https://github.com/bozdoz/wp-plugin-leaflet-map/issues" target="_blank">Leaflet Map (GitHub)</a></p>85 <h3><?php _e('Found an issue?', 'leaflet-map') ?></h3> 86 <p><?php _e('Post it to ', 'leaflet-map') ?><b><?php _e('WordPress Support', 'leaflet-map') ?></b>: <a href="https://wordpress.org/support/plugin/leaflet-map/" target="_blank">Leaflet Map (WordPress)</a></p> 87 <p><?php _e('Add an issue on ', 'leaflet-map') ?><b>GitHub</b>: <a href="https://github.com/bozdoz/wp-plugin-leaflet-map/issues" target="_blank">Leaflet Map (GitHub)</a></p> 88 88 89 89 <div class="wrap"> … … 143 143 144 144 <div> 145 <p> Leaf icon provided by <a href="https://fontawesome.com/" target="_blank">Font Awesome</a>, under their free license.</p>145 <p><?php _e('Leaf icon provided by ', 'leaflet-map') ?><a href="https://fontawesome.com/" target="_blank">Font Awesome</a><?php _e( ', under their free license.', 'leaflet-map' ) ?></p> 146 146 </div> 147 147
Note: See TracChangeset
for help on using the changeset viewer.