wpsl_map_tab_anchor_return

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

Description

This filter sets the return value of the click handler that wpsl_map_tab_anchor adds to your tab links. The default is false.

A click handler that returns false cancels the link’s default action, and stops the click from reaching the parent elements. Some tab scripts listen for clicks on a parent element, and then the tab no longer opens. Return true to let the click through.

The filter only has an effect when wpsl_map_tab_anchor returns an array, with Google Maps and [wpsl_map] maps. In all other cases WP Store Locator 3.0.3 adds no click handler to the tab links, and the value isn’t used.

Usage

This example sets the return value to true.

add_filter( 'wpsl_map_tab_anchor_return', '__return_true' );

Changelog

VersionDescription
3.0Works again, but only together with the array form of wpsl_map_tab_anchor, with Google Maps on [wpsl_map] maps. Moved to includes/frontend/assets/class-resources.php.
2.2.237The tab fix was no longer called, so up to and including 2.3.23 this filter had no effect.
2.2Introduced.

Source File

This filter is located in /includes/frontend/assets/class-resources.php.

Placement

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