SLP® phpDocs

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>
$autoload_shortcode  : bool

Methods

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

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() : void

clear_ajax_response()

Clear AJAX response.

public final clear_ajax_response() : void

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 the field name is a location table field.

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

get_instance()

Return an instance of the object which is also registered to the slplus global less the SLP_ part.

public static get_instance([null|array<string|int, mixed> $options = array() ]) : SLP_Base_Object
Parameters
$options : null|array<string|int, mixed> = array()

object init params

Return values
SLP_Base_Object

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() ]) : void
Parameters
$options : array<string|int, mixed> = array()

set_ajax_response()

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

protected final set_ajax_response() : void

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"


        
On this page

Search results