Here is a quick shortcut I used to combine a series of comma separated values into a single list of unique entries. In my case I was trying to get a unique list of tags that came from several different lists of tags. If list A had “apples, oranges, bananas” and list b had “apples,grapes,watermelons” I wanted to get “apples, bananas,grapes,oranges,watermelons” back.
There is the shortcut I used:
Paste each comma-separated list into a file named “x”, separate lines are OK.
Run this Linux command on the file to create a file named “Y” that has my sorted unique list of tags:
# tr ‘,’ ‘\n’ < x | sort -u | tr ‘\n’ ‘,’ > y
This is a quick and efficient way to sort comma-separated lists on Linux, which likely includes OS/X as well.
Store Locator Plus 4.2.38 was released today addressing an issue where some sites suddenly “lost” locations.
After a week of research it was discovered that some MySQL and MariaDB installations will set boolean data fields to NULL versus true/false or blank. This led to an issue where any of the locations that had a null value in the privacy flag entry would be considered private by the Store Locator Plus search mechanism. The new patch considers locations with a NULL privacy value to not be marked private, which has “recovered” missing locations on the front-end search interface.
In addition to the patch, several updates that were underway have been included as part of the effort to launch a Widget Pack update and start provide more advanced user interface features and WordPress theme support.
A new plugin theme has been bundled with Store Locator Plus that has been test for layout compatibility with the iThemes Herschel WordPress theme.
The Simple White Four Column theme has been updated to use the newer SaSS based CSS rules engine, patching some quirks that are addressed with the core Store Locator Plus CSS ruleset included in all SaSS based plugin themes.
A new general layout option for Pro Pack users allows site designers to gain access to not just the location data but also Store Locator Plus plugin option values. The new [[slp_option nojs=”<option_name>”]] and [[slp_option js=”<option_name>”]] settings allow site designers to do things like place headers on the map with dynamic messages that change when site options change such as “All distances shown are in <miles>” where miles will change to kilometers if you change the default measurement in the UX settings panel. Many other options such as a fixed default radius and various labels can be displayed using this feature. It is used in conjunction with Enhanced Search to display heading on search box labels that can be changed via the admin panel (coming in the next Enhanced Search release).
The language translation system was extended, providing better internationalization (i18n) and localization (l10n) support for all add-on packs. This has been built into the SLP 4.2 add-on framework.
The state filter processor was refined to eliminate redundant code in Enhanced Search and the upcoming Widget Pack update.
The state and country SQL processors were updated to address various null data issues and to provide slightly faster SQL query processing.
Map Center and Zoom Level have been migrated to the newer options system in Store Locator Plus. This also grants access to the slp_option shortcode in Pro pack for displaying these values such as “Distances calculated from <map center address>.” when a map is first loaded.