SLPWidget_states_UI
extends SLP_BaseClass_UI
in package
Class SLPWidget_states_UI
Handle all the UI elements for the widget.
Putting this in a separate include file makes the admin loading "lighter".
Table of Contents
Properties
- $addon : mixed
- $js_requirements : array<string|int, string>
- $js_settings : array<string|int, string>
- $jsHandle : mixed
- $myslp : MySLP
- $slplus : mixed
- $uses_myslp : bool
- $uses_slplus : bool
- $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.
- create_string_state_dropdown() : string
- Build the state dropdown.
- 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.
- render_widget() : mixed
- Render the widget on the front end UI.
- set_properties() : mixed
- Set our properties.
- at_startup() : mixed
- Things we want our add on packs to do when they start.
- create_string_state_options() : string
- Create the option list for the states.
Properties
$addon
public
mixed
$addon
$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
$jsHandle
public
mixed
$jsHandle
$myslp
public
MySLP
$myslp
$slplus
public
mixed
$slplus
$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.
$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.
create_string_state_dropdown()
Build the state dropdown.
public
create_string_state_dropdown() : string
Return values
string —the HTML for the state dropdown
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
render_widget()
Render the widget on the front end UI.
public
render_widget(mixed $args, mixed $instance) : mixed
Parameters
- $args : mixed
- $instance : 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
create_string_state_options()
Create the option list for the states.
private
create_string_state_options() : string