Store Locator Plus®

SLP_UI_Shortcode_slp_location extends SLP_UI_Shortcode
in package

Class SLP_UI_Shortcode_slp_location

Table of Contents

Constants

shortcode  = 'slp_location'

Properties

$ajax_response  : array<string|int, mixed>
$responses  : array<string|int, mixed>
$ajax_response  : mixed
$autoload_shortcode  : mixed
$responses  : mixed

Methods

__construct()  : mixed
SLP_Base_Object constructor.
activate()  : mixed
Activate the shortcode processing.
check_formatting()  : mixed
Start looking for shortcode strings and check formatting.
clear_ajax_response()  : mixed
Clear AJAX response.
format()  : string
Looks at the shortcode entries in a string and makes sure they are properly formatted.
get_instance()  : SLPlus_BaseClass_Object
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
process()  : string
Process the shortcode into a string output.
set_properties()  : mixed
Set our properties.
stop_checking_format()  : mixed
Stop checking formatting.
initialize()  : mixed
Do these things when this object is invoked. Override in your class.
set_ajax_response()  : mixed
Get location data is it would come back to JS via AJAX handler.
set_LocationURL()  : string
Set the location URL.
shortcode_modifier()  : string
Shortcode modifier.
special_processing()  : string
Output for special slp_location data elements.

Constants

Properties

$ajax_response read-only

public array<string|int, mixed> $ajax_response

The current location data being processed as it would come back from an AJAX request

$responses read-only

public array<string|int, mixed> $responses

An array of ajax repsonses with the key = location ID, prevents multiple requests for the same location data. Serves as a memory cache.

Methods

__construct()

SLP_Base_Object constructor.

public __construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
$options : array<string|int, mixed> = array()

activate()

Activate the shortcode processing.

public final activate() : mixed

clear_ajax_response()

Clear AJAX response.

public final clear_ajax_response() : mixed

format()

Looks at the shortcode entries in a string and makes sure they are properly formatted.

public format(array<string|int, mixed> $initial_attributes) : string

Add extended attributes if necessary. Does NOT output the final data, that is done in JavaScript.

Attributes for this shortcode include: where field name is a locations table field.

Parameters
$initial_attributes : array<string|int, mixed>
Return values
string

process()

Process the shortcode into a string output.

public process(array<string|int, mixed> $attributes, string $content, string $tag) : string

TODO: check web_link is being setup properly TODO: finish replicating the AJAX shortcode modifiers here.

Parameters
$attributes : array<string|int, mixed>
$content : string
$tag : string
Return values
string

set_properties()

Set our properties.

public set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
$options : array<string|int, mixed> = array()

initialize()

Do these things when this object is invoked. Override in your class.

protected initialize() : mixed

set_ajax_response()

Get location data is it would come back to JS via AJAX handler.

protected final set_ajax_response() : mixed

shortcode_modifier()

Shortcode modifier.

private shortcode_modifier(array<string|int, mixed> $settings) : string
Parameters
$settings : array<string|int, mixed>
Return values
string

[slp_pages style="custom" no_map="1" pages_directory_entry_css_class="slp_page simple_list col-md-12"]

[storepage field='sl_image' type='image'] [storepage field='sl_store'] [storepage field='sl_address'] [storepage field='sl_city'], [storepage field='sl_state'] [storepage field='sl_zip']

[slp_location phone]

[slp_location fax] [storepage field='url' title='Visit Website' type='hyperlink' tag='div' class='site-link btn btn-primary'][storepage field='pages_url' title='More Info' type='hyperlink' tag='div' class='info-link col-sm-12 btn btn-primary']

[/slp_pages]

TODO: Add ifset & ifnotset support as well as format="html"

special_processing()

Output for special slp_location data elements.

private special_processing( $attributes) : string

These are the non-field data elements, such as distance_1 which is normally calculated in the JavaScript processor.

Parameters
$attributes :
Return values
string

        
On this page

Search results