Store Locator Plus®

SLP_Admin_Activation extends SLPlus_BaseClass_Object
in package

Store Locator Plus Activation handler.

Handles data structure changes as well as settings migration between versions. Update the plugin version in config.php on every structure change.

Table of Contents

Properties

$slplus  : SLPlus
$uses_slplus  : bool
$slplus  : mixed
$uses_slplus  : mixed

Methods

__construct()  : mixed
__get()  : SLPlus_BaseClass_Object
__isset()  : bool
being_deactivated()  : bool
Is this add-on being deactivated?
copy_newer_files()  : mixed
Copy non-empty, readable files to destination if they are newer than the destination file.
get_instance()  : SLPlus_BaseClass_Object
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
set_properties()  : mixed
Set our properties.
update()  : mixed
Update the plugin.
initialize()  : mixed
Do these things when this object is invoked. Override in your class.
add_slplus_roles_and_caps()  : mixed
Add roles and cap.
check_for_addon_updates()  : mixed
Check if there are any add on updates. Inactive plugins too.
copyr()  : mixed
Recursively copy source directory (or file) into destination directory.
dbupdater()  : string
Update the data structures on new db versions.
iconMapper()  : string
Updates specific to 3.8.6
install_ExtendedDataTables()  : mixed
Setup the extended data tables.
install_main_table()  : mixed
Update main table
multisite_upgrade_options()  : mixed
Multisite upgrade.

Properties

$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

being_deactivated()

Is this add-on being deactivated?

public being_deactivated() : bool
Return values
bool

copy_newer_files()

Copy non-empty, readable files to destination if they are newer than the destination file.

public copy_newer_files( $source_file,  $destination_file) : mixed

OR if the destination file does not exist.

Parameters
$source_file :
$destination_file :

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

TODO: PHP7.4 and PHP8.0 the static instance variable returns an object matching $class TODO: PHP8.1 the static instance continually returns the FIRST object (SLP_Admin_Helper) every time -- it is like PHP8.1 static instance is bound to base_class-object versus the calling class object

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
SLPlus_BaseClass_Object

set_properties()

Set our properties.

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

initialize()

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

protected initialize() : mixed

add_slplus_roles_and_caps()

Add roles and cap.

private add_slplus_roles_and_caps() : mixed

check_for_addon_updates()

Check if there are any add on updates. Inactive plugins too.

private check_for_addon_updates() : mixed

copyr()

Recursively copy source directory (or file) into destination directory.

private copyr(string $source, string $dest) : mixed
Parameters
$source : string

can be a file or a directory

$dest : string

can be a file or a directory

dbupdater()

Update the data structures on new db versions.

private dbupdater(string $sql, string $table_name) : string
Parameters
$sql : string
$table_name : string
Return values
string

iconMapper()

Updates specific to 3.8.6

private iconMapper(string $iconFile) : string
Parameters
$iconFile : string
Return values
string

icon file

install_ExtendedDataTables()

Setup the extended data tables.

private install_ExtendedDataTables() : mixed
Tags
used-by

\SLPJanitor_Admin_Functions::drop_locations

install_main_table()

Update main table

private install_main_table() : mixed

As of version 3.5, use sl_option_value to store serialized options related to a single location.

Update the plugin version in config.php on every structure change.

multisite_upgrade_options()

Multisite upgrade.

private multisite_upgrade_options() : mixed

        
On this page

Search results