Description
This filter allows you to change the default options for the address shortcode.
By default, all the address and contact details are shown on the store pages.
Parameters
$shortcode_defaults - (array) The current defaults for the [wpsl_address] shortcode.
The available shortcode attributes:
| Attribute | Value |
|---|---|
| id | The id of the store you want to show the address for. This is only required if you use this shortcode on a page that isn't a store location page. |
| name | True or false |
| address | True or false |
| address2 | True or false |
| city | True or false |
| state | True or false |
| zip | True or false |
| country | True or false |
| phone | True or false |
| fax | True or false |
| True or false | |
| url | True or false |
Usage
This example will set the country to false, which will hide it from the shortcode output:
Changelog
Since 2.0
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.