-
Notifications
You must be signed in to change notification settings - Fork 2
tp TouchPointWP Stats
Keep track of some basic stats that are helpful for Tenth to support other churches using the plugin.
- Class name: Stats
- Namespace: \tp\TouchPointWP
- This class implements: tp\TouchPointWP\Interfaces\api, JsonSerializable, tp\TouchPointWP\Interfaces\updatesViaCron
const CRON_HOOK = \tp\TouchPointWP\TouchPointWP::HOOK_PREFIX . 'stats_submit'
const SUBMISSION_ENDPOINT = 'https://www.tenth.org/touchpoint-api/stats/submit'
mixed tp\TouchPointWP\Stats::__destruct()
Make sure saves have happened before the object is destroyed.
- Visibility: public
- mixed
bool tp\TouchPointWP\Stats::load()
Loads the module and initializes the other actions.
- Visibility: public
- This method is static.
- bool -
void tp\TouchPointWP\Stats::migrate()
Call home, triggered by migration.
- Visibility: public
- This method is static.
void tp\TouchPointWP\Interfaces\updatesViaCron::updateCron()
Run the updating cron task. Fail quietly to not disturb the visitor experience if using WP default cron handling.
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\Interfaces\updatesViaCron
void tp\TouchPointWP\Interfaces\updatesViaCron::checkUpdates()
Check to see if a cron run is needed, and run it if so. Connected to an init function.
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\Interfaces\updatesViaCron
bool tp\TouchPointWP\Stats::updateDb()
Save the stats to the database.
- Visibility: public
- bool - true on success (or if an update wasn't needed), false on failure.
void tp\TouchPointWP\Stats::__set(mixed name, mixed value)
Setter. Allows particular statistics to be set.
- Visibility: public
- name mixed* value mixed
void tp\TouchPointWP\Stats::__get(string name)
- Visibility: public
- name string
array tp\TouchPointWP\Stats::getStatsForSubmission(bool updateQueried)
Assemble the information that's submitted.
- Visibility: public
- updateQueried bool
- array -
mixed tp\TouchPointWP\Stats::jsonSerialize()
Assemble the object into a format that can be serialized to JSON. Only includes the parameters that are part of this class, not those that are loaded from the database separately, such as version numbers.
- Visibility: public
- mixed
\tp\TouchPointWP\Stats tp\TouchPointWP\Stats::instance()
Get the singleton.
- Visibility: public
- This method is static.
- \tp\TouchPointWP\Stats -
bool tp\TouchPointWP\Interfaces\api::api(array uri)
Handle API requests
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\Interfaces\api
- uri array - The request URI already parsed by parse_url()
- bool - False if endpoint is not found. Should print the result.
bool tp\TouchPointWP\Stats::handleSubmission()
Handle submissions received to this site (presumably tenth.org) from other users of the plugin.
- Visibility: public
- This method is static.
- bool - True on success
Documentation generated November 19, 2025 1:15am.
- Simple RSVP
- People Lists
- Involvements
- Outreach Partners
- SQL & Python Reports
- Events Calendar from Meetings (Beta)
- Events Calendar Plugin Integration (Deprecated)
- tp
- tp\TouchPointWP
- Api
- Auth
- tp\TouchPointWP\Blocks
- CalendarGrid
- EventsCalendar
- ExtraValueHandler
- Geo
- tp\TouchPointWP\Interfaces
- Involvement
- Involvement_PostTypeSettings
- InvolvementMembership
- Location
- Meeting
- MeetingArray
- Partner
- Person
- PostTypeCapable
- RegistrationType
- Report
- Rsvp
- Settings
- Stats
- StatusWidget
- Taxonomies
- TouchPointWP
- TouchPointWP_AdminAPI
- TouchPointWP_Exception
- TouchPointWP_WPError
- Utilities
- tp\TouchPointWP