TouchPointWP
in package
Main plugin class.
Table of Contents
Constants
- API_ENDPOINT = "touchpoint-api"
- API Endpoint prefix, and specific endpoints. All must be lower-case.
- API_ENDPOINT_ADMIN = "admin"
- API_ENDPOINT_ADMIN_SCRIPTZIP = "admin/scriptzip"
- API_ENDPOINT_APP_EVENTS = "app-events"
- API_ENDPOINT_AUTH = "auth"
- API_ENDPOINT_CLEANUP = "cleanup"
- API_ENDPOINT_GEOLOCATE = "geolocate"
- API_ENDPOINT_GLOBAL = "global"
- API_ENDPOINT_INVOLVEMENT = "inv"
- API_ENDPOINT_MEETING = "mtg"
- API_ENDPOINT_PERSON = "person"
- API_ENDPOINT_REPORT = "report"
- CACHE_NONE = 20
- CACHE_PRIVATE = 10
- CACHE_PUBLIC = 0
- Caching
- CACHE_TTL = 8
- Typical amount of time in hours for metadata to last (e.g. genders and resCodes).
- HOOK_PREFIX = "tp_"
- Prefix to use for all filters and hooks.
- INIT_ACTION_HOOK = self::HOOK_PREFIX . "init"
- SETTINGS_PREFIX = "tp_"
- Prefix to use for all settings.
- SHORTCODE_PREFIX = "TP-"
- Prefix to use for all shortcodes.
- TABLE_IP_GEO = self::TABLE_PREFIX . "ipGeo"
- TABLE_PREFIX = "tp_"
- Table Names
- TAX_AGEGROUP = self::HOOK_PREFIX . "agegroup"
- TAX_CAMPUS = self::HOOK_PREFIX . "campus"
- TAX_DAYTIME = self::HOOK_PREFIX . "timeOfDay"
- TAX_DIV = self::HOOK_PREFIX . "div"
- TAX_GP_CATEGORY = self::HOOK_PREFIX . "partner_category"
- TAX_INV_MARITAL = self::HOOK_PREFIX . "inv_marital"
- TAX_RESCODE = self::HOOK_PREFIX . "rescode"
- TAX_TENSE = self::HOOK_PREFIX . "tense"
- TAX_TENSE_FUTURE = "future"
- TAX_TENSE_PAST = "past"
- TAX_TENSE_PRESENT = "present"
- TAX_WEEKDAY = self::HOOK_PREFIX . "weekday"
- TAXMETA_LOOKUP_ID = self::HOOK_PREFIX . "lookup_id"
- TEMPLATES_TO_OVERWRITE = ['archive.php', 'singular.php', 'single.php', 'index.php', 'template-canvas.php']
- TOKEN = "TouchPointWP"
- The Token
- VERSION = "0.0.37"
- Version number
Properties
- $assets_dir : string
- The plugin assets directory.
- $assets_url : string
- The plugin assets URL, with trailing slash.
- $debug : bool
- $dir : string
- The main plugin directory.
- $file : string
- The main plugin file.
- $joiner : string
- $script_ext : string
- Suffix for JavaScripts.
- $settings : TouchPointWP_Settings|null
- Settings object
Methods
- __clone() : mixed
- Don't clone.
- __wakeup() : mixed
- Don't deserialize.
- activation() : mixed
- Activation. Runs on activation.
- admin() : TouchPointWP_AdminAPI
- adminPrintStyleOverrides() : void
- Force some styling overrides into admin views.
- ajaxGeolocate() : void
- apiGet() : stdClass|array<string|int, mixed>
- apiPost() : stdClass|array<string|int, mixed>
- capitalPyScript() : string
- Find and replace links to /pyscript with their more functional brother, /PyScript. That small typo makes bad things happen.
- checkMigrations() : void
- Compare the version numbers to determine if a migration is needed.
- cronAdd15Minutes() : mixed
- currentUserIsAdmin() : bool
- Whether the current user is an admin.
- currentUserPerson() : Person|null
- Get the person that corresponds to the current user, if the current user is authenticated, and the user is associated with a PeopleId.
- deactivation() : mixed
- Deactivation. Runs on deactivation.
- doCacheHeaders() : void
- Spit out headers that prevent caching. Useful for API calls.
- doPersonQuery() : stdClass
- Submit a person query to TouchPoint with a structured array with the parameters.
- enqueueActionsStyle() : void
- This function enqueues the stylesheet for actions (swal, basically).
- enqueuePartialsStyle() : mixed
- This function enqueues the stylesheet for the default templates, to avoid registering the style on sites where custom templates exist.
- extGet() : array<string|int, mixed>
- filterByTag() : string
- Adds async/defer attributes to enqueued / registered scripts. If -defer or -async is present in the script's handle, the respective attribute is added.
- flattenArrayToKV() : array<string|int, mixed>
- flushRewriteRules() : void
- Execute a flushing of the rewrite rules, if either absolutely necessary ($force = true) or enqueued by queuing function.
- geolocate() : stdClass|false
- getCampuses() : array<string|int, mixed>
- Returns an array of objects that correspond to campuses. Each Campus has a name, a code, and an id.
- getDivisions() : array<string|int, mixed>
- Returns an array of objects that correspond to divisions. Each Division has a name and an id. The name is both the Program and Division.
- getDivisionsAsKVArray() : array<string|int, string>
- Format the list of divisions into an array with form-name-friendly IDs as the key.
- getDivisionTermIdByDivId() : int|false
- getFamilyEvFields() : array<string|int, mixed>
- Returns an array of objects that correspond to Family Extra Value Fields. Each has a name and a type.
- getFamilyEvFieldsAsKVArray() : array<string|int, string>
- Format the list of Family Extra Value Fields into an array with form-name-friendly IDs as the key.
- getGenders() : array<string|int, mixed>
- Returns an array of objects that correspond to the genders. Each Gender has a name and an id.
- getJsLocalizationDir() : string
- getKeywords() : array<string|int, mixed>
- Returns an array of objects that correspond to keywords. Each Keyword has a name and an id.
- getKeywordsAsKVArray() : array<string|int, string>
- Format the list of divisions into an array with form-name-friendly IDs as the key.
- getMemberTypesForDivisions() : array<string|int, mixed>
- Get the member types currently in use for the named divisions.
- getPersonEvFields() : array<string|int, mixed>
- Returns an array of objects that correspond to Person Extra Value Fields. Each has a name and a type.
- getPersonEvFieldsAsKVArray() : array<string|int, string>
- Format the list of Person Extra Value Fields into an array with form-name-friendly IDs as the key.
- getResCodes() : array<string|int, mixed>
- Returns an array of objects that correspond to resident codes. Each ResCode has a name, a code, and an id.
- getSavedSearches() : array<string|int, array<string|int, string>>
- Get a list of saved searches pertinent to the current user. These are grouped by type: User's searches, Public, and Flags.
- getTaxTermId() : int|null
- Get the term id for a given taxonomy and value.
- getTermsClauses() : mixed
- Filter to add a tp_post_type option to get_terms that takes either a string of one post type or an array of post types.
- host() : string|null
- init() : void
- instance() : TouchPointWP
- Main TouchPointWP Instance
- isApi() : bool
- Indicates that the current request is being processed through the API.
- load() : TouchPointWP
- Load the settings, connect the references, and check that there aren't pending migrations.
- loadLocalizations() : mixed
- Load plugin textdomain
- newQueryObject() : array<string|int, mixed>
- Create a basic parameter array for doPersonQuery
- orderHierarchicalTerms() : array<string|int, WP_Term>
- Sort a list of hierarchical terms into a list in which each parent is immediately followed by its children.
- parseRequest() : bool
- postHeadersAndFiltering() : string
- printDynamicFooterScripts() : void
- Print Dynamic Instantiation scripts.
- queueFlushRewriteRules() : void
- Cause a flushing of rewrite rules on next load.
- queueUpdateDeployedScripts() : void
- Cause a script update on next load.
- registerScriptsAndStyles() : void
- registerTaxonomies() : void
- Register the taxonomies.
- renderBaseInlineScript() : void
- requireScript() : void
- Enqueue TouchPoint Scripts. Also, always adds Base if it hasn't been added yet.
- requireStyle() : void
- Enqueue TouchPoint Styles.
- reverseGeocode() : object|false
- scheduleCleanup() : void
- setCaching() : void
- uninstall() : mixed
- Uninstallation. Runs on uninstallation.
- updateDeployedScripts() : void
- updateFamilyEvFields() : false|object
- Update the Person Extra Values if they're stale.
- updatePersonEvFields() : false|object
- Update the Person Extra Values if they're stale.
- useTribeCalendar() : bool
- Indicates that Tribe Calendar is enabled.
- useTribeCalendarPro() : bool
- Indicates that Tribe Calendar Pro is enabled.
Constants
API_ENDPOINT
API Endpoint prefix, and specific endpoints. All must be lower-case.
public
mixed
API_ENDPOINT
= "touchpoint-api"
API_ENDPOINT_ADMIN
public
mixed
API_ENDPOINT_ADMIN
= "admin"
API_ENDPOINT_ADMIN_SCRIPTZIP
public
mixed
API_ENDPOINT_ADMIN_SCRIPTZIP
= "admin/scriptzip"
API_ENDPOINT_APP_EVENTS
public
mixed
API_ENDPOINT_APP_EVENTS
= "app-events"
API_ENDPOINT_AUTH
public
mixed
API_ENDPOINT_AUTH
= "auth"
API_ENDPOINT_CLEANUP
public
mixed
API_ENDPOINT_CLEANUP
= "cleanup"
API_ENDPOINT_GEOLOCATE
public
mixed
API_ENDPOINT_GEOLOCATE
= "geolocate"
API_ENDPOINT_GLOBAL
public
mixed
API_ENDPOINT_GLOBAL
= "global"
API_ENDPOINT_INVOLVEMENT
public
mixed
API_ENDPOINT_INVOLVEMENT
= "inv"
API_ENDPOINT_MEETING
public
mixed
API_ENDPOINT_MEETING
= "mtg"
API_ENDPOINT_PERSON
public
mixed
API_ENDPOINT_PERSON
= "person"
API_ENDPOINT_REPORT
public
mixed
API_ENDPOINT_REPORT
= "report"
CACHE_NONE
public
mixed
CACHE_NONE
= 20
CACHE_PRIVATE
public
mixed
CACHE_PRIVATE
= 10
CACHE_PUBLIC
Caching
public
mixed
CACHE_PUBLIC
= 0
CACHE_TTL
Typical amount of time in hours for metadata to last (e.g. genders and resCodes).
public
mixed
CACHE_TTL
= 8
HOOK_PREFIX
Prefix to use for all filters and hooks.
public
mixed
HOOK_PREFIX
= "tp_"
INIT_ACTION_HOOK
public
mixed
INIT_ACTION_HOOK
= self::HOOK_PREFIX . "init"
SETTINGS_PREFIX
Prefix to use for all settings.
public
mixed
SETTINGS_PREFIX
= "tp_"
SHORTCODE_PREFIX
Prefix to use for all shortcodes.
public
mixed
SHORTCODE_PREFIX
= "TP-"
TABLE_IP_GEO
public
mixed
TABLE_IP_GEO
= self::TABLE_PREFIX . "ipGeo"
TABLE_PREFIX
Table Names
public
mixed
TABLE_PREFIX
= "tp_"
TAX_AGEGROUP
public
mixed
TAX_AGEGROUP
= self::HOOK_PREFIX . "agegroup"
TAX_CAMPUS
public
mixed
TAX_CAMPUS
= self::HOOK_PREFIX . "campus"
TAX_DAYTIME
public
mixed
TAX_DAYTIME
= self::HOOK_PREFIX . "timeOfDay"
TAX_DIV
public
mixed
TAX_DIV
= self::HOOK_PREFIX . "div"
TAX_GP_CATEGORY
public
mixed
TAX_GP_CATEGORY
= self::HOOK_PREFIX . "partner_category"
TAX_INV_MARITAL
public
mixed
TAX_INV_MARITAL
= self::HOOK_PREFIX . "inv_marital"
TAX_RESCODE
public
mixed
TAX_RESCODE
= self::HOOK_PREFIX . "rescode"
TAX_TENSE
public
mixed
TAX_TENSE
= self::HOOK_PREFIX . "tense"
TAX_TENSE_FUTURE
public
mixed
TAX_TENSE_FUTURE
= "future"
TAX_TENSE_PAST
public
mixed
TAX_TENSE_PAST
= "past"
TAX_TENSE_PRESENT
public
mixed
TAX_TENSE_PRESENT
= "present"
TAX_WEEKDAY
public
mixed
TAX_WEEKDAY
= self::HOOK_PREFIX . "weekday"
TAXMETA_LOOKUP_ID
public
mixed
TAXMETA_LOOKUP_ID
= self::HOOK_PREFIX . "lookup_id"
TEMPLATES_TO_OVERWRITE
public
mixed
TEMPLATES_TO_OVERWRITE
= ['archive.php', 'singular.php', 'single.php', 'index.php', 'template-canvas.php']
TOKEN
The Token
public
mixed
TOKEN
= "TouchPointWP"
VERSION
Version number
public
mixed
VERSION
= "0.0.37"
Properties
$assets_dir
The plugin assets directory.
public
string
$assets_dir
$assets_url
The plugin assets URL, with trailing slash.
public
string
$assets_url
$debug
public
bool
$debug
$dir
The main plugin directory.
public
static string
$dir
$file
The main plugin file.
public
string
$file
$joiner
public
static string
$joiner
= " ◦ "
Used for imploding arrays together in human-friendly formats.
$script_ext
Suffix for JavaScripts.
public
string
$script_ext
$settings
Settings object
public
TouchPointWP_Settings|null
$settings
= null
Methods
__clone()
Don't clone.
public
__clone() : mixed
__wakeup()
Don't deserialize.
public
__wakeup() : mixed
activation()
Activation. Runs on activation.
public
activation() : mixed
admin()
public
admin() : TouchPointWP_AdminAPI
Return values
TouchPointWP_AdminAPIadminPrintStyleOverrides()
Force some styling overrides into admin views.
public
adminPrintStyleOverrides() : void
ajaxGeolocate()
public
ajaxGeolocate() : void
apiGet()
public
apiGet(string $command[, array<string|int, mixed>|null $parameters = null ][, int $timeout = 5 ]) : stdClass|array<string|int, mixed>
Parameters
- $command : string
-
The thing to get
- $parameters : array<string|int, mixed>|null = null
-
URL parameters to be added.
- $timeout : int = 5
-
Amount of time in sec to wait before timing out.
Tags
Return values
stdClass|array<string|int, mixed> —An array with headers, body, and other keys Data is generally in json_decode($response['body'])->data
apiPost()
public
apiPost(string $command[, mixed $data = null ][, int $timeout = 5 ]) : stdClass|array<string|int, mixed>
Parameters
- $command : string
-
The thing to post
- $data : mixed = null
-
Data to post
- $timeout : int = 5
-
Amount of time in sec to wait before timing out.
Tags
Return values
stdClass|array<string|int, mixed> —An object that corresponds to the Data python object in TouchPoint.
capitalPyScript()
Find and replace links to /pyscript with their more functional brother, /PyScript. That small typo makes bad things happen.
public
static capitalPyScript(string|mixed $text) : string
Parameters
- $text : string|mixed
-
The text to be modified. (should be a string, but this is WordPress, so maybe not.)
Tags
Return values
string —The modified text.
checkMigrations()
Compare the version numbers to determine if a migration is needed.
public
checkMigrations() : void
cronAdd15Minutes()
public
static cronAdd15Minutes( $schedules) : mixed
Parameters
currentUserIsAdmin()
Whether the current user is an admin.
public
static currentUserIsAdmin() : bool
Return values
boolcurrentUserPerson()
Get the person that corresponds to the current user, if the current user is authenticated, and the user is associated with a PeopleId.
public
static currentUserPerson() : Person|null
Return values
Person|nulldeactivation()
Deactivation. Runs on deactivation.
public
deactivation() : mixed
doCacheHeaders()
Spit out headers that prevent caching. Useful for API calls.
public
static doCacheHeaders([int $cacheLevel = null ]) : void
Parameters
- $cacheLevel : int = null
doPersonQuery()
Submit a person query to TouchPoint with a structured array with the parameters.
public
doPersonQuery(array<string|int, mixed> $q[, bool $verbose = false ][, int $timeout = 5 ]) : stdClass
Parameters
- $q : array<string|int, mixed>
- $verbose : bool = false
- $timeout : int = 5
Tags
Return values
stdClass —The people objects are contained within ->people.
enqueueActionsStyle()
This function enqueues the stylesheet for actions (swal, basically).
public
static enqueueActionsStyle(string $action) : void
Parameters
- $action : string
-
This string identifies which action is being used. This should be passed to the filter so the filter can make an informed decision about whether to exclude the stylesheet.
enqueuePartialsStyle()
This function enqueues the stylesheet for the default templates, to avoid registering the style on sites where custom templates exist.
public
static enqueuePartialsStyle() : mixed
extGet()
public
extGet(string $url[, array<string|int, mixed>|null $parameters = null ]) : array<string|int, mixed>
Parameters
- $url : string
-
The destination of the request.
- $parameters : array<string|int, mixed>|null = null
-
URL parameters to be added.
Tags
Return values
array<string|int, mixed> —An array with headers, body, and other keys.
filterByTag()
Adds async/defer attributes to enqueued / registered scripts. If -defer or -async is present in the script's handle, the respective attribute is added.
public
filterByTag(string|null $tag, string|null $handle) : string
DOES apply to ALL scripts, not just those in the template.
Parameters
- $tag : string|null
-
The script tag.
- $handle : string|null
-
The script handle.
Tags
Return values
string —The HTML string.
flattenArrayToKV()
public
static flattenArrayToKV(array<string|int, mixed> $array, string $kField, string $vField[, string $kPrefix = '' ]) : array<string|int, mixed>
Parameters
- $array : array<string|int, mixed>
- $kField : string
- $vField : string
- $kPrefix : string = ''
Return values
array<string|int, mixed>flushRewriteRules()
Execute a flushing of the rewrite rules, if either absolutely necessary ($force = true) or enqueued by queuing function.
public
flushRewriteRules([bool $force = true ]) : void
Parameters
- $force : bool = true
Tags
geolocate()
public
geolocate([bool $useApi = true ][, bool $includeRaw = false ]) : stdClass|false
Parameters
- $useApi : bool = true
-
Set false to only use cached data, and not the IP API.
- $includeRaw : bool = false
Return values
stdClass|false —An object with 'lat', 'lng', and 'human' attributes, if a location could be identified. Or, false if not available.
getCampuses()
Returns an array of objects that correspond to campuses. Each Campus has a name, a code, and an id.
public
getCampuses() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getDivisions()
Returns an array of objects that correspond to divisions. Each Division has a name and an id. The name is both the Program and Division.
public
getDivisions() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getDivisionsAsKVArray()
Format the list of divisions into an array with form-name-friendly IDs as the key.
public
getDivisionsAsKVArray() : array<string|int, string>
Return values
array<string|int, string>getDivisionTermIdByDivId()
public
static getDivisionTermIdByDivId(int $divId) : int|false
Parameters
- $divId : int
Return values
int|false —Returns the term ID number or false (or 0) if the division is not found, or not enabled.
getFamilyEvFields()
Returns an array of objects that correspond to Family Extra Value Fields. Each has a name and a type.
public
getFamilyEvFields([array<string|int, mixed>|null $matches = null ]) : array<string|int, mixed>
Parameters
- $matches : array<string|int, mixed>|null = null
-
Provide an array of items that should be matched. If provided, only matches are returned.
Return values
array<string|int, mixed>getFamilyEvFieldsAsKVArray()
Format the list of Family Extra Value Fields into an array with form-name-friendly IDs as the key.
public
getFamilyEvFieldsAsKVArray([string|null $type = null ][, bool $addNone = false ]) : array<string|int, string>
Parameters
- $type : string|null = null
-
To limit the list to a particular data type, provide the name of the datatype. Needs to match the type in TouchPoint.
- $addNone : bool = false
-
Set true to add a "none" option to the list.
Return values
array<string|int, string>getGenders()
Returns an array of objects that correspond to the genders. Each Gender has a name and an id.
public
getGenders() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getJsLocalizationDir()
public
getJsLocalizationDir() : string
Return values
stringgetKeywords()
Returns an array of objects that correspond to keywords. Each Keyword has a name and an id.
public
getKeywords() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getKeywordsAsKVArray()
Format the list of divisions into an array with form-name-friendly IDs as the key.
public
getKeywordsAsKVArray() : array<string|int, string>
Return values
array<string|int, string>getMemberTypesForDivisions()
Get the member types currently in use for the named divisions.
public
getMemberTypesForDivisions([array<string|int, string> $divisions = [] ]) : array<string|int, mixed>
Parameters
- $divisions : array<string|int, string> = []
Return values
array<string|int, mixed>getPersonEvFields()
Returns an array of objects that correspond to Person Extra Value Fields. Each has a name and a type.
public
getPersonEvFields([array<string|int, mixed>|null $matches = null ]) : array<string|int, mixed>
Parameters
- $matches : array<string|int, mixed>|null = null
-
Provide an array of items that should be matched. If provided, only matches are returned.
Return values
array<string|int, mixed>getPersonEvFieldsAsKVArray()
Format the list of Person Extra Value Fields into an array with form-name-friendly IDs as the key.
public
getPersonEvFieldsAsKVArray([string|null $type = null ][, bool $addNone = false ]) : array<string|int, string>
Parameters
- $type : string|null = null
-
To limit the list to a particular data type, provide the name of the datatype. Needs to match the type in TouchPoint.
- $addNone : bool = false
-
Set true to add a "none" option to the list.
Return values
array<string|int, string>getResCodes()
Returns an array of objects that correspond to resident codes. Each ResCode has a name, a code, and an id.
public
getResCodes() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getSavedSearches()
Get a list of saved searches pertinent to the current user. These are grouped by type: User's searches, Public, and Flags.
public
getSavedSearches([int|null $peopleId = null ][, mixed $includeValue = null ]) : array<string|int, array<string|int, string>>
Because these are user-specific and relatively volatile, they are NOT cached in WordPress.
Parameters
- $peopleId : int|null = null
- $includeValue : mixed = null
Return values
array<string|int, array<string|int, string>>getTaxTermId()
Get the term id for a given taxonomy and value.
public
static getTaxTermId( $taxonomy, $value) : int|null
Parameters
Tags
Return values
int|nullgetTermsClauses()
Filter to add a tp_post_type option to get_terms that takes either a string of one post type or an array of post types.
public
getTermsClauses( $clauses, $taxonomy, $args) : mixed
Parameters
Tags
host()
public
host() : string|null
Return values
string|null —The URL of the TouchPoint instance. Null if not set.
init()
public
static init() : void
instance()
Main TouchPointWP Instance
public
static instance([mixed $file = '' ]) : TouchPointWP
Ensures only one instance of TouchPointWP is loaded or can be loaded.
Parameters
- $file : mixed = ''
Tags
Return values
TouchPointWP —instance
isApi()
Indicates that the current request is being processed through the API.
public
static isApi() : bool
Return values
boolload()
Load the settings, connect the references, and check that there aren't pending migrations.
public
static load( $file) : TouchPointWP
Parameters
Return values
TouchPointWPloadLocalizations()
Load plugin textdomain
public
loadLocalizations() : mixed
newQueryObject()
Create a basic parameter array for doPersonQuery
public
static newQueryObject() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>orderHierarchicalTerms()
Sort a list of hierarchical terms into a list in which each parent is immediately followed by its children.
public
static orderHierarchicalTerms(array<string|int, WP_Term> $terms[, bool $noChildlessParents = false ]) : array<string|int, WP_Term>
Parameters
- $terms : array<string|int, WP_Term>
- $noChildlessParents : bool = false
Return values
array<string|int, WP_Term>parseRequest()
public
parseRequest(bool $continue, WP $wp, array<string|int, mixed>|string $extraVars) : bool
Parameters
- $continue : bool
-
Whether to parse the request
- $wp : WP
-
Current WordPress environment instance
- $extraVars : array<string|int, mixed>|string
-
Passed query variables
Tags
Return values
bool —Whether other request parsing functions should be allowed to function.
postHeadersAndFiltering()
public
static postHeadersAndFiltering() : string
Return values
stringprintDynamicFooterScripts()
Print Dynamic Instantiation scripts.
public
printDynamicFooterScripts() : void
queueFlushRewriteRules()
Cause a flushing of rewrite rules on next load.
public
static queueFlushRewriteRules() : void
queueUpdateDeployedScripts()
Cause a script update on next load.
public
static queueUpdateDeployedScripts() : void
registerScriptsAndStyles()
public
registerScriptsAndStyles() : void
registerTaxonomies()
Register the taxonomies.
public
registerTaxonomies() : void
renderBaseInlineScript()
public
static renderBaseInlineScript() : void
requireScript()
Enqueue TouchPoint Scripts. Also, always adds Base if it hasn't been added yet.
public
static requireScript([string|null $name = null ]) : void
Parameters
- $name : string|null = null
requireStyle()
Enqueue TouchPoint Styles.
public
static requireStyle([string|null $name = null ]) : void
Parameters
- $name : string|null = null
reverseGeocode()
public
reverseGeocode(float $lat, float $lng[, bool $includeIpLoc = true ]) : object|false
Parameters
- $lat : float
-
Latitude
- $lng : float
-
Longitude
- $includeIpLoc : bool = true
-
Whether to use IP geolocation as a fallback data source.
Return values
object|false —An object with a 'human' attribute, if a location could be identified. Or, false if not available.
scheduleCleanup()
public
static scheduleCleanup() : void
setCaching()
public
static setCaching(int $level) : void
Parameters
- $level : int
uninstall()
Uninstallation. Runs on uninstallation.
public
static uninstall() : mixed
updateDeployedScripts()
public
updateDeployedScripts([bool $force = false ]) : void
Parameters
- $force : bool = false
Tags
updateFamilyEvFields()
Update the Person Extra Values if they're stale.
public
updateFamilyEvFields() : false|object
Return values
false|object —False on failure.
updatePersonEvFields()
Update the Person Extra Values if they're stale.
public
updatePersonEvFields() : false|object
Return values
false|object —False on failure
useTribeCalendar()
Indicates that Tribe Calendar is enabled.
public
static useTribeCalendar() : bool
Return values
booluseTribeCalendarPro()
Indicates that Tribe Calendar Pro is enabled.
public
static useTribeCalendarPro() : bool