SLP® phpDocs

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  : mixed
$js_settings  : mixed
$jsHandle  : mixed
$myslp  : MySLP
$uses_myslp  : bool
$uses_slplus  : bool
$js_requirements  : mixed
$slplus  : mixed
$slug  : 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()  : static
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

$uses_myslp

public bool $uses_myslp

Set to true to add a $myslp property pointing to global $myslp

$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() ]) : static
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
static

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