SLP_UI
extends SLPlus_BaseClass_Object
in package
Store Locator Plus basic user interface.
Table of Contents
Properties
- $radius_default : string
- $radius_default : mixed
- $radius_selector_radii : array<string|int, string>
- $radius_selector_radii : mixed
- $slplus : SLPlus
- $uses_slplus : bool
- $slplus : mixed
- $uses_slplus : mixed
- $js_attributes : mixed
- $shortcode_map_region : mixed
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- add_to_js_options() : array<string|int, mixed>
- Put map_region from Country_Manager and results_layout from set_ResultsLayout into JavaScript CDATA
- create_Map() : mixed
- Create the HTML for the map.
- create_MapContent() : mixed
- Replace [slp_mapcontent]
- create_MapTagline() : mixed
- Create the map tagline for SLP link
- create_Results() : mixed
- Create the HTML for the search results.
- create_SearchElement() : string
- Process shortcodes for search form.
- create_string_radius_selector() : string
- Build the radius selector string.
- create_string_radius_selector_div() : mixed
- Create the default search radius div.
- create_string_radius_selector_options() : string
- Create the options HTML for the radius select string.
- createstring_DefaultSearchDiv_Address() : string
- Create the default search address div.
- createstring_InputDiv() : string
- Create a search form input div.
- createstring_SearchForm() : mixed
- Output the search form based on the search results layout.
- createstring_TagalongPlaceholder() : string
- Placeholder for the Tagalong legend placement in SLP Layout controls.
- filter_SetDefaultMapLayout() : string
- find_default_radius() : string
- Find the default radius in the radii string.
- get_instance() : SLPlus_BaseClass_Object
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- localize_script() : mixed
- Localize the CSL Script
- modify_searchlayout() : string
- Modify the search form.
- no_texturize_shortcodes() : array<string|int, mixed>
- Do not texturize our shortcodes.
- rawDeal() : string
- Strip all \r\n from the template to try to "unbreak" Theme Forest themes.
- remove_slp_addon_shortcodes() : string
- Remove the [slp_addon ...] shortcodes from results layout.
- render_shortcode() : string
- Process the store locator plus shortcode.
- render_slp_block() : string
- Render locations map on front end via Blocks.
- set_MapCenter() : mixed
- Set the starting point for the center of the map.
- set_properties() : mixed
- Set our properties.
- set_ResultsLayout() : string
- Set the results layout string.
- setup_stylesheet_for_slplus() : mixed
- Setup the CSS for the product pages.
- strip_slashes_from_smart_options() : mixed
- Strip slashes from smart options before putting into JS array.
- initialize() : mixed
- Things we do at the start.
- assign_user_stylesheet() : mixed
- Assign the plugin specific UI stylesheet.
- create_DefaultSearchDiv_Submit() : mixed
- Create the default search submit div.
- get_environment() : array<string|int, mixed>
- Get the environment.
- get_find_button_text() : mixed
- Retrieve the proper find button default text.
- get_messages() : array<string|int, string>
- Set the messages for us in the JS array.
- register_locations_map_block_type() : mixed
- Register Locations Map Block Type
- set_allowed_attributes() : array<string|int, mixed>
- Set the allowed shortcode attributes.
- set_radius_selector_radii() : mixed
- Set the radius_selector_radii array.
Properties
$radius_default
public
string
$radius_default
Radius Default
$radius_default
public
mixed
$radius_default
$radius_selector_radii
public
array<string|int, string>
$radius_selector_radii
A string array of each radius in the slplus->options['radii'] setting.
$radius_selector_radii
public
mixed
$radius_selector_radii
$slplus
public
SLPlus
$slplus
$uses_slplus
public
bool
$uses_slplus
Set to true (default) if the object needs access to the SLPlus plugin object.
$slplus
protected
mixed
$slplus
$uses_slplus
protected
mixed
$uses_slplus
= \true
$js_attributes
private
mixed
$js_attributes
= array()
$shortcode_map_region
private
mixed
$shortcode_map_region
= 'us'
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
__get()
public
__get(string $property) : SLPlus_BaseClass_Object
Parameters
- $property : string
Return values
SLPlus_BaseClass_Object__isset()
public
__isset(string $property) : bool
Parameters
- $property : string
Return values
booladd_to_js_options()
Put map_region from Country_Manager and results_layout from set_ResultsLayout into JavaScript CDATA
public
add_to_js_options(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $options : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>create_Map()
Create the HTML for the map.
public
create_Map() : mixed
create_MapContent()
Replace [slp_mapcontent]
public
create_MapContent() : mixed
create_MapTagline()
Create the map tagline for SLP link
public
create_MapTagline() : mixed
create_Results()
Create the HTML for the search results.
public
create_Results() : mixed
create_SearchElement()
Process shortcodes for search form.
public
create_SearchElement(array<string|int, mixed> $attributes[, null|string $content = null ]) : string
Parameters
- $attributes : array<string|int, mixed>
- $content : null|string = null
Return values
stringcreate_string_radius_selector()
Build the radius selector string.
public
create_string_radius_selector() : string
Return values
stringcreate_string_radius_selector_div()
Create the default search radius div.
public
create_string_radius_selector_div() : mixed
create_string_radius_selector_options()
Create the options HTML for the radius select string.
public
create_string_radius_selector_options() : string
Return values
stringcreatestring_DefaultSearchDiv_Address()
Create the default search address div.
public
createstring_DefaultSearchDiv_Address([string $placeholder = '' ]) : string
Parameters
- $placeholder : string = ''
Tags
Return values
stringcreatestring_InputDiv()
Create a search form input div.
public
createstring_InputDiv([null|string $fldID = null ][, string $label = '' ][, string $placeholder = '' ][, bool $hidden = false ][, null|string $divID = null ][, string $default = '' ]) : string
Parameters
- $fldID : null|string = null
- $label : string = ''
- $placeholder : string = ''
- $hidden : bool = false
- $divID : null|string = null
- $default : string = ''
Tags
Return values
stringcreatestring_SearchForm()
Output the search form based on the search results layout.
public
createstring_SearchForm() : mixed
createstring_TagalongPlaceholder()
Placeholder for the Tagalong legend placement in SLP Layout controls.
public
createstring_TagalongPlaceholder(array<string|int, mixed> $attributes[, string $content = '' ]) : string
Does nothing but stop the [tagalong ...] shortcode text from appearing in output when Tagalong is not active.
Parameters
- $attributes : array<string|int, mixed>
-
array
- $content : string = ''
Return values
string —blank text
filter_SetDefaultMapLayout()
public
filter_SetDefaultMapLayout(string $HTML) : string
Parameters
- $HTML : string
-
current map HTML default is blank
Return values
string —modified map HTML
find_default_radius()
Find the default radius in the radii string.
public
find_default_radius() : string
It is wrappped with () or the first/only entry in a comma-separated list.
Return values
stringget_instance()
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
public
static get_instance([bool $no_global = false ][, mixed $params = array() ]) : SLPlus_BaseClass_Object
TODO: PHP7.4 and PHP8.0 the static instance variable returns an object matching $class TODO: PHP8.1 the static instance continually returns the FIRST object (SLP_Admin_Helper) every time -- it is like PHP8.1 static instance is bound to base_class-object versus the calling class object
Parameters
- $no_global : bool = false
-
set to true to skip assigning object to SLP global as a property.
- $params : mixed = array()
-
object init params
Return values
SLPlus_BaseClass_Objectlocalize_script()
Localize the CSL Script
public
localize_script() : mixed
All values in the slplus->options array get passed in to JavaScript CDATA as the options property.
Tags
modify_searchlayout()
Modify the search form.
public
modify_searchlayout(string $html) : string
Parameters
- $html : string
Tags
Return values
stringno_texturize_shortcodes()
Do not texturize our shortcodes.
public
static no_texturize_shortcodes(array<string|int, mixed> $shortcodes) : array<string|int, mixed>
Parameters
- $shortcodes : array<string|int, mixed>
Return values
array<string|int, mixed>rawDeal()
Strip all \r\n from the template to try to "unbreak" Theme Forest themes.
public
rawDeal(string $inStr) : string
They have a known bug that MANY Theme Forest authors have introduced which will change this: