WP Store Locator - Version 2.0.2

Version Description

  • Fixed: Not all users always seeing the notice to convert the 1.x locations to custom post types.
  • Fixed: Prevented empty search results from ending up in the autoload transient.
  • Fixed: The autoload transient not being cleared after changing the start location on the settings page.
  • Changed: Added extra CSS to make it harder for themes to turn the map completely grey, and set the default opening hours alignment to left.
  • Changed: If you use the store locator in a tab, then it no longer requires the tab anchor to be 'wpsl-map-tab'. You can use whatever you want with the 'wpsl_map_tab_anchor' filter.
Download this release

Release Info

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

Code changes from version 2.0.1 to 2.0.2

admin/class-notices.php CHANGED
@@ -28,7 +28,7 @@ if ( !class_exists( 'WPSL_Notices' ) ) {
28
 
29
  $this->notices = get_option( 'wpsl_notices' );
30
 
31
- add_action( 'admin_notices', array( $this, 'show' ) );
32
  }
33
 
34
  /**
28
 
29
  $this->notices = get_option( 'wpsl_notices' );
30
 
31
+ add_action( 'all_admin_notices', array( $this, 'show' ) );
32
  }
33
 
34
  /**
admin/class-settings.php CHANGED
@@ -310,6 +310,7 @@ if ( !class_exists( 'WPSL_Settings' ) ) {
310
 
311
  /* The options we need to check for changes */
312
  $options = array(
 
313
  'debug',
314
  'autoload',
315
  'autoload_limit',
310
 
311
  /* The options we need to check for changes */
312
  $options = array(
313
+ 'zoom_name',
314
  'debug',
315
  'autoload',
316
  'autoload_limit',
css/styles.css CHANGED
@@ -54,6 +54,7 @@ div elements, we disable it to prevent it from messing up the map
54
  .wpsl-gmap-canvas img {
55
  display: inline !important;
56
  opacity: 1 !important;
 
57
  }
58
 
59
  #wpsl-wrap {
@@ -649,8 +650,9 @@ div elements, we disable it to prevent it from messing up the map
649
  }
650
 
651
  table.wpsl-opening-hours td {
652
- vertical-align:top;
653
  padding: 0 15px 0 0;
 
654
  }
655
 
656
  .wpsl_stores .wpsl-contact-details span,
54
  .wpsl-gmap-canvas img {
55
  display: inline !important;
56
  opacity: 1 !important;
57
+ max-height: none !important;
58
  }
59
 
60
  #wpsl-wrap {
650
  }
651
 
652
  table.wpsl-opening-hours td {
653
+ vertical-align: top;
654
  padding: 0 15px 0 0;
655
+ text-align: left;
656
  }
657
 
658
  .wpsl_stores .wpsl-contact-details span,
