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
$addon
public
mixed
$addon
$js_settings
public
mixed
$js_settings
= array()
$jsHandle
public
mixed
$jsHandle
$myslp
public
MySLP
$myslp
$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.
$js_requirements
protected
mixed
$js_requirements
= array('jquery', 'slp_core')
$slplus
protected
mixed
$slplus
$slug
protected
mixed
$slug
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_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_css()
If the file userinterface.css exists, enqueue it.
public
enqueue_ui_css() : mixed
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/
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
staticinitialize()
Instantiate the admin panel object.
public
initialize() : mixed
set_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
at_startup()
Things we want our add on packs to do when they start.
protected
at_startup() : mixed