Overview

Namespaces

  • None
  • WPGMZA
    • Integration
    • Selector

Classes

  • AdminMarkerDataTable
  • AjaxTable
  • AutoLoader
  • Crud
  • Database
  • DataTable
  • Distance
  • DOMDocument
  • DOMElement
  • Factory
  • GDPRCompliance
  • GlobalSettings
  • GoogleGeocoder
  • GoogleMap
  • GoogleMapsAPILoader
  • GoogleMapsLoader
  • LatLng
  • Map
  • MapsEngineDialog
  • Marker
  • MarkerDataTable
  • MarkerFilter
  • ModalDialog
  • NominatimGeocodeCache
  • OLLoader
  • Plugin
  • Query
  • QueryFragment
  • RestAPI
  • ScriptLoader
  • Strings
  • Table

Functions

  • create_marker_instance_delegate
  • query_nominatim_cache
  • store_nominatim_cache
  • Overview
  • Namespace
  • Class

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
Extended by WPGMZA\Plugin
Namespace: WPGMZA
Located at class.plugin.php
Methods summary
public
# __construct( )

Constructor. Called when plugins_loaded fires.

Constructor. Called when plugins_loaded fires.

public
# __set( $name, $value )
public
# __get( $name )

Getter, see property-read above.

Getter, see property-read above.

public
# onInit( )
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.

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.

If any of the enqueue scripts, admin enqueue scripts or enqueue block assets (Gutenberg) actions have already fired, this function will immediately ask the script loader to enqueue the plugins scripts and styles.

If none of those actions have fired yet, this function will bind to all three and enqueue the scripts at the correct time.

public
# getLocalizedData( )
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.

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.

Returns

string|null
The current page, where relevant to this plugin, or null
public boolean
# isUsingMinifiedScripts( )

Returns true if we are to be using combined or minified JavaScript

Returns true if we are to be using combined or minified JavaScript

Returns

boolean
True if combined or minified scripts are to be used.
public boolean
# isInDeveloperMode( )

Returns true if the developer mode setting is checked, or if the developer mode cookie is set.

Returns true if the developer mode setting is checked, or if the developer mode cookie is set.

Returns

boolean
True if in developer mode, by setting or by cookie.
public boolean
# isProVersion( )

Check whether we are running the Pro add-on.

Check whether we are running the Pro add-on.

Returns

boolean
True if the Pro add-on is installed and activated.
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.

Returns the plugin version, based on the plugin comment header. This value will be cached if it hasn't been read already.

Returns

string
The version string.
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.

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.

Parameters

$mofile
Path to the .mo file in question.
$domain
The text domain

Returns

string
Methods inherited from WPGMZA\Factory
createInstance()
Constants summary
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"
Properties summary
public static boolean $enqueueScriptsFired
# false
protected $scriptLoader
#
Magic properties summary
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.

API documentation generated by ApiGen