css/styles.min.css CHANGED
@@ -1 +1 @@
1
- #wpsl-result-list a,#wpsl-wrap [class*=" wpsl-icon-"]:focus,#wpsl-wrap [class^=wpsl-icon-]:active{outline:0}#wpsl-map-controls div:hover,#wpsl-reset-map:hover,#wpsl-search-btn:hover,.wpsl-dropdown{cursor:pointer}#wpsl-wrap,.wpsl-clearfix:after,.wpsl-contact-details{clear:both}@font-face{font-family:wpsl-fontello;src:url(../font/fontello.eot?28897909);src:url(../font/fontello.eot?28897909#iefix) format('embedded-opentype'),url(../font/fontello.woff?28897909) format('woff'),url(../font/fontello.ttf?28897909) format('truetype'),url(../font/fontello.svg?28897909#fontello) format('svg');font-weight:400;font-style:normal}#wpsl-gmap{float:right;width:66.5%;height:350px;margin-bottom:0}.wpsl-store-below #wpsl-gmap{float:none;width:100%}.wpsl-gmap-canvas{width:100%;height:300px;margin-bottom:20px}.gm-style-mtc,.gmnoprint{z-index:9999!important}#wpsl-gmap div,#wpsl-gmap img,.wpsl-gmap-canvas div,.wpsl-gmap-canvas img{box-shadow:none!important;max-width:none!important;background:0 0}#wpsl-gmap img,.wpsl-gmap-canvas img{display:inline!important;opacity:1!important}#wpsl-wrap{width:100%;overflow:hidden;margin-bottom:20px}#wpsl-search-wrap{float:left;width:100%}#wpsl-gmap #wpsl-map-controls{position:absolute;right:5px;bottom:20px;border-radius:3px;z-index:3;font-size:11px;white-space:nowrap}#wpsl-map-controls .wpsl-direction-preloader{margin:5px 5px 0}#wpsl-map-controls div{float:left;background:#fff;border-radius:3px}#wpsl-wrap [class*=" wpsl-icon-"],#wpsl-wrap [class^=wpsl-icon-]{position:relative;float:left;padding:5px 7px;display:inline-block;font-family:wpsl-fontello;font-style:normal;font-weight:400;font-size:1.3em;color:#7c7c7c;speak:none;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none;line-height:1em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpsl-wrap .wpsl-ie [class*=" wpsl-icon-"],#wpsl-wrap .wpsl-ie [class^=wpsl-icon-]{padding:8px 8px 4px}#wpsl-wrap.wpsl-mobile [class*=" wpsl-icon-"],#wpsl-wrap.wpsl-mobile [class^=wpsl-icon-]{padding:8px 10px}#wpsl-wrap .wpsl-icon-reset{border:1px solid #ccc;border-radius:3px 0 0 3px;z-index:2}#wpsl-wrap .wpsl-icon-direction{border:1px solid #ccc;z-index:1}#wpsl-wrap .wpsl-reset-exists{border-radius:0 3px 3px 0;border-left:0}#wpsl-wrap .wpsl-active-icon,#wpsl-wrap [class*=" wpsl-icon-"]:hover,#wpsl-wrap [class^=wpsl-icon-]:hover{color:#000}#wpsl-wrap .wpsl-in-progress,#wpsl-wrap .wpsl-in-progress:hover{color:#c6c6c6}#wpsl-gmap #wpsl-reset-map{position:absolute;display:none;right:37px;top:37px;padding:6px 14px;background:#fff!important;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:3px;z-index:3}.gm-style-cc{word-wrap:normal}#wpsl-search-wrap .wpsl-input,#wpsl-search-wrap .wpsl-select-wrap{display:table}#wpsl-search-btn,#wpsl-search-wrap #wpsl-radius,#wpsl-search-wrap #wpsl-results,#wpsl-search-wrap .wpsl-input input,#wpsl-search-wrap .wpsl-input label{display:table-cell}#wpsl-search-wrap label{margin-bottom:0}#wpsl-search-input{width:179px;height:auto;padding:7px 12px;font-size:100%;margin:0}#wpsl-search-btn,#wpsl-search-wrap input{border:1px solid #d2d2d2;border-radius:3px}#wpsl-search-btn{padding:7px 10px;line-height:1.428571429;font-weight:400;color:#7c7c7c;background-color:#e6e6e6;background-repeat:repeat-x;background-image:-moz-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-ms-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-webkit-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-o-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:linear-gradient(top,#f4f4f4,#e6e6e6);box-shadow:0 1px 2px rgba(64,64,64,.1);text-transform:none!important}#wpsl-search-input.wpsl-error{border:1px solid #bd0028!important}.wpsl-search{margin-bottom:12px;padding:12px 12px 0;background:#f4f3f3}.wpsl-back{display:inline-block}#wpsl-result-list{width:33%;margin-right:.5%}.wpsl-store-below #wpsl-result-list{width:100%;margin:12px 0 0}#wpsl-direction-details,#wpsl-stores{height:350px;overflow-y:auto}#wpsl-direction-details,.wpsl-hide{display:none}#wpsl-result-list p{padding-left:10px}.wpsl-store-below #wpsl-result-list p{padding-left:0}.wpsl-direction-before{margin:14px 0 21px;padding-left:10px}.wpsl-store-below .wpsl-direction-before{padding-left:0}.wpsl-direction-before div{margin-top:10px}#wpsl-wrap #wpsl-result-list li{padding:10px;border-bottom:1px dotted #ccc;margin-left:0;overflow:hidden;list-style:none!important;text-indent:0}#wpsl-wrap.wpsl-store-below #wpsl-result-list li{padding:10px 10px 10px 0}#wpsl-result-list li p{padding-left:0;margin:0 0 20px}.wpsl-store-details.wpsl-store-listing{position:relative;padding-right:20px}.wpsl-store-details.wpsl-store-listing.wpsl-active-details:before,.wpsl-store-details.wpsl-store-listing:before{position:absolute;content:'';bottom:6px;right:0;border-top:5px solid #000;border-left:6px solid transparent;border-right:6px solid transparent}.wpsl-store-details.wpsl-store-listing.wpsl-active-details:before{border-bottom:5px solid #000;border-top:none;border-left:6px solid transparent;border-right:6px solid transparent}#wpsl-stores .wpsl-store-thumb{float:right;border-radius:3px;margin:7px 0 0 10px;padding:0;border:none}.wpsl-direction-index{float:left;width:8%;margin:0 5% 0 0}.wpsl-direction-txt{float:left;width:62%}.wpsl-direction-distance{float:left;width:20%;margin:0 0 0 5%}.wpsl-direction-txt span{display:block;margin-top:10px}.wpsl-country,.wpsl-directions,.wpsl-street{display:block;border-bottom:none!important}#wpsl-wrap #wpsl-result-list li.wpsl-preloader{position:relative;border-bottom:none;padding:10px 10px 10px 35px}.wpsl-preloader img{position:absolute;left:10px;top:50%;margin-top:-8px;box-shadow:none!important;border:none!important}.wpsl-preloader span{float:left;margin:-5px 0 0 11px}#wpsl-search-btn,#wpsl-search-wrap div{margin-right:10px;float:left}#wpsl-search-wrap .wpsl-select-wrap{position:relative;z-index:2;margin-right:0}#wpsl-search-wrap .wpsl-input-field{position:relative}#wpsl-radius,#wpsl-results{float:left;margin-right:15px;display:inline}#wpsl-category{z-index:1;clear:both}#wpsl-search-wrap .wpsl-dropdown div{position:absolute;float:none;margin:-1px 0 0;top:100%;left:-1px;right:-1px;border:1px solid #ccc;background:#fff;border-top:1px solid #eee;border-radius:0 0 3px 3px;opacity:0;overflow:hidden;-webkit-transition:all 150ms ease-in-out;-moz-transition:all 150ms ease-in-out;-ms-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}#wpsl-search-wrap .wpsl-dropdown.wpsl-active div{opacity:1}#wpsl-search-wrap .wpsl-input label{margin-right:0}#wpsl-radius{margin-right:10px}#wpsl-search select,#wpsl-search-wrap select,.wpsl-direction-details{display:none}#wpsl-search-wrap div label{float:left;margin-right:10px;line-height:32px}#wpsl-results label{width:auto}#wpsl-result-list ul{list-style:none;margin:0;padding:0}#wpsl-gmap .wpsl-info-window,.wpsl-gmap-canvas .wpsl-info-window{max-width:225px}.wpsl-info-window span,.wpsl-more-info-listings span{display:block}.wpsl-info-window .wpsl-no-margin{margin:0}.wpsl-more-info-listings{display:none}.wpsl-info-window span span{display:inline!important}#wpsl-wrap .wpsl-info-window p{margin:0 0 10px}.wpsl-store-hours{margin-top:10px}.wpsl-store-hours strong{display:block}#wpsl-gmap .wpsl-info-actions{display:block;margin:10px 0!important}.wpsl-info-actions a{float:left;margin-right:7px}.wpsl-info-actions .wpsl-zoom-here{margin-right:0}.wpsl-dropdown{position:relative;width:90px;border:1px solid #ccc;background:#fff;border-radius:3px;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-right:0!important;z-index:2}#wpsl-results .wpsl-dropdown{width:70px}.wpsl-dropdown ul{position:absolute;left:0;width:100%;height:100%;padding:0!important;margin:0!important;list-style:none;overflow:hidden}.wpsl-dropdown:hover{box-shadow:0 0 5px rgba(0,0,0,.15)}.wpsl-dropdown .wpsl-selected-item,.wpsl-dropdown li{position:relative;display:block;line-height:1;color:#000;overflow:hidden;white-space:nowrap}.wpsl-selected-item:after{position:absolute;content:"";right:12px;top:50%;margin-top:-4px;border:6px solid transparent;border-top:8px solid #000}.wpsl-active .wpsl-selected-item:after{margin-top:-10px;border:6px solid transparent;border-bottom:8px solid #000}.wpsl-dropdown li:hover{background:#f8f9f8;position:relative;z-index:3;color:#000}.wpsl-dropdown .wpsl-selected-item,.wpsl-dropdown li,.wpsl-selected-item{list-style:none;padding:9px 12px!important;margin:0!important}.wpsl-selected-dropdown{font-weight:700}.wpsl-clearfix:after,.wpsl-clearfix:before{content:" ";display:table}#wpsl-wrap .wpsl-selected-item{position:static;padding-right:35px!important}#wpsl-category,.wpsl-input,.wpsl-select-wrap{position:relative;margin-bottom:10px}.wpsl-provided-by{float:right;padding:5px 0;text-align:right;font-size:12px;width:100%}#wpsl-wrap .wpsl-results-only label{width:auto}.wpsl-contact-details,.wpsl-location-address,.wpsl-locations-details{margin-bottom:15px}table.wpsl-opening-hours td{vertical-align:top;padding:0 15px 0 0}#wpsl-stores .wpsl-contact-details span,.wpsl_stores .wpsl-contact-details span,table.wpsl-opening-hours time{display:block}table.wpsl-opening-hours{width:auto!important;font-size:100%!important}table.wpsl-opening-hours,table.wpsl-opening-hours td{border:none!important}.wpsl-gmap-canvas .wpsl-infobox{min-width:155px;max-width:350px!important;padding:10px;border-radius:4px;font-size:13px;font-weight:300;border:1px solid #ccc;background:#fff!important}.wpsl-gmap-canvas .wpsl-infobox:after,.wpsl-gmap-canvas .wpsl-infobox:before{position:absolute;content:"";left:40px;bottom:-11px}.wpsl-gmap-canvas .wpsl-infobox:after{border-left:11px solid transparent;border-right:11px solid transparent;border-top:11px solid #fff}.wpsl-gmap-canvas .wpsl-infobox:before{border-left:13px solid transparent;border-right:13px solid transparent;border-top:13px solid #ccc;bottom:-13px;left:38px}@media (max-width:825px){#wpsl-search-input{width:348px}.wpsl-results-only #wpsl-search-wrap .wpsl-dropdown{width:70px}#wpsl-search-wrap .wpsl-input{width:100%;margin-bottom:10px}#wpsl-category label,#wpsl-radius label,.wpsl-cat-results-filter #wpsl-search-wrap .wpsl-input,.wpsl-input label,.wpsl-no-filters #wpsl-search-wrap .wpsl-input,.wpsl-results-only #wpsl-search-wrap .wpsl-input{width:auto}}@media (max-width:720px){#wpsl-search-wrap .wpsl-dropdown{width:114px}}@media (max-width:675px){#wpsl-search-wrap #wpsl-search-btn{float:left;margin:0 5px 0 0}.wpsl-dropdown,.wpsl-results-only #wpsl-search-wrap .wpsl-input{width:100%}.wpsl-search{padding:2%}#wpsl-result-list p,#wpsl-wrap #wpsl-result-list li,.wpsl-direction-before{padding-left:0}.wpsl-input{margin-right:0}#wpsl-gmap,#wpsl-result-list{float:none;width:100%}#wpsl-gmap{margin-bottom:15px;margin-top:10px}#wpsl-result-list,.wpsl-cat-results-filter .wpsl-select-wrap,.wpsl-filter .wpsl-select-wrap{margin-bottom:10px}#wpsl-wrap #wpsl-result-list li.wpsl-preloader{padding-left:25px}.wpsl-preloader img{left:0}#wpsl-stores.wpsl-not-loaded{height:25px}#wpsl-reset-map{top:25px}#wpsl-category,#wpsl-search-btn,.wpsl-input,.wpsl-no-filters #wpsl-search-wrap .wpsl-input,.wpsl-select-wrap{margin-bottom:0}#wpsl-stores.wpsl-no-autoload{height:auto!important}}@media (max-width:570px){#wpsl-search-wrap #wpsl-search-btn{margin-bottom:5px}.wpsl-search{padding:4%}#wpsl-search-input{width:98%!important}.wpsl-cat-results-filter #wpsl-search-input,.wpsl-cat-results-filter #wpsl-search-wrap .wpsl-input,.wpsl-no-results #wpsl-search-input,.wpsl-results-only #wpsl-search-input{width:100%!important}.wpsl-search-btn-wrap{margin-top:15px;clear:both}#wpsl-search-btn,#wpsl-search-wrap div{margin-right:0}#wpsl-search-wrap div label{display:block;width:100%}.wpsl-select-wrap{width:100%}#wpsl-radius,#wpsl-results{width:50%}#wpsl-radius{margin-right:4%}#wpsl-search-wrap .wpsl-dropdown{width:96%!important}.wpsl-no-filters #wpsl-search-input,.wpsl-no-filters #wpsl-search-wrap .wpsl-input{width:100%!important}}
1
+ #wpsl-result-list a,#wpsl-wrap [class*=" wpsl-icon-"]:focus,#wpsl-wrap [class^=wpsl-icon-]:active{outline:0}#wpsl-map-controls div:hover,#wpsl-reset-map:hover,#wpsl-search-btn:hover,.wpsl-dropdown{cursor:pointer}#wpsl-wrap,.wpsl-clearfix:after,.wpsl-contact-details{clear:both}@font-face{font-family:wpsl-fontello;src:url(../font/fontello.eot?28897909);src:url(../font/fontello.eot?28897909#iefix) format('embedded-opentype'),url(../font/fontello.woff?28897909) format('woff'),url(../font/fontello.ttf?28897909) format('truetype'),url(../font/fontello.svg?28897909#fontello) format('svg');font-weight:400;font-style:normal}#wpsl-gmap{float:right;width:66.5%;height:350px;margin-bottom:0}.wpsl-store-below #wpsl-gmap{float:none;width:100%}.wpsl-gmap-canvas{width:100%;height:300px;margin-bottom:20px}.gm-style-mtc,.gmnoprint{z-index:9999!important}#wpsl-gmap div,#wpsl-gmap img,.wpsl-gmap-canvas div,.wpsl-gmap-canvas img{box-shadow:none!important;max-width:none!important;background:0 0}#wpsl-gmap img,.wpsl-gmap-canvas img{display:inline!important;opacity:1!important;max-height:none!important}#wpsl-wrap{width:100%;overflow:hidden;margin-bottom:20px}#wpsl-search-wrap{float:left;width:100%}#wpsl-gmap #wpsl-map-controls{position:absolute;right:5px;bottom:20px;border-radius:3px;z-index:3;font-size:11px;white-space:nowrap}#wpsl-map-controls .wpsl-direction-preloader{margin:5px 5px 0}#wpsl-map-controls div{float:left;background:#fff;border-radius:3px}#wpsl-wrap [class*=" wpsl-icon-"],#wpsl-wrap [class^=wpsl-icon-]{position:relative;float:left;padding:5px 7px;display:inline-block;font-family:wpsl-fontello;font-style:normal;font-weight:400;font-size:1.3em;color:#7c7c7c;speak:none;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none;line-height:1em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpsl-wrap .wpsl-ie [class*=" wpsl-icon-"],#wpsl-wrap .wpsl-ie [class^=wpsl-icon-]{padding:8px 8px 4px}#wpsl-wrap.wpsl-mobile [class*=" wpsl-icon-"],#wpsl-wrap.wpsl-mobile [class^=wpsl-icon-]{padding:8px 10px}#wpsl-wrap .wpsl-icon-reset{border:1px solid #ccc;border-radius:3px 0 0 3px;z-index:2}#wpsl-wrap .wpsl-icon-direction{border:1px solid #ccc;z-index:1}#wpsl-wrap .wpsl-reset-exists{border-radius:0 3px 3px 0;border-left:0}#wpsl-wrap .wpsl-active-icon,#wpsl-wrap [class*=" wpsl-icon-"]:hover,#wpsl-wrap [class^=wpsl-icon-]:hover{color:#000}#wpsl-wrap .wpsl-in-progress,#wpsl-wrap .wpsl-in-progress:hover{color:#c6c6c6}#wpsl-gmap #wpsl-reset-map{position:absolute;display:none;right:37px;top:37px;padding:6px 14px;background:#fff!important;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:3px;z-index:3}.gm-style-cc{word-wrap:normal}#wpsl-search-wrap .wpsl-input,#wpsl-search-wrap .wpsl-select-wrap{display:table}#wpsl-search-btn,#wpsl-search-wrap #wpsl-radius,#wpsl-search-wrap #wpsl-results,#wpsl-search-wrap .wpsl-input input,#wpsl-search-wrap .wpsl-input label{display:table-cell}#wpsl-search-wrap label{margin-bottom:0}#wpsl-search-input{width:179px;height:auto;padding:7px 12px;font-size:100%;margin:0}#wpsl-search-btn,#wpsl-search-wrap input{border:1px solid #d2d2d2;border-radius:3px}#wpsl-search-btn{padding:7px 10px;line-height:1.428571429;font-weight:400;color:#7c7c7c;background-color:#e6e6e6;background-repeat:repeat-x;background-image:-moz-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-ms-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-webkit-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-o-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:linear-gradient(top,#f4f4f4,#e6e6e6);box-shadow:0 1px 2px rgba(64,64,64,.1);text-transform:none!important}#wpsl-search-input.wpsl-error{border:1px solid #bd0028!important}.wpsl-search{margin-bottom:12px;padding:12px 12px 0;background:#f4f3f3}.wpsl-back{display:inline-block}#wpsl-result-list{width:33%;margin-right:.5%}.wpsl-store-below #wpsl-result-list{width:100%;margin:12px 0 0}#wpsl-direction-details,#wpsl-stores{height:350px;overflow-y:auto}#wpsl-direction-details,.wpsl-hide{display:none}#wpsl-result-list p{padding-left:10px}.wpsl-store-below #wpsl-result-list p{padding-left:0}.wpsl-direction-before{margin:14px 0 21px;padding-left:10px}.wpsl-store-below .wpsl-direction-before{padding-left:0}.wpsl-direction-before div{margin-top:10px}#wpsl-wrap #wpsl-result-list li{padding:10px;border-bottom:1px dotted #ccc;margin-left:0;overflow:hidden;list-style:none!important;text-indent:0}#wpsl-wrap.wpsl-store-below #wpsl-result-list li{padding:10px 10px 10px 0}#wpsl-result-list li p{padding-left:0;margin:0 0 20px}.wpsl-store-details.wpsl-store-listing{position:relative;padding-right:20px}.wpsl-store-details.wpsl-store-listing.wpsl-active-details:before,.wpsl-store-details.wpsl-store-listing:before{position:absolute;content:'';bottom:6px;right:0;border-top:5px solid #000;border-left:6px solid transparent;border-right:6px solid transparent}.wpsl-store-details.wpsl-store-listing.wpsl-active-details:before{border-bottom:5px solid #000;border-top:none;border-left:6px solid transparent;border-right:6px solid transparent}#wpsl-stores .wpsl-store-thumb{float:right;border-radius:3px;margin:7px 0 0 10px;padding:0;border:none}.wpsl-direction-index{float:left;width:8%;margin:0 5% 0 0}.wpsl-direction-txt{float:left;width:62%}.wpsl-direction-distance{float:left;width:20%;margin:0 0 0 5%}.wpsl-direction-txt span{display:block;margin-top:10px}.wpsl-country,.wpsl-directions,.wpsl-street{display:block;border-bottom:none!important}#wpsl-wrap #wpsl-result-list li.wpsl-preloader{position:relative;border-bottom:none;padding:10px 10px 10px 35px}.wpsl-preloader img{position:absolute;left:10px;top:50%;margin-top:-8px;box-shadow:none!important;border:none!important}.wpsl-preloader span{float:left;margin:-5px 0 0 11px}#wpsl-search-btn,#wpsl-search-wrap div{margin-right:10px;float:left}#wpsl-search-wrap .wpsl-select-wrap{position:relative;z-index:2;margin-right:0}#wpsl-search-wrap .wpsl-input-field{position:relative}#wpsl-radius,#wpsl-results{float:left;margin-right:15px;display:inline}#wpsl-category{z-index:1;clear:both}#wpsl-search-wrap .wpsl-dropdown div{position:absolute;float:none;margin:-1px 0 0;top:100%;left:-1px;right:-1px;border:1px solid #ccc;background:#fff;border-top:1px solid #eee;border-radius:0 0 3px 3px;opacity:0;overflow:hidden;-webkit-transition:all 150ms ease-in-out;-moz-transition:all 150ms ease-in-out;-ms-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}#wpsl-search-wrap .wpsl-dropdown.wpsl-active div{opacity:1}#wpsl-search-wrap .wpsl-input label{margin-right:0}#wpsl-radius{margin-right:10px}#wpsl-search select,#wpsl-search-wrap select,.wpsl-direction-details{display:none}#wpsl-search-wrap div label{float:left;margin-right:10px;line-height:32px}#wpsl-results label{width:auto}#wpsl-result-list ul{list-style:none;margin:0;padding:0}#wpsl-gmap .wpsl-info-window,.wpsl-gmap-canvas .wpsl-info-window{max-width:225px}.wpsl-info-window span,.wpsl-more-info-listings span{display:block}.wpsl-info-window .wpsl-no-margin{margin:0}.wpsl-more-info-listings{display:none}.wpsl-info-window span span{display:inline!important}#wpsl-wrap .wpsl-info-window p{margin:0 0 10px}.wpsl-store-hours{margin-top:10px}.wpsl-store-hours strong{display:block}#wpsl-gmap .wpsl-info-actions{display:block;margin:10px 0!important}.wpsl-info-actions a{float:left;margin-right:7px}.wpsl-info-actions .wpsl-zoom-here{margin-right:0}.wpsl-dropdown{position:relative;width:90px;border:1px solid #ccc;background:#fff;border-radius:3px;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-right:0!important;z-index:2}#wpsl-results .wpsl-dropdown{width:70px}.wpsl-dropdown ul{position:absolute;left:0;width:100%;height:100%;padding:0!important;margin:0!important;list-style:none;overflow:hidden}.wpsl-dropdown:hover{box-shadow:0 0 5px rgba(0,0,0,.15)}.wpsl-dropdown .wpsl-selected-item,.wpsl-dropdown li{position:relative;display:block;line-height:1;color:#000;overflow:hidden;white-space:nowrap}.wpsl-selected-item:after{position:absolute;content:"";right:12px;top:50%;margin-top:-4px;border:6px solid transparent;border-top:8px solid #000}.wpsl-active .wpsl-selected-item:after{margin-top:-10px;border:6px solid transparent;border-bottom:8px solid #000}.wpsl-dropdown li:hover{background:#f8f9f8;position:relative;z-index:3;color:#000}.wpsl-dropdown .wpsl-selected-item,.wpsl-dropdown li,.wpsl-selected-item{list-style:none;padding:9px 12px!important;margin:0!important}.wpsl-selected-dropdown{font-weight:700}.wpsl-clearfix:after,.wpsl-clearfix:before{content:" ";display:table}#wpsl-wrap .wpsl-selected-item{position:static;padding-right:35px!important}#wpsl-category,.wpsl-input,.wpsl-select-wrap{position:relative;margin-bottom:10px}.wpsl-provided-by{float:right;padding:5px 0;text-align:right;font-size:12px;width:100%}#wpsl-wrap .wpsl-results-only label{width:auto}.wpsl-contact-details,.wpsl-location-address,.wpsl-locations-details{margin-bottom:15px}table.wpsl-opening-hours td{vertical-align:top;padding:0 15px 0 0;text-align:left}#wpsl-stores .wpsl-contact-details span,.wpsl_stores .wpsl-contact-details span,table.wpsl-opening-hours time{display:block}table.wpsl-opening-hours{width:auto!important;font-size:100%!important}table.wpsl-opening-hours,table.wpsl-opening-hours td{border:none!important}.wpsl-gmap-canvas .wpsl-infobox{min-width:155px;max-width:350px!important;padding:10px;border-radius:4px;font-size:13px;font-weight:300;border:1px solid #ccc;background:#fff!important}.wpsl-gmap-canvas .wpsl-infobox:after,.wpsl-gmap-canvas .wpsl-infobox:before{position:absolute;content:"";left:40px;bottom:-11px}.wpsl-gmap-canvas .wpsl-infobox:after{border-left:11px solid transparent;border-right:11px solid transparent;border-top:11px solid #fff}.wpsl-gmap-canvas .wpsl-infobox:before{border-left:13px solid transparent;border-right:13px solid transparent;border-top:13px solid #ccc;bottom:-13px;left:38px}@media (max-width:825px){#wpsl-search-input{width:348px}.wpsl-results-only #wpsl-search-wrap .wpsl-dropdown{width:70px}#wpsl-search-wrap .wpsl-input{width:100%;margin-bottom:10px}#wpsl-category label,#wpsl-radius label,.wpsl-cat-results-filter #wpsl-search-wrap .wpsl-input,.wpsl-input label,.wpsl-no-filters #wpsl-search-wrap .wpsl-input,.wpsl-results-only #wpsl-search-wrap .wpsl-input{width:auto}}@media (max-width:720px){#wpsl-search-wrap .wpsl-dropdown{width:114px}}@media (max-width:675px){#wpsl-search-wrap #wpsl-search-btn{float:left;margin:0 5px 0 0}.wpsl-dropdown,.wpsl-results-only #wpsl-search-wrap .wpsl-input{width:100%}.wpsl-search{padding:2%}#wpsl-result-list p,#wpsl-wrap #wpsl-result-list li,.wpsl-direction-before{padding-left:0}.wpsl-input{margin-right:0}#wpsl-gmap,#wpsl-result-list{float:none;width:100%}#wpsl-gmap{margin-bottom:15px;margin-top:10px}#wpsl-result-list,.wpsl-cat-results-filter .wpsl-select-wrap,.wpsl-filter .wpsl-select-wrap{margin-bottom:10px}#wpsl-wrap #wpsl-result-list li.wpsl-preloader{padding-left:25px}.wpsl-preloader img{left:0}#wpsl-stores.wpsl-not-loaded{height:25px}#wpsl-reset-map{top:25px}#wpsl-category,#wpsl-search-btn,.wpsl-input,.wpsl-no-filters #wpsl-search-wrap .wpsl-input,.wpsl-select-wrap{margin-bottom:0}#wpsl-stores.wpsl-no-autoload{height:auto!important}}@media (max-width:570px){#wpsl-search-wrap #wpsl-search-btn{margin-bottom:5px}.wpsl-search{padding:4%}#wpsl-search-input{width:98%!important}.wpsl-cat-results-filter #wpsl-search-input,.wpsl-cat-results-filter #wpsl-search-wrap .wpsl-input,.wpsl-no-results #wpsl-search-input,.wpsl-results-only #wpsl-search-input{width:100%!important}.wpsl-search-btn-wrap{margin-top:15px;clear:both}#wpsl-search-btn,#wpsl-search-wrap div{margin-right:0}#wpsl-search-wrap div label{display:block;width:100%}.wpsl-select-wrap{width:100%}#wpsl-radius,#wpsl-results{width:50%}#wpsl-radius{margin-right:4%}#wpsl-search-wrap .wpsl-dropdown{width:96%!important}.wpsl-no-filters #wpsl-search-input,.wpsl-no-filters #wpsl-search-wrap .wpsl-input{width:100%!important}}
frontend/class-frontend.php CHANGED
@@ -80,7 +80,7 @@ if ( !class_exists( 'WPSL_Frontend' ) ) {
80
  *
81
  * The SQL query that selects nearby locations doesn't take that long,
82
  * but collecting all the store meta data in get_store_meta_data() for hunderds,
83
- * or thousands of stores can make it really slow.
84
  */
85
  if ( $wpsl_settings['autoload'] && isset( $_GET['autoload'] ) && $_GET['autoload'] && !$wpsl_settings['debug'] && !isset( $_GET['skip_cache'] ) ) {
86
 
@@ -89,7 +89,7 @@ if ( !class_exists( 'WPSL_Frontend' ) ) {
89
  * including the lang code in the transient name.
90
  *
91
  * Otherwise if the language is for example set to German on page load,
92
- * and the user switches to Spanish. He would get the incorrect
93
  * permalink structure ( /de/.. instead or /es/.. ) and translated
94
  * store details.
95
  */
@@ -97,7 +97,10 @@ if ( !class_exists( 'WPSL_Frontend' ) ) {
97
 
98
  if ( false === ( $store_data = get_transient( 'wpsl_autoload_' . $wpsl_settings['autoload_limit'] . $lang_code ) ) ) {
99
  $store_data = $this->find_nearby_locations();
100
- set_transient( 'wpsl_autoload_' . $wpsl_settings['autoload_limit'] . $lang_code, $store_data, 0 );
 
 
 
101
  }
102
  } else {
103
  $store_data = $this->find_nearby_locations();
@@ -121,6 +124,8 @@ if ( !class_exists( 'WPSL_Frontend' ) ) {
121
  public function find_nearby_locations() {
122
 
123
  global $wpdb, $wpsl, $wpsl_settings;
 
 
124
 
125
  /* Set the correct earth radius in either km or miles.
126
  * We need this to calculate the distance between two coordinates.
@@ -183,7 +188,7 @@ if ( !class_exists( 'WPSL_Frontend' ) ) {
183
 
184
  $placeholder_values = apply_filters( 'wpsl_sql_placeholder_values', $placeholder_values );
185
 
186
- /* The sql that will check which store locations falls within
187
  * the selected radius based on the lat and lng values.
188
  */
189
  $sql = apply_filters( 'wpsl_sql',
@@ -202,14 +207,11 @@ if ( !class_exists( 'WPSL_Frontend' ) ) {
202
 
203
  $stores = $wpdb->get_results( $wpdb->prepare( $sql, $placeholder_values ) );
204
 
205
- /* Make sure we have a valid response */
206
- if ( $stores === false ) {
207
- wp_send_json_error();
208
- } else {
209
- $store_data = $this->get_store_meta_data( $stores );
210
-
211
- return apply_filters( 'wpsl_store_data', $store_data );
212
  }
 
 
213
  }
214
 
215
  /**
@@ -997,7 +999,7 @@ if ( !class_exists( 'WPSL_Frontend' ) ) {
997
  }
998
 
999
  /**
1000
- * Collect the CSS classes that are placed on the outer div.
1001
  *
1002
  * @since 2.0
1003
  * @return string $classes The custom CSS rules
@@ -1260,7 +1262,8 @@ if ( !class_exists( 'WPSL_Frontend' ) ) {
1260
  'distanceUnit' => $wpsl_settings['distance_unit'],
1261
  'geoLocationTimout' => apply_filters( 'wpsl_geolocation_timeout', 5000 ),
1262
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
1263
- 'mapControls' => $this->get_map_controls()
 
1264
  );
1265
 
1266
  /* If the marker clusters are enabled, include the js file and marker settings */
80
  *
81
  * The SQL query that selects nearby locations doesn't take that long,
82
  * but collecting all the store meta data in get_store_meta_data() for hunderds,
83
+ * or thousands of stores can make it really slow.
84
  */
85
  if ( $wpsl_settings['autoload'] && isset( $_GET['autoload'] ) && $_GET['autoload'] && !$wpsl_settings['debug'] && !isset( $_GET['skip_cache'] ) ) {
86
 
89
  * including the lang code in the transient name.
90
  *
91
  * Otherwise if the language is for example set to German on page load,
92
+ * and the user switches to Spanish, then he would get the incorrect
93
  * permalink structure ( /de/.. instead or /es/.. ) and translated
94
  * store details.
95
  */
97
 
98
  if ( false === ( $store_data = get_transient( 'wpsl_autoload_' . $wpsl_settings['autoload_limit'] . $lang_code ) ) ) {
99
  $store_data = $this->find_nearby_locations();
100
+
101
+ if ( $store_data ) {
102
+ set_transient( 'wpsl_autoload_' . $wpsl_settings['autoload_limit'] . $lang_code, $store_data, 0 );
103
+ }
104
  }
105
  } else {
106
  $store_data = $this->find_nearby_locations();
124
  public function find_nearby_locations() {
125
 
126
  global $wpdb, $wpsl, $wpsl_settings;
127
+
128
+ $store_data = array();
129
 
130
  /* Set the correct earth radius in either km or miles.
131
  * We need this to calculate the distance between two coordinates.
188
 
189
  $placeholder_values = apply_filters( 'wpsl_sql_placeholder_values', $placeholder_values );
190
 
191
+ /* The sql that will check which store locations fall within
192
  * the selected radius based on the lat and lng values.
193
  */
194
  $sql = apply_filters( 'wpsl_sql',
207
 
208
  $stores = $wpdb->get_results( $wpdb->prepare( $sql, $placeholder_values ) );
209
 
210
+ if ( $stores ) {
211
+ $store_data = apply_filters( 'wpsl_store_data', $this->get_store_meta_data( $stores ) );
 
 
 
 
 
212
  }
213
+
214
+ return $store_data;
215
  }
216
 
217
  /**
999
  }
1000
 
1001
  /**
1002
+ * Collect the CSS classes that are placed on the outer store locator div.
1003
  *
1004
  * @since 2.0
1005
  * @return string $classes The custom CSS rules
1262
  'distanceUnit' => $wpsl_settings['distance_unit'],
1263
  'geoLocationTimout' => apply_filters( 'wpsl_geolocation_timeout', 5000 ),
1264
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
1265
+ 'mapControls' => $this->get_map_controls(),
1266
+ 'mapTabAnchor' => apply_filters( 'wpsl_map_tab_anchor', 'wpsl-map-tab' )
1267
  );
1268
 
1269
  /* If the marker clusters are enabled, include the js file and marker settings */
js/wpsl-gmap.js CHANGED
@@ -1105,50 +1105,46 @@ function makeAjaxRequest( startLatLng, resetMap, autoLoad, infoWindow ) {
1105
 
1106
  /* Remove the preloaders and no results msg */
1107
  $( ".wpsl-preloader, .no-results" ).remove();
1108
-
1109
- if ( response.success !== false ) {
1110
- if ( response.length > 0 ) {
1111
-
1112
- /* Loop over the returned locations */
1113
- $.each( response, function( index ) {
1114
- _.extend( response[index], templateHelpers );
1115
-
1116
- /* Add the location maker to the map */
1117
- latLng = new google.maps.LatLng( response[index].lat, response[index].lng );
1118
- addMarker( latLng, response[index].id, response[index], draggable, infoWindow );
1119
-
1120
- /* Create the html output with help from underscore js */
1121
- storeData = storeData + _.template( template, response[index] );
1122
- });
1123
-
1124
- $( "#wpsl-result-list" ).off( "click", ".wpsl-directions" );
1125
-
1126
- /* Add the html for the store listing to the <ul> */
1127
- $storeList.append( storeData );
1128
-
1129
- $( "#wpsl-result-list" ).on( "click", ".wpsl-directions", function() {
1130
-
1131
- /* Check if we need to render the direction on the map. */
1132
- if ( wpslSettings.directionRedirect != 1 ) {
1133
- renderDirections( $( this ) );
1134
-
1135
- return false;
1136
- }
1137
- });
1138
 
1139
- /* Do we need to create a marker cluster? */
1140
- checkMarkerClusters();
1141
-
1142
- /* Make sure everything fits on the screen */
1143
- fitBounds();
1144
-
1145
- $( "#wpsl-result-list p:empty" ).remove();
1146
- } else {
1147
- $storeList.html( "<li class='no-results'>" + wpslLabels.noResults + "</li>" );
1148
- }
1149
- } else {
1150
- alert( wpslLabels.generalError );
1151
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1152
 
1153
  /* Store the default zoom and latlng values the first time
1154
  * all the stores are added to the map.
@@ -1885,7 +1881,8 @@ function closeDropdowns() {
1885
  * This code prevents the map from showing a large grey area if
1886
  * the store locator is placed in a tab, and that tab is actived.
1887
  *
1888
- * For this to code to work the #wpsl-map-tab anchor is required in the Store Locator tab.
 
1889
  *
1890
  * Note: If the "Attempt to auto-locate the user" option is enabled,
1891
  * and the user quickly switches to the store locator tab, before the
@@ -1898,9 +1895,9 @@ function closeDropdowns() {
1898
  * @see http://stackoverflow.com/questions/9458215/google-maps-not-working-in-jquery-tabs
1899
  * @since 2.0
1900
  */
1901
- if ( $( "a[href='#wpsl-map-tab']" ).length ) {
1902
  var mapZoom, mapCenter,
1903
- $wpsl_tab = $( "a[href='#wpsl-map-tab']" );
1904
 
1905
  $wpsl_tab.on( "click", function() {
1906
  setTimeout( function() {
1105
 
1106
  /* Remove the preloaders and no results msg */
1107
  $( ".wpsl-preloader, .no-results" ).remove();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1108
 
1109
+ if ( response.length > 0 ) {
1110
+
1111
+ /* Loop over the returned locations */
1112
+ $.each( response, function( index ) {
1113
+ _.extend( response[index], templateHelpers );
1114
+
1115
+ /* Add the location maker to the map */
1116
+ latLng = new google.maps.LatLng( response[index].lat, response[index].lng );
1117
+ addMarker( latLng, response[index].id, response[index], draggable, infoWindow );
1118
+
1119
+ /* Create the html output with help from underscore js */
1120
+ storeData = storeData + _.template( template, response[index] );
1121
+ });
1122
+
1123
+ $( "#wpsl-result-list" ).off( "click", ".wpsl-directions" );
1124
+
1125
+ /* Add the html for the store listing to the <ul> */
1126
+ $storeList.append( storeData );
1127
+
1128
+ $( "#wpsl-result-list" ).on( "click", ".wpsl-directions", function() {
1129
+
1130
+ /* Check if we need to render the direction on the map. */
1131
+ if ( wpslSettings.directionRedirect != 1 ) {
1132
+ renderDirections( $( this ) );
1133
+
1134
+ return false;
1135
+ }
1136
+ });
1137
+
1138
+ /* Do we need to create a marker cluster? */
1139
+ checkMarkerClusters();
1140
+
1141
+ /* Make sure everything fits on the screen */
1142
+ fitBounds();
1143
+
1144
+ $( "#wpsl-result-list p:empty" ).remove();
1145
+ } else {
1146
+ $storeList.html( "<li class='no-results'>" + wpslLabels.noResults + "</li>" );
1147
+ }
1148
 
1149
  /* Store the default zoom and latlng values the first time
1150
  * all the stores are added to the map.
1881
  * This code prevents the map from showing a large grey area if
1882
  * the store locator is placed in a tab, and that tab is actived.
1883
  *
1884
+ * The default map anchor is set to 'wpsl-map-tab', but you can
1885
+ * change this with the 'wpsl_map_tab_anchor' filter.
1886
  *
1887
  * Note: If the "Attempt to auto-locate the user" option is enabled,
1888
  * and the user quickly switches to the store locator tab, before the
1895
  * @see http://stackoverflow.com/questions/9458215/google-maps-not-working-in-jquery-tabs
1896
  * @since 2.0
1897
  */
1898
+ if ( $( "a[href='#" + wpslSettings.mapTabAnchor + "']" ).length ) {
1899
  var mapZoom, mapCenter,
1900
+ $wpsl_tab = $( "a[href='#" + wpslSettings.mapTabAnchor + "']" );
1901
 
1902
  $wpsl_tab.on( "click", function() {
1903
  setTimeout( function() {
js/wpsl-gmap.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(e){function t(t,n){var a,c,w,u,m,h,v,S=Number(wpslSettings.autoZoomLevel);c=o(n),w=l(),G=new google.maps.Geocoder,K=new google.maps.DirectionsRenderer,F=new google.maps.DirectionsService,a={zoom:Number(c.zoomLevel),center:c.startLatLng,mapTypeId:google.maps.MapTypeId[c.mapType.toUpperCase()],mapTypeControl:Number(c.mapTypeControl)?!0:!1,panControl:Number(c.panControls)?!0:!1,scrollwheel:Number(c.scrollWheel)?!0:!1,streetViewControl:Number(c.streetView)?!0:!1,zoomControlOptions:{style:google.maps.ZoomControlStyle[c.controlStyle.toUpperCase()],position:google.maps.ControlPosition[c.controlPosition.toUpperCase()+"_TOP"]}},j=new google.maps.Map(document.getElementById(t),a),i(c.mapStyle),"undefined"!=typeof window["wpslMap_"+n]&&"undefined"!=typeof window["wpslMap_"+n].locations&&(m=new google.maps.LatLngBounds,h=window["wpslMap_"+n].locations,v=h.length,e.each(h,function(e){u=new google.maps.LatLng(h[e].lat,h[e].lng),N(u,h[e].id,h[e],!1,w),m.extend(u)}),j.fitBounds(m),google.maps.event.addListenerOnce(j,"bounds_changed",function(e){return function(){e.getZoom()>S&&e.setZoom(S)}}(j))),e("#wpsl-gmap").length&&(!p()&&e(".wpsl-dropdown").length?A():(e("#wpsl-search-wrap select").show(),e("#wpsl-wrap").addClass("wpsl-mobile")),1==wpslSettings.autoLocate?d(c.startLatLng,w):1==wpslSettings.autoLoad&&r(c.startLatLng,w),1!=wpslSettings.mouseFocus||p()||e("#wpsl-search-input").focus(),g(w),f(c,j,w)),s()}function s(){"undefined"!=typeof wpslSettings.markerZoomTo&&1==wpslSettings.markerZoomTo&&google.maps.event.addListener(j,"zoom_changed",function(){R()})}function o(e){var t,s,o,l=["zoomLevel","mapType","mapTypeControl","mapStyle","streetView","panControls","scrollWheel","controlPosition","controlStyle"],i={zoomLevel:wpslSettings.zoomLevel,mapType:wpslSettings.mapType,mapTypeControl:wpslSettings.mapTypeControl,mapStyle:wpslSettings.mapStyle,streetView:wpslSettings.streetView,panControls:wpslSettings.panControls,scrollWheel:wpslSettings.scrollWheel,controlPosition:wpslSettings.controlPosition,controlStyle:wpslSettings.controlStyle};if("undefined"!=typeof window["wpslMap_"+e]&&"undefined"!=typeof window["wpslMap_"+e].shortCode)for(t=0,s=l.length;s>t;t++)o=window["wpslMap_"+e].shortCode[l[t]],"undefined"!=typeof o&&(i[l[t]]=o);return i.startLatLng=n(e),i}function n(e){var t,s,o="";return"undefined"!=typeof window["wpslMap_"+e]&&"undefined"!=typeof window["wpslMap_"+e].locations&&(o=window["wpslMap_"+e].locations[0]),"undefined"!=typeof o&&"undefined"!=typeof o.lat&&"undefined"!=typeof o.lng?t=new google.maps.LatLng(o.lat,o.lng):""!==wpslSettings.zoomLatlng?(s=wpslSettings.zoomLatlng.split(","),t=new google.maps.LatLng(s[0],s[1])):t=new google.maps.LatLng(0,0),t}function l(){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)},q=new InfoBox(s)):q=new google.maps.InfoWindow,q}function i(e){e=a(e),e&&j.setOptions({styles:e})}function a(e){try{var t=JSON.parse(e);if(t&&"object"==typeof t&&null!==t)return t}catch(s){}return!1}function r(e,t){var s={store:wpslLabels.startPoint};N(e,0,s,!0,t),I(e,nt,it,t)}function p(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function d(t,s){if(navigator.geolocation){var o,n,l=!1,i=Number(wpslSettings.geoLocationTimout);o=setInterval(function(){e(".wpsl-icon-direction").toggleClass("wpsl-active-icon")},600),n=setTimeout(function(){c(o),r(t,s)},i),navigator.geolocation.getCurrentPosition(function(e){c(o),clearTimeout(n),U(l),w(t,e,nt,s)},function(o){if(e(".wpsl-icon-direction").hasClass("wpsl-user-activated")){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 clearTimeout(n),r(t,s)},{maximumAge:6e4,timeout:i,enableHighAccuracy:!0})}else alert(wpslGeolocationErrors.unavailable),r(t,s)}function c(t){clearInterval(t),e(".wpsl-icon-direction").removeClass("wpsl-active-icon")}function w(e,t,s,o){if("undefined"==typeof t)r(e,o);else{var n=new google.maps.LatLng(t.coords.latitude,t.coords.longitude);H=t,C(n),j.setCenter(n),N(n,0,"",!0),I(n,s,it,o)}}function g(t){e("#wpsl-search-btn").on("click",function(){var s=!1;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(),nt=!1,u(),U(s),h(),y(t)):e("#wpsl-search-input").addClass("wpsl-error").focus()})}function u(){"undefined"!=typeof wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&"undefined"!=typeof et[0]&&et[0].close()}function f(t,s,o){google.maps.event.addListenerOnce(s,"tilesloaded",function(){e(".gm-style").append(wpslSettings.mapControls),e(".wpsl-icon-reset, #wpsl-reset-map").length>0&&(m(t.startLatLng,o),e(".wpsl-icon-reset").hide()),e(".wpsl-icon-direction").on("click",function(){e(this).addClass("wpsl-user-activated"),d(t.startLatLng,o)})})}function m(t,s){e(".wpsl-icon-reset, #wpsl-reset-map").on("click",function(){var o=!1,n=!0;e(this).hasClass("wpsl-in-progress")||(1==wpslSettings.autoLoad&&(it=1),(j.getCenter().lat()!==ot.centerLatlng.lat()||j.getCenter().lng()!==ot.centerLatlng.lng()||j.getZoom()!==ot.zoomLevel)&&(U(o),e("#wpsl-search-input").val("").removeClass(),e(".wpsl-icon-reset").addClass("wpsl-in-progress"),Y&&Y.clearMarkers(),h(),v(),1==wpslSettings.autoLocate?w(t,H,n,s):r(t,s)),e("#wpsl-stores").show(),e("#wpsl-direction-details").hide())})}function h(){"undefined"!=typeof J&&""!==J&&(J.setMap(null),J="")}function v(){var t,s,o,n,l=[wpslSettings.searchRadius+" "+wpslSettings.distanceUnit,wpslSettings.maxResults],i=["wpsl-radius","wpsl-results"];for(t=0,s=i.length;s>t;t++)e("#"+i[t]+" select").val(parseInt(l[t])),e("#"+i[t]+" li").removeClass(),"wpsl-radius"==i[t]?o=wpslSettings.searchRadius:"wpsl-results"==i[t]&&(o=wpslSettings.maxResults),e("#"+i[t]+" li").each(function(){e(this).text()===l[t]&&(e(this).addClass("wpsl-selected-dropdown"),e("#"+i[t]+" .wpsl-selected-item").html(l[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"),n=e("#wpsl-category li:first-child").text(),e("#wpsl-category .wpsl-selected-item").html(n).attr("data-value",0))}function S(t){var s,o,n,l,i;for(u(),i=t.parents("li").length>0?t.parents("li").data("store-id"):t.parents(".wpsl-info-window").data("store-id"),"undefined"!=typeof J&&""!==J&&(o=J.getPosition()),st={centerLatlng:j.getCenter(),zoomLevel:j.getZoom()},s=0,l=tt.length;l>s;s++)0!=tt[s].storeId||"undefined"!=typeof o&&""!==o?tt[s].storeId==i&&(n=tt[s].getPosition()):o=tt[s].getPosition();o&&n?(e("#wpsl-direction-details ul").empty(),e(".wpsl-direction-before, .wpsl-direction-after").remove(),b(o,n)):alert(wpslLabels.generalError)}function L(e,t){var s,o,n;for(s=0,o=tt.length;o>s;s++)tt[s].storeId==e&&(n=tt[s],n.setAnimation("start"==t?google.maps.Animation.BOUNCE:null))}function b(t,s){var o,n,l,i,a,r,p,d,c,w="",g={};d="km"==wpslSettings.distanceUnit?"METRIC":"IMPERIAL",g={origin:t,destination:s,travelMode:google.maps.DirectionsTravelMode.DRIVING,unitSystem:google.maps.UnitSystem[d]},F.route(g,function(t,s){if(s==google.maps.DirectionsStatus.OK){if(K.setMap(j),K.setDirections(t),t.routes.length>0){for(a=t.routes[0],r=0;r<a.legs.length;r++)for(o=a.legs[r],p=0,n=o.steps.length;n>p;p++)l=o.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,n=tt.length;n>r;r++)tt[r].setMap(null);Y&&Y.clearMarkers(),"undefined"!=typeof J&&""!==J&&J.setMap(null),e("#wpsl-stores").hide(),1==wpslSettings.templateId&&(c=e("#wpsl-gmap").offset(),e(window).scrollTop(c.top))}}else W(s)})}function y(t){var s,o=!1,n=!1,l=e("#wpsl-search-input").val();G.geocode({address:l},function(e,l){l==google.maps.GeocoderStatus.OK?(s=e[0].geometry.location,U(n),N(s,0,"",!0,t),I(s,nt,o,t)):$(l)})}function C(t){var s;G.geocode({latLng:t},function(t,o){o==google.maps.GeocoderStatus.OK?(s=k(t),""!==s&&e("#wpsl-search-input").val(s)):$(o)})}function k(e){var t,s,o,n=e[0].address_components.length;for(o=0;n>o;o++)s=e[0].address_components[o].types,(/^postal_code$/.test(s)||/^postal_code_prefix,postal_code$/.test(s))&&(t=e[0].address_components[o].long_name);return t}function I(e,t,s,o){1==wpslSettings.directionRedirect?x(e,function(){E(e,t,s,o)}):E(e,t,s,o)}function x(e,t){G.geocode({latLng:e},function(e,s){s==google.maps.GeocoderStatus.OK?(X=e[0].formatted_address,t()):$(s)})}function E(t,s,o,n){var l,i,a,r="",d="",c=!1,w=e("#wpsl-wrap").hasClass("wpsl-mobile"),g=e("#wpsl-listing-template").html(),u=e("#wpsl-stores ul"),f=wpslSettings.path+"img/ajax-loader.gif",m={action:"store_search",lat:t.lat(),lng:t.lng()};s?(m.max_results=wpslSettings.maxResults,m.radius=wpslSettings.searchRadius):(w?(i=parseInt(e("#wpsl-results .wpsl-dropdown").val()),a=parseInt(e("#wpsl-radius .wpsl-dropdown").val())):(i=parseInt(e("#wpsl-results .wpsl-selected-item").attr("data-value")),a=parseInt(e("#wpsl-radius .wpsl-selected-item").attr("data-value"))),m.max_results=isNaN(i)?wpslSettings.maxResults:i,m.radius=isNaN(a)?wpslSettings.searchRadius:a,e("#wpsl-category").length>0&&(d=parseInt(w?e("#wpsl-category .wpsl-dropdown").val():e("#wpsl-category .wpsl-selected-item").attr("data-value")),isNaN(d)||0===d||(m.filter=d))),1==o&&(m.autoload=1,"undefined"!=typeof H&&(m.skip_cache=1)),u.empty().append("<li class='wpsl-preloader'><img src='"+f+"'/>"+wpslLabels.preloader+"</li>"),e.get(wpslSettings.ajaxurl,m,function(t){e(".wpsl-preloader, .no-results").remove(),t.success!==!1?t.length>0?(e.each(t,function(e){_.extend(t[e],wt),l=new google.maps.LatLng(t[e].lat,t[e].lng),N(l,t[e].id,t[e],c,n),r+=_.template(g,t[e])}),e("#wpsl-result-list").off("click",".wpsl-directions"),u.append(r),e("#wpsl-result-list").on("click",".wpsl-directions",function(){return 1!=wpslSettings.directionRedirect?(S(e(this)),!1):void 0}),M(),B(),e("#wpsl-result-list p:empty").remove()):u.html("<li class='no-results'>"+wpslLabels.noResults+"</li>"):alert(wpslLabels.generalError),1==wpslSettings.resetMap&&(e.isEmptyObject(ot)&&google.maps.event.addListenerOnce(j,"tilesloaded",function(){ot={centerLatlng:j.getCenter(),zoomLevel:j.getZoom()},e(".wpsl-icon-direction").addClass("wpsl-reset-exists"),e(".wpsl-icon-reset, #wpsl-reset-map").show()}),e(".wpsl-icon-reset").removeClass("wpsl-in-progress"))}),1!=wpslSettings.mouseFocus||p()||e("#wpsl-search-input").focus()}function M(){if(1==wpslSettings.markerClusters){var e=Number(wpslSettings.clusterZoom),t=Number(wpslSettings.clusterSize);isNaN(e)&&(e=""),isNaN(t)&&(t=""),Y=new MarkerClusterer(j,tt,{gridSize:t,maxZoom:e})}}function N(e,t,s,o,n){var l,i,a,r=!0;l=0===t?wpslSettings.path+"img/markers/"+wpslSettings.startMarker:wpslSettings.path+"img/markers/"+wpslSettings.storeMarker,i={url:l,scaledSize:new google.maps.Size(24,35),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(12,35)},a=new google.maps.Marker({position:e,map:j,optimized:!1,title:s.store,draggable:o,storeId:t,icon:i}),tt.push(a),google.maps.event.addListener(a,"click",function(o){return function(){0!=t?"undefined"!=typeof wpslSettings.markerStreetView&&1==wpslSettings.markerStreetView?Z(e,function(){P(a,V(s),n,o)}):P(a,V(s),n,o):P(a,wpslLabels.startPoint,n,o),google.maps.event.clearListeners(n,"domready"),google.maps.event.addListener(n,"domready",function(){O(a,o),R()})}}(j)),o&&google.maps.event.addListener(a,"dragend",function(e){U(r),j.setCenter(e.latLng),C(e.latLng),I(e.latLng,nt,it=!1,n)})}function P(e,t,s,o){et.length=0,s.setContent(t),s.open(o,e),et.push(s),"undefined"!=typeof wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&1==wpslSettings.markerClusters&&(Q=e.storeId,s.setVisible(!0))}function O(t,s){e(".wpsl-info-actions a").on("click",function(o){var n=Number(wpslSettings.autoZoomLevel);if(o.stopImmediatePropagation(),e(this).hasClass("wpsl-directions")){if(1==wpslSettings.directionRedirect)return!0;S(e(this))}else e(this).hasClass("wpsl-streetview")?T(t,s):e(this).hasClass("wpsl-zoom-here")&&(s.setCenter(t.getPosition()),s.setZoom(n));return!1})}function R(){var t=j.getZoom();t>=wpslSettings.autoZoomLevel?e(".wpsl-zoom-here").hide():e(".wpsl-zoom-here").show()}function T(t,s){var o=s.getStreetView();o.setPosition(t.getPosition()),o.setVisible(!0),e("#wpsl-map-controls").hide(),z(o,s)}function z(t,s){google.maps.event.addListener(t,"visible_changed",function(){if(!t.getVisible()){var o=s.getZoom();e("#wpsl-map-controls").show(),s.setZoom(o-1),s.setZoom(o)}})}function Z(e,t){var s=new google.maps.StreetViewService;s.getPanoramaByLocation(e,50,function(e,s){lt=s==google.maps.StreetViewStatus.OK?!0:!1,t()})}function V(t){var s,o;return o=e("#wpsl-base-gmap_0").length?e("#wpsl-cpt-info-window-template").html():e("#wpsl-info-window-template").html(),s=_.template(o,t)}function B(){var e,t,s=Number(wpslSettings.autoZoomLevel),o=new google.maps.LatLngBounds;for(google.maps.event.addListenerOnce(j,"bounds_changed",function(){this.getZoom()>s&&this.setZoom(s)}),e=0,t=tt.length;t>e;e++)o.extend(tt[e].position);j.fitBounds(o)}function U(e){var t,s;if(K.setMap(null),tt){for(s=0,t=tt.length;t>s;s++)e?1!=tt[s].draggable?tt[s].setMap(null):J=tt[s]:tt[s].setMap(null);tt.length=0}Y&&Y.clearMarkers()}function $(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 W(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 A(){e(".wpsl-dropdown").each(function(){var t,s,o=e(this);o.$dropdownWrap=o.wrap("<div class='wpsl-dropdown'></div>").parent(),o.$selectedVal=o.val(),o.$dropdownElem=e("<div><ul/></div>").appendTo(o.$dropdownWrap),o.$dropdown=o.$dropdownElem.find("ul"),o.$options=o.$dropdownWrap.find("option"),o.hide().removeClass("wpsl-dropdown"),e.each(o.$options,function(){t=e(this).val()==o.$selectedVal?'class="wpsl-selected-dropdown"':"",o.$dropdown.append("<li data-value="+e(this).val()+" "+t+">"+e(this).text()+"</li>")}),o.$dropdownElem.before("<span data-value="+o.find(":selected").val()+" class='wpsl-selected-item'>"+o.find(":selected").text()+"</span>"),o.$dropdownItem=o.$dropdownElem.find("li"),o.$dropdownWrap.on("click",function(t){D(),e(this).toggleClass("wpsl-active"),s=0,e(this).hasClass("wpsl-active")?(o.$dropdownItem.each(function(){s+=e(this).outerHeight()}),o.$dropdownElem.css("height",s+2+"px")):o.$dropdownElem.css("height",0),t.stopPropagation()}),o.$dropdownItem.on("click",function(t){o.$dropdownWrap.find(e(".wpsl-selected-item")).html(e(this).text()).attr("data-value",e(this).attr("data-value")),o.$dropdownItem.removeClass("wpsl-selected-dropdown"),e(this).addClass("wpsl-selected-dropdown"),D(),t.stopPropagation()})}),e(document).click(function(){D()})}function D(){e(".wpsl-dropdown").removeClass("wpsl-active"),e(".wpsl-dropdown div").css("height",0)}var G,j,K,F,H,Q,q,Y,J,X,et=[],tt=[],st={},ot={},nt=!1,lt=!1,it="undefined"!=typeof wpslSettings?wpslSettings.autoLoad:"";if(_.templateSettings={evaluate:/\<\%(.+?)\%\>/g,interpolate:/\<\%=(.+?)\%\>/g,escape:/\<\%-(.+?)\%\>/g},e(".wpsl-gmap-canvas").length&&(e("<img />").attr("src",wpslSettings.path+"img/ajax-loader.gif"),e(".wpsl-gmap-canvas").each(function(s){var o=e(this).attr("id");t(o,s)})),e("#wpsl-result-list").on("click",".wpsl-back",function(){var t,s;for(K.setMap(null),t=0,s=tt.length;s>t;t++)tt[t].setMap(j);return"undefined"!=typeof J&&""!==J&&J.setMap(j),Y&&M(),j.setCenter(st.centerLatlng),j.setZoom(st.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(){L(e(this).data("store-id"),"start")}),e("#wpsl-stores").on("mouseleave","li",function(){L(e(this).data("store-id"),"stop")})):"info_window"==wpslSettings.markerEffect&&e("#wpsl-stores").on("mouseenter","li",function(){var t,s;for(t=0,s=tt.length;s>t;t++)tt[t].storeId==e(this).data("store-id")&&(google.maps.event.trigger(tt[t],"click"),j.setCenter(tt[t].position))})),"undefined"!=typeof wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&1==wpslSettings.markerClusters){var at,rt,pt,dt,ct;google.maps.event.addListener(j,"zoom_changed",function(){google.maps.event.addListenerOnce(j,"idle",function(){if("undefined"!=typeof Y&&(at=Y.clusters_,at.length))for(dt=0,rt=at.length;rt>dt;dt++)for(ct=0,pt=at[dt].markers_.length;pt>ct;ct++)if(at[dt].markers_[ct].storeId==Q){q.getVisible()&&null===at[dt].markers_[ct].map?q.setVisible(!1):q.getVisible()||null===at[dt].markers_[ct].map||q.setVisible(!0);break}})})}var wt={formatPhoneNumber:function(e){return 1==wpslSettings.phoneUrl&&p()&&(e="<a href='tel:"+wt.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="",n="";return e("#wpsl-gmap").length&&(lt&&(o="<a class='wpsl-streetview' href='#'>"+wpslLabels.streetView+"</a>"),1==wpslSettings.markerZoomTo&&(n="<a class='wpsl-zoom-here' href='#'>"+wpslLabels.zoomHere+"</a>"),s="<div class='wpsl-info-actions'>"+wt.createDirectionUrl(t)+o+n+"</div>"),s},createDirectionUrl:function(t){var s,o,n,l={};return 1==wpslSettings.directionRedirect?("undefined"==typeof X&&(X=""),l.target="target='_blank'","undefined"!=typeof t?l.src=e("[data-store-id="+t+"] .wpsl-directions").attr("href"):(n=this.zip?this.zip+", ":"",o=this.address+", "+this.city+", "+n+this.country,l.src="https://maps.google.com/maps?saddr="+wt.rfc3986EncodeURIComponent(X)+"&daddr="+wt.rfc3986EncodeURIComponent(o))):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)}};if(e("#wpsl-search-input").keydown(function(t){var s=t.keyCode||t.which;13==s&&e("#wpsl-search-btn").trigger("click")}),e("#wpsl-stores").on("click",".wpsl-store-details",function(){var t,s,o=e(this).parents("li"),n=o.data("store-id");if("info window"==wpslSettings.moreInfoLocation)for(t=0,s=tt.length;s>t;t++)tt[t].storeId==n&&google.maps.event.trigger(tt[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();return"default"!=wpslSettings.templateId||"store listings"==wpslSettings.moreInfoLocation?!1:void 0}),e("a[href='#wpsl-map-tab']").length){var gt,ut,ft=e("a[href='#wpsl-map-tab']");ft.on("click",function(){return setTimeout(function(){gt=j.getZoom(),ut=j.getCenter(),google.maps.event.trigger(j,"resize"),j.setZoom(gt),j.setCenter(ut),B()},50),!1})}});
1
+ jQuery(document).ready(function(e){function t(t,n){var a,c,w,u,m,h,v,S=Number(wpslSettings.autoZoomLevel);c=o(n),w=l(),G=new google.maps.Geocoder,K=new google.maps.DirectionsRenderer,F=new google.maps.DirectionsService,a={zoom:Number(c.zoomLevel),center:c.startLatLng,mapTypeId:google.maps.MapTypeId[c.mapType.toUpperCase()],mapTypeControl:Number(c.mapTypeControl)?!0:!1,panControl:Number(c.panControls)?!0:!1,scrollwheel:Number(c.scrollWheel)?!0:!1,streetViewControl:Number(c.streetView)?!0:!1,zoomControlOptions:{style:google.maps.ZoomControlStyle[c.controlStyle.toUpperCase()],position:google.maps.ControlPosition[c.controlPosition.toUpperCase()+"_TOP"]}},j=new google.maps.Map(document.getElementById(t),a),i(c.mapStyle),"undefined"!=typeof window["wpslMap_"+n]&&"undefined"!=typeof window["wpslMap_"+n].locations&&(m=new google.maps.LatLngBounds,h=window["wpslMap_"+n].locations,v=h.length,e.each(h,function(e){u=new google.maps.LatLng(h[e].lat,h[e].lng),N(u,h[e].id,h[e],!1,w),m.extend(u)}),j.fitBounds(m),google.maps.event.addListenerOnce(j,"bounds_changed",function(e){return function(){e.getZoom()>S&&e.setZoom(S)}}(j))),e("#wpsl-gmap").length&&(!p()&&e(".wpsl-dropdown").length?A():(e("#wpsl-search-wrap select").show(),e("#wpsl-wrap").addClass("wpsl-mobile")),1==wpslSettings.autoLocate?d(c.startLatLng,w):1==wpslSettings.autoLoad&&r(c.startLatLng,w),1!=wpslSettings.mouseFocus||p()||e("#wpsl-search-input").focus(),g(w),f(c,j,w)),s()}function s(){"undefined"!=typeof wpslSettings.markerZoomTo&&1==wpslSettings.markerZoomTo&&google.maps.event.addListener(j,"zoom_changed",function(){O()})}function o(e){var t,s,o,l=["zoomLevel","mapType","mapTypeControl","mapStyle","streetView","panControls","scrollWheel","controlPosition","controlStyle"],i={zoomLevel:wpslSettings.zoomLevel,mapType:wpslSettings.mapType,mapTypeControl:wpslSettings.mapTypeControl,mapStyle:wpslSettings.mapStyle,streetView:wpslSettings.streetView,panControls:wpslSettings.panControls,scrollWheel:wpslSettings.scrollWheel,controlPosition:wpslSettings.controlPosition,controlStyle:wpslSettings.controlStyle};if("undefined"!=typeof window["wpslMap_"+e]&&"undefined"!=typeof window["wpslMap_"+e].shortCode)for(t=0,s=l.length;s>t;t++)o=window["wpslMap_"+e].shortCode[l[t]],"undefined"!=typeof o&&(i[l[t]]=o);return i.startLatLng=n(e),i}function n(e){var t,s,o="";return"undefined"!=typeof window["wpslMap_"+e]&&"undefined"!=typeof window["wpslMap_"+e].locations&&(o=window["wpslMap_"+e].locations[0]),"undefined"!=typeof o&&"undefined"!=typeof o.lat&&"undefined"!=typeof o.lng?t=new google.maps.LatLng(o.lat,o.lng):""!==wpslSettings.zoomLatlng?(s=wpslSettings.zoomLatlng.split(","),t=new google.maps.LatLng(s[0],s[1])):t=new google.maps.LatLng(0,0),t}function l(){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)},q=new InfoBox(s)):q=new google.maps.InfoWindow,q}function i(e){e=a(e),e&&j.setOptions({styles:e})}function a(e){try{var t=JSON.parse(e);if(t&&"object"==typeof t&&null!==t)return t}catch(s){}return!1}function r(e,t){var s={store:wpslLabels.startPoint};N(e,0,s,!0,t),I(e,nt,it,t)}function p(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function d(t,s){if(navigator.geolocation){var o,n,l=!1,i=Number(wpslSettings.geoLocationTimout);o=setInterval(function(){e(".wpsl-icon-direction").toggleClass("wpsl-active-icon")},600),n=setTimeout(function(){c(o),r(t,s)},i),navigator.geolocation.getCurrentPosition(function(e){c(o),clearTimeout(n),U(l),w(t,e,nt,s)},function(o){if(e(".wpsl-icon-direction").hasClass("wpsl-user-activated")){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 clearTimeout(n),r(t,s)},{maximumAge:6e4,timeout:i,enableHighAccuracy:!0})}else alert(wpslGeolocationErrors.unavailable),r(t,s)}function c(t){clearInterval(t),e(".wpsl-icon-direction").removeClass("wpsl-active-icon")}function w(e,t,s,o){if("undefined"==typeof t)r(e,o);else{var n=new google.maps.LatLng(t.coords.latitude,t.coords.longitude);H=t,C(n),j.setCenter(n),N(n,0,"",!0),I(n,s,it,o)}}function g(t){e("#wpsl-search-btn").on("click",function(){var s=!1;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(),nt=!1,u(),U(s),h(),y(t)):e("#wpsl-search-input").addClass("wpsl-error").focus()})}function u(){"undefined"!=typeof wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&"undefined"!=typeof et[0]&&et[0].close()}function f(t,s,o){google.maps.event.addListenerOnce(s,"tilesloaded",function(){e(".gm-style").append(wpslSettings.mapControls),e(".wpsl-icon-reset, #wpsl-reset-map").length>0&&(m(t.startLatLng,o),e(".wpsl-icon-reset").hide()),e(".wpsl-icon-direction").on("click",function(){e(this).addClass("wpsl-user-activated"),d(t.startLatLng,o)})})}function m(t,s){e(".wpsl-icon-reset, #wpsl-reset-map").on("click",function(){var o=!1,n=!0;e(this).hasClass("wpsl-in-progress")||(1==wpslSettings.autoLoad&&(it=1),(j.getCenter().lat()!==ot.centerLatlng.lat()||j.getCenter().lng()!==ot.centerLatlng.lng()||j.getZoom()!==ot.zoomLevel)&&(U(o),e("#wpsl-search-input").val("").removeClass(),e(".wpsl-icon-reset").addClass("wpsl-in-progress"),Y&&Y.clearMarkers(),h(),v(),1==wpslSettings.autoLocate?w(t,H,n,s):r(t,s)),e("#wpsl-stores").show(),e("#wpsl-direction-details").hide())})}function h(){"undefined"!=typeof J&&""!==J&&(J.setMap(null),J="")}function v(){var t,s,o,n,l=[wpslSettings.searchRadius+" "+wpslSettings.distanceUnit,wpslSettings.maxResults],i=["wpsl-radius","wpsl-results"];for(t=0,s=i.length;s>t;t++)e("#"+i[t]+" select").val(parseInt(l[t])),e("#"+i[t]+" li").removeClass(),"wpsl-radius"==i[t]?o=wpslSettings.searchRadius:"wpsl-results"==i[t]&&(o=wpslSettings.maxResults),e("#"+i[t]+" li").each(function(){e(this).text()===l[t]&&(e(this).addClass("wpsl-selected-dropdown"),e("#"+i[t]+" .wpsl-selected-item").html(l[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"),n=e("#wpsl-category li:first-child").text(),e("#wpsl-category .wpsl-selected-item").html(n).attr("data-value",0))}function S(t){var s,o,n,l,i;for(u(),i=t.parents("li").length>0?t.parents("li").data("store-id"):t.parents(".wpsl-info-window").data("store-id"),"undefined"!=typeof J&&""!==J&&(o=J.getPosition()),st={centerLatlng:j.getCenter(),zoomLevel:j.getZoom()},s=0,l=tt.length;l>s;s++)0!=tt[s].storeId||"undefined"!=typeof o&&""!==o?tt[s].storeId==i&&(n=tt[s].getPosition()):o=tt[s].getPosition();o&&n?(e("#wpsl-direction-details ul").empty(),e(".wpsl-direction-before, .wpsl-direction-after").remove(),b(o,n)):alert(wpslLabels.generalError)}function L(e,t){var s,o,n;for(s=0,o=tt.length;o>s;s++)tt[s].storeId==e&&(n=tt[s],n.setAnimation("start"==t?google.maps.Animation.BOUNCE:null))}function b(t,s){var o,n,l,i,a,r,p,d,c,w="",g={};d="km"==wpslSettings.distanceUnit?"METRIC":"IMPERIAL",g={origin:t,destination:s,travelMode:google.maps.DirectionsTravelMode.DRIVING,unitSystem:google.maps.UnitSystem[d]},F.route(g,function(t,s){if(s==google.maps.DirectionsStatus.OK){if(K.setMap(j),K.setDirections(t),t.routes.length>0){for(a=t.routes[0],r=0;r<a.legs.length;r++)for(o=a.legs[r],p=0,n=o.steps.length;n>p;p++)l=o.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,n=tt.length;n>r;r++)tt[r].setMap(null);Y&&Y.clearMarkers(),"undefined"!=typeof J&&""!==J&&J.setMap(null),e("#wpsl-stores").hide(),1==wpslSettings.templateId&&(c=e("#wpsl-gmap").offset(),e(window).scrollTop(c.top))}}else W(s)})}function y(t){var s,o=!1,n=!1,l=e("#wpsl-search-input").val();G.geocode({address:l},function(e,l){l==google.maps.GeocoderStatus.OK?(s=e[0].geometry.location,U(n),N(s,0,"",!0,t),I(s,nt,o,t)):$(l)})}function C(t){var s;G.geocode({latLng:t},function(t,o){o==google.maps.GeocoderStatus.OK?(s=k(t),""!==s&&e("#wpsl-search-input").val(s)):$(o)})}function k(e){var t,s,o,n=e[0].address_components.length;for(o=0;n>o;o++)s=e[0].address_components[o].types,(/^postal_code$/.test(s)||/^postal_code_prefix,postal_code$/.test(s))&&(t=e[0].address_components[o].long_name);return t}function I(e,t,s,o){1==wpslSettings.directionRedirect?x(e,function(){E(e,t,s,o)}):E(e,t,s,o)}function x(e,t){G.geocode({latLng:e},function(e,s){s==google.maps.GeocoderStatus.OK?(X=e[0].formatted_address,t()):$(s)})}function E(t,s,o,n){var l,i,a,r="",d="",c=!1,w=e("#wpsl-wrap").hasClass("wpsl-mobile"),g=e("#wpsl-listing-template").html(),u=e("#wpsl-stores ul"),f=wpslSettings.path+"img/ajax-loader.gif",m={action:"store_search",lat:t.lat(),lng:t.lng()};s?(m.max_results=wpslSettings.maxResults,m.radius=wpslSettings.searchRadius):(w?(i=parseInt(e("#wpsl-results .wpsl-dropdown").val()),a=parseInt(e("#wpsl-radius .wpsl-dropdown").val())):(i=parseInt(e("#wpsl-results .wpsl-selected-item").attr("data-value")),a=parseInt(e("#wpsl-radius .wpsl-selected-item").attr("data-value"))),m.max_results=isNaN(i)?wpslSettings.maxResults:i,m.radius=isNaN(a)?wpslSettings.searchRadius:a,e("#wpsl-category").length>0&&(d=parseInt(w?e("#wpsl-category .wpsl-dropdown").val():e("#wpsl-category .wpsl-selected-item").attr("data-value")),isNaN(d)||0===d||(m.filter=d))),1==o&&(m.autoload=1,"undefined"!=typeof H&&(m.skip_cache=1)),u.empty().append("<li class='wpsl-preloader'><img src='"+f+"'/>"+wpslLabels.preloader+"</li>"),e.get(wpslSettings.ajaxurl,m,function(t){e(".wpsl-preloader, .no-results").remove(),t.length>0?(e.each(t,function(e){_.extend(t[e],wt),l=new google.maps.LatLng(t[e].lat,t[e].lng),N(l,t[e].id,t[e],c,n),r+=_.template(g,t[e])}),e("#wpsl-result-list").off("click",".wpsl-directions"),u.append(r),e("#wpsl-result-list").on("click",".wpsl-directions",function(){return 1!=wpslSettings.directionRedirect?(S(e(this)),!1):void 0}),M(),B(),e("#wpsl-result-list p:empty").remove()):u.html("<li class='no-results'>"+wpslLabels.noResults+"</li>"),1==wpslSettings.resetMap&&(e.isEmptyObject(ot)&&google.maps.event.addListenerOnce(j,"tilesloaded",function(){ot={centerLatlng:j.getCenter(),zoomLevel:j.getZoom()},e(".wpsl-icon-direction").addClass("wpsl-reset-exists"),e(".wpsl-icon-reset, #wpsl-reset-map").show()}),e(".wpsl-icon-reset").removeClass("wpsl-in-progress"))}),1!=wpslSettings.mouseFocus||p()||e("#wpsl-search-input").focus()}function M(){if(1==wpslSettings.markerClusters){var e=Number(wpslSettings.clusterZoom),t=Number(wpslSettings.clusterSize);isNaN(e)&&(e=""),isNaN(t)&&(t=""),Y=new MarkerClusterer(j,tt,{gridSize:t,maxZoom:e})}}function N(e,t,s,o,n){var l,i,a,r=!0;l=0===t?wpslSettings.path+"img/markers/"+wpslSettings.startMarker:wpslSettings.path+"img/markers/"+wpslSettings.storeMarker,i={url:l,scaledSize:new google.maps.Size(24,35),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(12,35)},a=new google.maps.Marker({position:e,map:j,optimized:!1,title:s.store,draggable:o,storeId:t,icon:i}),tt.push(a),google.maps.event.addListener(a,"click",function(o){return function(){0!=t?"undefined"!=typeof wpslSettings.markerStreetView&&1==wpslSettings.markerStreetView?Z(e,function(){P(a,V(s),n,o)}):P(a,V(s),n,o):P(a,wpslLabels.startPoint,n,o),google.maps.event.clearListeners(n,"domready"),google.maps.event.addListener(n,"domready",function(){T(a,o),O()})}}(j)),o&&google.maps.event.addListener(a,"dragend",function(e){U(r),j.setCenter(e.latLng),C(e.latLng),I(e.latLng,nt,it=!1,n)})}function P(e,t,s,o){et.length=0,s.setContent(t),s.open(o,e),et.push(s),"undefined"!=typeof wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&1==wpslSettings.markerClusters&&(Q=e.storeId,s.setVisible(!0))}function T(t,s){e(".wpsl-info-actions a").on("click",function(o){var n=Number(wpslSettings.autoZoomLevel);if(o.stopImmediatePropagation(),e(this).hasClass("wpsl-directions")){if(1==wpslSettings.directionRedirect)return!0;S(e(this))}else e(this).hasClass("wpsl-streetview")?R(t,s):e(this).hasClass("wpsl-zoom-here")&&(s.setCenter(t.getPosition()),s.setZoom(n));return!1})}function O(){var t=j.getZoom();t>=wpslSettings.autoZoomLevel?e(".wpsl-zoom-here").hide():e(".wpsl-zoom-here").show()}function R(t,s){var o=s.getStreetView();o.setPosition(t.getPosition()),o.setVisible(!0),e("#wpsl-map-controls").hide(),z(o,s)}function z(t,s){google.maps.event.addListener(t,"visible_changed",function(){if(!t.getVisible()){var o=s.getZoom();e("#wpsl-map-controls").show(),s.setZoom(o-1),s.setZoom(o)}})}function Z(e,t){var s=new google.maps.StreetViewService;s.getPanoramaByLocation(e,50,function(e,s){lt=s==google.maps.StreetViewStatus.OK?!0:!1,t()})}function V(t){var s,o;return o=e("#wpsl-base-gmap_0").length?e("#wpsl-cpt-info-window-template").html():e("#wpsl-info-window-template").html(),s=_.template(o,t)}function B(){var e,t,s=Number(wpslSettings.autoZoomLevel),o=new google.maps.LatLngBounds;for(google.maps.event.addListenerOnce(j,"bounds_changed",function(){this.getZoom()>s&&this.setZoom(s)}),e=0,t=tt.length;t>e;e++)o.extend(tt[e].position);j.fitBounds(o)}function U(e){var t,s;if(K.setMap(null),tt){for(s=0,t=tt.length;t>s;s++)e?1!=tt[s].draggable?tt[s].setMap(null):J=tt[s]:tt[s].setMap(null);tt.length=0}Y&&Y.clearMarkers()}function $(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 W(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 A(){e(".wpsl-dropdown").each(function(){var t,s,o=e(this);o.$dropdownWrap=o.wrap("<div class='wpsl-dropdown'></div>").parent(),o.$selectedVal=o.val(),o.$dropdownElem=e("<div><ul/></div>").appendTo(o.$dropdownWrap),o.$dropdown=o.$dropdownElem.find("ul"),o.$options=o.$dropdownWrap.find("option"),o.hide().removeClass("wpsl-dropdown"),e.each(o.$options,function(){t=e(this).val()==o.$selectedVal?'class="wpsl-selected-dropdown"':"",o.$dropdown.append("<li data-value="+e(this).val()+" "+t+">"+e(this).text()+"</li>")}),o.$dropdownElem.before("<span data-value="+o.find(":selected").val()+" class='wpsl-selected-item'>"+o.find(":selected").text()+"</span>"),o.$dropdownItem=o.$dropdownElem.find("li"),o.$dropdownWrap.on("click",function(t){D(),e(this).toggleClass("wpsl-active"),s=0,e(this).hasClass("wpsl-active")?(o.$dropdownItem.each(function(){s+=e(this).outerHeight()}),o.$dropdownElem.css("height",s+2+"px")):o.$dropdownElem.css("height",0),t.stopPropagation()}),o.$dropdownItem.on("click",function(t){o.$dropdownWrap.find(e(".wpsl-selected-item")).html(e(this).text()).attr("data-value",e(this).attr("data-value")),o.$dropdownItem.removeClass("wpsl-selected-dropdown"),e(this).addClass("wpsl-selected-dropdown"),D(),t.stopPropagation()})}),e(document).click(function(){D()})}function D(){e(".wpsl-dropdown").removeClass("wpsl-active"),e(".wpsl-dropdown div").css("height",0)}var G,j,K,F,H,Q,q,Y,J,X,et=[],tt=[],st={},ot={},nt=!1,lt=!1,it="undefined"!=typeof wpslSettings?wpslSettings.autoLoad:"";if(_.templateSettings={evaluate:/\<\%(.+?)\%\>/g,interpolate:/\<\%=(.+?)\%\>/g,escape:/\<\%-(.+?)\%\>/g},e(".wpsl-gmap-canvas").length&&(e("<img />").attr("src",wpslSettings.path+"img/ajax-loader.gif"),e(".wpsl-gmap-canvas").each(function(s){var o=e(this).attr("id");t(o,s)})),e("#wpsl-result-list").on("click",".wpsl-back",function(){var t,s;for(K.setMap(null),t=0,s=tt.length;s>t;t++)tt[t].setMap(j);return"undefined"!=typeof J&&""!==J&&J.setMap(j),Y&&M(),j.setCenter(st.centerLatlng),j.setZoom(st.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(){L(e(this).data("store-id"),"start")}),e("#wpsl-stores").on("mouseleave","li",function(){L(e(this).data("store-id"),"stop")})):"info_window"==wpslSettings.markerEffect&&e("#wpsl-stores").on("mouseenter","li",function(){var t,s;for(t=0,s=tt.length;s>t;t++)tt[t].storeId==e(this).data("store-id")&&(google.maps.event.trigger(tt[t],"click"),j.setCenter(tt[t].position))})),"undefined"!=typeof wpslSettings.infoWindowStyle&&"infobox"==wpslSettings.infoWindowStyle&&1==wpslSettings.markerClusters){var at,rt,pt,dt,ct;google.maps.event.addListener(j,"zoom_changed",function(){google.maps.event.addListenerOnce(j,"idle",function(){if("undefined"!=typeof Y&&(at=Y.clusters_,at.length))for(dt=0,rt=at.length;rt>dt;dt++)for(ct=0,pt=at[dt].markers_.length;pt>ct;ct++)if(at[dt].markers_[ct].storeId==Q){q.getVisible()&&null===at[dt].markers_[ct].map?q.setVisible(!1):q.getVisible()||null===at[dt].markers_[ct].map||q.setVisible(!0);break}})})}var wt={formatPhoneNumber:function(e){return 1==wpslSettings.phoneUrl&&p()&&(e="<a href='tel:"+wt.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="",n="";return e("#wpsl-gmap").length&&(lt&&(o="<a class='wpsl-streetview' href='#'>"+wpslLabels.streetView+"</a>"),1==wpslSettings.markerZoomTo&&(n="<a class='wpsl-zoom-here' href='#'>"+wpslLabels.zoomHere+"</a>"),s="<div class='wpsl-info-actions'>"+wt.createDirectionUrl(t)+o+n+"</div>"),s},createDirectionUrl:function(t){var s,o,n,l={};return 1==wpslSettings.directionRedirect?("undefined"==typeof X&&(X=""),l.target="target='_blank'","undefined"!=typeof t?l.src=e("[data-store-id="+t+"] .wpsl-directions").attr("href"):(n=this.zip?this.zip+", ":"",o=this.address+", "+this.city+", "+n+this.country,l.src="https://maps.google.com/maps?saddr="+wt.rfc3986EncodeURIComponent(X)+"&daddr="+wt.rfc3986EncodeURIComponent(o))):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)}};if(e("#wpsl-search-input").keydown(function(t){var s=t.keyCode||t.which;13==s&&e("#wpsl-search-btn").trigger("click")}),e("#wpsl-stores").on("click",".wpsl-store-details",function(){var t,s,o=e(this).parents("li"),n=o.data("store-id");if("info window"==wpslSettings.moreInfoLocation)for(t=0,s=tt.length;s>t;t++)tt[t].storeId==n&&google.maps.event.trigger(tt[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();return"default"!=wpslSettings.templateId||"store listings"==wpslSettings.moreInfoLocation?!1:void 0}),e("a[href='#"+wpslSettings.mapTabAnchor+"']").length){var gt,ut,ft=e("a[href='#"+wpslSettings.mapTabAnchor+"']");ft.on("click",function(){return setTimeout(function(){gt=j.getZoom(),ut=j.getCenter(),google.maps.event.trigger(j,"resize"),j.setZoom(gt),j.setCenter(ut),B()},50),!1})}});
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === WP Store Locator ===
2
  Plugin URI: http://wpstorelocator.co
3
  Contributors: tijmensmit
4
  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
5
  Requires at least: 3.7
6
  Tested up to: 4.3
7
- Stable tag: 2.0.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
@@ -25,7 +25,7 @@ the language that is set in the admin panel.
25
  * Choose from nine retina ready marker icons.
26
  * Show the driving distances in either km or miles.
27
  * Shortcodes that enable you to add individual opening hours, addresses or just a map with a single marker to any page.
28
- * Compatible with multilingual plugins like WPML and qTranslate X.
29
  * You can drag the marker in the editor to the exact location on the map.
30
  * Show the search results either underneath the map, or next to it.
31
  * Show Google Maps in different languages, this also influences the language for the driving directions.
@@ -95,7 +95,7 @@ If you don't use ajax navigation, but do see the number 1 it's probably a confli
95
 
96
  If you find a plugin or theme that causes a conflict, please report it on the [support page](http://wordpress.org/support/plugin/wp-store-locator).
97
 
98
- > You can find the full documentation [here](http://wpstorelocator.co/documentation/)
99
 
100
  == Screenshots ==
101
 
@@ -106,6 +106,13 @@ If you find a plugin or theme that causes a conflict, please report it on the [s
106
 
107
  == Changelog ==
108
 
 
 
 
 
 
 
 
109
  = 2.0.1 =
110
  * Fixed: Prevented other plugins that use [underscore](http://underscorejs.org/) or [backbone](http://backbonejs.org/) from breaking the JavaScript templates, via [fatman49](https://profiles.wordpress.org/fatman49/) and [zurf](https://profiles.wordpress.org/zurf/).
111
  * Fixed: Street view not showing the correct location after using it more then once, via [marijke_25](https://profiles.wordpress.org/marijke_25/).
1
+ === WP Store Locator ===
2
  Plugin URI: http://wpstorelocator.co
3
  Contributors: tijmensmit
4
  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
5
  Requires at least: 3.7
6
  Tested up to: 4.3
7
+ Stable tag: 2.0.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
25
  * Choose from nine retina ready marker icons.
26
  * Show the driving distances in either km or miles.
27
  * Shortcodes that enable you to add individual opening hours, addresses or just a map with a single marker to any page.
28
+ * Compatible with multilingual plugins like [WPML](https://wpml.org/plugin/wp-store-locator/) and qTranslate X.
29
  * You can drag the marker in the editor to the exact location on the map.
30
  * Show the search results either underneath the map, or next to it.
31
  * Show Google Maps in different languages, this also influences the language for the driving directions.
95
 
96
  If you find a plugin or theme that causes a conflict, please report it on the [support page](http://wordpress.org/support/plugin/wp-store-locator).
97
 
98
+ > You can find the full documentation [here](http://wpstorelocator.co/documentation/).
99
 
100
  == Screenshots ==
101
 
106
 
107
  == Changelog ==
108
 
109
+ = 2.0.2 =
110
+ * Fixed: Not all users always seeing the notice to convert the 1.x locations to custom post types.
111
+ * Fixed: Prevented empty search results from ending up in the autoload transient.
112
+ * Fixed: The autoload transient not being cleared after changing the start location on the settings page.
113
+ * Changed: Added extra CSS to make it harder for themes to turn the map completely grey, and set the default opening hours alignment to left.
114
+ * Changed: If you use the store locator in a tab, then it no longer requires the tab anchor to be 'wpsl-map-tab'. You can use whatever you want with the 'wpsl_map_tab_anchor' filter.
115
+
116
  = 2.0.1 =
117
  * Fixed: Prevented other plugins that use [underscore](http://underscorejs.org/) or [backbone](http://backbonejs.org/) from breaking the JavaScript templates, via [fatman49](https://profiles.wordpress.org/fatman49/) and [zurf](https://profiles.wordpress.org/zurf/).
118
  * Fixed: Street view not showing the correct location after using it more then once, via [marijke_25](https://profiles.wordpress.org/marijke_25/).
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: http://wpstorelocator.co/
7
- Version: 2.0.1
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.0.1' );
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: http://wpstorelocator.co/
7
+ Version: 2.0.2
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.0.2' );
63
 
64
  if ( !defined( 'WPSL_URL' ) )
65
  define( 'WPSL_URL', plugin_dir_url( __FILE__ ) );