Class Plugin
This class represents the plugin itself. Broadly, this module handles practically all interaction with the platform (WP), loading assets as needed, and hooking into the platforms interface to provide menus etc.
It also provides a number of helpful utility functions.
- WPGMZA\Factory
-
WPGMZA\Plugin
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
loadScripts( )
This function will cause the plugin scripts to be loaded. Firstly it will initialize an instance of ScriptLoader. If the developer mode setting is enabled, the scripts will be rebuilt. |
public
|
|
public
string|null
|
#
getCurrentPage( )
Returns a string stating the current page, relevant to this plugin. Please refer to the constants on this class for a list of available pages. If the current page is not relevant to this plugin, NULL is returned. |
public
boolean
|
|
public
boolean
|
#
isInDeveloperMode( )
Returns true if the developer mode setting is checked, or if the developer mode cookie is set. |
public
boolean
|
|
public
string
|
#
getBasicVersion( )
Returns the plugin version, based on the plugin comment header. This value will be cached if it hasn't been read already. |
public
string
|
#
onLoadTextDomainMOFile( string $mofile, string $domain )
Hooks into load_textdomain_mofile, this function is used to override the WordPress repo translations and force the translations bundled with our plugin to be used. These are more complete and accurate than the WordPress community translations. |
createInstance()
|
string |
PAGE_MAP_LIST
|
#
"map-list"
|
string |
PAGE_MAP_EDIT
|
#
"map-edit"
|
string |
PAGE_SETTINGS
|
#
"map-settings"
|
string |
PAGE_SUPPORT
|
#
"map-support"
|
string |
PAGE_CATEGORIES
|
#
"categories"
|
string |
PAGE_ADVANCED
|
#
"advanced"
|
string |
PAGE_CUSTOM_FIELDS
|
#
"custom-fields"
|
public static
boolean
|
$enqueueScriptsFired
|
#
false
|
protected
|
$scriptLoader
|
public read-only
string
|
$spatialFunctionPrefix
MySQL versions 8 and above prefix all spatial functions with ST_, previous versions do not. This property will be ST_ where necessary, and an empty string where not. You should use this with all DB calls that make use of spaital functions. |
public read-only
string
|
$gdprCompliance
An instance of the GDPRCompliance class. |