Store Locator Plus®

SLP_BaseClass_UI extends SLPlus_BaseClass_Object
in package

A base class that helps add-on packs separate UI functionality.

Add on packs should include and extend this class.

This allows the main plugin to only include this file when NOT in admin mode.

Table of Contents

Properties

$addon  : SLP_BaseClass_Addon
$addon  : mixed
$js_requirements  : array<string|int, string>
$js_settings  : array<string|int, string>
$js_settings  : mixed
$jsHandle  : mixed
$slplus  : SLPlus
$slplus  : SLPlus
$uses_slplus  : bool
$js_requirements  : mixed
$slplus  : mixed
$uses_slplus  : mixed

Methods

__construct()  : mixed
__get()  : SLPlus_BaseClass_Object
__isset()  : bool
add_hooks_and_filters()  : mixed
Add the plugin specific hooks and filter configurations here.
enqueue_ui_css()  : mixed
If the file userinterface.css exists, enqueue it.
enqueue_ui_javascript()  : mixed
Enqueue the userinterface.js scripts (./js/<slug>_userinterface.min.js preferred).
get_instance()  : SLPlus_BaseClass_Object
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
initialize()  : mixed
Instantiate the admin panel object.
set_properties()  : mixed
Set our properties.
at_startup()  : mixed
Things we want our add on packs to do when they start.

Properties

$js_requirements

public array<string|int, string> $js_requirements

An array of the JavaScript hooks that are needed by the userinterface.js script. userinterface.js is only loaded if the file exists in the include directory.

$js_settings

public array<string|int, string> $js_settings

JavaScript settings that are to be localized as a _settings JS variable.

$uses_slplus

public bool $uses_slplus

Set to true (default) if the object needs access to the SLPlus plugin object.

Methods

__construct()

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

__isset()

public __isset(string $property) : bool
Parameters
$property : string
Return values
bool

add_hooks_and_filters()

Add the plugin specific hooks and filter configurations here.

public add_hooks_and_filters() : mixed

Should include WordPress and SLP specific hooks and filters.

enqueue_ui_javascript()

Enqueue the userinterface.js scripts (./js/<slug>_userinterface.min.js preferred).

public enqueue_ui_javascript() : mixed

Minified take precedence.

Called from \MySLP_REST_API::get_options() to send data to front-end/locations.js for embeding maps.

Look first in ./js/_userinterface.js then ./js/userinterface.js then ./include/userinterface.js

get_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_Object

set_properties()

Set our properties.

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

        
On this page

Search results