WP Store Locator - Version 2.2.12

Version Description

Download this release

Release Info

Developer tijmensmit
Plugin Icon 128x128 WP Store Locator
Version 2.2.12
Comparing to
See all releases

Code changes from version 2.2.11 to 2.2.12

Files changed (4) hide show
  1. js/wpsl-gmap.js +33 -14
  2. js/wpsl-gmap.min.js +1 -1
  3. readme.txt +6 -1
  4. wp-store-locator.php +2 -2
js/wpsl-gmap.js CHANGED
@@ -62,12 +62,26 @@ if ( $( ".wpsl-gmap-canvas" ).length ) {
62
  */
63
  function initializeGmap( mapId, mapIndex ) {
64
  var mapOptions, mapDetails, settings, infoWindow, latLng,
65
- bounds, mapData, maxZoom;
 
 
66
 
67
  // Get the settings that belongs to the current map.
68
  settings = getMapSettings( mapIndex );
69
 
70
- maxZoom = Number( settings.zoomLevel );
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
  // Create a new infoWindow, either with the infobox libray or use the default one.
73
  infoWindow = newInfoWindow();
@@ -78,7 +92,7 @@ function initializeGmap( mapId, mapIndex ) {
78
 
79
  // Set the map options.
80
  mapOptions = {
81
- zoom: Number( settings.zoomLevel ),
82
  center: settings.startLatLng,
83
  mapTypeId: google.maps.MapTypeId[ settings.mapType.toUpperCase() ],
84
  mapTypeControl: Number( settings.mapTypeControl ) ? true : false,
@@ -109,11 +123,14 @@ function initializeGmap( mapId, mapIndex ) {
109
  bounds.extend( latLng );
110
  });
111
 
112
- // Make sure we don't zoom to far when fitBounds runs.
113
- attachBoundsChangedListener( map, maxZoom );
 
 
114
 
115
- // Make all the markers fit on the map.
116
- map.fitBounds( bounds );
 
117
 
118
  /*
119
  * If we need to apply the fix for the map showing up grey because
@@ -125,7 +142,7 @@ function initializeGmap( mapId, mapIndex ) {
125
  mapDetails = {
126
  map: map,
127
  bounds: bounds,
128
- maxZoom: Number( settings.zoomLevel )
129
  };
130
 
131
  mapsArray.push( mapDetails );
@@ -1134,11 +1151,11 @@ function filterApiResponse( response ) {
1134
  addressLength = response[0].address_components.length;
1135
 
1136
  // Loop over the API response.
1137
- for ( i = 0; i < addressLength; i++ ){
1138
  responseType = response[0].address_components[i].types;
1139
 
1140
  // filter out the postal code.
1141
- if ( ( /^postal_code$/.test( responseType ) ) || ( /^postal_code_prefix,postal_code$/.test( responseType ) ) ) {
1142
  zipcode = response[0].address_components[i].long_name;
1143
  }
1144
  }
@@ -1328,7 +1345,7 @@ function makeAjaxRequest( startLatLng, resetMap, autoLoad, infoWindow ) {
1328
  */
1329
  function collectAjaxData( startLatLng, resetMap, autoLoad ) {
1330
  var maxResult, radius, customDropdownName, customDropdownValue,
1331
- customCheckboxName, customCheckboxValue,
1332
  categoryId = "",
1333
  isMobile = $( "#wpsl-wrap" ).hasClass( "wpsl-mobile" ),
1334
  defaultFilters = $( "#wpsl-wrap" ).hasClass( "wpsl-default-filters" ),
@@ -2378,9 +2395,11 @@ function fixGreyTabMap( currentMap, mapTabAnchor, mapNumber ) {
2378
  */
2379
  function attachBoundsChangedListener( map, maxZoom ) {
2380
  google.maps.event.addListenerOnce( map, "bounds_changed", function() {
2381
- if ( this.getZoom() > maxZoom ) {
2382
- this.setZoom( maxZoom );
2383
- }
 
 
2384
  });
2385
  }
2386
 
62
  */
63
  function initializeGmap( mapId, mapIndex ) {
64
  var mapOptions, mapDetails, settings, infoWindow, latLng,
65
+ bounds, mapData, zoomLevel,
66
+ defaultZoomLevel = Number( wpslSettings.zoomLevel ),
67
+ maxZoom = Number( wpslSettings.autoZoomLevel );
68
 
69
  // Get the settings that belongs to the current map.
70
  settings = getMapSettings( mapIndex );
71
 
72
+ /*
73
+ * This is the value from either the settings page,
74
+ * or the zoom level set through the shortcode.
75
+ */
76
+ zoomLevel = Number( settings.zoomLevel );
77
+
78
+ /*
79
+ * If they are not equal, then the zoom value is set through the shortcode.
80
+ * If this is the case, then we use that as the max zoom level.
81
+ */
82
+ if ( zoomLevel !== defaultZoomLevel ) {
83
+ maxZoom = zoomLevel;
84
+ }
85
 
86
  // Create a new infoWindow, either with the infobox libray or use the default one.
87
  infoWindow = newInfoWindow();
92
 
93
  // Set the map options.
94
  mapOptions = {
95
+ zoom: zoomLevel,
96
  center: settings.startLatLng,
97
  mapTypeId: google.maps.MapTypeId[ settings.mapType.toUpperCase() ],
98
  mapTypeControl: Number( settings.mapTypeControl ) ? true : false,
123
  bounds.extend( latLng );
124
  });
125
 
126
+ // If we have more then one location on the map, then make sure to not zoom to far.
127
+ if ( mapData.length > 1 ) {
128
+ // Make sure we don't zoom to far when fitBounds runs.
129
+ attachBoundsChangedListener( map, maxZoom );
130
 
131
+ // Make all the markers fit on the map.
132
+ map.fitBounds( bounds );
133
+ }
134
 
135
  /*
136
  * If we need to apply the fix for the map showing up grey because
142
  mapDetails = {
143
  map: map,
144
  bounds: bounds,
145
+ maxZoom: maxZoom
146
  };
147
 
148
  mapsArray.push( mapDetails );
1151
  addressLength = response[0].address_components.length;
1152
 
1153
  // Loop over the API response.
1154
+ for ( i = 0; i < addressLength; i++ ) {
1155
  responseType = response[0].address_components[i].types;
1156
 
1157
  // filter out the postal code.
1158
+ if ( ( /^postal_code$/.test( responseType ) ) || ( /^postal_code,postal_code_prefix$/.test( responseType ) ) ) {
1159
  zipcode = response[0].address_components[i].long_name;
1160
  }
1161
  }
1345
  */
1346
  function collectAjaxData( startLatLng, resetMap, autoLoad ) {
1347
  var maxResult, radius, customDropdownName, customDropdownValue,
1348
+ customCheckboxName,
1349
  categoryId = "",
1350
  isMobile = $( "#wpsl-wrap" ).hasClass( "wpsl-mobile" ),
1351
  defaultFilters = $( "#wpsl-wrap" ).hasClass( "wpsl-default-filters" ),
2395
  */
2396
  function attachBoundsChangedListener( map, maxZoom ) {
2397
  google.maps.event.addListenerOnce( map, "bounds_changed", function() {
2398
+ google.maps.event.addListenerOnce( map, "idle", function() {
2399
+ if ( this.getZoom() > maxZoom ) {
2400
+ this.setZoom( maxZoom );
2401
+ }
2402
+ });
2403
  });
2404
  }
2405
 
js/wpsl-gmap.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(e){function t(t,l){var p,g,u,m,v,S,b,y;u=o(l),y=Number(u.zoomLevel),m=i(),se=new google.maps.Geocoder,oe=new google.maps.DirectionsRenderer,le=new google.maps.DirectionsService,p={zoom:Number(u.zoomLevel),center:u.startLatLng,mapTypeId:google.maps.MapTypeId[u.mapType.toUpperCase()],mapTypeControl:Number(u.mapTypeControl)?!0:!1,scrollwheel:Number(u.scrollWheel)?!0:!1,streetViewControl:Number(u.streetView)?!0:!1,gestureHandling:u.gestureHandling,zoomControlOptions:{position:google.maps.ControlPosition[u.controlPosition.toUpperCase()+"_TOP"]}},me=a(),ne=new google.maps.Map(document.getElementById(t),p),r(u.mapStyle),"undefined"!=typeof window["wpslMap_"+l]&&"undefined"!=typeof window["wpslMap_"+l].locations&&(S=new google.maps.LatLngBounds,b=window["wpslMap_"+l].locations,e.each(b,function(e){v=new google.maps.LatLng(b[e].lat,b[e].lng),Z(v,b[e].id,b[e],!1,m),S.extend(v)}),te(ne,y),ne.fitBounds(S),_.isArray(wpslSettings.mapTabAnchor)&&(g={map:ne,bounds:S,maxZoom:Number(u.zoomLevel)},fe.push(g))),e("#wpsl-gmap").length&&(1==wpslSettings.autoComplete&&s(),!c()&&e(".wpsl-dropdown").length&&1==wpslSettings.enableStyledDropdowns?Q():(e("#wpsl-search-wrap select").show(),c()?e("#wpsl-wrap").addClass("wpsl-mobile"):e("#wpsl-wrap").addClass("wpsl-default-filters")),e(".wpsl-search").hasClass("wpsl-widget")||(1==wpslSettings.autoLocate?w(u.startLatLng,m):1==wpslSettings.autoLoad&&d(u.startLatLng,m)),1!=wpslSettings.mouseFocus||c()||e("#wpsl-search-input").focus(),f(m),h(u,ne,m),J()),n()}function s(){var t,s,n,o={};"undefined"==typeof wpslSettings.geocodeComponents||e.isEmptyObject(wpslSettings.geocodeComponents)||(o.componentRestrictions=wpslSettings.geocodeComponents),t=document.getElementById("wpsl-search-input"),s=new google.maps.places.Autocomplete(t,o),s.addListener("place_changed",function(){n=s.getPlace(),n.geometry&&(ae=n.geometry.location)})}function n(){"undefined"!=typeof wpslSettings.markerZoomTo&&1==wpslSettings.markerZoomTo&&google.maps.event.addListener(ne,"zoom_changed",function(){V()})}function o(e){var t,s,n,o=["zoomLevel","mapType","mapTypeControl","mapStyle","streetView","scrollWheel","controlPosition"],i={zoomLevel:wpslSettings.zoomLevel,mapType:wpslSettings.mapType,mapTypeControl:wpslSettings.mapTypeControl,mapStyle:wpslSettings.mapStyle,streetView:wpslSettings.streetView,scrollWheel:wpslSettings.scrollWheel,controlPosition:wpslSettings.controlPosition,gestureHandling:wpslSettings.gestureHandling};if("undefined"!=typeof window["wpslMap_"+e]&&"undefined"!=typeof window["wpslMap_"+e].shortCode)for(t=0,s=o.length;s>t;t++)n=window["wpslMap_"+e].shortCode[o[t]],"undefined"!=typeof n&&(i[o[t]]=n);return i.startLatLng=l(e),i}function l(e){var t,s,n="";return"undefined"!=typeof window["wpslMap_"+e]&&"undefined"!=typeof window["wpslMap_"+e].locations&&(n=window["wpslMap_"+e].locations[0]),"undefined"!=typeof n&&"undefined"!=typeof n.lat&&"undefined"!=typeof n.lng?t=new google.maps.LatLng(n.lat,n.lng):""!==wpslSettings.startLatlng?(s=wpslSettings.startLatlng.split(","),t=new google.maps.LatLng(s[0],s[1])):t=new google.maps.LatLng(0,0),t}function i(){var e,t,s={};return"undefined"!=typeof wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle?(e=wpslSettings.infoBoxClearance.split(","),t=wpslSettings.infoBoxPixelOffset.split(","),s={alignBottom:!0,boxClass:wpslSettings.infoBoxClass,closeBoxMargin:wpslSettings.infoBoxCloseMargin,closeBoxURL:wpslSettings.infoBoxCloseUrl,content:"",disableAutoPan:Number(wpslSettings.infoBoxDisableAutoPan)?!0:!1,enableEventPropagation:Number(wpslSettings.infoBoxEnableEventPropagation)?!0:!1,infoBoxClearance:new google.maps.Size(Number(e[0]),Number(e[1])),pixelOffset:new google.maps.Size(Number(t[0]),Number(t[1])),zIndex:Number(wpslSettings.infoBoxZindex)},pe=new InfoBox(s)):pe=new google.maps.InfoWindow,pe}function a(){var e,t=wpslSettings.markerIconProps,s={};"undefined"!=typeof t.url?s.url=t.url:"undefined"!=typeof t.categoryMarkerUrl?s.categoryMarkerUrl=t.categoryMarkerUrl:"undefined"!=typeof t.alternateMarkerUrl?s.alternateMarkerUrl=t.alternateMarkerUrl:s.url=wpslSettings.url+"img/markers/";for(var n in t)t.hasOwnProperty(n)&&(e=t[n].split(","),2==e.length&&(s[n]=e));return s}function r(e){e=p(e),e&&ne.setOptions({styles:e})}function p(e){try{var t=JSON.parse(e);if(t&&"object"==typeof t&&null!==t)return t}catch(s){}return!1}function d(e,t){Z(e,0,"",!0,t),N(e,Se,ye,t)}function c(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function w(t,s){if(navigator.geolocation){var n,o,l=!1,i=Number(wpslSettings.geoLocationTimout);n=setInterval(function(){e(".wpsl-icon-direction").toggleClass("wpsl-active-icon")},600),o=setTimeout(function(){g(n),d(t,s)},i),navigator.geolocation.getCurrentPosition(function(i){g(n),clearTimeout(o),F(l),u(t,i,Se,s),e(".wpsl-search").addClass("wpsl-geolocation-run")},function(n){if(e(".wpsl-icon-direction").hasClass("wpsl-user-activated")&&!e(".wpsl-search").hasClass("wpsl-geolocation-run")){switch(n.code){case n.PERMISSION_DENIED:alert(wpslGeolocationErrors.denied);break;case n.POSITION_UNAVAILABLE:alert(wpslGeolocationErrors.unavailable);break;case n.TIMEOUT:alert(wpslGeolocationErrors.timeout);break;default:alert(wpslGeolocationErrors.generalError)}e(".wpsl-icon-direction").removeClass("wpsl-active-icon")}else e(".wpsl-search").hasClass("wpsl-geolocation-run")||(clearTimeout(o),d(t,s))},{maximumAge:6e4,timeout:i,enableHighAccuracy:!0})}else alert(wpslGeolocationErrors.unavailable),d(t,s)}function g(t){clearInterval(t),e(".wpsl-icon-direction").removeClass("wpsl-active-icon")}function u(e,t,s,n){if("undefined"==typeof t)d(e,n);else{var o=new google.maps.LatLng(t.coords.latitude,t.coords.longitude);ie=t,I(o),ne.setCenter(o),Z(o,0,"",!0,n),N(o,s,ye,n)}}function f(t){e("#wpsl-search-btn").unbind("click").bind("click",function(s){var n=!1;return e("#wpsl-search-input").removeClass(),e("#wpsl-search-input").val()?(e("#wpsl-result-list ul").empty(),e("#wpsl-stores").show(),e(".wpsl-direction-before, .wpsl-direction-after").remove(),e("#wpsl-direction-details").hide(),Se=!1,m(),F(n),S(),1==wpslSettings.autoComplete&&"undefined"!=typeof ae?x(ae,t):k(t)):e("#wpsl-search-input").addClass("wpsl-error").focus(),!1})}function m(){"undefined"!=typeof wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&"undefined"!=typeof ge[0]&&ge[0].close()}function h(t,s,n){google.maps.event.addListenerOnce(s,"tilesloaded",function(){e(".gm-style").append(wpslSettings.mapControls),e(".wpsl-icon-reset, #wpsl-reset-map").length>0&&(v(t.startLatLng,n),e(".wpsl-icon-reset").hide()),e(".wpsl-icon-direction").on("click",function(){e(this).addClass("wpsl-user-activated"),w(t.startLatLng,n)})})}function v(t,s){e(".wpsl-icon-reset, #wpsl-reset-map").on("click",function(){var n=!1,o=!0;e(this).hasClass("wpsl-in-progress")||(1==wpslSettings.autoLoad&&(ye=1),(ne.getCenter().lat()!==ve.centerLatlng.lat()||ne.getCenter().lng()!==ve.centerLatlng.lng()||ne.getZoom()!==ve.zoomLevel)&&(F(n),e("#wpsl-search-input").val("").removeClass(),e(".wpsl-icon-reset").addClass("wpsl-in-progress"),de&&de.clearMarkers(),S(),b(),1==wpslSettings.autoLocate?u(t,ie,o,s):d(t,s)),e("#wpsl-stores").show(),e("#wpsl-direction-details").hide())})}function S(){"undefined"!=typeof ce&&""!==ce&&(ce.setMap(null),ce="")}function b(){var t,s,n,o,l,i,a,r,p=e("#wpsl-wrap").hasClass("wpsl-default-filters"),d=[wpslSettings.searchRadius+" "+wpslSettings.distanceUnit,wpslSettings.maxResults],c=["wpsl-radius","wpsl-results"];for(t=0,s=c.length;s>t;t++)e("#"+c[t]+" select").val(parseInt(d[t])),e("#"+c[t]+" li").removeClass(),"wpsl-radius"==c[t]?n=wpslSettings.searchRadius:"wpsl-results"==c[t]&&(n=wpslSettings.maxResults),e("#"+c[t]+" li").each(function(){e(this).text()===d[t]&&(e(this).addClass("wpsl-selected-dropdown"),e("#"+c[t]+" .wpsl-selected-item").html(d[t]).attr("data-value",n))});e("#wpsl-category").length&&(e("#wpsl-category select").val(0),e("#wpsl-category li").removeClass(),e("#wpsl-category li:first-child").addClass("wpsl-selected-dropdown"),o=e("#wpsl-category li:first-child").text(),e("#wpsl-category .wpsl-selected-item").html(o).attr("data-value",0)),e(".wpsl-custom-dropdown").length>0&&e(".wpsl-custom-dropdown").each(function(t){p?e(this).find("option").removeAttr("selected"):(l=e(this).siblings("div"),i=l.find("li:first-child"),a=i.text(),r=i.attr("data-value"),l.find("li").removeClass(),l.prev().html(a).attr("data-value",r))})}function y(t){var s,n,o,l,i;for(m(),i=t.parents("li").length>0?t.parents("li").data("store-id"):t.parents(".wpsl-info-window").data("store-id"),"undefined"!=typeof ce&&""!==ce&&(n=ce.getPosition()),he={centerLatlng:ne.getCenter(),zoomLevel:ne.getZoom()},s=0,l=ue.length;l>s;s++)0!=ue[s].storeId||"undefined"!=typeof n&&""!==n?ue[s].storeId==i&&(o=ue[s].getPosition()):n=ue[s].getPosition();n&&o?(e("#wpsl-direction-details ul").empty(),e(".wpsl-direction-before, .wpsl-direction-after").remove(),L(n,o)):alert(wpslLabels.generalError)}function C(e,t){var s,n,o;for(s=0,n=ue.length;n>s;s++)ue[s].storeId==e&&(o=ue[s],"start"==t?o.setAnimation(google.maps.Animation.BOUNCE):o.setAnimation(null))}function L(t,s){var n,o,l,i,a,r,p,d,c,w="",g={};d="km"==wpslSettings.distanceUnit?"METRIC":"IMPERIAL",g={origin:t,destination:s,travelMode:wpslSettings.directionsTravelMode,unitSystem:google.maps.UnitSystem[d]},le.route(g,function(t,s){if(s==google.maps.DirectionsStatus.OK){if(oe.setMap(ne),oe.setDirections(t),t.routes.length>0){for(a=t.routes[0],r=0;r<a.legs.length;r++)for(n=a.legs[r],p=0,o=n.steps.length;o>p;p++)l=n.steps[p],i=p+1,w=w+"<li><div class='wpsl-direction-index'>"+i+"</div><div class='wpsl-direction-txt'>"+l.instructions+"</div><div class='wpsl-direction-distance'>"+l.distance.text+"</div></li>";for(e("#wpsl-direction-details ul").append(w).before("<div class='wpsl-direction-before'><a class='wpsl-back' id='wpsl-direction-start' href='#'>"+wpslLabels.back+"</a><div><span class='wpsl-total-distance'>"+a.legs[0].distance.text+"</span> - <span class='wpsl-total-durations'>"+a.legs[0].duration.text+"</span></div></div>").after("<p class='wpsl-direction-after'>"+t.routes[0].copyrights+"</p>"),e("#wpsl-direction-details").show(),r=0,o=ue.length;o>r;r++)ue[r].setMap(null);de&&de.clearMarkers(),"undefined"!=typeof ce&&""!==ce&&ce.setMap(null),e("#wpsl-stores").hide(),1==wpslSettings.templateId&&(c=e("#wpsl-gmap").offset(),e(window).scrollTop(c.top))}}else q(s)})}function k(t){var s,n={address:e("#wpsl-search-input").val()};"undefined"==typeof wpslSettings.geocodeComponents||e.isEmptyObject(wpslSettings.geocodeComponents)||(n.componentRestrictions=wpslSettings.geocodeComponents),se.geocode(n,function(e,n){n==google.maps.GeocoderStatus.OK?(s=e[0].geometry.location,x(s,t)):K(n)})}function x(e,t){var s=!1;Z(e,0,"",!0,t),N(e,Se,s,t)}function I(t){var s;se.geocode({latLng:t},function(t,n){n==google.maps.GeocoderStatus.OK?(s=M(t),""!==s&&e("#wpsl-search-input").val(s)):K(n)})}function M(e){var t,s,n,o=e[0].address_components.length;for(n=0;o>n;n++)s=e[0].address_components[n].types,(/^postal_code$/.test(s)||/^postal_code_prefix,postal_code$/.test(s))&&(t=e[0].address_components[n].long_name);return t}function N(e,t,s,n){1==wpslSettings.directionRedirect?E(e,function(){T(e,t,s,n)}):T(e,t,s,n)}function E(e,t){se.geocode({latLng:e},function(e,s){s==google.maps.GeocoderStatus.OK?(we=e[0].formatted_address,t()):K(s)})}function T(t,s,n,o){var l,i,a,r="",p=!1,d=e("#wpsl-listing-template").html(),w=e("#wpsl-stores ul"),g=wpslSettings.url+"img/ajax-loader.gif";a=P(t,s,n),w.empty().append("<li class='wpsl-preloader'><img src='"+g+"'/>"+wpslLabels.preloader+"</li>"),e("#wpsl-wrap").removeClass("wpsl-no-results"),e.get(wpslSettings.ajaxurl,a,function(s){e(".wpsl-preloader, .no-results").remove(),s.length>0?(e.each(s,function(e){_.extend(s[e],_e),l=new google.maps.LatLng(s[e].lat,s[e].lng),Z(l,s[e].id,s[e],p,o),r+=_.template(d)(s[e])}),e("#wpsl-result-list").off("click",".wpsl-directions"),w.empty(),w.append(r),e("#wpsl-result-list").on("click",".wpsl-directions",function(){return 1!=wpslSettings.directionRedirect?(y(e(this)),!1):void 0}),z(),e("#wpsl-result-list p:empty").remove()):(Z(t,0,"",!0,o),i=O(),e("#wpsl-wrap").addClass("wpsl-no-results"),w.html("<li class='wpsl-no-results-msg'>"+i+"</li>")),1==wpslSettings.runFitBounds?H():(ne.setZoom(Number(wpslSettings.zoomLevel)),ne.setCenter(ue[0].position)),1==wpslSettings.resetMap&&(e.isEmptyObject(ve)&&google.maps.event.addListenerOnce(ne,"tilesloaded",function(){ve={centerLatlng:ne.getCenter(),zoomLevel:ne.getZoom()},e("#wpsl-map-controls").addClass("wpsl-reset-exists"),e(".wpsl-icon-reset, #wpsl-reset-map").show()}),e(".wpsl-icon-reset").removeClass("wpsl-in-progress"))}),1!=wpslSettings.mouseFocus||c()||e("#wpsl-search-input").focus()}function P(t,s,n){var o,l,i,a,r,p="",d=e("#wpsl-wrap").hasClass("wpsl-mobile"),c=e("#wpsl-wrap").hasClass("wpsl-default-filters"),w={action:"store_search",lat:t.lat(),lng:t.lng()};return s?(w.max_results=wpslSettings.maxResults,w.search_radius=wpslSettings.searchRadius):(d||c?(o=parseInt(e("#wpsl-results .wpsl-dropdown").val()),l=parseInt(e("#wpsl-radius .wpsl-dropdown").val())):(o=parseInt(e("#wpsl-results .wpsl-selected-item").attr("data-value")),l=parseInt(e("#wpsl-radius .wpsl-selected-item").attr("data-value"))),isNaN(o)?w.max_results=wpslSettings.maxResults:w.max_results=o,isNaN(l)?w.search_radius=wpslSettings.searchRadius:w.search_radius=l,"undefined"!=typeof wpslSettings.categoryIds?w.filter=wpslSettings.categoryIds:e("#wpsl-category").length>0?(p=d||c?parseInt(e("#wpsl-category .wpsl-dropdown").val()):parseInt(e("#wpsl-category .wpsl-selected-item").attr("data-value")),isNaN(p)||0===p||(w.filter=p)):e("#wpsl-checkbox-filter").length>0&&e("#wpsl-checkbox-filter input:checked").length>0&&(w.filter=U()),e(".wpsl-custom-dropdown").length>0&&e(".wpsl-custom-dropdown").each(function(t){i="",a="",d||c?(i=e(this).attr("name"),a=e(this).val()):(i=e(this).attr("name"),a=e(this).next(".wpsl-selected-item").attr("data-value")),i&&a&&(w[i]=a)}),e(".wpsl-custom-checkboxes").length>0&&e(".wpsl-custom-checkboxes").each(function(t){r=e(this).attr("data-name"),r&&(w[r]=R(r))})),1==n&&("undefined"!=typeof ie?w.skip_cache=1:(w.autoload=1,"undefined"!=typeof wpslSettings.categoryIds&&(w.filter=wpslSettings.categoryIds))),"undefined"!=typeof wpslSettings.collectStatistics&&0==n&&(w.search=e("#wpsl-search-input").val()),w}function R(t){var s=e("[data-name="+t+"]"),n=[];return e(s).find("input:checked").each(function(t){n.push(e(this).val())}),n.join()}function O(){var e;return e="undefined"!=typeof wpslSettings.noResults&&""!==wpslSettings.noResults?wpslSettings.noResults:wpslLabels.noResults}function U(){var t=e("#wpsl-checkbox-filter input:checked").map(function(){return e(this).val()});return t=t.get(),t=t.join(",")}function z(){if(1==wpslSettings.markerClusters){var e,t,s=Number(wpslSettings.clusterZoom),n=Number(wpslSettings.clusterSize);isNaN(s)&&(s=""),isNaN(n)&&(n=""),"undefined"!=typeof wpslSettings.excludeStartFromCluster&&1==wpslSettings.excludeStartFromCluster&&(t=ue.slice(0),t.splice(0,1)),e="undefined"==typeof t?ue:t,de=new MarkerClusterer(ne,e,{gridSize:n,maxZoom:s})}}function Z(e,t,s,n,o){var l,i,a,r=!0;0===t?(s={store:wpslLabels.startPoint},l=me.url+wpslSettings.startMarker):l="undefined"!=typeof s.alternateMarkerUrl&&s.alternateMarkerUrl?s.alternateMarkerUrl:"undefined"!=typeof s.categoryMarkerUrl&&s.categoryMarkerUrl?s.categoryMarkerUrl:me.url+wpslSettings.storeMarker,i={url:l,scaledSize:new google.maps.Size(Number(me.scaledSize[0]),Number(me.scaledSize[1])),origin:new google.maps.Point(Number(me.origin[0]),Number(me.origin[1])),anchor:new google.maps.Point(Number(me.anchor[0]),Number(me.anchor[1]))},a=new google.maps.Marker({position:e,map:ne,optimized:!1,title:B(s.store),draggable:n,storeId:t,icon:i}),ue.push(a),google.maps.event.addListener(a,"click",function(n){return function(){0!=t?"undefined"!=typeof wpslSettings.markerStreetView&&1==wpslSettings.markerStreetView?j(e,function(){A(a,G(s),o,n)}):A(a,G(s),o,n):A(a,wpslLabels.startPoint,o,n),google.maps.event.clearListeners(o,"domready"),google.maps.event.addListener(o,"domready",function(){$(a,n),V()})}}(ne)),n&&google.maps.event.addListener(a,"dragend",function(e){F(r),ne.setCenter(e.latLng),I(e.latLng),N(e.latLng,Se,ye=!1,o)})}function B(e){return e?e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(t)}):void 0}function A(e,t,s,n){ge.length=0,s.setContent(t),s.open(n,e),ge.push(s),"undefined"!=typeof wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&1==wpslSettings.markerClusters&&(re=e.storeId,s.setVisible(!0))}function $(t,s){e(".wpsl-info-actions a").on("click",function(n){var o=Number(wpslSettings.autoZoomLevel);if(n.stopImmediatePropagation(),e(this).hasClass("wpsl-directions")){if(1==wpslSettings.directionRedirect)return!0;y(e(this))}else e(this).hasClass("wpsl-streetview")?W(t,s):e(this).hasClass("wpsl-zoom-here")&&(s.setCenter(t.getPosition()),s.setZoom(o));return!1})}function V(){var t=ne.getZoom();t>=wpslSettings.autoZoomLevel?e(".wpsl-zoom-here").hide():e(".wpsl-zoom-here").show()}function W(t,s){var n=s.getStreetView();n.setPosition(t.getPosition()),n.setVisible(!0),e("#wpsl-map-controls").hide(),D(n,s)}function D(t,s){google.maps.event.addListener(t,"visible_changed",function(){if(!t.getVisible()){var n=s.getZoom();e("#wpsl-map-controls").show(),s.setZoom(n-1),s.setZoom(n)}})}function j(e,t){var s=new google.maps.StreetViewService;s.getPanoramaByLocation(e,50,function(e,s){be=s==google.maps.StreetViewStatus.OK?!0:!1,t()})}function G(t){var s,n;return n=e("#wpsl-base-gmap_0").length?e("#wpsl-cpt-info-window-template").html():e("#wpsl-info-window-template").html(),s=_.template(n)(t)}function H(){var e,t,s=Number(wpslSettings.autoZoomLevel),n=new google.maps.LatLngBounds;for(te(ne,s),e=0,t=ue.length;t>e;e++)n.extend(ue[e].position);ne.fitBounds(n)}function F(e){var t,s;if(oe.setMap(null),ue){for(s=0,t=ue.length;t>s;s++)e?1!=ue[s].draggable?ue[s].setMap(null):ce=ue[s]:ue[s].setMap(null);ue.length=0}de&&de.clearMarkers()}function K(e){var t;switch(e){case"ZERO_RESULTS":t=wpslLabels.noResults;break;case"OVER_QUERY_LIMIT":t=wpslLabels.queryLimit;break;default:t=wpslLabels.generalError}alert(t)}function q(e){var t;switch(e){case"NOT_FOUND":case"ZERO_RESULTS":t=wpslLabels.noDirectionsFound;break;case"OVER_QUERY_LIMIT":t=wpslLabels.queryLimit;break;default:t=wpslLabels.generalError}alert(t)}function Q(){var t=Number(wpslSettings.maxDropdownHeight);e(".wpsl-dropdown").each(function(s){var n,o,l=e(this);l.$dropdownWrap=l.wrap("<div class='wpsl-dropdown'></div>").parent(),l.$selectedVal=l.val(),l.$dropdownElem=e("<div><ul/></div>").appendTo(l.$dropdownWrap),l.$dropdown=l.$dropdownElem.find("ul"),l.$options=l.$dropdownWrap.find("option"),l.hide().removeClass("wpsl-dropdown"),e.each(l.$options,function(){n=e(this).val()==l.$selectedVal?'class="wpsl-selected-dropdown"':"",l.$dropdown.append("<li data-value="+e(this).val()+" "+n+">"+e(this).text()+"</li>")}),l.$dropdownElem.before("<span data-value="+l.find(":selected").val()+" class='wpsl-selected-item'>"+l.find(":selected").text()+"</span>"),l.$dropdownItem=l.$dropdownElem.find("li"),l.$dropdownWrap.on("click",function(s){return e(this).hasClass("wpsl-active")?void e(this).removeClass("wpsl-active"):(Y(),e(this).toggleClass("wpsl-active"),o=0,e(this).hasClass("wpsl-active")?(l.$dropdownItem.each(function(t){o+=e(this).outerHeight()}),l.$dropdownElem.css("height",o+2+"px")):l.$dropdownElem.css("height",0),o>t&&(e(this).addClass("wpsl-scroll-required"),l.$dropdownElem.css("height",t+"px")),void s.stopPropagation())}),l.$dropdownItem.on("click",function(t){l.$dropdownWrap.find(e(".wpsl-selected-item")).html(e(this).text()).attr("data-value",e(this).attr("data-value")),l.$dropdownItem.removeClass("wpsl-selected-dropdown"),e(this).addClass("wpsl-selected-dropdown"),Y(),t.stopPropagation()})}),e(document).click(function(){Y()})}function Y(){e(".wpsl-dropdown").removeClass("wpsl-active"),e(".wpsl-dropdown div").css("height",0)}function J(){e(".wpsl-search").hasClass("wpsl-widget")&&(e("#wpsl-search-btn").trigger("click"),e(".wpsl-search").removeClass("wpsl-widget"))}function X(){var t,s;if(_.isArray(wpslSettings.mapTabAnchor))for(t=0,s=fe.length;s>t;t++)ee(fe[t],wpslSettings.mapTabAnchor[t],t);else e("a[href='#"+wpslSettings.mapTabAnchor+"']").length&&ee(ne,wpslSettings.mapTabAnchor)}function ee(t,s,n){var o,l,i,a,r,p=Number(wpslSettings.mapTabAnchorReturn)?!0:!1,d=e("a[href='#"+s+"']");i="undefined"!=typeof t.maxZoom?t.maxZoom:Number(wpslSettings.autoZoomLevel),"undefined"!=typeof n&&0==n&&d.addClass("wpsl-fitbounds"),d.on("click",function(){return setTimeout(function(){"undefined"!=typeof t.map?(a=t.bounds,r=t.map):r=t,o=r.getZoom(),l=r.getCenter(),google.maps.event.trigger(r,"resize"),d.hasClass("wpsl-fitbounds")||(te(r,i),r.setZoom(o),r.setCenter(l),"undefined"!=typeof a?r.fitBounds(a):H(),d.addClass("wpsl-fitbounds"))},50),p})}function te(e,t){google.maps.event.addListenerOnce(e,"bounds_changed",function(){this.getZoom()>t&&this.setZoom(t)})}var se,ne,oe,le,ie,ae,re,pe,de,ce,we,ge=[],ue=[],fe=[],me={},he={},ve={},Se=!1,be=!1,ye="undefined"!=typeof wpslSettings?wpslSettings.autoLoad:"";if(_.templateSettings={evaluate:/\<\%(.+?)\%\>/g,interpolate:/\<\%=(.+?)\%\>/g,escape:/\<\%-(.+?)\%\>/g},e(".wpsl-gmap-canvas").length&&(e("<img />").attr("src",wpslSettings.url+"img/ajax-loader.gif"),e(".wpsl-gmap-canvas").each(function(s){var n=e(this).attr("id");t(n,s)}),X()),e("#wpsl-result-list").on("click",".wpsl-back",function(){var t,s;for(oe.setMap(null),t=0,s=ue.length;s>t;t++)ue[t].setMap(ne);return"undefined"!=typeof ce&&""!==ce&&ce.setMap(ne),de&&z(),ne.setCenter(he.centerLatlng),ne.setZoom(he.zoomLevel),e(".wpsl-direction-before, .wpsl-direction-after").remove(),e("#wpsl-stores").show(),e("#wpsl-direction-details").hide(),!1}),e("#wpsl-gmap").length&&("bounce"==wpslSettings.markerEffect?(e("#wpsl-stores").on("mouseenter","li",function(){C(e(this).data("store-id"),"start")}),e("#wpsl-stores").on("mouseleave","li",function(){C(e(this).data("store-id"),"stop")})):"info_window"==wpslSettings.markerEffect&&e("#wpsl-stores").on("mouseenter","li",function(){var t,s;for(t=0,s=ue.length;s>t;t++)ue[t].storeId==e(this).data("store-id")&&(google.maps.event.trigger(ue[t],"click"),ne.setCenter(ue[t].position))})),"undefined"!=typeof wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&1==wpslSettings.markerClusters){var Ce,Le,ke,xe,Ie;google.maps.event.addListener(ne,"zoom_changed",function(){google.maps.event.addListenerOnce(ne,"idle",function(){if("undefined"!=typeof de&&(Ce=de.clusters_,Ce.length))for(xe=0,Le=Ce.length;Le>xe;xe++)for(Ie=0,ke=Ce[xe].markers_.length;ke>Ie;Ie++)if(Ce[xe].markers_[Ie].storeId==re){pe.getVisible()&&null===Ce[xe].markers_[Ie].map?pe.setVisible(!1):pe.getVisible()||null===Ce[xe].markers_[Ie].map||pe.setVisible(!0);break}})})}var _e={formatPhoneNumber:function(e){return 1==wpslSettings.phoneUrl&&c()&&(e="<a href='tel:"+_e.formatClickablePhoneNumber(e)+"'>"+e+"</a>"),e},formatClickablePhoneNumber:function(e){return-1!=e.indexOf("+")&&-1!=e.indexOf("(0)")&&(e=e.replace("(0)","")),e.replace(/(-| |\(|\)|\.|)/g,"")},createInfoWindowActions:function(t){var s,n="",o="";return e("#wpsl-gmap").length&&(be&&(n="<a class='wpsl-streetview' href='#'>"+wpslLabels.streetView+"</a>"),1==wpslSettings.markerZoomTo&&(o="<a class='wpsl-zoom-here' href='#'>"+wpslLabels.zoomHere+"</a>"),s="<div class='wpsl-info-actions'>"+_e.createDirectionUrl(t)+n+o+"</div>"),s},createDirectionUrl:function(t){var s,n,o,l={};return 1==wpslSettings.directionRedirect?("undefined"==typeof we&&(we=""),l.target="target='_blank'","undefined"!=typeof t?l.src=e("[data-store-id="+t+"] .wpsl-directions").attr("href"):(o=this.zip?this.zip+", ":"",n=this.address+", "+this.city+", "+o+this.country,l.src="https://www.google.com/maps/dir/?api=1&origin="+_e.rfc3986EncodeURIComponent(we)+"&destination="+_e.rfc3986EncodeURIComponent(n)+"&travelmode="+wpslSettings.directionsTravelMode.toLowerCase())):l={src:"#",target:""},s="<a class='wpsl-directions' "+l.target+" href='"+l.src+"'>"+wpslLabels.directions+"</a>"},rfc3986EncodeURIComponent:function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape)}};e("#wpsl-stores").on("click",".wpsl-store-details",function(){var t,s,n=e(this).parents("li"),o=n.data("store-id");if("info window"==wpslSettings.moreInfoLocation)for(t=0,s=ue.length;s>t;t++)ue[t].storeId==o&&google.maps.event.trigger(ue[t],"click");else n.find(".wpsl-more-info-listings").is(":visible")?e(this).removeClass("wpsl-active-details"):e(this).addClass("wpsl-active-details"),n.siblings().find(".wpsl-store-details").removeClass("wpsl-active-details"),n.siblings().find(".wpsl-more-info-listings").hide(),n.find(".wpsl-more-info-listings").toggle();return"default"!=wpslSettings.templateId||"store listings"==wpslSettings.moreInfoLocation?!1:void 0})});
1
+ jQuery(document).ready(function(e){var t,s,o,l,n,i,a,r,p,d,c,w,g,u,m,f,h=[],v=[],S=[],b={},C={},L={},y=!1,k=!1,x="undefined"!=typeof wpslSettings?wpslSettings.autoLoad:"";function I(e,t){V(e,0,"",!0,t),B(e,y,x,t)}function M(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function N(t,s){if(navigator.geolocation){var o,l,n=Number(wpslSettings.geoLocationTimout);o=setInterval(function(){e(".wpsl-icon-direction").toggleClass("wpsl-active-icon")},600),l=setTimeout(function(){E(o),I(t,s)},n),navigator.geolocation.getCurrentPosition(function(n){E(o),clearTimeout(l),F(!1),T(t,n,y,s),e(".wpsl-search").addClass("wpsl-geolocation-run")},function(o){if(e(".wpsl-icon-direction").hasClass("wpsl-user-activated")&&!e(".wpsl-search").hasClass("wpsl-geolocation-run")){switch(o.code){case o.PERMISSION_DENIED:alert(wpslGeolocationErrors.denied);break;case o.POSITION_UNAVAILABLE:alert(wpslGeolocationErrors.unavailable);break;case o.TIMEOUT:alert(wpslGeolocationErrors.timeout);break;default:alert(wpslGeolocationErrors.generalError)}e(".wpsl-icon-direction").removeClass("wpsl-active-icon")}else e(".wpsl-search").hasClass("wpsl-geolocation-run")||(clearTimeout(l),I(t,s))},{maximumAge:6e4,timeout:n,enableHighAccuracy:!0})}else alert(wpslGeolocationErrors.unavailable),I(t,s)}function E(t){clearInterval(t),e(".wpsl-icon-direction").removeClass("wpsl-active-icon")}function T(e,t,o,l){if(void 0===t)I(e,l);else{var i=new google.maps.LatLng(t.coords.latitude,t.coords.longitude);n=t,Z(i),s.setCenter(i),V(i,0,"",!0,l),B(i,o,x,l)}}function P(){void 0!==wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&void 0!==h[0]&&h[0].close()}function R(){void 0!==d&&""!==d&&(d.setMap(null),d="")}function O(t){var n,i,a,r,c;for(P(),c=t.parents("li").length>0?t.parents("li").data("store-id"):t.parents(".wpsl-info-window").data("store-id"),void 0!==d&&""!==d&&(i=d.getPosition()),C={centerLatlng:s.getCenter(),zoomLevel:s.getZoom()},n=0,r=v.length;n<r;n++)0!=v[n].storeId||void 0!==i&&""!==i?v[n].storeId==c&&(a=v[n].getPosition()):i=v[n].getPosition();i&&a?(e("#wpsl-direction-details ul").empty(),e(".wpsl-direction-before, .wpsl-direction-after").remove(),function(t,n){var i,a,r,c,w,g,u,m,f="",h={};u="km"==wpslSettings.distanceUnit?"METRIC":"IMPERIAL";h={origin:t,destination:n,travelMode:wpslSettings.directionsTravelMode,unitSystem:google.maps.UnitSystem[u]},l.route(h,function(t,l){if(l==google.maps.DirectionsStatus.OK){if(o.setMap(s),o.setDirections(t),t.routes.length>0){for(c=t.routes[0],w=0;w<c.legs.length;w++)for(i=c.legs[w],g=0,a=i.steps.length;g<a;g++)r=i.steps[g],f=f+"<li><div class='wpsl-direction-index'>"+(g+1)+"</div><div class='wpsl-direction-txt'>"+r.instructions+"</div><div class='wpsl-direction-distance'>"+r.distance.text+"</div></li>";for(e("#wpsl-direction-details ul").append(f).before("<div class='wpsl-direction-before'><a class='wpsl-back' id='wpsl-direction-start' href='#'>"+wpslLabels.back+"</a><div><span class='wpsl-total-distance'>"+c.legs[0].distance.text+"</span> - <span class='wpsl-total-durations'>"+c.legs[0].duration.text+"</span></div></div>").after("<p class='wpsl-direction-after'>"+t.routes[0].copyrights+"</p>"),e("#wpsl-direction-details").show(),w=0,a=v.length;w<a;w++)v[w].setMap(null);p&&p.clearMarkers(),void 0!==d&&""!==d&&d.setMap(null),e("#wpsl-stores").hide(),1==wpslSettings.templateId&&(m=e("#wpsl-gmap").offset(),e(window).scrollTop(m.top))}}else!function(e){var t;switch(e){case"NOT_FOUND":case"ZERO_RESULTS":t=wpslLabels.noDirectionsFound;break;case"OVER_QUERY_LIMIT":t=wpslLabels.queryLimit;break;default:t=wpslLabels.generalError}alert(t)}(l)})}(i,a)):alert(wpslLabels.generalError)}function U(e,t){var s,o,l;for(s=0,o=v.length;s<o;s++)v[s].storeId==e&&(l=v[s],"start"==t?l.setAnimation(google.maps.Animation.BOUNCE):l.setAnimation(null))}function z(e,t){V(e,0,"",!0,t),B(e,y,!1,t)}function Z(s){var o;t.geocode({latLng:s},function(t,s){s==google.maps.GeocoderStatus.OK?""!==(o=function(e){var t,s,o,l=e[0].address_components.length;for(o=0;o<l;o++)s=e[0].address_components[o].types,(/^postal_code$/.test(s)||/^postal_code,postal_code_prefix$/.test(s))&&(t=e[0].address_components[o].long_name);return t}(t))&&e("#wpsl-search-input").val(o):K(s)})}function B(e,s,o,l){var n,i;1==wpslSettings.directionRedirect?(n=e,i=function(){A(e,s,o,l)},t.geocode({latLng:n},function(e,t){t==google.maps.GeocoderStatus.OK?(c=e[0].formatted_address,i()):K(t)})):A(e,s,o,l)}function A(t,o,l,i){var a,r,p="",d=e("#wpsl-listing-template").html(),c=e("#wpsl-stores ul"),w=wpslSettings.url+"img/ajax-loader.gif";r=function(t,s,o){var l,i,a,r,p,d="",c=e("#wpsl-wrap").hasClass("wpsl-mobile"),w=e("#wpsl-wrap").hasClass("wpsl-default-filters"),g={action:"store_search",lat:t.lat(),lng:t.lng()};s?(g.max_results=wpslSettings.maxResults,g.search_radius=wpslSettings.searchRadius):(c||w?(l=parseInt(e("#wpsl-results .wpsl-dropdown").val()),i=parseInt(e("#wpsl-radius .wpsl-dropdown").val())):(l=parseInt(e("#wpsl-results .wpsl-selected-item").attr("data-value")),i=parseInt(e("#wpsl-radius .wpsl-selected-item").attr("data-value"))),isNaN(l)?g.max_results=wpslSettings.maxResults:g.max_results=l,isNaN(i)?g.search_radius=wpslSettings.searchRadius:g.search_radius=i,void 0!==wpslSettings.categoryIds?g.filter=wpslSettings.categoryIds:e("#wpsl-category").length>0?(d=c||w?parseInt(e("#wpsl-category .wpsl-dropdown").val()):parseInt(e("#wpsl-category .wpsl-selected-item").attr("data-value")),isNaN(d)||0===d||(g.filter=d)):e("#wpsl-checkbox-filter").length>0&&e("#wpsl-checkbox-filter input:checked").length>0&&(g.filter=e("#wpsl-checkbox-filter input:checked").map(function(){return e(this).val()}).get().join(",")),e(".wpsl-custom-dropdown").length>0&&e(".wpsl-custom-dropdown").each(function(t){a="",r="",c||w?(a=e(this).attr("name"),r=e(this).val()):(a=e(this).attr("name"),r=e(this).next(".wpsl-selected-item").attr("data-value")),a&&r&&(g[a]=r)}),e(".wpsl-custom-checkboxes").length>0&&e(".wpsl-custom-checkboxes").each(function(t){var s,o;(p=e(this).attr("data-name"))&&(g[p]=(s=e("[data-name="+p+"]"),o=[],e(s).find("input:checked").each(function(t){o.push(e(this).val())}),o.join()))}));1==o&&(void 0!==n?g.skip_cache=1:(g.autoload=1,void 0!==wpslSettings.categoryIds&&(g.filter=wpslSettings.categoryIds)));void 0!==wpslSettings.collectStatistics&&0==o&&(g.search=e("#wpsl-search-input").val());return g}(t,o,l),c.empty().append("<li class='wpsl-preloader'><img src='"+w+"'/>"+wpslLabels.preloader+"</li>"),e("#wpsl-wrap").removeClass("wpsl-no-results"),e.get(wpslSettings.ajaxurl,r,function(o){e(".wpsl-preloader, .no-results").remove(),o.length>0?(e.each(o,function(e){_.extend(o[e],j),V(new google.maps.LatLng(o[e].lat,o[e].lng),o[e].id,o[e],!1,i),p+=_.template(d)(o[e])}),e("#wpsl-result-list").off("click",".wpsl-directions"),c.empty(),c.append(p),e("#wpsl-result-list").on("click",".wpsl-directions",function(){if(1!=wpslSettings.directionRedirect)return O(e(this)),!1}),$(),e("#wpsl-result-list p:empty").remove()):(V(t,0,"",!0,i),a=function(){var e;e=void 0!==wpslSettings.noResults&&""!==wpslSettings.noResults?wpslSettings.noResults:wpslLabels.noResults;return e}(),e("#wpsl-wrap").addClass("wpsl-no-results"),c.html("<li class='wpsl-no-results-msg'>"+a+"</li>")),1==wpslSettings.runFitBounds?H():(s.setZoom(Number(wpslSettings.zoomLevel)),s.setCenter(v[0].position)),1==wpslSettings.resetMap&&(e.isEmptyObject(L)&&google.maps.event.addListenerOnce(s,"tilesloaded",function(){L={centerLatlng:s.getCenter(),zoomLevel:s.getZoom()},e("#wpsl-map-controls").addClass("wpsl-reset-exists"),e(".wpsl-icon-reset, #wpsl-reset-map").show()}),e(".wpsl-icon-reset").removeClass("wpsl-in-progress"))}),1!=wpslSettings.mouseFocus||M()||e("#wpsl-search-input").focus()}function $(){if(1==wpslSettings.markerClusters){var e,t=Number(wpslSettings.clusterZoom),o=Number(wpslSettings.clusterSize);isNaN(t)&&(t=""),isNaN(o)&&(o=""),void 0!==wpslSettings.excludeStartFromCluster&&1==wpslSettings.excludeStartFromCluster&&(e=v.slice(0)).splice(0,1),p=new MarkerClusterer(s,void 0===e?v:e,{gridSize:o,maxZoom:t})}}function V(t,o,l,n,i){var a,r,p,d;0===o?(l={store:wpslLabels.startPoint},a=b.url+wpslSettings.startMarker):a=void 0!==l.alternateMarkerUrl&&l.alternateMarkerUrl?l.alternateMarkerUrl:void 0!==l.categoryMarkerUrl&&l.categoryMarkerUrl?l.categoryMarkerUrl:b.url+wpslSettings.storeMarker,r={url:a,scaledSize:new google.maps.Size(Number(b.scaledSize[0]),Number(b.scaledSize[1])),origin:new google.maps.Point(Number(b.origin[0]),Number(b.origin[1])),anchor:new google.maps.Point(Number(b.anchor[0]),Number(b.anchor[1]))},p=new google.maps.Marker({position:t,map:s,optimized:!1,title:function(e){if(e)return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(t)})}(l.store),draggable:n,storeId:o,icon:r}),v.push(p),google.maps.event.addListener(p,"click",(d=s,function(){var s,n;0!=o?void 0!==wpslSettings.markerStreetView&&1==wpslSettings.markerStreetView?(s=t,n=function(){W(p,G(l),i,d)},(new google.maps.StreetViewService).getPanoramaByLocation(s,50,function(e,t){k=t==google.maps.StreetViewStatus.OK,n()})):W(p,G(l),i,d):W(p,wpslLabels.startPoint,i,d),google.maps.event.clearListeners(i,"domready"),google.maps.event.addListener(i,"domready",function(){var t,s;t=p,s=d,e(".wpsl-info-actions a").on("click",function(o){var l,n,i,a,r,p=Number(wpslSettings.autoZoomLevel);if(o.stopImmediatePropagation(),e(this).hasClass("wpsl-directions")){if(1==wpslSettings.directionRedirect)return!0;O(e(this))}else e(this).hasClass("wpsl-streetview")?(l=t,(i=(n=s).getStreetView()).setPosition(l.getPosition()),i.setVisible(!0),e("#wpsl-map-controls").hide(),a=i,r=n,google.maps.event.addListener(a,"visible_changed",function(){if(!a.getVisible()){var t=r.getZoom();e("#wpsl-map-controls").show(),r.setZoom(t-1),r.setZoom(t)}})):e(this).hasClass("wpsl-zoom-here")&&(s.setCenter(t.getPosition()),s.setZoom(p));return!1}),D()})})),n&&google.maps.event.addListener(p,"dragend",function(e){F(!0),s.setCenter(e.latLng),Z(e.latLng),B(e.latLng,y,x=!1,i)})}(_.templateSettings={evaluate:/\<\%(.+?)\%\>/g,interpolate:/\<\%=(.+?)\%\>/g,escape:/\<\%-(.+?)\%\>/g},e(".wpsl-gmap-canvas").length&&(e("<img />").attr("src",wpslSettings.url+"img/ajax-loader.gif"),e(".wpsl-gmap-canvas").each(function(a){!function(a,d){var c,w,g,u,m,f,h,v,C=Number(wpslSettings.zoomLevel),k=Number(wpslSettings.autoZoomLevel);g=function(e){var t,s,o,l,n,i,a,r=["zoomLevel","mapType","mapTypeControl","mapStyle","streetView","scrollWheel","controlPosition"],p={zoomLevel:wpslSettings.zoomLevel,mapType:wpslSettings.mapType,mapTypeControl:wpslSettings.mapTypeControl,mapStyle:wpslSettings.mapStyle,streetView:wpslSettings.streetView,scrollWheel:wpslSettings.scrollWheel,controlPosition:wpslSettings.controlPosition,gestureHandling:wpslSettings.gestureHandling};if(void 0!==window["wpslMap_"+e]&&void 0!==window["wpslMap_"+e].shortCode)for(t=0,s=r.length;t<s;t++)void 0!==(o=window["wpslMap_"+e].shortCode[r[t]])&&(p[r[t]]=o);return p.startLatLng=(l=e,a="",void 0!==window["wpslMap_"+l]&&void 0!==window["wpslMap_"+l].locations&&(a=window["wpslMap_"+l].locations[0]),void 0!==a&&void 0!==a.lat&&void 0!==a.lng?n=new google.maps.LatLng(a.lat,a.lng):""!==wpslSettings.startLatlng?(i=wpslSettings.startLatlng.split(","),n=new google.maps.LatLng(i[0],i[1])):n=new google.maps.LatLng(0,0),n),p}(d),(v=Number(g.zoomLevel))!==C&&(k=v);Z={},void 0!==wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle?(O=wpslSettings.infoBoxClearance.split(","),U=wpslSettings.infoBoxPixelOffset.split(","),Z={alignBottom:!0,boxClass:wpslSettings.infoBoxClass,closeBoxMargin:wpslSettings.infoBoxCloseMargin,closeBoxURL:wpslSettings.infoBoxCloseUrl,content:"",disableAutoPan:!!Number(wpslSettings.infoBoxDisableAutoPan),enableEventPropagation:!!Number(wpslSettings.infoBoxEnableEventPropagation),infoBoxClearance:new google.maps.Size(Number(O[0]),Number(O[1])),pixelOffset:new google.maps.Size(Number(U[0]),Number(U[1])),zIndex:Number(wpslSettings.infoBoxZindex)},r=new InfoBox(Z)):r=new google.maps.InfoWindow,u=r,t=new google.maps.Geocoder,o=new google.maps.DirectionsRenderer,l=new google.maps.DirectionsService,c={zoom:v,center:g.startLatLng,mapTypeId:google.maps.MapTypeId[g.mapType.toUpperCase()],mapTypeControl:!!Number(g.mapTypeControl),scrollwheel:!!Number(g.scrollWheel),streetViewControl:!!Number(g.streetView),gestureHandling:g.gestureHandling,zoomControlOptions:{position:google.maps.ControlPosition[g.controlPosition.toUpperCase()+"_TOP"]}},b=function(){var e,t=wpslSettings.markerIconProps,s={};void 0!==t.url?s.url=t.url:void 0!==t.categoryMarkerUrl?s.categoryMarkerUrl=t.categoryMarkerUrl:void 0!==t.alternateMarkerUrl?s.alternateMarkerUrl=t.alternateMarkerUrl:s.url=wpslSettings.url+"img/markers/";for(var o in t)t.hasOwnProperty(o)&&2==(e=t[o].split(",")).length&&(s[o]=e);return s}(),s=new google.maps.Map(document.getElementById(a),c),E=g.mapStyle,(E=function(e){try{var t=JSON.parse(e);if(t&&"object"==typeof t&&null!==t)return t}catch(e){}return!1}(E))&&s.setOptions({styles:E}),void 0!==window["wpslMap_"+d]&&void 0!==window["wpslMap_"+d].locations&&(f=new google.maps.LatLngBounds,h=window["wpslMap_"+d].locations,e.each(h,function(e){V(m=new google.maps.LatLng(h[e].lat,h[e].lng),h[e].id,h[e],!1,u),f.extend(m)}),h.length>1&&(Y(s,k),s.fitBounds(f)),_.isArray(wpslSettings.mapTabAnchor)&&(w={map:s,bounds:f,maxZoom:k},S.push(w)));var E;var O,U,Z;e("#wpsl-gmap").length&&(1==wpslSettings.autoComplete&&function(){var t,s,o,l={};void 0===wpslSettings.geocodeComponents||e.isEmptyObject(wpslSettings.geocodeComponents)||(l.componentRestrictions=wpslSettings.geocodeComponents);t=document.getElementById("wpsl-search-input"),(s=new google.maps.places.Autocomplete(t,l)).addListener("place_changed",function(){(o=s.getPlace()).geometry&&(i=o.geometry.location)})}(),!M()&&e(".wpsl-dropdown").length&&1==wpslSettings.enableStyledDropdowns?(j=Number(wpslSettings.maxDropdownHeight),e(".wpsl-dropdown").each(function(t){var s,o,l=e(this);l.$dropdownWrap=l.wrap("<div class='wpsl-dropdown'></div>").parent(),l.$selectedVal=l.val(),l.$dropdownElem=e("<div><ul/></div>").appendTo(l.$dropdownWrap),l.$dropdown=l.$dropdownElem.find("ul"),l.$options=l.$dropdownWrap.find("option"),l.hide().removeClass("wpsl-dropdown"),e.each(l.$options,function(){s=e(this).val()==l.$selectedVal?'class="wpsl-selected-dropdown"':"",l.$dropdown.append("<li data-value="+e(this).val()+" "+s+">"+e(this).text()+"</li>")}),l.$dropdownElem.before("<span data-value="+l.find(":selected").val()+" class='wpsl-selected-item'>"+l.find(":selected").text()+"</span>"),l.$dropdownItem=l.$dropdownElem.find("li"),l.$dropdownWrap.on("click",function(t){e(this).hasClass("wpsl-active")?e(this).removeClass("wpsl-active"):(q(),e(this).toggleClass("wpsl-active"),o=0,e(this).hasClass("wpsl-active")?(l.$dropdownItem.each(function(t){o+=e(this).outerHeight()}),l.$dropdownElem.css("height",o+2+"px")):l.$dropdownElem.css("height",0),o>j&&(e(this).addClass("wpsl-scroll-required"),l.$dropdownElem.css("height",j+"px")),t.stopPropagation())}),l.$dropdownItem.on("click",function(t){l.$dropdownWrap.find(e(".wpsl-selected-item")).html(e(this).text()).attr("data-value",e(this).attr("data-value")),l.$dropdownItem.removeClass("wpsl-selected-dropdown"),e(this).addClass("wpsl-selected-dropdown"),q(),t.stopPropagation()})}),e(document).click(function(){q()})):(e("#wpsl-search-wrap select").show(),M()?e("#wpsl-wrap").addClass("wpsl-mobile"):e("#wpsl-wrap").addClass("wpsl-default-filters")),e(".wpsl-search").hasClass("wpsl-widget")||(1==wpslSettings.autoLocate?N(g.startLatLng,u):1==wpslSettings.autoLoad&&I(g.startLatLng,u)),1!=wpslSettings.mouseFocus||M()||e("#wpsl-search-input").focus(),W=u,e("#wpsl-search-btn").unbind("click").bind("click",function(s){return e("#wpsl-search-input").removeClass(),e("#wpsl-search-input").val()?(e("#wpsl-result-list ul").empty(),e("#wpsl-stores").show(),e(".wpsl-direction-before, .wpsl-direction-after").remove(),e("#wpsl-direction-details").hide(),y=!1,P(),F(!1),R(),1==wpslSettings.autoComplete&&void 0!==i?z(i,W):(o=W,l={address:e("#wpsl-search-input").val()},void 0===wpslSettings.geocodeComponents||e.isEmptyObject(wpslSettings.geocodeComponents)||(l.componentRestrictions=wpslSettings.geocodeComponents),t.geocode(l,function(e,t){t==google.maps.GeocoderStatus.OK?z(e[0].geometry.location,o):K(t)}))):e("#wpsl-search-input").addClass("wpsl-error").focus(),!1;var o,l}),B=g,A=s,$=u,google.maps.event.addListenerOnce(A,"tilesloaded",function(){var t,o;e(".gm-style").append(wpslSettings.mapControls),e(".wpsl-icon-reset, #wpsl-reset-map").length>0&&(t=B.startLatLng,o=$,e(".wpsl-icon-reset, #wpsl-reset-map").on("click",function(){e(this).hasClass("wpsl-in-progress")||(1==wpslSettings.autoLoad&&(x=1),s.getCenter().lat()===L.centerLatlng.lat()&&s.getCenter().lng()===L.centerLatlng.lng()&&s.getZoom()===L.zoomLevel||(F(!1),e("#wpsl-search-input").val("").removeClass(),e(".wpsl-icon-reset").addClass("wpsl-in-progress"),p&&p.clearMarkers(),R(),function(){var t,s,o,l,n,i,a,r,p=e("#wpsl-wrap").hasClass("wpsl-default-filters"),d=[wpslSettings.searchRadius+" "+wpslSettings.distanceUnit,wpslSettings.maxResults],c=["wpsl-radius","wpsl-results"];for(t=0,s=c.length;t<s;t++)e("#"+c[t]+" select").val(parseInt(d[t])),e("#"+c[t]+" li").removeClass(),"wpsl-radius"==c[t]?o=wpslSettings.searchRadius:"wpsl-results"==c[t]&&(o=wpslSettings.maxResults),e("#"+c[t]+" li").each(function(){e(this).text()===d[t]&&(e(this).addClass("wpsl-selected-dropdown"),e("#"+c[t]+" .wpsl-selected-item").html(d[t]).attr("data-value",o))});e("#wpsl-category").length&&(e("#wpsl-category select").val(0),e("#wpsl-category li").removeClass(),e("#wpsl-category li:first-child").addClass("wpsl-selected-dropdown"),l=e("#wpsl-category li:first-child").text(),e("#wpsl-category .wpsl-selected-item").html(l).attr("data-value",0)),e(".wpsl-custom-dropdown").length>0&&e(".wpsl-custom-dropdown").each(function(t){p?e(this).find("option").removeAttr("selected"):(n=e(this).siblings("div"),i=n.find("li:first-child"),a=i.text(),r=i.attr("data-value"),n.find("li").removeClass(),n.prev().html(a).attr("data-value",r))})}(),1==wpslSettings.autoLocate?T(t,n,!0,o):I(t,o)),e("#wpsl-stores").show(),e("#wpsl-direction-details").hide())}),e(".wpsl-icon-reset").hide()),e(".wpsl-icon-direction").on("click",function(){e(this).addClass("wpsl-user-activated"),N(B.startLatLng,$)})}),e(".wpsl-search").hasClass("wpsl-widget")&&(e("#wpsl-search-btn").trigger("click"),e(".wpsl-search").removeClass("wpsl-widget")));var B,A,$;var W;var j;void 0!==wpslSettings.markerZoomTo&&1==wpslSettings.markerZoomTo&&google.maps.event.addListener(s,"zoom_changed",function(){D()})}(e(this).attr("id"),a)}),function(){var t,o;if(_.isArray(wpslSettings.mapTabAnchor))for(t=0,o=S.length;t<o;t++)Q(S[t],wpslSettings.mapTabAnchor[t],t);else e("a[href='#"+wpslSettings.mapTabAnchor+"']").length&&Q(s,wpslSettings.mapTabAnchor)}()),e("#wpsl-result-list").on("click",".wpsl-back",function(){var t,l;for(o.setMap(null),t=0,l=v.length;t<l;t++)v[t].setMap(s);return void 0!==d&&""!==d&&d.setMap(s),p&&$(),s.setCenter(C.centerLatlng),s.setZoom(C.zoomLevel),e(".wpsl-direction-before, .wpsl-direction-after").remove(),e("#wpsl-stores").show(),e("#wpsl-direction-details").hide(),!1}),e("#wpsl-gmap").length&&("bounce"==wpslSettings.markerEffect?(e("#wpsl-stores").on("mouseenter","li",function(){U(e(this).data("store-id"),"start")}),e("#wpsl-stores").on("mouseleave","li",function(){U(e(this).data("store-id"),"stop")})):"info_window"==wpslSettings.markerEffect&&e("#wpsl-stores").on("mouseenter","li",function(){var t,o;for(t=0,o=v.length;t<o;t++)v[t].storeId==e(this).data("store-id")&&(google.maps.event.trigger(v[t],"click"),s.setCenter(v[t].position))})),void 0!==wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&1==wpslSettings.markerClusters)&&google.maps.event.addListener(s,"zoom_changed",function(){google.maps.event.addListenerOnce(s,"idle",function(){if(void 0!==p&&(w=p.clusters_).length)for(m=0,g=w.length;m<g;m++)for(f=0,u=w[m].markers_.length;f<u;f++)if(w[m].markers_[f].storeId==a){r.getVisible()&&null===w[m].markers_[f].map?r.setVisible(!1):r.getVisible()||null===w[m].markers_[f].map||r.setVisible(!0);break}})});function W(e,t,s,o){h.length=0,s.setContent(t),s.open(o,e),h.push(s),void 0!==wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&1==wpslSettings.markerClusters&&(a=e.storeId,s.setVisible(!0))}function D(){s.getZoom()>=wpslSettings.autoZoomLevel?e(".wpsl-zoom-here").hide():e(".wpsl-zoom-here").show()}var j={formatPhoneNumber:function(e){return 1==wpslSettings.phoneUrl&&M()&&(e="<a href='tel:"+j.formatClickablePhoneNumber(e)+"'>"+e+"</a>"),e},formatClickablePhoneNumber:function(e){return-1!=e.indexOf("+")&&-1!=e.indexOf("(0)")&&(e=e.replace("(0)","")),e.replace(/(-| |\(|\)|\.|)/g,"")},createInfoWindowActions:function(t){var s,o="",l="";return e("#wpsl-gmap").length&&(k&&(o="<a class='wpsl-streetview' href='#'>"+wpslLabels.streetView+"</a>"),1==wpslSettings.markerZoomTo&&(l="<a class='wpsl-zoom-here' href='#'>"+wpslLabels.zoomHere+"</a>"),s="<div class='wpsl-info-actions'>"+j.createDirectionUrl(t)+o+l+"</div>"),s},createDirectionUrl:function(t){var s,o,l={};return 1==wpslSettings.directionRedirect?(void 0===c&&(c=""),l.target="target='_blank'",void 0!==t?l.src=e("[data-store-id="+t+"] .wpsl-directions").attr("href"):(o=this.zip?this.zip+", ":"",s=this.address+", "+this.city+", "+o+this.country,l.src="https://www.google.com/maps/dir/?api=1&origin="+j.rfc3986EncodeURIComponent(c)+"&destination="+j.rfc3986EncodeURIComponent(s)+"&travelmode="+wpslSettings.directionsTravelMode.toLowerCase())):l={src:"#",target:""},"<a class='wpsl-directions' "+l.target+" href='"+l.src+"'>"+wpslLabels.directions+"</a>"},rfc3986EncodeURIComponent:function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape)}};function G(t){var s;return s=e("#wpsl-base-gmap_0").length?e("#wpsl-cpt-info-window-template").html():e("#wpsl-info-window-template").html(),_.template(s)(t)}function H(){var e,t,o=Number(wpslSettings.autoZoomLevel),l=new google.maps.LatLngBounds;for(Y(s,o),e=0,t=v.length;e<t;e++)l.extend(v[e].position);s.fitBounds(l)}function F(e){var t,s;if(o.setMap(null),v){for(s=0,t=v.length;s<t;s++)e?1!=v[s].draggable?v[s].setMap(null):d=v[s]:v[s].setMap(null);v.length=0}p&&p.clearMarkers()}function K(e){var t;switch(e){case"ZERO_RESULTS":t=wpslLabels.noResults;break;case"OVER_QUERY_LIMIT":t=wpslLabels.queryLimit;break;default:t=wpslLabels.generalError}alert(t)}function q(){e(".wpsl-dropdown").removeClass("wpsl-active"),e(".wpsl-dropdown div").css("height",0)}function Q(t,s,o){var l,n,i,a,r,p=!!Number(wpslSettings.mapTabAnchorReturn),d=e("a[href='#"+s+"']");i=void 0!==t.maxZoom?t.maxZoom:Number(wpslSettings.autoZoomLevel),void 0!==o&&0==o&&d.addClass("wpsl-fitbounds"),d.on("click",function(){return setTimeout(function(){void 0!==t.map?(a=t.bounds,r=t.map):r=t,l=r.getZoom(),n=r.getCenter(),google.maps.event.trigger(r,"resize"),d.hasClass("wpsl-fitbounds")||(Y(r,i),r.setZoom(l),r.setCenter(n),void 0!==a?r.fitBounds(a):H(),d.addClass("wpsl-fitbounds"))},50),p})}function Y(e,t){google.maps.event.addListenerOnce(e,"bounds_changed",function(){google.maps.event.addListenerOnce(e,"idle",function(){this.getZoom()>t&&this.setZoom(t)})})}e("#wpsl-stores").on("click",".wpsl-store-details",function(){var t,s,o=e(this).parents("li"),l=o.data("store-id");if("info window"==wpslSettings.moreInfoLocation)for(t=0,s=v.length;t<s;t++)v[t].storeId==l&&google.maps.event.trigger(v[t],"click");else o.find(".wpsl-more-info-listings").is(":visible")?e(this).removeClass("wpsl-active-details"):e(this).addClass("wpsl-active-details"),o.siblings().find(".wpsl-store-details").removeClass("wpsl-active-details"),o.siblings().find(".wpsl-more-info-listings").hide(),o.find(".wpsl-more-info-listings").toggle();if("default"!=wpslSettings.templateId||"store listings"==wpslSettings.moreInfoLocation)return!1})});
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.paypal.me/tijmensmit
5
  Tags: google maps, store locator, business locations, geocoding, stores, geo, zipcode locator, dealer locater, geocode, gmaps, google map, google map plugin, location finder, map tools, shop locator, wp google map
