SLP® phpDocs

SLP_Premier extends SLP_BaseClass_Addon
in package

Class SLP_Premier

Table of Contents

Properties

$activation_class_name  : string
$addon  : SLP_BaseClass_Addon
$admin  : mixed
$admin_class_name  : string
$admin_menu_entries  : array<string|int, mixed>
$ajax  : SLP_BaseClass_AJAX
$ajax_class_name  : string
$dir  : string
$file  : string
$language_dir  : string
$latest_version  : mixed
$meta  : SLP_AddOns_Meta
$metadata  : mixed
$min_slp_version  : string
$myslp  : MySLP
$name  : string
$objects  : array<string|int, mixed>
$option_defaults  : array<string|int, mixed>
$option_name  : string
$options  : mixed
$Options  : SLP_Premier_Options
$options_defaults  : array<string|int, mixed>
$short_slug  : string
$slplus  : SLPlus
$slug  : string
$textdomain  : string
$Updates  : SLP_AddOn_Updates
$url  : string
$userinterface  : SLP_BaseClass_UI
$userinterface_class_name  : string
$uses_myslp  : bool
$uses_slplus  : bool
$version  : string
$widget  : SLP_BaseClass_Widget
$widget_class_name  : string
$WPOption_Manager  : SLP_WPOption_Manager
$class_prefix  : mixed

Methods

__construct()  : mixed
__get()  : mixed
Get the value, running it through a filter.
__isset()  : bool
Allow isset to be called on private properties.
__set()  : SLP_Option|null
Allow value to be set directly.
add_hooks_and_filters()  : mixed
Global hooks and filters that run after plugins_loaded.
add_object()  : mixed
create_object()  : mixed
Instantiate our objects ONCE and refer to them in an object array.
create_object_category()  : mixed
Create the category object if Power is active.
create_object_Updates()  : mixed
Creates updates object AND checks for updates for this add-on.
createobject_Admin()  : mixed
Create the admin interface object and attach to this->admin
createobject_AJAX()  : mixed
Create the AJAX processing object and attach to this->ajax
createobject_UserInterface()  : mixed
Create the user interface object and attach to this->UserInterface
extend_sql_get_location_bounds()  : string
Extend the SQL to get the min/max lat/long.
filter_AddMenuItems()  : array<string|int, mixed>
Add the items specified in the menu_entries property to the SLP menu.
find_minmax_latlng()  : mixed
Set the sw and ne corners of the bounding box that covers all our locations.
get_addon_version()  : string
Get the add-on pack version.
get_instance()  : static
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
get_meta()  : string
Get the add on metadata property as specified.
get_option()  : mixed
Get an option attribute.
has_url_controls()  : bool
Return true if any URL controls are in place.
init_options()  : mixed
Set option defaults for this plugin.
initialize()  : void
Initialize a singleton of this object.
instantiate()  : null|object
Instantiate an object of the noted class.
load_options()  : mixed
Load the options class to help the SLP smart options if we have that feature.
run_during_init()  : void
Executes actions during the initialization process.
set_location_search_boundaries()  : array<string|int, mixed>
Get the location search boundaries as saved in the admin panel.
set_option()  : bool
Set an option attribute.
set_option_defaults()  : mixed
Set option defaults outside of hard-coded property values via an array.
set_properties()  : mixed
Set our properties.
set_ValidOptions()  : mixed
Set valid options according to the addon options array.
setting_name()  : string
Generate a proper setting name for the settings class.
slp_init()  : mixed
Things to do once SLP is alive.
update_minmax_latlng_delete()  : mixed
Update the min/max latitude and longitude if we delete and outter boundary.
at_startup()  : mixed
Things to do at startup after this baby is initialized. Override in your class.
set_default_object_options()  : mixed
Our default object options.

Properties

$activation_class_name

public string $activation_class_name

The name of the activation class for this add on.

$admin_class_name

public string $admin_class_name

The name of the admin class for this add on.

$admin_menu_entries

public array<string|int, mixed> $admin_menu_entries

array of menu entries, should be in a key=>value array where key = the menu text and value = the function or PHP file to execute.

$ajax_class_name

public string $ajax_class_name

The name of the AJAX class for this add on.

$language_dir

public string $language_dir

The directory that contains the language translation files

$min_slp_version

public string $min_slp_version

Minimum version of SLP required to run this add-on pack in x.y.zz format.

$objects read-only

public array<string|int, mixed> $objects

A named array of our instantiated objects, the key is the class name the value is the object itself.

$option_defaults

public array<string|int, mixed> $option_defaults

The default values for options. Set this in init_options for any gettext elements. $option_defaults['setting'] = __('string to translate', 'textdomain')

$option_name

public string $option_name

The name of the wp_option to store serialized add-on pack settings.

$options

public mixed $options = array('category_name_separator' => ', ', 'boundaries_influence_min_lat' => '0', 'boundaries_influence_min_lng' => '0', 'boundaries_influence_max_lat' => '0', 'boundaries_influence_max_lng' => '0', 'dropdown_autosubmit' => '0', 'installed_version' => '', 'pagination_label' => '', 'show_address_guess' => '0', 'show_location_on_order_email' => '1')

$options_defaults

public array<string|int, mixed> $options_defaults

Default options.

$slug

public string $slug

