The recent release of version 1.4.0 of the Cardinal Store Locator plugin for WordPress added several new features including a new single location shortcode and widget, a map preview meta box when updating a location and functionality for supporting a reset button and total location results count among several other minor additions. In terms of upcoming updates, the next major focus will be the development of custom import functionality with planned support for location data formatted in XML, JSON, KML and CSV.
Single location shortcode and widget
To make use of the new shortcode simply add the following to your single location post content.
To use the widget you want to first ensure your theme has a registered widget area. Then visit your WordPress dashboard and navigate to Appearance > Widgets to drag the “Cardinal Store Locator Single Map” widget into the appropriate widget area on the right. For information on a more customized singe location template please visit the Single Location page within the documentation section.
Map preview meta box
The new location preview meta box appears in the right column after a location has been added with an address. A marker will display on the preview map where it will appear within the locator and single location map if using the new single location shortcode or widget. This meta box allows you to drag the marker for coordinate fine-tuning.
Reset button and total locations count display
To highlight a couple of the more minor updates with this release it is now possible to implement reset functionality by adding the class “bh-sl-reset” to an HTML element on the same page as the locator, such as a link or button element. In much the same way it is now possible to display the count of the total locations that are being displayed by adding the class “bh-sl-total-results” to an HTML element on the page.
- Added checks to make sure filter values are skipped in shortcode output if the value isn’t set.
- Added checks to replace non-ASCII characters when filtering to prevent issues with special characters.
- Added city column to Locations edit pages (list view).
- Added cslCreateMarker JS callback for custom marker overrides.
- Added Disable alpha markers setting.
- Added functionality to accept manual coordinate overrides with latitude and longitude post meta.
- Added InfoBubble support.
- Added location results total count if HTML element with “bh-sl-total-results” class exists.
- Added map preview post meta box on single location edit screen with manual coordinate fine-tuning available.
- Added query string parameter filter check so that results can be filtered with URL query strings.
- Added reset functionality that can be triggered via a button that has the CSS class “bh-sl-reset”.
- Added single location shortcode and widget to display map of a single location on single location posts.
- Added span and class to checkbox and radio button labels in filter output with shortcode.
- Fixed issue with Google Maps settings filter (bh_sl_map_settings) not being applied with full map start blank and no results.
- Fixed issue with Maximum Distance and Query string parameters settings combination.
- Updated Distance alert setting so that it can be disabled.
- Re-structured some of the underlying jQuery code.