Plugin Directory

Changeset 2782883 for leaflet-map


Ignore:
Timestamp:
09/11/2022 03:37:34 AM (4 years ago)
Author:
bozdoz
Message:

Merge branch 'master' of github.com:bozdoz/wp-plugin-leaflet-map

Location:
leaflet-map
Files:
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • leaflet-map/tags/3.0.5/class.admin.php

    r2401199 r2782883  
    8282
    8383        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"));
    8686    }
    8787
  • leaflet-map/tags/3.0.5/class.plugin-settings.php

    r2556149 r2782883  
    7272        $leaflet_version = Leaflet_Map::$leaflet_version;
    7373
    74         $foreachmap = __('You can also change this for each map');
     74        $foreachmap = __('You can also change this for each map', 'leaflet-map');
    7575
    7676        /*
  • leaflet-map/tags/3.0.5/leaflet-map.php

    r2625537 r2782883  
    99 * Text Domain: leaflet-map
    1010 * Domain Path: /languages/
    11  * Version: 3.0.4
     11 * Version: 3.0.5
    1212 * License: GPL2
    1313 * Leaflet Map is free software: you can redistribute it and/or modify
     
    3030}
    3131
    32 define('LEAFLET_MAP__PLUGIN_VERSION', '3.0.4');
     32define('LEAFLET_MAP__PLUGIN_VERSION', '3.0.5');
    3333define('LEAFLET_MAP__PLUGIN_FILE', __FILE__);
    3434define('LEAFLET_MAP__PLUGIN_DIR', plugin_dir_path(__FILE__));
  • leaflet-map/tags/3.0.5/readme.txt

    r2728637 r2782883  
    77Tags: leaflet, map, mobile, javascript, openstreetmap, mapquest, interactive
    88Requires at least: 4.6
    9 Tested up to: 6.0
    10 Version: 3.0.4
    11 Stable tag: 3.0.4
     9Tested up to: 6.0.2
     10Version: 3.0.5
     11Stable tag: 3.0.5
    1212License: GPLv2
    1313License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    150150== Changelog ==
    151151
     152= 3.0.5 =
     153* Fixes ampersands in geojson/gpx/kml urls
     154
    152155= 3.0.4 =
    153156* Fixes markers so that they can accept `0` as a value for x/y and lat/lng coordinates
     
    438441== Upgrade Notice ==
    439442
     443= 3.0.5 =
     444Fixes ampersands/querystrings in geojson/gpx/kml urls
     445
    440446= 3.0.4 =
    441447Fixes 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  
    22  // holds a function queue to call once page is loaded
    33  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}}';
    65    this.VERSION = VERSION;
    76
  • 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  
    109109    'fill-opacity' : 'fillOpacity',
    110110};
    111 var layer = L.ajaxGeoJson(src, {
     111// htmlspecialchars converts & to "&amp;"; maybe unnecessarily, and maybe 3x
     112var ampersandRegex = /&(?:amp;){1,3}/g
     113var layer = L.ajaxGeoJson(src.replace(ampersandRegex, '&'), {
    112114    type: '<?php echo $this->type; ?>',
    113115    style : layerStyle,
  • leaflet-map/tags/3.0.5/templates/settings.php

    r2556149 r2782883  
    8383
    8484<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>
    8888
    8989<div class="wrap">
     
    143143
    144144    <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>
    146146    </div>
    147147
  • leaflet-map/trunk/class.admin.php

    r2401199 r2782883  
    8282
    8383        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"));
    8686    }
    8787
  • leaflet-map/trunk/class.plugin-settings.php

    r2556149 r2782883  
    7272        $leaflet_version = Leaflet_Map::$leaflet_version;
    7373
    74         $foreachmap = __('You can also change this for each map');
     74        $foreachmap = __('You can also change this for each map', 'leaflet-map');
    7575
    7676        /*
  • leaflet-map/trunk/leaflet-map.php

    r2625537 r2782883  
    99 * Text Domain: leaflet-map
    1010 * Domain Path: /languages/
    11  * Version: 3.0.4
     11 * Version: 3.0.5
    1212 * License: GPL2
    1313 * Leaflet Map is free software: you can redistribute it and/or modify
     
    3030}
    3131
    32 define('LEAFLET_MAP__PLUGIN_VERSION', '3.0.4');
     32define('LEAFLET_MAP__PLUGIN_VERSION', '3.0.5');
    3333define('LEAFLET_MAP__PLUGIN_FILE', __FILE__);
    3434define('LEAFLET_MAP__PLUGIN_DIR', plugin_dir_path(__FILE__));
  • leaflet-map/trunk/readme.txt

    r2728637 r2782883  
    77Tags: leaflet, map, mobile, javascript, openstreetmap, mapquest, interactive
    88Requires at least: 4.6
    9 Tested up to: 6.0
    10 Version: 3.0.4
    11 Stable tag: 3.0.4
     9Tested up to: 6.0.2
     10Version: 3.0.5
     11Stable tag: 3.0.5
    1212License: GPLv2
    1313License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    150150== Changelog ==
    151151
     152= 3.0.5 =
     153* Fixes ampersands in geojson/gpx/kml urls
     154
    152155= 3.0.4 =
    153156* Fixes markers so that they can accept `0` as a value for x/y and lat/lng coordinates
     
    438441== Upgrade Notice ==
    439442
     443= 3.0.5 =
     444Fixes ampersands/querystrings in geojson/gpx/kml urls
     445
    440446= 3.0.4 =
    441447Fixes 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  
    22  // holds a function queue to call once page is loaded
    33  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}}';
    65    this.VERSION = VERSION;
    76
  • 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  
    109109    'fill-opacity' : 'fillOpacity',
    110110};
    111 var layer = L.ajaxGeoJson(src, {
     111// htmlspecialchars converts & to "&amp;"; maybe unnecessarily, and maybe 3x
     112var ampersandRegex = /&(?:amp;){1,3}/g
     113var layer = L.ajaxGeoJson(src.replace(ampersandRegex, '&'), {
    112114    type: '<?php echo $this->type; ?>',
    113115    style : layerStyle,
  • leaflet-map/trunk/templates/settings.php

    r2556149 r2782883  
    8383
    8484<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>
    8888
    8989<div class="wrap">
     
    143143
    144144    <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>
    146146    </div>
    147147
Note: See TracChangeset for help on using the changeset viewer.