The slug for this plugin, usually matches the plugin subdirectory name.

$userinterface_class_name

public string $userinterface_class_name

The name of the user class for this add on.

$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.

$version

public string $version

Current version of this add-on pack in x.y.zz format.

$widget_class_name

public string $widget_class_name

The name of the widget class for this add on.

$class_prefix

protected mixed $class_prefix = 'SLP_Premier_'

Methods

__construct()

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

__get()

Get the value, running it through a filter.

public __get(string $property) : mixed
Parameters
$property : string
Return values
mixed

null if not set or the value

__isset()

Allow isset to be called on private properties.

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

add_hooks_and_filters()

Global hooks and filters that run after plugins_loaded.

public add_hooks_and_filters() : mixed

create_object()

Instantiate our objects ONCE and refer to them in an object array.

public create_object(string $class[, string $subdir = '.' ]) : mixed

TODO: Remove and update Power compat to 4.9.1

Parameters
$class : string
$subdir : string = '.'

create_object_category()

Create the category object if Power is active.

public create_object_category() : mixed
Tags
returns

boolean

create_object_Updates()

Creates updates object AND checks for updates for this add-on.

public create_object_Updates(bool $force) : mixed
Parameters
$force : bool

createobject_Admin()

Create the admin interface object and attach to this->admin

public createobject_Admin() : mixed

Called on slp_admin_menu_starting. If that menu is rendering, we are on an admin page. Called via hook slp_admin_menu_starting setup in this class.

createobject_AJAX()

Create the AJAX processing object and attach to this->ajax

public createobject_AJAX() : mixed

createobject_UserInterface()

Create the user interface object and attach to this->UserInterface

public createobject_UserInterface() : mixed
Tags
used-by

\MySLP_REST_API::get_options

used-by

\SLP_BaseClass_Addon::slp_init via WP Filter wp_enqueue_scripts

extend_sql_get_location_bounds()

Extend the SQL to get the min/max lat/long.

public extend_sql_get_location_bounds(string $command) : string
Parameters
$command : string
Return values
string

filter_AddMenuItems()

Add the items specified in the menu_entries property to the SLP menu.

public filter_AddMenuItems(array<string|int, mixed> $menuItems) : array<string|int, mixed>

If you make the 'slug' property of the $admin_menu_entries array = $this->addon->short_slug you won't need to set this->addon->admin->admin_page_slug

Parameters
$menuItems : array<string|int, mixed>
Return values
array<string|int, mixed>

find_minmax_latlng()

Set the sw and ne corners of the bounding box that covers all our locations.

public find_minmax_latlng() : mixed

Store in the add on pack options array.

get_addon_version()

Get the add-on pack version.

public get_addon_version() : string
Return values
string

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

get_meta()

Get the add on metadata property as specified.

public get_meta(string $property) : string
Parameters
$property : string
Return values
string

get_option()

Get an option attribute.

public get_option(string $property, string $attribute) : mixed
Parameters
$property : string
$attribute : string

has_url_controls()

Return true if any URL controls are in place.

public has_url_controls() : bool
Return values
bool

init_options()

Set option defaults for this plugin.

public init_options() : mixed

initialize()

Initialize a singleton of this object.

public initialize() : void

instantiate()

Instantiate an object of the noted class.

public instantiate(string $class[, array<string|int, mixed> $options = array() ]) : null|object
Parameters
$class : string
$options : array<string|int, mixed> = array()
Return values
null|object

load_options()

Load the options class to help the SLP smart options if we have that feature.

public load_options() : mixed

run_during_init()

Executes actions during the initialization process.

public run_during_init() : void

Sets the name property with a localized string and calls the parent class's initialization method.

set_location_search_boundaries()

Get the location search boundaries as saved in the admin panel.

public set_location_search_boundaries() : array<string|int, mixed>

Use in both admin and UI.

Return values
array<string|int, mixed>

set_option()

Set an option attribute.

public set_option(string $property, string $attribute, mixed $value) : bool
Parameters
$property : string
$attribute : string
$value : mixed
Return values
bool

set_option_defaults()

Set option defaults outside of hard-coded property values via an array.

public set_option_defaults() : mixed

This allows for gettext() string translations of defaults.

Only bring over items in default_value_array that have matching keys in $this->options already.

set_properties()

Set our properties.

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

set_ValidOptions()

Set valid options according to the addon options array.

public set_ValidOptions(mixed $val, mixed $key) : mixed
Parameters
$val : mixed
$key : mixed

setting_name()

Generate a proper setting name for the settings class.

public setting_name(mixed $setting) : string
Parameters
$setting : mixed
Return values
string

slp_init()

Things to do once SLP is alive.

public slp_init() : mixed
Tags
used-by

\SLP_BaseClass_Addon::initialize via SLP Filter slp_init_complete

uses
SLP_BaseClass_Addon::createobject_UserInterface

via WP Filter wp_enqueue_scripts

update_minmax_latlng_delete()

Update the min/max latitude and longitude if we delete and outter boundary.

public update_minmax_latlng_delete() : mixed

at_startup()

Things to do at startup after this baby is initialized. Override in your class.

protected at_startup() : mixed

NOTE: this will not run at initialization if $this->objects is empty.

set_default_object_options()

Our default object options.

protected set_default_object_options() : mixed

        
On this page

Search results