Documentation

TouchPointWP_Settings
in package

The Settings class - most settings are available through the default getter.

Table of Contents

Constants

UNDEFINED_PLACEHOLDER  = INF

Properties

$parent  : TouchPointWP|null
The main plugin object.

Methods

__clone()  : mixed
Cloning is forbidden.
__construct()  : mixed
Constructor function.
__get()  : string|false
__wakeup()  : mixed
Unserializing instances of this class is forbidden.
add_menu_item()  : void
Add settings page to admin menu
add_settings_link()  : array<string|int, mixed>
Add settings link to plugin list table
configureSettings()  : array<string|int, mixed>
Container for settings page arguments
get()  : false|string|array<string|int, mixed>
Returns the setting, including default values. Returns false if the value is undefined.
hasValidApiSettings()  : bool
Indicates whether there are adequate settings in place for API calls.
initSettings()  : void
Initialise settings
instance()  : TouchPointWP_Settings
Main TouchPointWP_Settings Instance
migrate()  : void
Migrate settings from version to version. This may be called even when a migration isn't necessary.
registerSettings()  : void
Register plugin settings
set()  : false|mixed
settings_section()  : void
Settings section.
settingsPage()  : void
Load settings page content.
updateDeployedScripts()  : void
Generate new scripts and deploy to TouchPoint.
validation_lowercase()  : string
Force a value to lowercase; used as a validator

Constants

Properties

Methods

__get()

public __get(string $what) : string|false
Parameters
$what : string

The field to get a value for

Return values
string|false

The value, if set. False if not set.

__wakeup()

Unserializing instances of this class is forbidden.

public __wakeup() : mixed
Tags
since
1.0.0

Add settings link to plugin list table

public add_settings_link(array<string|int, mixed> $links) : array<string|int, mixed>
Parameters
$links : array<string|int, mixed>

Existing links.

Return values
array<string|int, mixed>

Modified links.

configureSettings()

Container for settings page arguments

public configureSettings([array<string|int, mixed>|null $settings = [] ]) : array<string|int, mixed>
Parameters
$settings : array<string|int, mixed>|null = []

Settings array.

Return values
array<string|int, mixed>

get()

Returns the setting, including default values. Returns false if the value is undefined.

public get(string $what) : false|string|array<string|int, mixed>
Parameters
$what : string
Return values
false|string|array<string|int, mixed>

hasValidApiSettings()

Indicates whether there are adequate settings in place for API calls.

public hasValidApiSettings() : bool
Return values
bool

migrate()

Migrate settings from version to version. This may be called even when a migration isn't necessary.

public migrate() : void

set()

public set(string $what, mixed $value[, bool $autoload = false ]) : false|mixed
Parameters
$what : string
$value : mixed
$autoload : bool = false
Return values
false|mixed

settings_section()

Settings section.

public settings_section(array<string|int, mixed> $section) : void
Parameters
$section : array<string|int, mixed>

Array of section ids.

validation_lowercase()

Force a value to lowercase; used as a validator

public validation_lowercase(string $data) : string
Parameters
$data : string

Mixed case string

Return values
string

lower-case string


        
On this page

Search results