SLPĀ® phpDocs

SLP_AddOns extends SLPlus_BaseClass_Object
in package

Add On Manager

Table of Contents

Properties

$addon  : object
$available  : mixed
$instances  : array<string, SLP_BaseClass_Addon>
$list  : mixed
$myslp  : MySLP
$network_notified  : mixed
$premier_subscription_error  : mixed
$recommended_upgrades  : mixed
$slplus  : SLPlus
$uses_myslp  : bool
$uses_slplus  : bool
$slug  : mixed
$premier_subscription_valid  : mixed
$upgrade_paths  : mixed
$upgrades_already_recommended  : mixed
$wpdk_url  : mixed

Methods

__construct()  : mixed
__get()  : SLPlus_BaseClass_Object
__isset()  : bool
activate_global_ajax_hooks()  : mixed
Activate global AJAX hooks to provide hooks/filters that may not run in AJAX.
get()  : mixed
Get the add on (SLP_AddOn object)
get_installed_version()  : string
Get the most recently installed version, does not have to be active currently.
get_instance()  : static
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
get_product_url()  : string
Return the product URL of the specified registered/active add-on pack.
get_recommendations_text()  : string
Create the recommended upgrades notification text.
get_versions()  : array<string|int, mixed>
Fetched installed and active version info.
is_premier_subscription_valid()  : bool
Is the premier subscription valid?
network_notice()  : mixed
Network notice.
recommend_upgrade()  : string
Recommend an add-on for upgrading a legacy plugin.
register()  : mixed
Register an add on object to the manager class.
set_properties()  : void
Set our properties.
was_active()  : bool
Was the specified SLP add on ever active?
initialize()  : mixed
Do these things when this object is invoked. Override in your class.
create_string_for_recommendations()  : string
Return an upgrade recommended notice.
create_string_product_link()  : string
Given the text to display and the leaf (end) portion of the product URL, return a full HTML link to the product page.
get_premier_license_status()  : string
Get Premier License Status
make_available()  : mixed
Add a sanctioned add on pack to the available add ons array.
na_multisite_premier_license_is_valid()  : mixed
Check Premier License for NA Multisite
saving_new_subscription()  : mixed
Check to make sure we are not saving a new subscription first.
set_upgrade_paths()  : mixed
Set the add-on upgrade paths.
valid_license_format()  : bool
Is the license format valid.

Properties

$network_notified

public mixed $network_notified = \false

$premier_subscription_error

public mixed $premier_subscription_error = \null
public mixed $recommended_upgrades = array()

$uses_slplus

public bool $uses_slplus

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

$premier_subscription_valid

private mixed $premier_subscription_valid

$upgrade_paths

private mixed $upgrade_paths = array()
private mixed $upgrades_already_recommended = array()

$wpdk_url

private mixed $wpdk_url = 'https://wordpress.storelocatorplus.com/wp-json/wp-dev-kit/v1/'

Methods

__construct()

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

activate_global_ajax_hooks()

Activate global AJAX hooks to provide hooks/filters that may not run in AJAX.

public activate_global_ajax_hooks() : mixed

get()

Get the add on (SLP_AddOn object)

public get(string $slug[, string|null $property = null ]) : mixed
Parameters
$slug : string
$property : string|null = null

if provided will try to get this property

Return values
mixed —

Returns the AddOn object if no property is specified, otherwise it returns the property value

get_installed_version()

Get the most recently installed version, does not have to be active currently.

public get_installed_version(string $slug) : string
Parameters
$slug : 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_product_url()

Return the product URL of the specified registered/active add-on pack.

public get_product_url(string $slug) : string
Parameters
$slug : string
Return values
string

get_recommendations_text()

Create the recommended upgrades notification text.

public get_recommendations_text() : string
Return values
string

get_versions()

Fetched installed and active version info.

public get_versions() : array<string|int, mixed>
Return values
array<string|int, mixed>

is_premier_subscription_valid()

Is the premier subscription valid?

public is_premier_subscription_valid() : bool
Return values
bool

network_notice()

Network notice.

public network_notice() : mixed

recommend_upgrade()

Recommend an add-on for upgrading a legacy plugin.

public recommend_upgrade(string $slug) : string
Parameters
$slug : string
Return values
string —

the slug of the add-on to upgrade to.

set_properties()

Set our properties.

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

was_active()

Was the specified SLP add on ever active?

public was_active(string $slug) : bool
Parameters
$slug : string

the add on slug

Return values
bool —

true if the add on appears to have ever been active

initialize()

Do these things when this object is invoked. Override in your class.

protected initialize() : mixed

create_string_for_recommendations()

Return an upgrade recommended notice.

private create_string_for_recommendations(string $slug) : string
Parameters
$slug : string

The slug for the add-on needed an upgrade.

Return values
string

Given the text to display and the leaf (end) portion of the product URL, return a full HTML link to the product page.

private create_string_product_link(string $text, string $addon_slug) : string
Parameters
$text : string
$addon_slug : string
Return values
string

get_premier_license_status()

Get Premier License Status

private get_premier_license_status([mixed $uid = null ][, mixed $sid = null ]) : string

Use transients so we only check once per week.

Parameters
$uid : mixed = null
$sid : mixed = null
Tags
params

string $uid

string $sid

Return values
string

make_available()

Add a sanctioned add on pack to the available add ons array.

private make_available(string $slug, string $name[, bool $active = false ][, SLP_BaseClass_Addon $instance = null ]) : mixed
Parameters
$slug : string
$name : string
$active : bool = false
$instance : SLP_BaseClass_Addon = null

na_multisite_premier_license_is_valid()

Check Premier License for NA Multisite

private na_multisite_premier_license_is_valid() : mixed

Use transients so we only check once per week.

saving_new_subscription()

Check to make sure we are not saving a new subscription first.

private saving_new_subscription() : mixed

set_upgrade_paths()

Set the add-on upgrade paths.

private set_upgrade_paths() : mixed

valid_license_format()

Is the license format valid.

private valid_license_format(mixed $uid, mixed $sid) : bool
Parameters
$uid : mixed
$sid : mixed
Return values
bool
On this page

Search results