wpsl_js_settings

  1. Description
  2. Parameters
  3. Usage
  4. Changelog
  5. Source File

Description

This filter allows you to overwrite the values from the WPSL settings page that are used in the JavaScript code for Google Maps, the search results template and the search functionality itself.

This can be useful if your planning to use the store locator on different pages and like to use different settings for each one of them.

Parameters

$settings - (array) The default settings.

Usage

The code example below changes the settings that are used to render the map for the ‘contact-us’ page. If not, then the defaults from the settings page are used.

You can find a full list of the available map options here.

Changelog

Since 2.2.8

Source File

This filter is located in /frontend/class-frontend.php

Placement

The code needs to be placed in the functions.php file inside your active theme folder.