6
  Requires at least: 3.7
7
  Tested up to: 4.9.1
8
- Stable tag: 2.2.11
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl.html
11
 
@@ -126,6 +126,11 @@ If you find a plugin or theme that causes a conflict, please report it on the [s
126
 
127
  == Changelog ==
128
 
 
 
 
 
 
129
  = 2.2.11, January 14, 2018 =
130
  * Added: A WPSL_Templates class that handles the different templates in the store locator and in the upcoming directory and nearby locations add-ons.
131
  * Added: A 'wpsl_settings_tab' filter that makes it possible to add custom tabs on the settings page.
5
  Tags: google maps, store locator, business locations, geocoding, stores, geo, zipcode locator, dealer locater, geocode, gmaps, google map, google map plugin, location finder, map tools, shop locator, wp google map
6
  Requires at least: 3.7
7
  Tested up to: 4.9.1
8
+ Stable tag: 2.2.12
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl.html
11
 
126
 
127
  == Changelog ==
128
 
129
+ = 2.2.12, February 16, 2018 =
130
+ * Fixed: The zoom level automatically going down to streetlevel with the wpsl_map shortcode, and ignoring the set zoom level in the shortcode options.
131
+ * Fixed: The zipcode not always being correctly filtered out of the geocode API response when the user location is automatically detected.
132
+ * Changed: Removed unused customCheckboxValue variable.
133
+
134
  = 2.2.11, January 14, 2018 =
135
  * Added: A WPSL_Templates class that handles the different templates in the store locator and in the upcoming directory and nearby locations add-ons.
136
  * Added: A 'wpsl_settings_tab' filter that makes it possible to add custom tabs on the settings page.
wp-store-locator.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Store Locator
4
  Description: An easy to use location management system that enables users to search for nearby physical stores
5
  Author: Tijmen Smit
6
  Author URI: https://wpstorelocator.co/
7
- Version: 2.2.11
8
  Text Domain: wpsl
9
  Domain Path: /languages/
10
  License: GPL v3
@@ -59,7 +59,7 @@ if ( !class_exists( 'WP_Store_locator' ) ) {
59
  public function define_constants() {
60
 
61
  if ( !defined( 'WPSL_VERSION_NUM' ) )
62
- define( 'WPSL_VERSION_NUM', '2.2.11' );
63
 
64
  if ( !defined( 'WPSL_URL' ) )
65
  define( 'WPSL_URL', plugin_dir_url( __FILE__ ) );
4
  Description: An easy to use location management system that enables users to search for nearby physical stores
5
  Author: Tijmen Smit
6
  Author URI: https://wpstorelocator.co/
7
+ Version: 2.2.12
8
  Text Domain: wpsl
9
  Domain Path: /languages/
10
  License: GPL v3
59
  public function define_constants() {
60
 
61
  if ( !defined( 'WPSL_VERSION_NUM' ) )
62
+ define( 'WPSL_VERSION_NUM', '2.2.12' );
63
 
64
  if ( !defined( 'WPSL_URL' ) )
65
  define( 'WPSL_URL', plugin_dir_url( __FILE__ ) );