tp TouchPointWP TouchPointWP_Settings - TenthPres/TouchPoint-WP GitHub Wiki
tp\TouchPointWP\TouchPointWP_Settings
The Settings class - most settings are available through the default getter.
- Class name: TouchPointWP_Settings
- Namespace: \tp\TouchPointWP
Constants
UNDEFINED_PLACEHOLDER
const UNDEFINED_PLACEHOLDER = INF
Properties
parent
public mixed parent = null
The main plugin object.
- Visibility: public
Methods
__construct
mixed tp\TouchPointWP\TouchPointWP_Settings::__construct(\tp\TouchPointWP\TouchPointWP parent)
Constructor function.
- Visibility: public
Arguments
- parent tp\TouchPointWP\TouchPointWP - Parent object.
Returns
- mixed
instance
\tp\TouchPointWP\TouchPointWP_Settings tp\TouchPointWP\TouchPointWP_Settings::instance(?\tp\TouchPointWP\TouchPointWP parent)
Main TouchPointWP_Settings Instance
Ensures only one instance of TouchPointWP_Settings is loaded or can be loaded.
- Visibility: public
- This method is static.
Arguments
- parent ?\tp\TouchPointWP\TouchPointWP - Object instance.
Returns
- \tp\TouchPointWP\TouchPointWP_Settings - instance
initSettings
void tp\TouchPointWP\TouchPointWP_Settings::initSettings()
Initialise settings
- Visibility: public
hasValidApiSettings
bool tp\TouchPointWP\TouchPointWP_Settings::hasValidApiSettings()
Indicates whether there are adequate settings in place for API calls.
- Visibility: public
Returns
- bool -
addMenuItems
void tp\TouchPointWP\TouchPointWP_Settings::addMenuItems()
Add settings page to admin menu
- Visibility: public
configureSettings
array tp\TouchPointWP\TouchPointWP_Settings::configureSettings(?array settings)
Container for settings page arguments
- Visibility: public
Arguments
- settings ?array - Settings array.
Returns
- array -
addSettingsLink
array tp\TouchPointWP\TouchPointWP_Settings::addSettingsLink(array links)
Add settings link to plugin list table
- Visibility: public
Arguments
- links array - Existing links.
Returns
- array - Modified links.
__get
string|false tp\TouchPointWP\TouchPointWP_Settings::__get(string what)
- Visibility: public
Arguments
- what string - The field to get a value for
Returns
- string|false - The value, if set. False if not set.
get
false|string|array tp\TouchPointWP\TouchPointWP_Settings::get(string what)
Returns the setting, including default values. Returns false if the value is undefined.
- Visibility: public
Arguments
- what string
Returns
- false|string|array -
set
bool tp\TouchPointWP\TouchPointWP_Settings::set(string what, mixed value, ?bool autoload)
- Visibility: public
Arguments
- what string* value mixed* autoload ?bool
Returns
- bool -
migrate
mixed tp\TouchPointWP\TouchPointWP_Settings::migrate()
Migrate settings from version to version. This may be called even when a migration isn't necessary.
- Visibility: public
Returns
- mixed
updateDeployedScripts
void tp\TouchPointWP\TouchPointWP_Settings::updateDeployedScripts()
Generate new scripts and deploy to TouchPoint.
- Visibility: public
registerSettings
void tp\TouchPointWP\TouchPointWP_Settings::registerSettings()
Register plugin settings
- Visibility: public
settings_section
void tp\TouchPointWP\TouchPointWP_Settings::settings_section(array section)
Settings section.
- Visibility: public
Arguments
- section array - Array of section ids.
settingsPage
void tp\TouchPointWP\TouchPointWP_Settings::settingsPage()
Load settings page content.
- Visibility: public
validation_lowercase
string tp\TouchPointWP\TouchPointWP_Settings::validation_lowercase(string data)
Force a value to lowercase; used as a validator
- Visibility: public
Arguments
- data string - Mixed case string
Returns
- string - lower-case string
__clone
mixed tp\TouchPointWP\TouchPointWP_Settings::__clone()
Cloning is forbidden.
- Visibility: public
Returns
- mixed
__wakeup
mixed tp\TouchPointWP\TouchPointWP_Settings::__wakeup()
Unserializing instances of this class is forbidden.
- Visibility: public
Returns
- mixed