From c9052f1b2912d855e9d31ca32268a8968847bebe Mon Sep 17 00:00:00 2001
From: James K
Date: Thu, 29 Jun 2023 00:21:37 -0400
Subject: [PATCH 001/226] Resolve an issue with wp admin improperly handling
migrations during plugin update.
---
src/TouchPoint-WP/TouchPointWP.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index d2ce4ea3..3976187c 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -493,7 +493,7 @@ public function parseRequest($continue, $wp, $extraVars): bool
*/
public static function currentUserIsAdmin(): bool
{
- if (!function_exists('current_user_can'))
+ if (!function_exists('current_user_can') || !function_exists('wp_get_current_user'))
return false;
return current_user_can('manage_options');
}
From 202e8453e4d5a3296ece0b868d7bbcb48aa94c66 Mon Sep 17 00:00:00 2001
From: James K
Date: Tue, 18 Jul 2023 18:23:24 -0400
Subject: [PATCH 002/226] Adding check that plugin has only been initialized
once.
---
src/TouchPoint-WP/TouchPointWP.php | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index 3976187c..7cc82f36 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -710,9 +710,22 @@ public static function load($file): TouchPointWP
return $instance;
}
+ /**
+ * @var bool True of the init process has run. False if not. Prevents things from happening twice, which can cause errors.
+ */
+ private static bool $_hasBeenInited = false;
+
+ /**
+ * Initialize the plugin.
+ *
+ * @return void
+ */
public static function init(): void
{
- self::instance()->loadLocalizations();
+ if (self::$_hasBeenInited)
+ return;
+
+ self::instance()->loadLocalizations();
self::instance()->registerTaxonomies();
@@ -722,6 +735,8 @@ public static function init(): void
// If the scripts need to be updated, do that.
self::instance()->updateDeployedScripts();
+ self::$_hasBeenInited = true;
+
self::requireScript("base");
do_action(self::INIT_ACTION_HOOK);
From 097f352ba80346335eeea7a599d787a9944a5d79 Mon Sep 17 00:00:00 2001
From: James K
Date: Fri, 21 Jul 2023 10:12:08 -0400
Subject: [PATCH 003/226] Style improvement for "sign in with TouchPoint" link
---
src/TouchPoint-WP/Auth.php | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/TouchPoint-WP/Auth.php b/src/TouchPoint-WP/Auth.php
index 9b94f057..598d5c3c 100644
--- a/src/TouchPoint-WP/Auth.php
+++ b/src/TouchPoint-WP/Auth.php
@@ -129,18 +129,17 @@ public static function footer()
*/
public static function printLoginLink()
{
- $html = '';
+ $html = '
';
+ $url = self::getLoginUrl();
/** @noinspection HtmlUnknownTarget */
- $html .= '';
+ $html .= " ";
$html .= sprintf(
// translators: %s is "what you call TouchPoint at your church", which is a setting
__('Sign in with your %s account', 'TouchPoint-WP'),
htmlentities(TouchPointWP::instance()->settings->system_name)
);
- printf(
- $html,
- self::getLoginUrl()
- );
+ $html .= '
';
+ echo $html;
}
/**
From a615cd2d74c411f5c274b077dfc5b2c7c4418dad Mon Sep 17 00:00:00 2001
From: James K
Date: Fri, 21 Jul 2023 11:49:06 -0400
Subject: [PATCH 004/226] Significant performance improvement by reducing db
queries. Also, better error reporting in python.
---
src/TouchPoint-WP/TouchPointWP.php | 542 +++++++++++---------
src/TouchPoint-WP/TouchPointWP_AdminAPI.php | 2 +-
src/TouchPoint-WP/TouchPointWP_Settings.php | 48 +-
src/python/WebApi.py | 10 +-
4 files changed, 346 insertions(+), 256 deletions(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index 7cc82f36..1c8ad335 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -450,7 +450,7 @@ public function parseRequest($continue, $wp, $extraVars): bool
return $continue;
}
}
-
+
// Auth endpoints
if ($reqUri['path'][1] === TouchPointWP::API_ENDPOINT_AUTH &&
$this->settings->enable_authentication === "on"
@@ -623,14 +623,44 @@ public function loadLocalizations()
load_plugin_textdomain('TouchPoint-WP', false, $dir . '/i18n/');
}
+ /**
+ * Create or update database tables
+ */
+ protected function createTables(): void
+ {
+ global $wpdb;
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
+
+ // IP Geo Caching table
+ $tableName = $wpdb->base_prefix . TouchPointWP::TABLE_IP_GEO;
+ $sql = "CREATE TABLE $tableName (
+ id int(10) unsigned NOT NULL auto_increment,
+ ip varbinary(16) NOT NULL UNIQUE,
+ updatedDT datetime DEFAULT NOW(),
+ data text NOT NULL,
+ PRIMARY KEY (id)
+ )";
+ dbDelta($sql);
+ }
+
/**
* Compare the version numbers to determine if a migration is needed.
*/
- public function checkMigrations(): void
+ public function migrate($force = false): void
{
- if ($this->settings->version !== self::VERSION) {
- $this->settings->migrate();
+ if ($this->settings->version === self::VERSION && !$force) {
+ return;
}
+
+ $this->createTables();
+
+ if (self::$_hasBeenInited) {
+ $this->insertTerms();
+ } else {
+ add_action(self::INIT_ACTION_HOOK, [$this, 'insertTerms']);
+ }
+
+ $this->settings->migrate();
}
/**
@@ -647,7 +677,7 @@ public static function load($file): TouchPointWP
if (is_null($instance->settings)) {
$instance->settings = TouchPointWP_Settings::instance($instance);
if (is_admin()) {
- $instance->checkMigrations();
+ $instance->migrate();
}
}
@@ -702,7 +732,7 @@ public static function load($file): TouchPointWP
// Load Reports (feature is always enabled)
$instance->reports = Report::load();
- add_action('init', [self::class, 'init']);
+ add_action('init', [self::class, 'init'], 10);
add_filter('the_content', [self::class, 'capitalPyScript'], 11);
add_filter('widget_text_content', [self::class, 'capitalPyScript'], 11);
@@ -742,6 +772,12 @@ public static function init(): void
do_action(self::INIT_ACTION_HOOK);
}
+ /**
+ * Prints the inline 'base' script. This is meant to be called in the wp_head and admin_head, and should only be
+ * called once on a page, but that is not automatically validated.
+ *
+ * @return void
+ */
public static function renderBaseInlineScript(): void
{
include self::instance()->assets_dir . '/js/base-inline.php';
@@ -765,7 +801,10 @@ public function registerScriptsAndStyles(): void
self::VERSION,
true
);
- wp_set_script_translations(self::SHORTCODE_PREFIX . 'base-defer', 'TouchPoint-WP', $this->getJsLocalizationDir());
+ wp_set_script_translations(
+ self::SHORTCODE_PREFIX . 'base-defer',
+ 'TouchPoint-WP', $this->getJsLocalizationDir()
+ );
wp_register_script(
self::SHORTCODE_PREFIX . 'swal2-defer',
@@ -1234,7 +1273,7 @@ function getLabels(string $singular, string $plural): array
$resCodeTypesToApply = Involvement_PostTypeSettings::getPostTypesWithGeoEnabled();
}
$resCodeTypesToApply[] = 'user';
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_RESCODE,
$resCodeTypesToApply,
[
@@ -1257,28 +1296,7 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- foreach ($this->getResCodes() as $rc) {
- if ($rc->name !== null && ! Utilities::termExists($rc->name, self::TAX_RESCODE)) {
- $term = Utilities::insertTerm(
- $rc->name,
- self::TAX_RESCODE,
- [
- 'description' => $rc->name,
- 'slug' => sanitize_title($rc->name)
- ]
- );
- if (is_wp_error($term)) {
- new TouchPointWP_WPError($term);
- } else {
- update_term_meta($term['term_id'], self::TAXMETA_LOOKUP_ID, $rc->id);
- }
-
- self::queueFlushRewriteRules();
- }
- }
- // TODO remove defunct res codes
- }
+ // Terms inserted via insertTerms method
// Campuses
if ($this->settings->enable_campuses === "on") {
@@ -1287,7 +1305,7 @@ function getLabels(string $singular, string $plural): array
$campusesTypesToApply = Involvement_PostTypeSettings::getPostTypes();
}
$campusesTypesToApply[] = 'user';
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_CAMPUS,
$campusesTypesToApply,
[
@@ -1307,29 +1325,8 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- foreach ($this->getCampuses() as $c) {
- if ($c->name !== null && ! Utilities::termExists($c->name, self::TAX_CAMPUS)) {
- $term = Utilities::insertTerm(
- $c->name,
- self::TAX_CAMPUS,
- [
- 'description' => $c->name,
- 'slug' => sanitize_title($c->code)
- ]
- );
- if (is_wp_error($term)) {
- new TouchPointWP_WPError($term);
- } else {
- update_term_meta($term['term_id'], self::TAXMETA_LOOKUP_ID, $c->id);
- }
-
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
}
- // TODO remove defunct campuses (including all of them, if disabled)
// Divisions & Programs
$divisionTypesToApply = [];
@@ -1338,7 +1335,7 @@ function getLabels(string $singular, string $plural): array
}
// TODO allow this taxonomy to be applied to other post types as an option.
if (count($divisionTypesToApply) > 0) {
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_DIV,
$divisionTypesToApply,
[
@@ -1359,75 +1356,13 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- $enabledDivisions = $this->settings->dv_divisions;
- foreach ($this->getDivisions() as $d) {
- if (in_array('div' . $d->id, $enabledDivisions)) {
- // Program
- $pTermInfo = Utilities::termExists($d->pName, self::TAX_DIV, 0);
- if ($pTermInfo === null && $d->pName !== null) {
- $pTermInfo = Utilities::insertTerm(
- $d->pName,
- self::TAX_DIV,
- [
- 'description' => $d->pName,
- 'slug' => sanitize_title($d->pName)
- ]
- );
- if (is_wp_error($pTermInfo)) {
- new TouchPointWP_WPError($pTermInfo);
- } else {
- update_term_meta($pTermInfo['term_id'], self::SETTINGS_PREFIX . 'programId', $d->proId);
- }
-
- self::queueFlushRewriteRules();
- }
-
- // Division
- $dTermInfo = Utilities::termExists($d->dName, self::TAX_DIV, $pTermInfo['term_id']);
- if ($dTermInfo === null && $d->dName !== null) {
- $dTermInfo = Utilities::insertTerm(
- $d->dName,
- self::TAX_DIV,
- [
- 'description' => $d->dName,
- 'parent' => $pTermInfo['term_id'],
- 'slug' => sanitize_title($d->dName)
- ]
- );
- if (is_wp_error($dTermInfo)) {
- new TouchPointWP_WPError($dTermInfo);
- } else {
- update_term_meta($dTermInfo['term_id'], self::SETTINGS_PREFIX . 'divId', $d->id);
- }
-
- self::queueFlushRewriteRules();
- }
- } else {
- // Remove terms that are disabled from importing.
-
- // Delete disabled divisions. Get program, so we delete the right division.
- $pTermInfo = Utilities::termExists($d->pName, self::TAX_DIV, 0);
- if ($pTermInfo !== null) {
- $dTermInfo = Utilities::termExists($d->dName, self::TAX_DIV, $pTermInfo['term_id']);
- if ($dTermInfo !== null) {
- wp_delete_term($dTermInfo['term_id'], self::TAX_DIV);
- self::queueFlushRewriteRules();
- }
- }
-
- // Program
- // TODO remove programs that no longer have a division selected for use as a term.
- // TODO remove program & div terms that are no longer present in TouchPoint
- }
- }
- }
+ // Terms inserted via insertTerms method
}
if ($this->settings->enable_involvements === "on") {
// Weekdays
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_WEEKDAY,
Involvement_PostTypeSettings::getPostTypes(),
[
@@ -1447,25 +1382,10 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- for ($di = 0; $di < 7; $di++) {
- $name = Utilities::getPluralDayOfWeekNameForNumber_noI18n($di);
- if ( ! Utilities::termExists($name, self::TAX_WEEKDAY)) {
- Utilities::insertTerm(
- $name,
- self::TAX_WEEKDAY,
- [
- 'description' => $name,
- 'slug' => Utilities::getDayOfWeekShortForNumber_noI18n($di)
- ]
- );
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
// Tenses
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_TENSE,
Involvement_PostTypeSettings::getPostTypes(),
[
@@ -1485,31 +1405,11 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- foreach (
- [
- TouchPointWP::TAX_TENSE_FUTURE => 'Upcoming',
- TouchPointWP::TAX_TENSE_PRESENT => 'Current',
- TouchPointWP::TAX_TENSE_PAST => 'Past',
- ] as $slug => $name
- ) {
- if ( ! Utilities::termExists($slug, self::TAX_TENSE)) {
- Utilities::insertTerm(
- $name,
- self::TAX_TENSE,
- [
- 'description' => $name,
- 'slug' => $slug
- ]
- );
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
// Time of Day
/** @noinspection SpellCheckingInspection */
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_DAYTIME,
Involvement_PostTypeSettings::getPostTypes(),
[
@@ -1529,32 +1429,7 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- $timesOfDay = [
- 'Late Night',
- 'Early Morning',
- 'Morning',
- 'Midday',
- 'Afternoon',
- 'Evening',
- 'Night'
- ];
- foreach ($timesOfDay as $tod) {
- if ( ! Utilities::termExists($tod, self::TAX_WEEKDAY)) {
- $slug = str_replace(" ", "", $tod);
- $slug = strtolower($slug);
- Utilities::insertTerm(
- $tod,
- self::TAX_DAYTIME,
- [
- 'description' => $tod,
- 'slug' => $slug
- ]
- );
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
}
// Age Groups
@@ -1563,7 +1438,7 @@ function getLabels(string $singular, string $plural): array
$ageGroupTypesToApply = Involvement_PostTypeSettings::getPostTypes();
}
$ageGroupTypesToApply[] = 'user';
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_AGEGROUP,
$ageGroupTypesToApply,
[
@@ -1583,26 +1458,12 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- foreach (["20s", "30s", "40s", "50s", "60s", "70+"] as $ag) {
- if ( ! Utilities::termExists($ag, self::TAX_AGEGROUP)) {
- Utilities::insertTerm(
- $ag,
- self::TAX_AGEGROUP,
- [
- 'description' => $ag,
- 'slug' => sanitize_title($ag)
- ]
- );
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
// Involvement Marital Status
if ($this->settings->enable_involvements === "on") {
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_INV_MARITAL,
Involvement_PostTypeSettings::getPostTypes(),
[
@@ -1622,21 +1483,7 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- foreach (['mostly_single', 'mostly_married'] as $ms) {
- if ( ! Utilities::termExists($ms, self::TAX_INV_MARITAL)) {
- Utilities::insertTerm(
- $ms,
- self::TAX_INV_MARITAL,
- [
- 'description' => $ms,
- 'slug' => sanitize_title($ms)
- ]
- );
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
}
// Global Partner Category
@@ -1672,6 +1519,245 @@ function getLabels(string $singular, string $plural): array
}
}
+ /**
+ * For the taxonomies that are based on Lookups in the TouchPoint database, insert or update the terms.
+ *
+ * @param object[] $list
+ * @param string $taxonomy
+ * @param bool $forceIdUpdate
+ *
+ * @return void
+ */
+ protected function insertTermsForLookupBasedTaxonomy(array $list, string $taxonomy, bool $forceIdUpdate)
+ {
+ foreach ($list as $i) {
+ if ($i->name === null) {
+ continue;
+ }
+ // In addition to making sure term exists, make sure it has the correct meta id, too.
+ $term = Utilities::termExists($i->name, $taxonomy);
+ $idUpdate = $forceIdUpdate;
+ if (!$term) {
+ $term = Utilities::insertTerm(
+ $i->name,
+ $taxonomy,
+ [
+ 'description' => $i->name,
+ 'slug' => sanitize_title($i->name)
+ ]
+ );
+ if (is_wp_error($term)) {
+ new TouchPointWP_WPError($term);
+ $term = null;
+ }
+ $idUpdate = true;
+ }
+ if ($term !== null && isset($term['term_id']) && $idUpdate) {
+ update_term_meta($term['term_id'], self::TAXMETA_LOOKUP_ID, $i->id);
+ }
+ if ($idUpdate) {
+ self::queueFlushRewriteRules();
+ }
+ }
+ }
+
+ public static bool $forceTermLookupIdUpdate = false;
+
+ /**
+ * Insert the terms for the registered taxonomies. (This is supposed to happen a while after the taxonomies are
+ * loaded.)
+ *
+ * @return void
+ */
+ public function insertTerms()
+ {
+ // Resident Codes
+ $this->insertTermsForLookupBasedTaxonomy(
+ $this->getResCodes(),
+ self::TAX_RESCODE,
+ self::$forceTermLookupIdUpdate
+ );
+ // TODO remove defunct res codes
+
+ // Campuses
+ if ($this->settings->enable_campuses === "on") {
+ $this->insertTermsForLookupBasedTaxonomy(
+ $this->getCampuses(),
+ self::TAX_CAMPUS,
+ self::$forceTermLookupIdUpdate
+ );
+ }
+ // TODO remove defunct campuses (including all of them, if disabled)
+
+ // Age Groups
+ foreach (["20s", "30s", "40s", "50s", "60s", "70+"] as $ag) {
+ if ( ! Utilities::termExists($ag, self::TAX_AGEGROUP)) {
+ Utilities::insertTerm(
+ $ag,
+ self::TAX_AGEGROUP,
+ [
+ 'description' => $ag,
+ 'slug' => sanitize_title($ag)
+ ]
+ );
+ self::queueFlushRewriteRules();
+ }
+ }
+
+ // Involvements and TODO Events
+ $postTypesToApply = [];
+ if ($this->settings->enable_involvements === "on") {
+ $postTypesToApply = Involvement_PostTypeSettings::getPostTypes();
+ }
+ if (count($postTypesToApply) > 0) {
+
+ // Divisions & Programs
+ $enabledDivisions = $this->settings->dv_divisions;
+ foreach ($this->getDivisions() as $d) {
+ if (in_array('div' . $d->id, $enabledDivisions)) {
+ // Program
+ $pTermInfo = Utilities::termExists($d->pName, self::TAX_DIV, 0);
+ if ($pTermInfo === null && $d->pName !== null) {
+ $pTermInfo = Utilities::insertTerm(
+ $d->pName,
+ self::TAX_DIV,
+ [
+ 'description' => $d->pName,
+ 'slug' => sanitize_title($d->pName)
+ ]
+ );
+ if (is_wp_error($pTermInfo)) {
+ new TouchPointWP_WPError($pTermInfo);
+ } else {
+ update_term_meta($pTermInfo['term_id'], self::SETTINGS_PREFIX . 'programId', $d->proId);
+ }
+
+ self::queueFlushRewriteRules();
+ }
+
+ // Division
+ $dTermInfo = Utilities::termExists($d->dName, self::TAX_DIV, $pTermInfo['term_id']);
+ if ($dTermInfo === null && $d->dName !== null) {
+ $dTermInfo = Utilities::insertTerm(
+ $d->dName,
+ self::TAX_DIV,
+ [
+ 'description' => $d->dName,
+ 'parent' => $pTermInfo['term_id'],
+ 'slug' => sanitize_title($d->dName)
+ ]
+ );
+ if (is_wp_error($dTermInfo)) {
+ new TouchPointWP_WPError($dTermInfo);
+ } else {
+ update_term_meta($dTermInfo['term_id'], self::SETTINGS_PREFIX . 'divId', $d->id);
+ }
+
+ self::queueFlushRewriteRules();
+ }
+ } else {
+ // Remove terms that are disabled from importing.
+
+ // Delete disabled divisions. Get program, so we delete the right division.
+ $pTermInfo = Utilities::termExists($d->pName, self::TAX_DIV, 0);
+ if ($pTermInfo !== null) {
+ $dTermInfo = Utilities::termExists($d->dName, self::TAX_DIV, $pTermInfo['term_id']);
+ if ($dTermInfo !== null) {
+ wp_delete_term($dTermInfo['term_id'], self::TAX_DIV);
+ self::queueFlushRewriteRules();
+ }
+ }
+
+ // Program
+ // TODO remove programs that no longer have a division selected for use as a term.
+ // TODO remove program & div terms that are no longer present in TouchPoint
+ }
+ }
+
+ // Weekdays
+ for ($di = 0; $di < 7; $di++) {
+ $name = Utilities::getPluralDayOfWeekNameForNumber_noI18n($di);
+ if ( ! Utilities::termExists($name, self::TAX_WEEKDAY)) {
+ Utilities::insertTerm(
+ $name,
+ self::TAX_WEEKDAY,
+ [
+ 'description' => $name,
+ 'slug' => Utilities::getDayOfWeekShortForNumber_noI18n($di)
+ ]
+ );
+ self::queueFlushRewriteRules();
+ }
+ }
+
+ // Tense
+ foreach (
+ [
+ TouchPointWP::TAX_TENSE_FUTURE => 'Upcoming',
+ TouchPointWP::TAX_TENSE_PRESENT => 'Current',
+ TouchPointWP::TAX_TENSE_PAST => 'Past',
+ ] as $slug => $name
+ ) {
+ if ( ! Utilities::termExists($slug, self::TAX_TENSE)) {
+ Utilities::insertTerm(
+ $name,
+ self::TAX_TENSE,
+ [
+ 'description' => $name,
+ 'slug' => $slug
+ ]
+ );
+ self::queueFlushRewriteRules();
+ }
+ }
+
+ // Time of Day
+ $timesOfDay = [
+ 'Late Night',
+ 'Early Morning',
+ 'Morning',
+ 'Midday',
+ 'Afternoon',
+ 'Evening',
+ 'Night'
+ ];
+ foreach ($timesOfDay as $tod) {
+ if ( ! Utilities::termExists($tod, self::TAX_WEEKDAY)) {
+ $slug = str_replace(" ", "", $tod);
+ $slug = strtolower($slug);
+ Utilities::insertTerm(
+ $tod,
+ self::TAX_DAYTIME,
+ [
+ 'description' => $tod,
+ 'slug' => $slug
+ ]
+ );
+ self::queueFlushRewriteRules();
+ }
+ }
+ }
+
+ // Involvements
+ if ($this->settings->enable_involvements === "on") {
+
+ // Involvement Marital Status
+ foreach (['mostly_single', 'mostly_married'] as $ms) {
+ if ( ! Utilities::termExists($ms, self::TAX_INV_MARITAL)) {
+ Utilities::insertTerm(
+ $ms,
+ self::TAX_INV_MARITAL,
+ [
+ 'description' => $ms,
+ 'slug' => sanitize_title($ms)
+ ]
+ );
+ self::queueFlushRewriteRules();
+ }
+ }
+ }
+ }
+
private static array $divisionTerms = [];
/**
@@ -1749,9 +1835,7 @@ public function activation()
{
self::queueFlushRewriteRules();
- $this->createTables();
-
- $this->settings->migrate();
+ $this->migrate(true);
}
/**
@@ -1793,26 +1877,6 @@ protected static function clearScheduledHooks(): void
wp_clear_scheduled_hook(Report::CRON_HOOK);
}
- /**
- * Create or update database tables
- */
- protected function createTables(): void
- {
- global $wpdb;
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
-
- // IP Geo Caching table
- $tableName = $wpdb->base_prefix . self::TABLE_IP_GEO;
- $sql = "CREATE TABLE $tableName (
- id int(10) unsigned NOT NULL auto_increment,
- ip varbinary(16) NOT NULL UNIQUE,
- updatedDT datetime DEFAULT NOW(),
- data text NOT NULL,
- PRIMARY KEY (id)
- )";
- dbDelta($sql);
- }
-
/**
* Drop database tables at uninstallation.
*/
@@ -1835,7 +1899,7 @@ protected static function dropTables(): void
*/
private function _log_version_number()
{
- update_option(self::TOKEN . '_version', self::VERSION, false);
+ update_option(self::TOKEN . '_version', self::VERSION, true);
}
/**
diff --git a/src/TouchPoint-WP/TouchPointWP_AdminAPI.php b/src/TouchPoint-WP/TouchPointWP_AdminAPI.php
index 24a5c86a..9452cac0 100644
--- a/src/TouchPoint-WP/TouchPointWP_AdminAPI.php
+++ b/src/TouchPoint-WP/TouchPointWP_AdminAPI.php
@@ -88,7 +88,7 @@ public static function api(array $uri): bool
if (!TouchPointWP::currentUserIsAdmin()) {
return false;
}
- TouchPointWP::instance()->settings->migrate();
+ TouchPointWP::instance()->migrate(true);
exit;
}
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 7bf47ed0..0f9e8dfc 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -180,6 +180,31 @@ public function hasValidApiSettings(): bool
$this->getWithoutDefault('api_pass') === TouchPointWP_Settings::UNDEFINED_PLACEHOLDER);
}
+ /**
+ * Used internally to determine if a particular setting should be auto-loaded.
+ *
+ * @param string $settingName
+ *
+ * @return bool
+ */
+ private function settingShouldBeAutoLoaded(string $settingName): bool
+ {
+ if (str_contains($settingName, '_cron_last_run')) {
+ return true;
+ }
+ foreach (self::settingsFields() as $page) {
+ foreach ($page['fields'] as $f) {
+ if ($f['id'] === $settingName) {
+ if (isset($f['autoload'])) {
+ return !!$f['autoload'];
+ }
+ return false;
+ }
+ }
+ }
+ return false;
+ }
+
/**
* Build settings fields
*
@@ -213,6 +238,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
'callback' => fn($new) => $this->validation_updateScriptsIfChanged($new, 'enable_authentication'),
],
[
@@ -221,6 +247,7 @@ private function settingsFields($includeDetail = false): array
'description' => __('Add a crazy-simple RSVP button to WordPress event pages.', 'TouchPoint-WP'),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
],
[
'id' => 'enable_involvements',
@@ -231,6 +258,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
],
[
'id' => 'enable_people_lists',
@@ -241,6 +269,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
],
[
'id' => 'enable_global',
@@ -251,6 +280,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
],
[
'id' => 'enable_campuses',
@@ -261,6 +291,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
],
[
'id' => 'system_name',
@@ -1174,16 +1205,18 @@ protected function getWithoutDefault(string $what, $default = self::UNDEFINED_PL
/**
* @param string $what
* @param mixed $value
- * @param bool $autoload
+ * @param ?bool $autoload
*
* @return false|mixed
*/
- public function set(string $what, $value, bool $autoload = false): bool
+ public function set(string $what, $value, ?bool $autoload = null): bool
{
+ if ($autoload === null) {
+ $autoload = $this->settingShouldBeAutoLoaded($what);
+ }
return update_option(TouchPointWP::SETTINGS_PREFIX . $what, $value, $autoload); // TODO MULTI
}
-
/**
* Migrate settings from version to version. This may be called even when a migration isn't necessary.
*/
@@ -1314,14 +1347,7 @@ public function migrate(): void
// 0.0.31 - Add lookup IDs to ResCodes
- foreach (TouchPointWP::instance()->getResCodes() as $rc) {
- $term = Utilities::termExists($rc->name, TouchPointWP::TAX_RESCODE);
- if ($term !== null && isset($term['term_id'])) {
- if (update_term_meta($term['term_id'], TouchPointWP::TAXMETA_LOOKUP_ID, $rc->id)) {
- TouchPointWP::queueFlushRewriteRules();
- }
- }
- }
+ TouchPointWP::$forceTermLookupIdUpdate = true;
// Update version string
diff --git a/src/python/WebApi.py b/src/python/WebApi.py
index f70ee4cf..13542342 100644
--- a/src/python/WebApi.py
+++ b/src/python/WebApi.py
@@ -18,8 +18,7 @@ def print_exception(): # From https://stackoverflow.com/a/20264059/2339939
lineno = tb.tb_lineno
filename = f.f_code.co_filename
linecache.checkcache(filename)
- line = linecache.getline(filename, lineno, f.f_globals)
- print('EXCEPTION IN ({}, LINE {} "{}"): {}'.format(filename, lineno, line.strip(), exc_obj))
+ print('{} (L{})'.format(exc_obj, lineno))
def get_person_info_for_sync(person_obj):
@@ -1166,6 +1165,9 @@ def get_person_info_for_sync(person_obj):
model.Title = "Login"
model.Header = "Processing..."
+ if response == "":
+ raise Exception("Could not communicate with WordPress server.")
+
response = json.loads(response)
if "error" in response:
@@ -1199,10 +1201,8 @@ def get_person_info_for_sync(person_obj):
print("Please email the following error message to " + model.Setting("AdminMail",
"the church staff") + " .
")
print(response)
- print(" ")
- print("")
+ print("")
if not apiCalled:
model.Title = "Invalid Request"
From a5510aa262e8e325dbed0f05d3bb21c85cbb615d Mon Sep 17 00:00:00 2001
From: James K
Date: Fri, 21 Jul 2023 22:49:32 -0400
Subject: [PATCH 005/226] Further updates to which options are autoloaded.
---
src/TouchPoint-WP/TouchPointWP.php | 1 +
src/TouchPoint-WP/TouchPointWP_Settings.php | 25 +++++++++++++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index 1c8ad335..a8df67c8 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -1552,6 +1552,7 @@ protected function insertTermsForLookupBasedTaxonomy(array $list, string $taxono
}
$idUpdate = true;
}
+ // Update the term meta if term is new, or if id update is forced.
if ($term !== null && isset($term['term_id']) && $idUpdate) {
update_term_meta($term['term_id'], self::TAXMETA_LOOKUP_ID, $i->id);
}
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 0f9e8dfc..1b57163e 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -189,7 +189,10 @@ public function hasValidApiSettings(): bool
*/
private function settingShouldBeAutoLoaded(string $settingName): bool
{
- if (str_contains($settingName, '_cron_last_run')) {
+ if (str_contains($settingName, '_cron_last_run')
+ || $settingName === "DEBUG"
+ || $settingName === "meta_familyEvFields" // because it's used when registering the taxonomies on every init.
+ ) {
return true;
}
foreach (self::settingsFields() as $page) {
@@ -313,6 +316,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => '',
+ 'autoload' => true,
'placeholder' => 'mychurch.tpsdb.com',
'callback' => [$this, 'validation_lowercase']
],
@@ -338,6 +342,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => '',
+ 'autoload' => true,
'placeholder' => '',
],
[
@@ -349,6 +354,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text_secret',
'default' => '',
+ 'autoload' => true,
'placeholder' => $this->passwordPlaceholder('api_pass'),
'callback' => fn($new) => $this->validation_secret($new, 'api_pass')
],
@@ -361,6 +367,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'WebApi',
+ 'autoload' => true,
'placeholder' => '',
],
[
@@ -372,6 +379,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => '',
+ 'autoload' => true,
'placeholder' => '',
],
[
@@ -389,7 +397,8 @@ private function settingsFields($includeDetail = false): array
];
// Add Script generation section if necessary settings are established.
- if ($this->getWithoutDefault('system_name') !== self::UNDEFINED_PLACEHOLDER
+ if ($includeDetail
+ && $this->getWithoutDefault('system_name') !== self::UNDEFINED_PLACEHOLDER
&& $this->hasValidApiSettings()) {
/** @noinspection HtmlUnknownTarget */
$this->settings['basic']['fields'][] = [
@@ -535,6 +544,7 @@ private function settingsFields($includeDetail = false): array
'type' => 'textarea',
'label' => __('Involvement Post Types', 'TouchPoint-WP'),
'default' => '[]',
+ 'autoload' => true,
'hidden' => true,
'description' => !$includeThis ? "" : function() {
TouchPointWP::requireScript("base");
@@ -617,6 +627,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'partners',
+ 'autoload' => true,
'placeholder' => 'partners',
'callback' => fn($new) => $this->validation_slug($new, 'global_slug')
],
@@ -708,6 +719,7 @@ private function settingsFields($includeDetail = false): array
'type' => 'select',
'options' => $includeThis ? $this->parent->getFamilyEvFieldsAsKVArray('code', true) : [],
'default' => [],
+ 'autoload' => true,
],
],
];
@@ -764,6 +776,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Divisions',
+ 'autoload' => true,
'placeholder' => 'Divisions'
],
[
@@ -775,6 +788,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Division',
+ 'autoload' => true,
'placeholder' => 'Division'
],
[
@@ -786,6 +800,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'div',
+ 'autoload' => true,
'placeholder' => 'div',
'callback' => fn($new) => $this->validation_slug($new, 'dv_slug')
],
@@ -844,6 +859,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Campuses',
+ 'autoload' => true,
'placeholder' => 'Campuses'
],
[
@@ -855,6 +871,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Campus',
+ 'autoload' => true,
'placeholder' => 'Campus'
],
[
@@ -866,6 +883,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'campus',
+ 'autoload' => true,
'placeholder' => 'campus',
'callback' => fn($new) => $this->validation_slug($new, 'camp_slug')
]
@@ -886,6 +904,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Resident Codes',
+ 'autoload' => true,
'placeholder' => 'Resident Codes'
],
[
@@ -897,6 +916,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Resident Code',
+ 'autoload' => true,
'placeholder' => 'Resident Code'
],
[
@@ -908,6 +928,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'rescodes',
+ 'autoload' => true,
'placeholder' => 'rescodes',
'callback' => fn($new) => $this->validation_slug($new, 'rc_slug')
]
From a1e48b71ef9c1b72d18b63d978e3c18a112a82d2 Mon Sep 17 00:00:00 2001
From: James K
Date: Tue, 8 Aug 2023 07:24:16 -0400
Subject: [PATCH 006/226] Adding filter for report classes
---
src/TouchPoint-WP/Report.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/Report.php b/src/TouchPoint-WP/Report.php
index 837ac966..7d01c0e3 100644
--- a/src/TouchPoint-WP/Report.php
+++ b/src/TouchPoint-WP/Report.php
@@ -35,6 +35,8 @@ class Report implements api, module, JsonSerializable, updatesViaCron
public const NAME_META_KEY = self::META_PREFIX . "name";
public const P1_META_KEY = self::META_PREFIX . "p1";
public const DEFAULT_CONTENT = '';
+ public const FIGURE_CLASS_FILTER = TouchPointWP::SETTINGS_PREFIX . "rpt_figure_class";
+ public const FIGURE_CLASS_DEFAULT = "TouchPoint-report";
public static bool $_isLoaded = false;
@@ -286,7 +288,8 @@ public static function reportShortcode($params = [], string $content = ""): stri
// Add Figure elt with a unique ID
$idAttr = "id=\"" . wp_unique_id('tp-report-') . "\"";
- $rc = "\n\t" . str_replace("\n", "\n\t", $rc);
+ $class = apply_filters(self::FIGURE_CLASS_FILTER, self::FIGURE_CLASS_DEFAULT);
+ $rc = "\n\t" . str_replace("\n", "\n\t", $rc);
// If desired, add a caption that indicates when the table was last updated.
if ($params['showupdated']) {
From d963685cb10ec34e23abf807893401d2cf7a0e7b Mon Sep 17 00:00:00 2001
From: James K
Date: Thu, 10 Aug 2023 15:57:38 -0400
Subject: [PATCH 007/226] Updates related to changed dev environment
---
.gitignore | 3 ++-
.idea/misc.xml | 1 -
.idea/php.xml | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0380c8f9..2f612cad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,4 +23,5 @@ node_modules
package-lock.json
/build/
-/touchpoint-wp.zip
\ No newline at end of file
+/touchpoint-wp.zip
+/composer.phar
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 591fc5ab..691dd2ff 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,3 @@
-
@noinspection
diff --git a/.idea/php.xml b/.idea/php.xml
index 05d47f11..299cb8ee 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -13,6 +13,7 @@
+
From 19b15cff9b64f3f05f4533da0cd79c149802c7c2 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 24 Aug 2023 22:14:55 -0400
Subject: [PATCH 008/226] Resolving an issue with how settings are defined
---
src/TouchPoint-WP/TouchPointWP_Settings.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 1b57163e..707ca003 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -1401,7 +1401,7 @@ public function updateDeployedScripts(): void
*/
public function registerSettings(): void
{
- $currentSection = false;
+ $currentSection = 'basic'; // basic is the default.
if (isset($_POST['tab']) && $_POST['tab']) {
$currentSection = $_POST['tab'];
} elseif (isset($_GET['tab']) && $_GET['tab']) {
@@ -1411,7 +1411,7 @@ public function registerSettings(): void
$this->settings = $this->settingsFields($currentSection);
foreach ($this->settings as $section => $data) {
// Check posted/selected tab.
- if ($currentSection && $currentSection !== $section) {
+ if ($currentSection !== $section) {
continue;
}
From 9c9d71560e6815691be19d0b37828fd5eda9b969 Mon Sep 17 00:00:00 2001
From: James K
Date: Mon, 14 Aug 2023 22:29:41 -0400
Subject: [PATCH 009/226] Reworking build procedure to maintain a local build
directory during development.
---
.gitignore | 4 +---
build.sh | 19 +++++++++----------
generateI18n_1forTranslation.ps1 | 2 +-
3 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/.gitignore b/.gitignore
index 2f612cad..236fe5d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,8 +4,7 @@ composer.lock
/assets/images/people
/TouchPointWP_ErrorLog.txt
/.phpdoc/
-/phpDocumentor.phar
-/wp-cli.phar
+*.phar
/.idea/workspace.xml
/.idea/usage.statistics.xml
@@ -24,4 +23,3 @@ package-lock.json
/build/
/touchpoint-wp.zip
-/composer.phar
diff --git a/build.sh b/build.sh
index b69c25e7..772b2e07 100644
--- a/build.sh
+++ b/build.sh
@@ -24,7 +24,7 @@ uglifyjs -o build/assets/js/meeting-defer.min.js -- assets/js/meeting-defer.js
uglifyjs -o build/assets/js/partner-defer.min.js -- assets/js/partner-defer.js
cp -r assets build
cd ./build || exit
-zip -r ../touchpoint-wp.zip assets
+#zip -r ../touchpoint-wp.zip assets
cd ..
@@ -35,15 +35,14 @@ cp -r ./i18n ./build/i18n
php ./wp-cli.phar i18n make-json ./build/i18n
php ./wp-cli.phar i18n make-mo ./build/i18n
-cd ./build || exit
-zip -r ../touchpoint-wp.zip i18n
-cd ..
-zip -r touchpoint-wp.zip ./ext
-zip -r touchpoint-wp.zip ./src
+cp -r ./ext ./build/ext
+cp -r ./src ./build/src
-find . -maxdepth 1 -iname "*.php" -exec zip touchpoint-wp.zip {} \;
-find . -maxdepth 1 -iname "*.md" -exec zip touchpoint-wp.zip {} \;
-find . -maxdepth 1 -iname "*.json" -exec zip touchpoint-wp.zip {} \;
+find . -maxdepth 1 -iname "*.php" -exec cp {} build/ \;
+find . -maxdepth 1 -iname "*.md" -exec cp {} build/ \;
+find . -maxdepth 1 -iname "*.json" -exec cp {} build/ \;
-rm -r build
\ No newline at end of file
+cd ./build || exit
+find . -exec zip ../touchpoint-wp.zip {} \;
+cd ..
diff --git a/generateI18n_1forTranslation.ps1 b/generateI18n_1forTranslation.ps1
index cc5a901d..e23662c6 100644
--- a/generateI18n_1forTranslation.ps1
+++ b/generateI18n_1forTranslation.ps1
@@ -7,5 +7,5 @@ if (!(test-path $pharFile -newerThan $compareDt))
Invoke-WebRequest https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -OutFile $pharFile
}
-php .\wp-cli.phar i18n make-pot . i18n/TouchPoint-WP.pot
+php .\wp-cli.phar i18n make-pot . i18n/TouchPoint-WP.pot --exclude=build
php .\wp-cli.phar i18n update-po i18n/TouchPoint-WP.pot
\ No newline at end of file
From 27601ab876b62d99647a63339427070ec3188cb1 Mon Sep 17 00:00:00 2001
From: James K
Date: Mon, 14 Aug 2023 22:30:57 -0400
Subject: [PATCH 010/226] Adding jetbrains run profiles
---
.idea/runConfigurations/Build__WSL_.xml | 17 +++++++++++++++++
.../i18n__1_for_Translation.xml | 17 +++++++++++++++++
.idea/runConfigurations/i18n__2_for_Publish.xml | 17 +++++++++++++++++
3 files changed, 51 insertions(+)
create mode 100644 .idea/runConfigurations/Build__WSL_.xml
create mode 100644 .idea/runConfigurations/i18n__1_for_Translation.xml
create mode 100644 .idea/runConfigurations/i18n__2_for_Publish.xml
diff --git a/.idea/runConfigurations/Build__WSL_.xml b/.idea/runConfigurations/Build__WSL_.xml
new file mode 100644
index 00000000..d2225246
--- /dev/null
+++ b/.idea/runConfigurations/Build__WSL_.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/i18n__1_for_Translation.xml b/.idea/runConfigurations/i18n__1_for_Translation.xml
new file mode 100644
index 00000000..8f161b58
--- /dev/null
+++ b/.idea/runConfigurations/i18n__1_for_Translation.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/i18n__2_for_Publish.xml b/.idea/runConfigurations/i18n__2_for_Publish.xml
new file mode 100644
index 00000000..30b2968d
--- /dev/null
+++ b/.idea/runConfigurations/i18n__2_for_Publish.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 8bd438ac43d57cc2c17271179b2b139a12c51d1e Mon Sep 17 00:00:00 2001
From: James K
Date: Tue, 15 Aug 2023 15:25:10 -0400
Subject: [PATCH 011/226] build improvements
---
.github/workflows/releases.yml | 4 ++--
.idea/misc.xml | 3 ++-
build.sh | 5 +++--
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml
index 5b1c26a6..5d315037 100644
--- a/.github/workflows/releases.yml
+++ b/.github/workflows/releases.yml
@@ -1,10 +1,10 @@
+name: Create Release
+
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
-name: Create Release
-
jobs:
build:
name: Create Release
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 691dd2ff..ec30493f 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,7 @@
+
@noinspection
-
+
\ No newline at end of file
diff --git a/build.sh b/build.sh
index 772b2e07..1f1eb7ad 100644
--- a/build.sh
+++ b/build.sh
@@ -24,12 +24,13 @@ uglifyjs -o build/assets/js/meeting-defer.min.js -- assets/js/meeting-defer.js
uglifyjs -o build/assets/js/partner-defer.min.js -- assets/js/partner-defer.js
cp -r assets build
cd ./build || exit
-#zip -r ../touchpoint-wp.zip assets
cd ..
# compile translations
-wget -O wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
+if [ ! -f wp-cli.phar ]; then
+ wget -O wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
+fi
cp -r ./i18n ./build/i18n
From 136e61ea2f893efa0c660f0f72e8b70a8f8e2a12 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 24 Aug 2023 22:46:18 -0400
Subject: [PATCH 012/226] Added an endpoint to spit out phpinfo.
---
src/TouchPoint-WP/TouchPointWP_AdminAPI.php | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/TouchPoint-WP/TouchPointWP_AdminAPI.php b/src/TouchPoint-WP/TouchPointWP_AdminAPI.php
index 24a5c86a..ae6bc5a7 100644
--- a/src/TouchPoint-WP/TouchPointWP_AdminAPI.php
+++ b/src/TouchPoint-WP/TouchPointWP_AdminAPI.php
@@ -90,6 +90,13 @@ public static function api(array $uri): bool
}
TouchPointWP::instance()->settings->migrate();
exit;
+
+ case "phpinfo":
+ if (!TouchPointWP::currentUserIsAdmin()) {
+ return false;
+ }
+ phpinfo();
+ exit;
}
return false;
From 44da8de7f598e10aca4e2f52542b0a2268260760 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 24 Aug 2023 22:46:44 -0400
Subject: [PATCH 013/226] Som very, VERY minor memory improvements
---
src/TouchPoint-WP/Involvement.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index 58bbb603..ff43e69e 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -364,6 +364,7 @@ public static function updateFromTouchPoint(bool $verbose = false)
$count += $update;
}
}
+ unset($type);
if ($success && $count !== 0) {
TouchPointWP::instance()->settings->set('inv_cron_last_run', time());
@@ -2087,6 +2088,7 @@ final protected static function updateInvolvementPostsForType(
} catch (TouchPointWP_Exception $e) {
return false;
}
+ unset($qOpts);
$invData = $response->invs ?? []; // null coalesce for case where there is no data.
@@ -2512,8 +2514,10 @@ final protected static function updateInvolvementPostsForType(
if ($verbose) {
echo " ";
}
- }
+ unset($post);
+ }
+ unset($inv);
//////////////////
//// Removals ////
From 7f4805ca612588bc2127d60b970120832bd0421c Mon Sep 17 00:00:00 2001
From: "James K."
Date: Fri, 25 Aug 2023 12:51:10 -0400
Subject: [PATCH 014/226] A few diagnostic tools for involvement syncing
---
.idea/misc.xml | 1 -
src/TouchPoint-WP/Involvement.php | 26 ++++++++++++++++++++++++--
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 591fc5ab..691dd2ff 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,3 @@
-
@noinspection
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index ff43e69e..535687c3 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -345,7 +345,14 @@ public static function updateFromTouchPoint(bool $verbose = false)
$verbose &= TouchPointWP::currentUserIsAdmin();
- foreach (self::allTypeSettings() as $type) {
+ foreach (self::allTypeSettings() as $k => $type) {
+
+ // TODO this is temp debugging code to allow only one post type to be synced during a force-sync.
+ if ($verbose && isset($_GET['type'])) {
+ if (intval($k) !== intval($_GET['type']))
+ continue;
+ }
+
if (count($type->importDivs) < 1) {
// Don't update if there aren't any divisions selected yet.
if ($verbose) {
@@ -356,7 +363,14 @@ public static function updateFromTouchPoint(bool $verbose = false)
// Divisions
$divs = Utilities::idArrayToIntArray($type->importDivs, false);
- $update = self::updateInvolvementPostsForType($type, $divs, $verbose);
+ try {
+ $update = self::updateInvolvementPostsForType($type, $divs, $verbose);
+ } catch (Exception $e) {
+ if ($verbose) {
+ echo "An exception occurred while syncing $type->namePlural: " . $e->getMessage();
+ }
+ continue;
+ }
if ($update === false) {
$success = false;
@@ -2108,13 +2122,21 @@ final protected static function updateInvolvementPostsForType(
return false;
}
+ $count = 0;
foreach ($invData as $inv) {
set_time_limit(15);
+ $count++;
if ($verbose) {
var_dump($inv);
}
+ // TODO this is temp debugging code to allow only one post type to be synced during a force-sync.
+ if ($verbose && isset($_GET['limit'])) {
+ if ($count > intval($_GET['limit']))
+ continue;
+ }
+
////////////////////////
// Standardize Inputs //
From cf64126d4650ec83437ca0a3a01adf8743683006 Mon Sep 17 00:00:00 2001
From: James K
Date: Mon, 14 Aug 2023 22:29:41 -0400
Subject: [PATCH 015/226] Reworking build procedure to maintain a local build
directory during development.
---
.gitignore | 5 ++---
build.sh | 19 +++++++++----------
generateI18n_1forTranslation.ps1 | 2 +-
3 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0380c8f9..236fe5d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,8 +4,7 @@ composer.lock
/assets/images/people
/TouchPointWP_ErrorLog.txt
/.phpdoc/
-/phpDocumentor.phar
-/wp-cli.phar
+*.phar
/.idea/workspace.xml
/.idea/usage.statistics.xml
@@ -23,4 +22,4 @@ node_modules
package-lock.json
/build/
-/touchpoint-wp.zip
\ No newline at end of file
+/touchpoint-wp.zip
diff --git a/build.sh b/build.sh
index b69c25e7..772b2e07 100644
--- a/build.sh
+++ b/build.sh
@@ -24,7 +24,7 @@ uglifyjs -o build/assets/js/meeting-defer.min.js -- assets/js/meeting-defer.js
uglifyjs -o build/assets/js/partner-defer.min.js -- assets/js/partner-defer.js
cp -r assets build
cd ./build || exit
-zip -r ../touchpoint-wp.zip assets
+#zip -r ../touchpoint-wp.zip assets
cd ..
@@ -35,15 +35,14 @@ cp -r ./i18n ./build/i18n
php ./wp-cli.phar i18n make-json ./build/i18n
php ./wp-cli.phar i18n make-mo ./build/i18n
-cd ./build || exit
-zip -r ../touchpoint-wp.zip i18n
-cd ..
-zip -r touchpoint-wp.zip ./ext
-zip -r touchpoint-wp.zip ./src
+cp -r ./ext ./build/ext
+cp -r ./src ./build/src
-find . -maxdepth 1 -iname "*.php" -exec zip touchpoint-wp.zip {} \;
-find . -maxdepth 1 -iname "*.md" -exec zip touchpoint-wp.zip {} \;
-find . -maxdepth 1 -iname "*.json" -exec zip touchpoint-wp.zip {} \;
+find . -maxdepth 1 -iname "*.php" -exec cp {} build/ \;
+find . -maxdepth 1 -iname "*.md" -exec cp {} build/ \;
+find . -maxdepth 1 -iname "*.json" -exec cp {} build/ \;
-rm -r build
\ No newline at end of file
+cd ./build || exit
+find . -exec zip ../touchpoint-wp.zip {} \;
+cd ..
diff --git a/generateI18n_1forTranslation.ps1 b/generateI18n_1forTranslation.ps1
index cc5a901d..e23662c6 100644
--- a/generateI18n_1forTranslation.ps1
+++ b/generateI18n_1forTranslation.ps1
@@ -7,5 +7,5 @@ if (!(test-path $pharFile -newerThan $compareDt))
Invoke-WebRequest https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -OutFile $pharFile
}
-php .\wp-cli.phar i18n make-pot . i18n/TouchPoint-WP.pot
+php .\wp-cli.phar i18n make-pot . i18n/TouchPoint-WP.pot --exclude=build
php .\wp-cli.phar i18n update-po i18n/TouchPoint-WP.pot
\ No newline at end of file
From 41bd37d02d01cb3cfc04b6ce18ccbd6e0ffeb8c5 Mon Sep 17 00:00:00 2001
From: James K
Date: Thu, 29 Jun 2023 00:21:37 -0400
Subject: [PATCH 016/226] Resolve an issue with wp admin improperly handling
migrations during plugin update.
---
src/TouchPoint-WP/TouchPointWP.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index 41016a12..1ecb1308 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -493,7 +493,7 @@ public function parseRequest($continue, $wp, $extraVars): bool
*/
public static function currentUserIsAdmin(): bool
{
- if (!function_exists('current_user_can'))
+ if (!function_exists('current_user_can') || !function_exists('wp_get_current_user'))
return false;
return current_user_can('manage_options');
}
From 8ecc5c2bf40722918b33d3a86faeb08386e64340 Mon Sep 17 00:00:00 2001
From: James K
Date: Tue, 18 Jul 2023 18:23:24 -0400
Subject: [PATCH 017/226] Adding check that plugin has only been initialized
once.
---
src/TouchPoint-WP/TouchPointWP.php | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index 1ecb1308..8e837589 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -710,9 +710,22 @@ public static function load($file): TouchPointWP
return $instance;
}
+ /**
+ * @var bool True of the init process has run. False if not. Prevents things from happening twice, which can cause errors.
+ */
+ private static bool $_hasBeenInited = false;
+
+ /**
+ * Initialize the plugin.
+ *
+ * @return void
+ */
public static function init(): void
{
- self::instance()->loadLocalizations();
+ if (self::$_hasBeenInited)
+ return;
+
+ self::instance()->loadLocalizations();
self::instance()->registerTaxonomies();
@@ -722,6 +735,8 @@ public static function init(): void
// If the scripts need to be updated, do that.
self::instance()->updateDeployedScripts();
+ self::$_hasBeenInited = true;
+
self::requireScript("base");
do_action(self::INIT_ACTION_HOOK);
From 032c1ecf169cecb0f887c0e4da42bc72ca1e2186 Mon Sep 17 00:00:00 2001
From: James K
Date: Fri, 21 Jul 2023 10:12:08 -0400
Subject: [PATCH 018/226] Style improvement for "sign in with TouchPoint" link
---
src/TouchPoint-WP/Auth.php | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/TouchPoint-WP/Auth.php b/src/TouchPoint-WP/Auth.php
index 9b94f057..598d5c3c 100644
--- a/src/TouchPoint-WP/Auth.php
+++ b/src/TouchPoint-WP/Auth.php
@@ -129,18 +129,17 @@ public static function footer()
*/
public static function printLoginLink()
{
- $html = '';
+ $html = '
';
+ $url = self::getLoginUrl();
/** @noinspection HtmlUnknownTarget */
- $html .= '';
+ $html .= " ";
$html .= sprintf(
// translators: %s is "what you call TouchPoint at your church", which is a setting
__('Sign in with your %s account', 'TouchPoint-WP'),
htmlentities(TouchPointWP::instance()->settings->system_name)
);
- printf(
- $html,
- self::getLoginUrl()
- );
+ $html .= '
';
+ echo $html;
}
/**
From eb6fbc60d89903fd6b727b6f6d277b956f39343d Mon Sep 17 00:00:00 2001
From: James K
Date: Fri, 21 Jul 2023 11:49:06 -0400
Subject: [PATCH 019/226] Significant performance improvement by reducing db
queries. Also, better error reporting in python.
---
src/TouchPoint-WP/TouchPointWP.php | 542 +++++++++++---------
src/TouchPoint-WP/TouchPointWP_AdminAPI.php | 2 +-
src/TouchPoint-WP/TouchPointWP_Settings.php | 48 +-
src/python/WebApi.py | 10 +-
4 files changed, 346 insertions(+), 256 deletions(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index 8e837589..a1485e9a 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -450,7 +450,7 @@ public function parseRequest($continue, $wp, $extraVars): bool
return $continue;
}
}
-
+
// Auth endpoints
if ($reqUri['path'][1] === TouchPointWP::API_ENDPOINT_AUTH &&
$this->settings->enable_authentication === "on"
@@ -623,14 +623,44 @@ public function loadLocalizations()
load_plugin_textdomain('TouchPoint-WP', false, $dir . '/i18n/');
}
+ /**
+ * Create or update database tables
+ */
+ protected function createTables(): void
+ {
+ global $wpdb;
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
+
+ // IP Geo Caching table
+ $tableName = $wpdb->base_prefix . TouchPointWP::TABLE_IP_GEO;
+ $sql = "CREATE TABLE $tableName (
+ id int(10) unsigned NOT NULL auto_increment,
+ ip varbinary(16) NOT NULL UNIQUE,
+ updatedDT datetime DEFAULT NOW(),
+ data text NOT NULL,
+ PRIMARY KEY (id)
+ )";
+ dbDelta($sql);
+ }
+
/**
* Compare the version numbers to determine if a migration is needed.
*/
- public function checkMigrations(): void
+ public function migrate($force = false): void
{
- if ($this->settings->version !== self::VERSION) {
- $this->settings->migrate();
+ if ($this->settings->version === self::VERSION && !$force) {
+ return;
}
+
+ $this->createTables();
+
+ if (self::$_hasBeenInited) {
+ $this->insertTerms();
+ } else {
+ add_action(self::INIT_ACTION_HOOK, [$this, 'insertTerms']);
+ }
+
+ $this->settings->migrate();
}
/**
@@ -647,7 +677,7 @@ public static function load($file): TouchPointWP
if (is_null($instance->settings)) {
$instance->settings = TouchPointWP_Settings::instance($instance);
if (is_admin()) {
- $instance->checkMigrations();
+ $instance->migrate();
}
}
@@ -702,7 +732,7 @@ public static function load($file): TouchPointWP
// Load Reports (feature is always enabled)
$instance->reports = Report::load();
- add_action('init', [self::class, 'init']);
+ add_action('init', [self::class, 'init'], 10);
add_filter('the_content', [self::class, 'capitalPyScript'], 11);
add_filter('widget_text_content', [self::class, 'capitalPyScript'], 11);
@@ -742,6 +772,12 @@ public static function init(): void
do_action(self::INIT_ACTION_HOOK);
}
+ /**
+ * Prints the inline 'base' script. This is meant to be called in the wp_head and admin_head, and should only be
+ * called once on a page, but that is not automatically validated.
+ *
+ * @return void
+ */
public static function renderBaseInlineScript(): void
{
include self::instance()->assets_dir . '/js/base-inline.php';
@@ -765,7 +801,10 @@ public function registerScriptsAndStyles(): void
self::VERSION,
true
);
- wp_set_script_translations(self::SHORTCODE_PREFIX . 'base-defer', 'TouchPoint-WP', $this->getJsLocalizationDir());
+ wp_set_script_translations(
+ self::SHORTCODE_PREFIX . 'base-defer',
+ 'TouchPoint-WP', $this->getJsLocalizationDir()
+ );
wp_register_script(
self::SHORTCODE_PREFIX . 'swal2-defer',
@@ -1234,7 +1273,7 @@ function getLabels(string $singular, string $plural): array
$resCodeTypesToApply = Involvement_PostTypeSettings::getPostTypesWithGeoEnabled();
}
$resCodeTypesToApply[] = 'user';
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_RESCODE,
$resCodeTypesToApply,
[
@@ -1257,28 +1296,7 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- foreach ($this->getResCodes() as $rc) {
- if ($rc->name !== null && ! Utilities::termExists($rc->name, self::TAX_RESCODE)) {
- $term = Utilities::insertTerm(
- $rc->name,
- self::TAX_RESCODE,
- [
- 'description' => $rc->name,
- 'slug' => sanitize_title($rc->name)
- ]
- );
- if (is_wp_error($term)) {
- new TouchPointWP_WPError($term);
- } else {
- update_term_meta($term['term_id'], self::TAXMETA_LOOKUP_ID, $rc->id);
- }
-
- self::queueFlushRewriteRules();
- }
- }
- // TODO remove defunct res codes
- }
+ // Terms inserted via insertTerms method
// Campuses
if ($this->settings->enable_campuses === "on") {
@@ -1287,7 +1305,7 @@ function getLabels(string $singular, string $plural): array
$campusesTypesToApply = Involvement_PostTypeSettings::getPostTypes();
}
$campusesTypesToApply[] = 'user';
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_CAMPUS,
$campusesTypesToApply,
[
@@ -1307,29 +1325,8 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- foreach ($this->getCampuses() as $c) {
- if ($c->name !== null && ! Utilities::termExists($c->name, self::TAX_CAMPUS)) {
- $term = Utilities::insertTerm(
- $c->name,
- self::TAX_CAMPUS,
- [
- 'description' => $c->name,
- 'slug' => sanitize_title($c->code)
- ]
- );
- if (is_wp_error($term)) {
- new TouchPointWP_WPError($term);
- } else {
- update_term_meta($term['term_id'], self::TAXMETA_LOOKUP_ID, $c->id);
- }
-
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
}
- // TODO remove defunct campuses (including all of them, if disabled)
// Divisions & Programs
$divisionTypesToApply = [];
@@ -1338,7 +1335,7 @@ function getLabels(string $singular, string $plural): array
}
// TODO allow this taxonomy to be applied to other post types as an option.
if (count($divisionTypesToApply) > 0) {
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_DIV,
$divisionTypesToApply,
[
@@ -1359,75 +1356,13 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- $enabledDivisions = $this->settings->dv_divisions;
- foreach ($this->getDivisions() as $d) {
- if (in_array('div' . $d->id, $enabledDivisions)) {
- // Program
- $pTermInfo = Utilities::termExists($d->pName, self::TAX_DIV, 0);
- if ($pTermInfo === null && $d->pName !== null) {
- $pTermInfo = Utilities::insertTerm(
- $d->pName,
- self::TAX_DIV,
- [
- 'description' => $d->pName,
- 'slug' => sanitize_title($d->pName)
- ]
- );
- if (is_wp_error($pTermInfo)) {
- new TouchPointWP_WPError($pTermInfo);
- } else {
- update_term_meta($pTermInfo['term_id'], self::SETTINGS_PREFIX . 'programId', $d->proId);
- }
-
- self::queueFlushRewriteRules();
- }
-
- // Division
- $dTermInfo = Utilities::termExists($d->dName, self::TAX_DIV, $pTermInfo['term_id']);
- if ($dTermInfo === null && $d->dName !== null) {
- $dTermInfo = Utilities::insertTerm(
- $d->dName,
- self::TAX_DIV,
- [
- 'description' => $d->dName,
- 'parent' => $pTermInfo['term_id'],
- 'slug' => sanitize_title($d->dName)
- ]
- );
- if (is_wp_error($dTermInfo)) {
- new TouchPointWP_WPError($dTermInfo);
- } else {
- update_term_meta($dTermInfo['term_id'], self::SETTINGS_PREFIX . 'divId', $d->id);
- }
-
- self::queueFlushRewriteRules();
- }
- } else {
- // Remove terms that are disabled from importing.
-
- // Delete disabled divisions. Get program, so we delete the right division.
- $pTermInfo = Utilities::termExists($d->pName, self::TAX_DIV, 0);
- if ($pTermInfo !== null) {
- $dTermInfo = Utilities::termExists($d->dName, self::TAX_DIV, $pTermInfo['term_id']);
- if ($dTermInfo !== null) {
- wp_delete_term($dTermInfo['term_id'], self::TAX_DIV);
- self::queueFlushRewriteRules();
- }
- }
-
- // Program
- // TODO remove programs that no longer have a division selected for use as a term.
- // TODO remove program & div terms that are no longer present in TouchPoint
- }
- }
- }
+ // Terms inserted via insertTerms method
}
if ($this->settings->enable_involvements === "on") {
// Weekdays
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_WEEKDAY,
Involvement_PostTypeSettings::getPostTypes(),
[
@@ -1447,25 +1382,10 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- for ($di = 0; $di < 7; $di++) {
- $name = Utilities::getPluralDayOfWeekNameForNumber_noI18n($di);
- if ( ! Utilities::termExists($name, self::TAX_WEEKDAY)) {
- Utilities::insertTerm(
- $name,
- self::TAX_WEEKDAY,
- [
- 'description' => $name,
- 'slug' => Utilities::getDayOfWeekShortForNumber_noI18n($di)
- ]
- );
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
// Tenses
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_TENSE,
Involvement_PostTypeSettings::getPostTypes(),
[
@@ -1485,31 +1405,11 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- foreach (
- [
- TouchPointWP::TAX_TENSE_FUTURE => 'Upcoming',
- TouchPointWP::TAX_TENSE_PRESENT => 'Current',
- TouchPointWP::TAX_TENSE_PAST => 'Past',
- ] as $slug => $name
- ) {
- if ( ! Utilities::termExists($slug, self::TAX_TENSE)) {
- Utilities::insertTerm(
- $name,
- self::TAX_TENSE,
- [
- 'description' => $name,
- 'slug' => $slug
- ]
- );
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
// Time of Day
/** @noinspection SpellCheckingInspection */
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_DAYTIME,
Involvement_PostTypeSettings::getPostTypes(),
[
@@ -1529,32 +1429,7 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- $timesOfDay = [
- 'Late Night',
- 'Early Morning',
- 'Morning',
- 'Midday',
- 'Afternoon',
- 'Evening',
- 'Night'
- ];
- foreach ($timesOfDay as $tod) {
- if ( ! Utilities::termExists($tod, self::TAX_WEEKDAY)) {
- $slug = str_replace(" ", "", $tod);
- $slug = strtolower($slug);
- Utilities::insertTerm(
- $tod,
- self::TAX_DAYTIME,
- [
- 'description' => $tod,
- 'slug' => $slug
- ]
- );
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
}
// Age Groups
@@ -1563,7 +1438,7 @@ function getLabels(string $singular, string $plural): array
$ageGroupTypesToApply = Involvement_PostTypeSettings::getPostTypes();
}
$ageGroupTypesToApply[] = 'user';
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_AGEGROUP,
$ageGroupTypesToApply,
[
@@ -1583,26 +1458,12 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- foreach (["20s", "30s", "40s", "50s", "60s", "70+"] as $ag) {
- if ( ! Utilities::termExists($ag, self::TAX_AGEGROUP)) {
- Utilities::insertTerm(
- $ag,
- self::TAX_AGEGROUP,
- [
- 'description' => $ag,
- 'slug' => sanitize_title($ag)
- ]
- );
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
// Involvement Marital Status
if ($this->settings->enable_involvements === "on") {
- $rt = register_taxonomy(
+ register_taxonomy(
self::TAX_INV_MARITAL,
Involvement_PostTypeSettings::getPostTypes(),
[
@@ -1622,21 +1483,7 @@ function getLabels(string $singular, string $plural): array
],
]
);
- if (! is_wp_error($rt)) {
- foreach (['mostly_single', 'mostly_married'] as $ms) {
- if ( ! Utilities::termExists($ms, self::TAX_INV_MARITAL)) {
- Utilities::insertTerm(
- $ms,
- self::TAX_INV_MARITAL,
- [
- 'description' => $ms,
- 'slug' => sanitize_title($ms)
- ]
- );
- self::queueFlushRewriteRules();
- }
- }
- }
+ // Terms inserted via insertTerms method
}
// Global Partner Category
@@ -1672,6 +1519,245 @@ function getLabels(string $singular, string $plural): array
}
}
+ /**
+ * For the taxonomies that are based on Lookups in the TouchPoint database, insert or update the terms.
+ *
+ * @param object[] $list
+ * @param string $taxonomy
+ * @param bool $forceIdUpdate
+ *
+ * @return void
+ */
+ protected function insertTermsForLookupBasedTaxonomy(array $list, string $taxonomy, bool $forceIdUpdate)
+ {
+ foreach ($list as $i) {
+ if ($i->name === null) {
+ continue;
+ }
+ // In addition to making sure term exists, make sure it has the correct meta id, too.
+ $term = Utilities::termExists($i->name, $taxonomy);
+ $idUpdate = $forceIdUpdate;
+ if (!$term) {
+ $term = Utilities::insertTerm(
+ $i->name,
+ $taxonomy,
+ [
+ 'description' => $i->name,
+ 'slug' => sanitize_title($i->name)
+ ]
+ );
+ if (is_wp_error($term)) {
+ new TouchPointWP_WPError($term);
+ $term = null;
+ }
+ $idUpdate = true;
+ }
+ if ($term !== null && isset($term['term_id']) && $idUpdate) {
+ update_term_meta($term['term_id'], self::TAXMETA_LOOKUP_ID, $i->id);
+ }
+ if ($idUpdate) {
+ self::queueFlushRewriteRules();
+ }
+ }
+ }
+
+ public static bool $forceTermLookupIdUpdate = false;
+
+ /**
+ * Insert the terms for the registered taxonomies. (This is supposed to happen a while after the taxonomies are
+ * loaded.)
+ *
+ * @return void
+ */
+ public function insertTerms()
+ {
+ // Resident Codes
+ $this->insertTermsForLookupBasedTaxonomy(
+ $this->getResCodes(),
+ self::TAX_RESCODE,
+ self::$forceTermLookupIdUpdate
+ );
+ // TODO remove defunct res codes
+
+ // Campuses
+ if ($this->settings->enable_campuses === "on") {
+ $this->insertTermsForLookupBasedTaxonomy(
+ $this->getCampuses(),
+ self::TAX_CAMPUS,
+ self::$forceTermLookupIdUpdate
+ );
+ }
+ // TODO remove defunct campuses (including all of them, if disabled)
+
+ // Age Groups
+ foreach (["20s", "30s", "40s", "50s", "60s", "70+"] as $ag) {
+ if ( ! Utilities::termExists($ag, self::TAX_AGEGROUP)) {
+ Utilities::insertTerm(
+ $ag,
+ self::TAX_AGEGROUP,
+ [
+ 'description' => $ag,
+ 'slug' => sanitize_title($ag)
+ ]
+ );
+ self::queueFlushRewriteRules();
+ }
+ }
+
+ // Involvements and TODO Events
+ $postTypesToApply = [];
+ if ($this->settings->enable_involvements === "on") {
+ $postTypesToApply = Involvement_PostTypeSettings::getPostTypes();
+ }
+ if (count($postTypesToApply) > 0) {
+
+ // Divisions & Programs
+ $enabledDivisions = $this->settings->dv_divisions;
+ foreach ($this->getDivisions() as $d) {
+ if (in_array('div' . $d->id, $enabledDivisions)) {
+ // Program
+ $pTermInfo = Utilities::termExists($d->pName, self::TAX_DIV, 0);
+ if ($pTermInfo === null && $d->pName !== null) {
+ $pTermInfo = Utilities::insertTerm(
+ $d->pName,
+ self::TAX_DIV,
+ [
+ 'description' => $d->pName,
+ 'slug' => sanitize_title($d->pName)
+ ]
+ );
+ if (is_wp_error($pTermInfo)) {
+ new TouchPointWP_WPError($pTermInfo);
+ } else {
+ update_term_meta($pTermInfo['term_id'], self::SETTINGS_PREFIX . 'programId', $d->proId);
+ }
+
+ self::queueFlushRewriteRules();
+ }
+
+ // Division
+ $dTermInfo = Utilities::termExists($d->dName, self::TAX_DIV, $pTermInfo['term_id']);
+ if ($dTermInfo === null && $d->dName !== null) {
+ $dTermInfo = Utilities::insertTerm(
+ $d->dName,
+ self::TAX_DIV,
+ [
+ 'description' => $d->dName,
+ 'parent' => $pTermInfo['term_id'],
+ 'slug' => sanitize_title($d->dName)
+ ]
+ );
+ if (is_wp_error($dTermInfo)) {
+ new TouchPointWP_WPError($dTermInfo);
+ } else {
+ update_term_meta($dTermInfo['term_id'], self::SETTINGS_PREFIX . 'divId', $d->id);
+ }
+
+ self::queueFlushRewriteRules();
+ }
+ } else {
+ // Remove terms that are disabled from importing.
+
+ // Delete disabled divisions. Get program, so we delete the right division.
+ $pTermInfo = Utilities::termExists($d->pName, self::TAX_DIV, 0);
+ if ($pTermInfo !== null) {
+ $dTermInfo = Utilities::termExists($d->dName, self::TAX_DIV, $pTermInfo['term_id']);
+ if ($dTermInfo !== null) {
+ wp_delete_term($dTermInfo['term_id'], self::TAX_DIV);
+ self::queueFlushRewriteRules();
+ }
+ }
+
+ // Program
+ // TODO remove programs that no longer have a division selected for use as a term.
+ // TODO remove program & div terms that are no longer present in TouchPoint
+ }
+ }
+
+ // Weekdays
+ for ($di = 0; $di < 7; $di++) {
+ $name = Utilities::getPluralDayOfWeekNameForNumber_noI18n($di);
+ if ( ! Utilities::termExists($name, self::TAX_WEEKDAY)) {
+ Utilities::insertTerm(
+ $name,
+ self::TAX_WEEKDAY,
+ [
+ 'description' => $name,
+ 'slug' => Utilities::getDayOfWeekShortForNumber_noI18n($di)
+ ]
+ );
+ self::queueFlushRewriteRules();
+ }
+ }
+
+ // Tense
+ foreach (
+ [
+ TouchPointWP::TAX_TENSE_FUTURE => 'Upcoming',
+ TouchPointWP::TAX_TENSE_PRESENT => 'Current',
+ TouchPointWP::TAX_TENSE_PAST => 'Past',
+ ] as $slug => $name
+ ) {
+ if ( ! Utilities::termExists($slug, self::TAX_TENSE)) {
+ Utilities::insertTerm(
+ $name,
+ self::TAX_TENSE,
+ [
+ 'description' => $name,
+ 'slug' => $slug
+ ]
+ );
+ self::queueFlushRewriteRules();
+ }
+ }
+
+ // Time of Day
+ $timesOfDay = [
+ 'Late Night',
+ 'Early Morning',
+ 'Morning',
+ 'Midday',
+ 'Afternoon',
+ 'Evening',
+ 'Night'
+ ];
+ foreach ($timesOfDay as $tod) {
+ if ( ! Utilities::termExists($tod, self::TAX_WEEKDAY)) {
+ $slug = str_replace(" ", "", $tod);
+ $slug = strtolower($slug);
+ Utilities::insertTerm(
+ $tod,
+ self::TAX_DAYTIME,
+ [
+ 'description' => $tod,
+ 'slug' => $slug
+ ]
+ );
+ self::queueFlushRewriteRules();
+ }
+ }
+ }
+
+ // Involvements
+ if ($this->settings->enable_involvements === "on") {
+
+ // Involvement Marital Status
+ foreach (['mostly_single', 'mostly_married'] as $ms) {
+ if ( ! Utilities::termExists($ms, self::TAX_INV_MARITAL)) {
+ Utilities::insertTerm(
+ $ms,
+ self::TAX_INV_MARITAL,
+ [
+ 'description' => $ms,
+ 'slug' => sanitize_title($ms)
+ ]
+ );
+ self::queueFlushRewriteRules();
+ }
+ }
+ }
+ }
+
private static array $divisionTerms = [];
/**
@@ -1749,9 +1835,7 @@ public function activation()
{
self::queueFlushRewriteRules();
- $this->createTables();
-
- $this->settings->migrate();
+ $this->migrate(true);
}
/**
@@ -1793,26 +1877,6 @@ protected static function clearScheduledHooks(): void
wp_clear_scheduled_hook(Report::CRON_HOOK);
}
- /**
- * Create or update database tables
- */
- protected function createTables(): void
- {
- global $wpdb;
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
-
- // IP Geo Caching table
- $tableName = $wpdb->base_prefix . self::TABLE_IP_GEO;
- $sql = "CREATE TABLE $tableName (
- id int(10) unsigned NOT NULL auto_increment,
- ip varbinary(16) NOT NULL UNIQUE,
- updatedDT datetime DEFAULT NOW(),
- data text NOT NULL,
- PRIMARY KEY (id)
- )";
- dbDelta($sql);
- }
-
/**
* Drop database tables at uninstallation.
*/
@@ -1835,7 +1899,7 @@ protected static function dropTables(): void
*/
private function _log_version_number()
{
- update_option(self::TOKEN . '_version', self::VERSION, false);
+ update_option(self::TOKEN . '_version', self::VERSION, true);
}
/**
diff --git a/src/TouchPoint-WP/TouchPointWP_AdminAPI.php b/src/TouchPoint-WP/TouchPointWP_AdminAPI.php
index ae6bc5a7..4fc95411 100644
--- a/src/TouchPoint-WP/TouchPointWP_AdminAPI.php
+++ b/src/TouchPoint-WP/TouchPointWP_AdminAPI.php
@@ -88,7 +88,7 @@ public static function api(array $uri): bool
if (!TouchPointWP::currentUserIsAdmin()) {
return false;
}
- TouchPointWP::instance()->settings->migrate();
+ TouchPointWP::instance()->migrate(true);
exit;
case "phpinfo":
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 7bf47ed0..0f9e8dfc 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -180,6 +180,31 @@ public function hasValidApiSettings(): bool
$this->getWithoutDefault('api_pass') === TouchPointWP_Settings::UNDEFINED_PLACEHOLDER);
}
+ /**
+ * Used internally to determine if a particular setting should be auto-loaded.
+ *
+ * @param string $settingName
+ *
+ * @return bool
+ */
+ private function settingShouldBeAutoLoaded(string $settingName): bool
+ {
+ if (str_contains($settingName, '_cron_last_run')) {
+ return true;
+ }
+ foreach (self::settingsFields() as $page) {
+ foreach ($page['fields'] as $f) {
+ if ($f['id'] === $settingName) {
+ if (isset($f['autoload'])) {
+ return !!$f['autoload'];
+ }
+ return false;
+ }
+ }
+ }
+ return false;
+ }
+
/**
* Build settings fields
*
@@ -213,6 +238,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
'callback' => fn($new) => $this->validation_updateScriptsIfChanged($new, 'enable_authentication'),
],
[
@@ -221,6 +247,7 @@ private function settingsFields($includeDetail = false): array
'description' => __('Add a crazy-simple RSVP button to WordPress event pages.', 'TouchPoint-WP'),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
],
[
'id' => 'enable_involvements',
@@ -231,6 +258,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
],
[
'id' => 'enable_people_lists',
@@ -241,6 +269,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
],
[
'id' => 'enable_global',
@@ -251,6 +280,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
],
[
'id' => 'enable_campuses',
@@ -261,6 +291,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'checkbox',
'default' => '',
+ 'autoload' => true,
],
[
'id' => 'system_name',
@@ -1174,16 +1205,18 @@ protected function getWithoutDefault(string $what, $default = self::UNDEFINED_PL
/**
* @param string $what
* @param mixed $value
- * @param bool $autoload
+ * @param ?bool $autoload
*
* @return false|mixed
*/
- public function set(string $what, $value, bool $autoload = false): bool
+ public function set(string $what, $value, ?bool $autoload = null): bool
{
+ if ($autoload === null) {
+ $autoload = $this->settingShouldBeAutoLoaded($what);
+ }
return update_option(TouchPointWP::SETTINGS_PREFIX . $what, $value, $autoload); // TODO MULTI
}
-
/**
* Migrate settings from version to version. This may be called even when a migration isn't necessary.
*/
@@ -1314,14 +1347,7 @@ public function migrate(): void
// 0.0.31 - Add lookup IDs to ResCodes
- foreach (TouchPointWP::instance()->getResCodes() as $rc) {
- $term = Utilities::termExists($rc->name, TouchPointWP::TAX_RESCODE);
- if ($term !== null && isset($term['term_id'])) {
- if (update_term_meta($term['term_id'], TouchPointWP::TAXMETA_LOOKUP_ID, $rc->id)) {
- TouchPointWP::queueFlushRewriteRules();
- }
- }
- }
+ TouchPointWP::$forceTermLookupIdUpdate = true;
// Update version string
diff --git a/src/python/WebApi.py b/src/python/WebApi.py
index 2e76ee39..a6622d74 100644
--- a/src/python/WebApi.py
+++ b/src/python/WebApi.py
@@ -18,8 +18,7 @@ def print_exception(): # From https://stackoverflow.com/a/20264059/2339939
lineno = tb.tb_lineno
filename = f.f_code.co_filename
linecache.checkcache(filename)
- line = linecache.getline(filename, lineno, f.f_globals)
- print('EXCEPTION IN ({}, LINE {} "{}"): {}'.format(filename, lineno, line.strip(), exc_obj))
+ print('{} (L{})'.format(exc_obj, lineno))
def get_person_info_for_sync(person_obj):
@@ -1166,6 +1165,9 @@ def get_person_info_for_sync(person_obj):
model.Title = "Login"
model.Header = "Processing..."
+ if response == "":
+ raise Exception("Could not communicate with WordPress server.")
+
response = json.loads(response)
if "error" in response:
@@ -1199,10 +1201,8 @@ def get_person_info_for_sync(person_obj):
print("Please email the following error message to " + model.Setting("AdminMail",
"the church staff") + " .
")
print(response)
- print(" ")
- print("")
+ print("")
if not apiCalled:
model.Title = "Invalid Request"
From 61188fee1fac77d8619b4dbdb09cd10aec7ef7a7 Mon Sep 17 00:00:00 2001
From: James K
Date: Fri, 21 Jul 2023 22:49:32 -0400
Subject: [PATCH 020/226] Further updates to which options are autoloaded.
---
src/TouchPoint-WP/TouchPointWP.php | 1 +
src/TouchPoint-WP/TouchPointWP_Settings.php | 25 +++++++++++++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index a1485e9a..0ea5b308 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -1552,6 +1552,7 @@ protected function insertTermsForLookupBasedTaxonomy(array $list, string $taxono
}
$idUpdate = true;
}
+ // Update the term meta if term is new, or if id update is forced.
if ($term !== null && isset($term['term_id']) && $idUpdate) {
update_term_meta($term['term_id'], self::TAXMETA_LOOKUP_ID, $i->id);
}
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 0f9e8dfc..1b57163e 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -189,7 +189,10 @@ public function hasValidApiSettings(): bool
*/
private function settingShouldBeAutoLoaded(string $settingName): bool
{
- if (str_contains($settingName, '_cron_last_run')) {
+ if (str_contains($settingName, '_cron_last_run')
+ || $settingName === "DEBUG"
+ || $settingName === "meta_familyEvFields" // because it's used when registering the taxonomies on every init.
+ ) {
return true;
}
foreach (self::settingsFields() as $page) {
@@ -313,6 +316,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => '',
+ 'autoload' => true,
'placeholder' => 'mychurch.tpsdb.com',
'callback' => [$this, 'validation_lowercase']
],
@@ -338,6 +342,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => '',
+ 'autoload' => true,
'placeholder' => '',
],
[
@@ -349,6 +354,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text_secret',
'default' => '',
+ 'autoload' => true,
'placeholder' => $this->passwordPlaceholder('api_pass'),
'callback' => fn($new) => $this->validation_secret($new, 'api_pass')
],
@@ -361,6 +367,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'WebApi',
+ 'autoload' => true,
'placeholder' => '',
],
[
@@ -372,6 +379,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => '',
+ 'autoload' => true,
'placeholder' => '',
],
[
@@ -389,7 +397,8 @@ private function settingsFields($includeDetail = false): array
];
// Add Script generation section if necessary settings are established.
- if ($this->getWithoutDefault('system_name') !== self::UNDEFINED_PLACEHOLDER
+ if ($includeDetail
+ && $this->getWithoutDefault('system_name') !== self::UNDEFINED_PLACEHOLDER
&& $this->hasValidApiSettings()) {
/** @noinspection HtmlUnknownTarget */
$this->settings['basic']['fields'][] = [
@@ -535,6 +544,7 @@ private function settingsFields($includeDetail = false): array
'type' => 'textarea',
'label' => __('Involvement Post Types', 'TouchPoint-WP'),
'default' => '[]',
+ 'autoload' => true,
'hidden' => true,
'description' => !$includeThis ? "" : function() {
TouchPointWP::requireScript("base");
@@ -617,6 +627,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'partners',
+ 'autoload' => true,
'placeholder' => 'partners',
'callback' => fn($new) => $this->validation_slug($new, 'global_slug')
],
@@ -708,6 +719,7 @@ private function settingsFields($includeDetail = false): array
'type' => 'select',
'options' => $includeThis ? $this->parent->getFamilyEvFieldsAsKVArray('code', true) : [],
'default' => [],
+ 'autoload' => true,
],
],
];
@@ -764,6 +776,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Divisions',
+ 'autoload' => true,
'placeholder' => 'Divisions'
],
[
@@ -775,6 +788,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Division',
+ 'autoload' => true,
'placeholder' => 'Division'
],
[
@@ -786,6 +800,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'div',
+ 'autoload' => true,
'placeholder' => 'div',
'callback' => fn($new) => $this->validation_slug($new, 'dv_slug')
],
@@ -844,6 +859,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Campuses',
+ 'autoload' => true,
'placeholder' => 'Campuses'
],
[
@@ -855,6 +871,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Campus',
+ 'autoload' => true,
'placeholder' => 'Campus'
],
[
@@ -866,6 +883,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'campus',
+ 'autoload' => true,
'placeholder' => 'campus',
'callback' => fn($new) => $this->validation_slug($new, 'camp_slug')
]
@@ -886,6 +904,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Resident Codes',
+ 'autoload' => true,
'placeholder' => 'Resident Codes'
],
[
@@ -897,6 +916,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'Resident Code',
+ 'autoload' => true,
'placeholder' => 'Resident Code'
],
[
@@ -908,6 +928,7 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'rescodes',
+ 'autoload' => true,
'placeholder' => 'rescodes',
'callback' => fn($new) => $this->validation_slug($new, 'rc_slug')
]
From 6016dcc603736026e2fc64449d763bbeb24a4911 Mon Sep 17 00:00:00 2001
From: James K
Date: Tue, 8 Aug 2023 07:24:16 -0400
Subject: [PATCH 021/226] Adding filter for report classes
---
src/TouchPoint-WP/Report.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/Report.php b/src/TouchPoint-WP/Report.php
index 837ac966..7d01c0e3 100644
--- a/src/TouchPoint-WP/Report.php
+++ b/src/TouchPoint-WP/Report.php
@@ -35,6 +35,8 @@ class Report implements api, module, JsonSerializable, updatesViaCron
public const NAME_META_KEY = self::META_PREFIX . "name";
public const P1_META_KEY = self::META_PREFIX . "p1";
public const DEFAULT_CONTENT = '';
+ public const FIGURE_CLASS_FILTER = TouchPointWP::SETTINGS_PREFIX . "rpt_figure_class";
+ public const FIGURE_CLASS_DEFAULT = "TouchPoint-report";
public static bool $_isLoaded = false;
@@ -286,7 +288,8 @@ public static function reportShortcode($params = [], string $content = ""): stri
// Add Figure elt with a unique ID
$idAttr = "id=\"" . wp_unique_id('tp-report-') . "\"";
- $rc = "\n\t" . str_replace("\n", "\n\t", $rc);
+ $class = apply_filters(self::FIGURE_CLASS_FILTER, self::FIGURE_CLASS_DEFAULT);
+ $rc = "\n\t" . str_replace("\n", "\n\t", $rc);
// If desired, add a caption that indicates when the table was last updated.
if ($params['showupdated']) {
From 117a69b4e51be03c6dcae169ee8ea6456caab4ff Mon Sep 17 00:00:00 2001
From: James K
Date: Thu, 10 Aug 2023 15:57:38 -0400
Subject: [PATCH 022/226] Updates related to changed dev environment
---
.gitignore | 3 ++-
.idea/misc.xml | 1 -
.idea/php.xml | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0380c8f9..2f612cad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,4 +23,5 @@ node_modules
package-lock.json
/build/
-/touchpoint-wp.zip
\ No newline at end of file
+/touchpoint-wp.zip
+/composer.phar
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 591fc5ab..691dd2ff 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,3 @@
-
@noinspection
diff --git a/.idea/php.xml b/.idea/php.xml
index 05d47f11..299cb8ee 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -13,6 +13,7 @@
+
From 8ef8f5e60a95562f868a6970e7c7f6b66dd5fd1f Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 24 Aug 2023 22:14:55 -0400
Subject: [PATCH 023/226] Resolving an issue with how settings are defined
---
src/TouchPoint-WP/TouchPointWP_Settings.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 1b57163e..707ca003 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -1401,7 +1401,7 @@ public function updateDeployedScripts(): void
*/
public function registerSettings(): void
{
- $currentSection = false;
+ $currentSection = 'basic'; // basic is the default.
if (isset($_POST['tab']) && $_POST['tab']) {
$currentSection = $_POST['tab'];
} elseif (isset($_GET['tab']) && $_GET['tab']) {
@@ -1411,7 +1411,7 @@ public function registerSettings(): void
$this->settings = $this->settingsFields($currentSection);
foreach ($this->settings as $section => $data) {
// Check posted/selected tab.
- if ($currentSection && $currentSection !== $section) {
+ if ($currentSection !== $section) {
continue;
}
From 2d2e31ad4a5822628b1c8d6fe5edfaeb2e3bf770 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Fri, 25 Aug 2023 17:23:17 -0400
Subject: [PATCH 024/226] Merging buxfixes and optimizations from Next
---
src/TouchPoint-WP/TouchPointWP.php | 2 +-
src/TouchPoint-WP/TouchPointWP_Settings.php | 6 ------
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index 0ea5b308..de450c2c 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -1552,7 +1552,7 @@ protected function insertTermsForLookupBasedTaxonomy(array $list, string $taxono
}
$idUpdate = true;
}
- // Update the term meta if term is new, or if id update is forced.
+ // Update the term meta if term is new, or if id update is forced.
if ($term !== null && isset($term['term_id']) && $idUpdate) {
update_term_meta($term['term_id'], self::TAXMETA_LOOKUP_ID, $i->id);
}
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 707ca003..1a38ecd4 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -316,7 +316,6 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => '',
- 'autoload' => true,
'placeholder' => 'mychurch.tpsdb.com',
'callback' => [$this, 'validation_lowercase']
],
@@ -342,7 +341,6 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => '',
- 'autoload' => true,
'placeholder' => '',
],
[
@@ -354,7 +352,6 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text_secret',
'default' => '',
- 'autoload' => true,
'placeholder' => $this->passwordPlaceholder('api_pass'),
'callback' => fn($new) => $this->validation_secret($new, 'api_pass')
],
@@ -367,7 +364,6 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => 'WebApi',
- 'autoload' => true,
'placeholder' => '',
],
[
@@ -379,7 +375,6 @@ private function settingsFields($includeDetail = false): array
),
'type' => 'text',
'default' => '',
- 'autoload' => true,
'placeholder' => '',
],
[
@@ -719,7 +714,6 @@ private function settingsFields($includeDetail = false): array
'type' => 'select',
'options' => $includeThis ? $this->parent->getFamilyEvFieldsAsKVArray('code', true) : [],
'default' => [],
- 'autoload' => true,
],
],
];
From 8ac7869ff927be5f4db23d81c735a9f7a9d607e1 Mon Sep 17 00:00:00 2001
From: James K
Date: Mon, 14 Aug 2023 22:29:41 -0400
Subject: [PATCH 025/226] Reworking build procedure to maintain a local build
directory during development.
---
.gitignore | 4 +---
build.sh | 19 +++++++++----------
generateI18n_1forTranslation.ps1 | 2 +-
3 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/.gitignore b/.gitignore
index 2f612cad..236fe5d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,8 +4,7 @@ composer.lock
/assets/images/people
/TouchPointWP_ErrorLog.txt
/.phpdoc/
-/phpDocumentor.phar
-/wp-cli.phar
+*.phar
/.idea/workspace.xml
/.idea/usage.statistics.xml
@@ -24,4 +23,3 @@ package-lock.json
/build/
/touchpoint-wp.zip
-/composer.phar
diff --git a/build.sh b/build.sh
index b69c25e7..772b2e07 100644
--- a/build.sh
+++ b/build.sh
@@ -24,7 +24,7 @@ uglifyjs -o build/assets/js/meeting-defer.min.js -- assets/js/meeting-defer.js
uglifyjs -o build/assets/js/partner-defer.min.js -- assets/js/partner-defer.js
cp -r assets build
cd ./build || exit
-zip -r ../touchpoint-wp.zip assets
+#zip -r ../touchpoint-wp.zip assets
cd ..
@@ -35,15 +35,14 @@ cp -r ./i18n ./build/i18n
php ./wp-cli.phar i18n make-json ./build/i18n
php ./wp-cli.phar i18n make-mo ./build/i18n
-cd ./build || exit
-zip -r ../touchpoint-wp.zip i18n
-cd ..
-zip -r touchpoint-wp.zip ./ext
-zip -r touchpoint-wp.zip ./src
+cp -r ./ext ./build/ext
+cp -r ./src ./build/src
-find . -maxdepth 1 -iname "*.php" -exec zip touchpoint-wp.zip {} \;
-find . -maxdepth 1 -iname "*.md" -exec zip touchpoint-wp.zip {} \;
-find . -maxdepth 1 -iname "*.json" -exec zip touchpoint-wp.zip {} \;
+find . -maxdepth 1 -iname "*.php" -exec cp {} build/ \;
+find . -maxdepth 1 -iname "*.md" -exec cp {} build/ \;
+find . -maxdepth 1 -iname "*.json" -exec cp {} build/ \;
-rm -r build
\ No newline at end of file
+cd ./build || exit
+find . -exec zip ../touchpoint-wp.zip {} \;
+cd ..
diff --git a/generateI18n_1forTranslation.ps1 b/generateI18n_1forTranslation.ps1
index cc5a901d..e23662c6 100644
--- a/generateI18n_1forTranslation.ps1
+++ b/generateI18n_1forTranslation.ps1
@@ -7,5 +7,5 @@ if (!(test-path $pharFile -newerThan $compareDt))
Invoke-WebRequest https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -OutFile $pharFile
}
-php .\wp-cli.phar i18n make-pot . i18n/TouchPoint-WP.pot
+php .\wp-cli.phar i18n make-pot . i18n/TouchPoint-WP.pot --exclude=build
php .\wp-cli.phar i18n update-po i18n/TouchPoint-WP.pot
\ No newline at end of file
From 00facce0819283efd340a85baa46511a29257465 Mon Sep 17 00:00:00 2001
From: James K
Date: Mon, 14 Aug 2023 22:30:57 -0400
Subject: [PATCH 026/226] Adding jetbrains run profiles
---
.idea/runConfigurations/Build__WSL_.xml | 17 +++++++++++++++++
.../i18n__1_for_Translation.xml | 17 +++++++++++++++++
.idea/runConfigurations/i18n__2_for_Publish.xml | 17 +++++++++++++++++
3 files changed, 51 insertions(+)
create mode 100644 .idea/runConfigurations/Build__WSL_.xml
create mode 100644 .idea/runConfigurations/i18n__1_for_Translation.xml
create mode 100644 .idea/runConfigurations/i18n__2_for_Publish.xml
diff --git a/.idea/runConfigurations/Build__WSL_.xml b/.idea/runConfigurations/Build__WSL_.xml
new file mode 100644
index 00000000..d2225246
--- /dev/null
+++ b/.idea/runConfigurations/Build__WSL_.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/i18n__1_for_Translation.xml b/.idea/runConfigurations/i18n__1_for_Translation.xml
new file mode 100644
index 00000000..8f161b58
--- /dev/null
+++ b/.idea/runConfigurations/i18n__1_for_Translation.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/i18n__2_for_Publish.xml b/.idea/runConfigurations/i18n__2_for_Publish.xml
new file mode 100644
index 00000000..30b2968d
--- /dev/null
+++ b/.idea/runConfigurations/i18n__2_for_Publish.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 1d0588c0d661dfbd4de5bc21f30a54e332cf2e71 Mon Sep 17 00:00:00 2001
From: James K
Date: Tue, 15 Aug 2023 15:25:10 -0400
Subject: [PATCH 027/226] build improvements
---
.github/workflows/releases.yml | 4 ++--
.idea/misc.xml | 3 ++-
build.sh | 5 +++--
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml
index 5b1c26a6..5d315037 100644
--- a/.github/workflows/releases.yml
+++ b/.github/workflows/releases.yml
@@ -1,10 +1,10 @@
+name: Create Release
+
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
-name: Create Release
-
jobs:
build:
name: Create Release
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 691dd2ff..ec30493f 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,7 @@
+
@noinspection
-
+
\ No newline at end of file
diff --git a/build.sh b/build.sh
index 772b2e07..1f1eb7ad 100644
--- a/build.sh
+++ b/build.sh
@@ -24,12 +24,13 @@ uglifyjs -o build/assets/js/meeting-defer.min.js -- assets/js/meeting-defer.js
uglifyjs -o build/assets/js/partner-defer.min.js -- assets/js/partner-defer.js
cp -r assets build
cd ./build || exit
-#zip -r ../touchpoint-wp.zip assets
cd ..
# compile translations
-wget -O wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
+if [ ! -f wp-cli.phar ]; then
+ wget -O wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
+fi
cp -r ./i18n ./build/i18n
From d27cbf2f9e628278e89db2fbaef1f8ba52d1e768 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 24 Aug 2023 22:12:14 -0400
Subject: [PATCH 028/226] Settings for Meeting Calendars
---
.idea/misc.xml | 1 -
i18n/TouchPoint-WP-es_ES.po | 390 ++++++++++---------
i18n/TouchPoint-WP.pot | 392 +++++++++++---------
src/TouchPoint-WP/TouchPointWP_Settings.php | 74 +++-
4 files changed, 504 insertions(+), 353 deletions(-)
diff --git a/.idea/misc.xml b/.idea/misc.xml
index ec30493f..d436a9a5 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,3 @@
-
@noinspection
diff --git a/i18n/TouchPoint-WP-es_ES.po b/i18n/TouchPoint-WP-es_ES.po
index cb174921..dc3f5a94 100644
--- a/i18n/TouchPoint-WP-es_ES.po
+++ b/i18n/TouchPoint-WP-es_ES.po
@@ -50,7 +50,7 @@ msgid "Slug"
msgstr "Slug"
#: src/templates/admin/invKoForm.php:47
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:763
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:865
msgid "Divisions to Import"
msgstr "Divisiones a Importar"
@@ -118,13 +118,13 @@ msgstr "Género"
#: src/templates/admin/invKoForm.php:169
#: src/TouchPoint-WP/Involvement.php:1419
-#: src/TouchPoint-WP/TouchPointWP.php:1422
+#: src/TouchPoint-WP/TouchPointWP.php:1372
msgid "Weekday"
msgstr "Día laborable"
#: src/templates/admin/invKoForm.php:173
#: src/TouchPoint-WP/Involvement.php:1445
-#: src/TouchPoint-WP/TouchPointWP.php:1504
+#: src/TouchPoint-WP/TouchPointWP.php:1419
msgid "Time of Day"
msgstr "Hora del día"
@@ -133,7 +133,7 @@ msgid "Prevailing Marital Status"
msgstr "Estado civil prevaleciente"
#: src/templates/admin/invKoForm.php:181
-#: src/TouchPoint-WP/TouchPointWP.php:1558
+#: src/TouchPoint-WP/TouchPointWP.php:1448
msgid "Age Group"
msgstr "Grupo de edad"
@@ -177,19 +177,19 @@ msgid "%s will be imported overnight for the first time."
msgstr "%s se importarán durante la noche por primera vez."
#. translators: %s is "what you call TouchPoint at your church", which is a setting
-#: src/TouchPoint-WP/Auth.php:137
+#: src/TouchPoint-WP/Auth.php:138
msgid "Sign in with your %s account"
msgstr "Inicie sesión con su cuenta de %s"
-#: src/TouchPoint-WP/Auth.php:392
+#: src/TouchPoint-WP/Auth.php:391
msgid "Your login token expired."
msgstr "Su token de inicio de sesión caducó."
-#: src/TouchPoint-WP/Auth.php:407
+#: src/TouchPoint-WP/Auth.php:406
msgid "Your login token is invalid."
msgstr "Su token de inicio de sesión no es válido."
-#: src/TouchPoint-WP/Auth.php:419
+#: src/TouchPoint-WP/Auth.php:418
msgid "Session could not be validated."
msgstr "No se pudo validar la sesión."
@@ -303,110 +303,110 @@ msgstr "Contacta"
msgid "RSVP"
msgstr "RSVP"
-#: src/TouchPoint-WP/TouchPointWP.php:2404
+#: src/TouchPoint-WP/TouchPointWP.php:2484
msgid "Unknown Type"
msgstr "Tipo desconocido"
-#: src/TouchPoint-WP/TouchPointWP.php:2458
+#: src/TouchPoint-WP/TouchPointWP.php:2538
msgid "Your Searches"
msgstr "Tus búsquedas"
-#: src/TouchPoint-WP/TouchPointWP.php:2461
+#: src/TouchPoint-WP/TouchPointWP.php:2541
msgid "Public Searches"
msgstr "Búsquedas públicas"
-#: src/TouchPoint-WP/TouchPointWP.php:2464
+#: src/TouchPoint-WP/TouchPointWP.php:2544
msgid "Status Flags"
msgstr "Indicadores de Estado"
-#: src/TouchPoint-WP/TouchPointWP.php:2469
-#: src/TouchPoint-WP/TouchPointWP.php:2470
+#: src/TouchPoint-WP/TouchPointWP.php:2549
+#: src/TouchPoint-WP/TouchPointWP.php:2550
msgid "Current Value"
msgstr "Valor actual"
-#: src/TouchPoint-WP/TouchPointWP.php:2597
-#: src/TouchPoint-WP/TouchPointWP.php:2635
+#: src/TouchPoint-WP/TouchPointWP.php:2677
+#: src/TouchPoint-WP/TouchPointWP.php:2715
msgid "Invalid or incomplete API Settings."
msgstr "Configuración de API no válida o incompleta."
-#: src/TouchPoint-WP/TouchPointWP.php:2605
-#: src/TouchPoint-WP/TouchPointWP.php:2642
+#: src/TouchPoint-WP/TouchPointWP.php:2685
+#: src/TouchPoint-WP/TouchPointWP.php:2722
msgid "Host appears to be missing from TouchPoint-WP configuration."
msgstr "Parece que falta el host en la configuración de TouchPoint-WP."
-#: src/TouchPoint-WP/TouchPointWP.php:2762
+#: src/TouchPoint-WP/TouchPointWP.php:2842
msgid "People Query Failed"
msgstr "Consulta de registros de personas fallida"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:204
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:235
msgid "Basic Settings"
msgstr "Ajustes básicos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:205
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:236
msgid "Connect to TouchPoint and choose which features you wish to use."
msgstr "Conéctese a TouchPoint y elija qué funciones desea usar."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:209
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:240
msgid "Enable Authentication"
msgstr "Habilitar autenticación"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:210
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:241
msgid "Allow TouchPoint users to sign into this website with TouchPoint."
msgstr "Permita que los usuarios de TouchPoint inicien sesión en este sitio web con TouchPoint."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:220
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:252
msgid "Enable RSVP Tool"
msgstr "Habilitar la herramienta RSVP"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:221
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:253
msgid "Add a crazy-simple RSVP button to WordPress event pages."
msgstr "Agregue un botón RSVP muy simple a las páginas de eventos de WordPress."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:227
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:260
msgid "Enable Involvements"
msgstr "Habilitar Participaciones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:228
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:261
msgid "Load Involvements from TouchPoint for involvement listings and entries native in your website."
msgstr "Cargue participaciones desde TouchPoint para obtener listas de participación y entradas nativas en su sitio web."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:237
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:271
msgid "Enable Public People Lists"
msgstr "Habilitar listas de personas públicas"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:238
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:272
msgid "Import public people listings from TouchPoint (e.g. staff or elders)"
msgstr "Importe listados públicos de personas desde TouchPoint (por ejemplo, personal o ancianos)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:247
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:282
msgid "Enable Global Partner Listings"
msgstr "Habilitar listados de Socios Globales"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:248
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:283
msgid "Import ministry partners from TouchPoint to list publicly."
msgstr "Importe socios ministeriales de TouchPoint para incluirlos en una lista pública."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:267
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:304
msgid "Display Name"
msgstr "Nombre para mostrar"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:268
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:305
msgid "What your church calls your TouchPoint database."
msgstr "Lo que su iglesia llama su base de datos TouchPoint."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:278
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:315
msgid "TouchPoint Host Name"
msgstr "Nombre de host del TouchPoint"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:279
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:316
msgid "The domain for your TouchPoint database, without the https or any slashes."
msgstr "El dominio de su base de datos TouchPoint, sin https ni barras."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:290
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:328
msgid "Custom Mobile App Deeplink Host Name"
msgstr "Nombre de host de enlace profundo de aplicación móvil personalizada"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:291
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:329
msgid ""
"The domain for your mobile app deeplinks, without the https or any slashes. If you aren't \r\n"
" using the custom mobile app, leave this blank."
@@ -414,48 +414,48 @@ msgstr ""
"El dominio de los enlaces profundos de su aplicación móvil, sin https ni barras oblicuas. \r\n"
"Si no está utilizando la aplicación móvil personalizada, déjelo en blanco."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:303
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:341
msgid "TouchPoint API Username"
msgstr "Nombre de usuario de la API de TouchPoint"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:314
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:353
msgid "TouchPoint API User Password"
msgstr "Contraseña de usuario de la API de TouchPoint"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:315
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:354
msgid "The password of a user account in TouchPoint with API permissions."
msgstr "La contraseña de una cuenta de usuario en TouchPoint con permisos de API."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:326
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:366
msgid "TouchPoint API Script Name"
msgstr "Nombre de la secuencia de comandos de la API de TouchPoint"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:327
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:367
msgid "The name of the Python script loaded into TouchPoint. Don't change this unless you know what you're doing."
msgstr "El nombre de la secuencia de comandos de Python cargada en TouchPoint. No cambies esto a menos que sepas lo que estás haciendo."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:337
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:378
msgid "Google Maps Javascript API Key"
msgstr "Clave de la API de Javascript de Google Maps"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:338
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:379
msgid "Required for embedding maps."
msgstr "Necesario para incrustar mapas."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:348
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:390
msgid "Google Maps Geocoding API Key"
msgstr "Clave API de codificación geográfica de Google Maps"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:349
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:391
msgid "Optional. Allows for reverse geocoding of user locations."
msgstr "Opcional. Permite la geocodificación inversa de las ubicaciones de los usuarios."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:366
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:372
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:409
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:415
msgid "Generate Scripts"
msgstr "Generar secuencias de comandos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:369
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:412
msgid ""
"Once your settings on this page are set and saved, use this tool to generate\r\n"
"the scripts needed for TouchPoint in a convenient installation package. "
@@ -463,369 +463,369 @@ msgstr ""
"Una vez que haya configurado y guardado su configuración en esta página, \r\n"
"use esta herramienta para generar los scripts necesarios para TouchPoint en un conveniente paquete de instalación."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:371
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:414
msgid "Upload the package to {tpName} here"
msgstr "Sube el paquete a {tpName} aquí"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:386
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:429
msgid "People"
msgstr "Gente"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:387
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:430
msgid "Manage how people are synchronized between TouchPoint and WordPress."
msgstr "Administre cómo se sincronizan las personas entre TouchPoint y WordPress."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:391
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:434
msgid "Contact Keywords"
msgstr "Palabras clave de contacto"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:392
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:435
msgid "These keywords will be used when someone clicks the \"Contact\" button on a Person's listing or profile."
msgstr "Estas palabras clave se utilizarán cuando alguien haga clic en el botón \"Contactar\" en la lista o el perfil de una Persona."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:403
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:446
msgid "Extra Value for WordPress User ID"
msgstr "Valor Adicional para la ID de usuario de WordPress"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:404
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:447
msgid "The name of the extra value to use for the WordPress User ID. If you are using multiple WordPress instances with one TouchPoint database, you will need these values to be unique between WordPress instances. In most cases, the default is fine."
msgstr "El nombre del valor adicional que se usará para el ID de usuario de WordPress. Si está utilizando varias instancias de WordPress con una base de datos de TouchPoint, necesitará que estos valores sean únicos entre las instancias de WordPress. En la mayoría de los casos, el valor predeterminado está bien."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:414
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:457
msgid "Extra Value: Biography"
msgstr "Valor Adicional: Biografía"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:415
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:458
msgid "Import a Bio from a Person Extra Value field. Can be an HTML or Text Extra Value. This will overwrite any values set by WordPress. Leave blank to not import."
msgstr "Importe una biografía desde un campo de Valor Adicional de Persona. Puede ser un Valor Adicional HTML o de texto. Esto sobrescribirá cualquier valor establecido por WordPress. Dejar en blanco para no importar."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:425
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:660
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:468
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:705
msgid "Extra Values to Import"
msgstr "Valor Adicional para importar"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:426
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:469
msgid "Import People Extra Value fields as User Meta data."
msgstr "Importe campos de valor extra de personas como metadatos de usuario."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:442
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:485
msgid "Authentication"
msgstr "Autenticación"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:443
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:486
msgid "Allow users to log into WordPress using TouchPoint."
msgstr "Permita que los usuarios inicien sesión en WordPress usando TouchPoint."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:447
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:490
msgid "Make TouchPoint the default authentication method."
msgstr "Haga que TouchPoint sea el método de autenticación predeterminado."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:448
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:491
msgid "By checking this box, the TouchPoint login page will become the default. To prevent the redirect and reach the standard TouchPoint login page, add '"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:457
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:500
msgid "Enable Auto-Provisioning"
msgstr "Habilitar el aprovisionamiento automático"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:458
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:501
msgid "Automatically create WordPress users, if needed, to match authenticated TouchPoint users."
msgstr "Cree automáticamente usuarios de WordPress, si es necesario, para que coincidan con los usuarios autenticados de TouchPoint."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:467
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:510
msgid "Change 'Edit Profile' links"
msgstr "Cambiar los enlaces 'Editar perfil'"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:468
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:511
msgid "\"Edit Profile\" links will take the user to their TouchPoint profile, instead of their WordPress profile."
msgstr "Los enlaces \"Editar perfil\" llevarán al usuario a su perfil de TouchPoint, en lugar de a su perfil de WordPress."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:477
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:520
msgid "Enable full logout"
msgstr "Habilitar cierre de sesión completo"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:478
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:521
msgid "Logout of TouchPoint when logging out of WordPress."
msgstr "Cierre sesión en TouchPoint al cerrar sesión en WordPress."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:484
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:527
msgid "Prevent Subscriber Admin Bar"
msgstr "Prevenir la barra de administración de suscriptores"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:485
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:528
msgid "By enabling this option, users who can't edit anything won't see the Admin bar."
msgstr "Al habilitar esta opción, los usuarios que no pueden editar nada no verán la barra de administración."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:499
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:542
msgid "Involvements"
msgstr "Involucramientos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:500
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:543
msgid "Import Involvements from TouchPoint to list them on your website, for Small Groups, Classes, and more. Select the division(s) that immediately correspond to the type of Involvement you want to list. For example, if you want a Small Group list and have a Small Group Division, only select the Small Group Division. If you want Involvements to be filterable by additional Divisions, select those Divisions on the Divisions tab, not here."
msgstr "Importe participaciones desde TouchPoint para enumerarlas en su sitio web, para grupos pequeños, clases y más. Seleccione la(s) división(es) que corresponda(n) inmediatamente al tipo de participación que desea enumerar. Por ejemplo, si desea una lista de grupos pequeños y tiene una división de grupos pequeños, solo seleccione la división de grupos pequeños. Si desea que las participaciones se puedan filtrar por divisiones adicionales, seleccione esas divisiones en la pestaña Divisiones, no aquí."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:505
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:548
msgid "Involvement Post Types"
msgstr "Tipos de publicaciones de Involucramientos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:533
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:577
msgid "Global Partners"
msgstr "Misioneros"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:534
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:578
msgid "Manage how global partners are imported from TouchPoint for listing on WordPress. Partners are grouped by family, and content is provided through Family Extra Values. This works for both People and Business records."
msgstr "Administre cómo se importan los socios globales desde TouchPoint para incluirlos en WordPress. Los socios se agrupan por familia y el contenido se proporciona a través de Valor Extra Familiar. Esto funciona tanto para registros de personas como de empresas."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:538
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:582
msgid "Global Partner Name (Plural)"
msgstr "Nombre de los misioneros (plural)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:539
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:583
msgid "What you call Global Partners at your church"
msgstr "Lo que llamas los Misioneros en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:549
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:593
msgid "Global Partner Name (Singular)"
msgstr "Nombre de un misionero (singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:550
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:594
msgid "What you call a Global Partner at your church"
msgstr "Lo que llamas un Misionero en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:560
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:604
msgid "Global Partner Name for Secure Places (Plural)"
msgstr "Nombre de los misioneros para lugares seguros (plural)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:561
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:605
msgid "What you call Secure Global Partners at your church"
msgstr "Lo que llamas un Misionero seguro en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:571
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:615
msgid "Global Partner Name for Secure Places (Singular)"
msgstr "Nombre de un misionero para lugares seguros (singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:572
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:616
msgid "What you call a Secure Global Partner at your church"
msgstr "Lo que llamas los Misioneros seguros en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:582
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:626
msgid "Global Partner Slug"
msgstr "Slug de Socio Global"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:583
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:627
msgid "The root path for Global Partner posts"
msgstr "La ruta raíz para las publicaciones de Socios Globales"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:594
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:639
msgid "Saved Search"
msgstr "Búsqueda Guardada"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:595
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:640
msgid "Anyone who is included in this saved search will be included in the listing."
msgstr "Cualquiera que esté incluido en esta búsqueda guardada se incluirá en la lista."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:605
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:650
msgid "Extra Value: Description"
msgstr "Valor Adicional: Descripción"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:606
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:651
msgid "Import a description from a Family Extra Value field. Can be an HTML or Text Extra Value. This becomes the body of the Global Partner post."
msgstr "Importe una descripción de un campo de Valor Extra Familiar. Puede ser un valor adicional HTML o de texto. Esto se convierte en el cuerpo de la publicación del socio global."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:616
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:661
msgid "Extra Value: Summary"
msgstr "Valor Adicional: Resumen"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:617
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:662
msgid "Optional. Import a short description from a Family Extra Value field. Can be an HTML or Text Extra Value. If not provided, the full bio will be truncated."
msgstr "Opcional. Importe una breve descripción de un campo de Valor Extra Familiar. Puede ser un Valor Adicional HTML o de texto. Si no se proporciona, la biografía completa se truncará."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:627
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:672
msgid "Latitude Override"
msgstr "Anulación de latitud"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:628
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:673
msgid "Designate a text Family Extra Value that will contain a latitude that overrides any locations on the partner's profile for the partner map. Both latitude and longitude must be provided for an override to take place."
msgstr "Designe un Valor Familiar Adicional de texto que contenga una latitud que anule cualquier ubicación en el perfil del socio para el mapa de socios. Tanto la latitud como la longitud deben proporcionarse para que se produzca una anulación."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:638
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:683
msgid "Longitude Override"
msgstr "Anulación de longitud"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:639
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:684
msgid "Designate a text Family Extra Value that will contain a longitude that overrides any locations on the partner's profile for the partner map. Both latitude and longitude must be provided for an override to take place."
msgstr "Designe un Valor Familiar Adicional de texto que contenga una longitud que anule cualquier ubicación en el perfil del socio para el mapa de socios. Tanto la latitud como la longitud deben proporcionarse para que se produzca una anulación."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:649
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:694
msgid "Public Location"
msgstr "Ubicación Pública"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:650
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:695
msgid "Designate a text Family Extra Value that will contain the partner's location, as you want listed publicly. For partners who have DecoupleLocation enabled, this field will be associated with the map point, not the list entry."
msgstr "Designe un Valor Adicional Familiar de texto que contendrá la ubicación del socio, como desea que se enumere públicamente. Para los socios que tienen DecoupleLocation habilitado, este campo se asociará con el punto del mapa, no con la entrada de la lista."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:661
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:706
msgid "Import Family Extra Value fields as Meta data on the partner's post"
msgstr "Importe campos de Valor Adicional Familiar como Metadatos en la publicación del socio"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:672
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:717
msgid "Primary Taxonomy"
msgstr "Taxonomía Primaria"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:673
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:718
msgid "Import a Family Extra Value as the primary means by which partners are organized."
msgstr "Importe un Valor Adicional Familiar como el medio principal por el cual se organizan los socios."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:688
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:734
msgid "Events Calendar"
msgstr "Calendario de eventos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:689
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:735
msgid "Integrate with The Events Calendar from ModernTribe."
msgstr "Integre con el calendario de eventos de ModernTribe."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:693
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:739
msgid "Events for Custom Mobile App"
msgstr "Eventos para la aplicación móvil personalizada"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:696
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:742
msgid "To use your Events Calendar events in the Custom mobile app, set the Provider to Wordpress Plugin - Modern Tribe and use this url:"
msgstr "Para usar los eventos de su calendario de eventos en la aplicación móvil personalizada, configure el proveedor en Wordpress Plugin - Modern Tribe y use esta URL:"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:698
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:744
msgid "Preview"
msgstr "Preestrena"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:713
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:759
msgid "Use Standardizing Stylesheet"
msgstr "Usar hoja de estilo de estandarización"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:714
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:760
msgid "Inserts some basic CSS into the events feed to clean up display"
msgstr "Inserta algo de CSS básico en el feed de eventos para limpiar la pantalla"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:724
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:823
msgid "Divisions"
msgstr "Divisiones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:725
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:824
msgid "Import Divisions from TouchPoint to your website as a taxonomy. These are used to classify users and involvements."
msgstr "Importe Divisiones desde TouchPoint a su sitio web como una taxonomía. Estos se utilizan para clasificar a los usuarios y las participaciones."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:729
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:828
msgid "Division Name (Plural)"
msgstr "Nombre de la División (plural)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:730
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:829
msgid "What you call Divisions at your church"
msgstr "Lo que llamas Divisiones en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:740
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:840
msgid "Division Name (Singular)"
msgstr "Nombre de la División (Singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:741
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:841
msgid "What you call a Division at your church"
msgstr "Lo que llamas una división en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:751
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:852
msgid "Division Slug"
msgstr "Slug de División"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:752
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:853
msgid "The root path for the Division Taxonomy"
msgstr "La ruta raíz para la Taxonomía de División"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:764
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:866
msgid "These Divisions will be imported for the taxonomy"
msgstr "Estas Divisiones se importarán para la taxonomía"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:801
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:903
msgid "Campuses"
msgstr "Campus"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:802
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:904
msgid "Import Campuses from TouchPoint to your website as a taxonomy. These are used to classify users and involvements."
msgstr "Importe Campus desde TouchPoint a su sitio web como una taxonomía. Estos se utilizan para clasificar a los usuarios y las participaciones."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:809
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:911
msgid "Campus Name (Plural)"
msgstr "Nombre del Campus (Plural)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:810
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:912
msgid "What you call Campuses at your church"
msgstr "Lo que llamas Campus en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:820
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:923
msgid "Campus Name (Singular)"
msgstr "Nombre del Campus (Singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:821
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:924
msgid "What you call a Campus at your church"
msgstr "Lo que llamas un Campus en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:831
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:935
msgid "Campus Slug"
msgstr "Slug de Campus"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:832
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:936
msgid "The root path for the Campus Taxonomy"
msgstr "El camino raíz para la Taxonomía del Campus"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:846
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:951
msgid "Resident Codes"
msgstr "Códigos de Residentes"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:847
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:952
msgid "Import Resident Codes from TouchPoint to your website as a taxonomy. These are used to classify users and involvements that have locations."
msgstr "Importe Códigos de Residentes desde TouchPoint a su sitio web como una taxonomía. Estos se utilizan para clasificar los usuarios y las participaciones que tienen ubicaciones."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:851
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:956
msgid "Resident Code Name (Plural)"
msgstr "Nombre de Código de Tesidente (Plural)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:852
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:957
msgid "What you call Resident Codes at your church"
msgstr "Lo que llamas Códigos de Residente en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:862
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:968
msgid "Resident Code Name (Singular)"
msgstr "Nombre de Código de Residente (singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:863
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:969
msgid "What you call a Resident Code at your church"
msgstr "Lo que llamas un Código de Residencia en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:873
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:980
msgid "Resident Code Slug"
msgstr "Slug de Código Residente"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:874
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:981
msgid "The root path for the Resident Code Taxonomy"
msgstr "La ruta raíz para la Taxonomía del Código de Residente"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1030
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1138
msgid "password saved"
msgstr "contraseña guardada"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1086
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1087
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1194
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1195
msgid "TouchPoint-WP"
msgstr "TouchPoint-WP"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1118
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1226
msgid "Settings"
msgstr "Ajustes"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1346
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1449
msgid "Script Update Failed"
msgstr "Actualización de secuencia de comandos fallida"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1462
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1578
msgid "TouchPoint-WP Settings"
msgstr "Configuración de TouchPoint-WP"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1513
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1629
msgid "Save Settings"
msgstr "Guardar ajustes"
@@ -993,7 +993,7 @@ msgstr "Enviar"
msgid "Nothing to submit."
msgstr "Nada que enviar."
-#: src/TouchPoint-WP/TouchPointWP.php:2703
+#: src/TouchPoint-WP/TouchPointWP.php:2783
msgid "The scripts on TouchPoint that interact with this plugin are out-of-date, and an automatic update failed."
msgstr "Los scripts en TouchPoint que interactúan con este complemento están desactualizados y falló una actualización automática."
@@ -1049,7 +1049,7 @@ msgid "Next"
msgstr "Siguiente"
#: src/TouchPoint-WP/Involvement.php:1467
-#: src/TouchPoint-WP/TouchPointWP.php:1597
+#: src/TouchPoint-WP/TouchPointWP.php:1473
msgid "Marital Status"
msgstr "Estado civil"
@@ -1175,12 +1175,12 @@ msgstr "Añade una ubicación"
msgid "The Campus"
msgstr "El campus"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:777
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:783
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:879
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:885
msgid "Locations"
msgstr "Ubicaciones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:778
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:880
msgid "Locations are physical places, probably campuses. None are required, but they can help present geographic information clearly."
msgstr "Las ubicaciones son lugares físicos, probablemente campus. No se requiere ninguno, pero pueden ayudar a presentar la información geográfica con claridad."
@@ -1284,7 +1284,7 @@ msgctxt "miles. Unit is appended to a number. %2.1f is the number, so %2.1fmi l
msgid "%2.1fmi"
msgstr "%2.1fmi"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:304
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:342
msgid "The username of a user account in TouchPoint with API permissions."
msgstr "El nombre de usuario de una cuenta de usuario en TouchPoint con permisos de API."
@@ -1309,7 +1309,7 @@ msgid "Could not locate."
msgstr "No se pudo localizar."
#: src/TouchPoint-WP/Meeting.php:86
-#: src/TouchPoint-WP/TouchPointWP.php:907
+#: src/TouchPoint-WP/TouchPointWP.php:961
msgid "Only GET requests are allowed."
msgstr "Solo se permiten solicitudes GET."
@@ -1328,115 +1328,115 @@ msgstr "Datos proporcionados no válidos."
msgid "Invalid Post Type."
msgstr "Tipo de publicación no válida."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:257
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:293
msgid "Enable Campuses"
msgstr "Habilitar Campus"
-#: src/TouchPoint-WP/TouchPointWP.php:1228
+#: src/TouchPoint-WP/TouchPointWP.php:1282
msgid "Classify posts by their general locations."
msgstr "clasificar las publicaciones por sus ubicaciones generales."
-#: src/TouchPoint-WP/TouchPointWP.php:1281
+#: src/TouchPoint-WP/TouchPointWP.php:1314
msgid "Classify posts by their church campus."
msgstr "Clasifique las publicaciones por el campus."
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/TouchPointWP.php:1333
+#: src/TouchPoint-WP/TouchPointWP.php:1345
msgid "Classify things by %s."
msgstr "Clasifica las cosas por %s."
-#: src/TouchPoint-WP/TouchPointWP.php:1421
+#: src/TouchPoint-WP/TouchPointWP.php:1371
msgid "Classify involvements by the day on which they meet."
msgstr "Clasificar las participaciones por el día en que se reúnen."
-#: src/TouchPoint-WP/TouchPointWP.php:1422
+#: src/TouchPoint-WP/TouchPointWP.php:1372
msgid "Weekdays"
msgstr "Días de semana"
-#: src/TouchPoint-WP/TouchPointWP.php:1459
+#: src/TouchPoint-WP/TouchPointWP.php:1394
msgid "Classify involvements by tense (present, future, past)"
msgstr "Clasificar las implicaciones por tiempo (presente, futuro, pasado)"
-#: src/TouchPoint-WP/TouchPointWP.php:1460
+#: src/TouchPoint-WP/TouchPointWP.php:1395
msgid "Tense"
msgstr "Tiempo"
-#: src/TouchPoint-WP/TouchPointWP.php:1460
+#: src/TouchPoint-WP/TouchPointWP.php:1395
msgid "Tenses"
msgstr "Tiempos"
-#: src/TouchPoint-WP/TouchPointWP.php:1503
+#: src/TouchPoint-WP/TouchPointWP.php:1418
msgid "Classify involvements by the portion of the day in which they meet."
msgstr "Clasifique las participaciones por la parte del día en que se reúnen."
-#: src/TouchPoint-WP/TouchPointWP.php:1504
+#: src/TouchPoint-WP/TouchPointWP.php:1419
msgid "Times of Day"
msgstr "Tiempos del Día"
-#: src/TouchPoint-WP/TouchPointWP.php:1557
+#: src/TouchPoint-WP/TouchPointWP.php:1447
msgid "Classify involvements and users by their age groups."
msgstr "Clasifica las implicaciones y los usuarios por sus grupos de edad."
-#: src/TouchPoint-WP/TouchPointWP.php:1558
+#: src/TouchPoint-WP/TouchPointWP.php:1448
msgid "Age Groups"
msgstr "Grupos de Edad"
-#: src/TouchPoint-WP/TouchPointWP.php:1596
+#: src/TouchPoint-WP/TouchPointWP.php:1472
msgid "Classify involvements by whether participants are mostly single or married."
msgstr "Clasifique las participaciones según si los participantes son en su mayoría solteros o casados."
-#: src/TouchPoint-WP/TouchPointWP.php:1597
+#: src/TouchPoint-WP/TouchPointWP.php:1473
msgid "Marital Statuses"
msgstr "Estados Civiles"
-#: src/TouchPoint-WP/TouchPointWP.php:1641
+#: src/TouchPoint-WP/TouchPointWP.php:1503
msgid "Classify Partners by category chosen in settings."
msgstr "Clasifique a los ministeriales por categoría elegida en la configuración."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:258
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:294
msgid "Import campuses as a taxonomy. (You probably want to do this if you're multi-campus.)"
msgstr "Importar campus como taxonomía. (Probablemente quieras hacer esto si tienes varios campus)."
#. translators: %s: taxonomy name, plural
-#: src/TouchPoint-WP/TouchPointWP.php:1201
+#: src/TouchPoint-WP/TouchPointWP.php:1255
msgid "Search %s"
msgstr "Buscar %s"
#. translators: %s: taxonomy name, plural
-#: src/TouchPoint-WP/TouchPointWP.php:1203
+#: src/TouchPoint-WP/TouchPointWP.php:1257
msgid "All %s"
msgstr "Todos los %s"
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/TouchPointWP.php:1205
+#: src/TouchPoint-WP/TouchPointWP.php:1259
msgid "Edit %s"
msgstr "Editar %s"
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/TouchPointWP.php:1207
+#: src/TouchPoint-WP/TouchPointWP.php:1261
msgid "Update %s"
msgstr "Actualizar %s"
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/TouchPointWP.php:1209
+#: src/TouchPoint-WP/TouchPointWP.php:1263
msgid "Add New %s"
msgstr "Agregar Nuevo %s"
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/TouchPointWP.php:1211
+#: src/TouchPoint-WP/TouchPointWP.php:1265
msgid "New %s"
msgstr "Nuevo %s"
-#: src/TouchPoint-WP/Report.php:167
+#: src/TouchPoint-WP/Report.php:169
msgid "TouchPoint Reports"
msgstr "Informes de TouchPoint"
-#: src/TouchPoint-WP/Report.php:168
+#: src/TouchPoint-WP/Report.php:170
msgid "TouchPoint Report"
msgstr "Informe de TouchPoint"
#. translators: Last updated date/time for a report. %1$s is the date. %2$s is the time.
-#: src/TouchPoint-WP/Report.php:295
+#: src/TouchPoint-WP/Report.php:298
msgid "Updated on %1$s at %2$s"
msgstr "Actualizada %1$s %2$s"
@@ -1447,3 +1447,43 @@ msgstr "Cada 15 minutos"
#: src/TouchPoint-WP/Involvement.php:1395
msgid "Language"
msgstr "Idioma"
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:771
+msgid "Meeting Calendars"
+msgstr "Calendarios de Reuniones"
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:772
+msgid "Import Meetings from TouchPoint to a calendar on your website."
+msgstr "Importe reuniones desde TouchPoint a un calendario en su sitio web."
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:776
+msgid "Meetings Slug"
+msgstr "SLug de Reuniones"
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:777
+msgid "The root path for Meetings"
+msgstr "El camino raíz para los Reuniones"
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:789
+msgid "Months of History"
+msgstr "Meses de Historia"
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:790
+msgid "Meetings will be kept for the public calendar until the event is this many months in the past. Note that due to limitations in TouchPoint's approach to events, Meetings cannot be fully updated once they occur."
+msgstr "Las reuniones se mantendrán para el calendario público hasta que el evento sea hace tantos meses. Tenga en cuenta que debido a las limitaciones en el enfoque de los eventos de TouchPoint, las reuniones no se pueden actualizar por completo una vez que ocurren."
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:799
+msgid "Months of Future"
+msgstr "Meses de Futuro"
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:800
+msgid "Meetings more than this many months in the future will not be imported."
+msgstr "Las reuniones de más de esta cantidad de meses en el futuro no se importarán."
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:809
+msgid "Meeting Deletion Handling"
+msgstr "Eliminación de Reuniones"
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:810
+msgid "When a Meeting is deleted in TouchPoint that has already been imported to WordPress, how should that be handled?"
+msgstr "Cuando se elimina una reunión en TouchPoint que ya se ha importado a WordPress, ¿cómo se debe manejar?"
diff --git a/i18n/TouchPoint-WP.pot b/i18n/TouchPoint-WP.pot
index 743bc964..e0082f43 100644
--- a/i18n/TouchPoint-WP.pot
+++ b/i18n/TouchPoint-WP.pot
@@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2023-08-14T19:18:55+00:00\n"
+"POT-Creation-Date: 2023-08-15T02:25:51+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.8.1\n"
"X-Domain: TouchPoint-WP\n"
@@ -53,7 +53,7 @@ msgid "Slug"
msgstr ""
#: src/templates/admin/invKoForm.php:47
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:763
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:865
msgid "Divisions to Import"
msgstr ""
@@ -141,13 +141,13 @@ msgstr ""
#: src/templates/admin/invKoForm.php:169
#: src/TouchPoint-WP/Involvement.php:1419
-#: src/TouchPoint-WP/TouchPointWP.php:1422
+#: src/TouchPoint-WP/TouchPointWP.php:1372
msgid "Weekday"
msgstr ""
#: src/templates/admin/invKoForm.php:173
#: src/TouchPoint-WP/Involvement.php:1445
-#: src/TouchPoint-WP/TouchPointWP.php:1504
+#: src/TouchPoint-WP/TouchPointWP.php:1419
msgid "Time of Day"
msgstr ""
@@ -156,7 +156,7 @@ msgid "Prevailing Marital Status"
msgstr ""
#: src/templates/admin/invKoForm.php:181
-#: src/TouchPoint-WP/TouchPointWP.php:1558
+#: src/TouchPoint-WP/TouchPointWP.php:1448
msgid "Age Group"
msgstr ""
@@ -239,19 +239,19 @@ msgid "%2.1fmi"
msgstr ""
#. translators: %s is "what you call TouchPoint at your church", which is a setting
-#: src/TouchPoint-WP/Auth.php:137
+#: src/TouchPoint-WP/Auth.php:138
msgid "Sign in with your %s account"
msgstr ""
-#: src/TouchPoint-WP/Auth.php:392
+#: src/TouchPoint-WP/Auth.php:391
msgid "Your login token expired."
msgstr ""
-#: src/TouchPoint-WP/Auth.php:407
+#: src/TouchPoint-WP/Auth.php:406
msgid "Your login token is invalid."
msgstr ""
-#: src/TouchPoint-WP/Auth.php:419
+#: src/TouchPoint-WP/Auth.php:418
msgid "Session could not be validated."
msgstr ""
@@ -329,7 +329,7 @@ msgid "Language"
msgstr ""
#: src/TouchPoint-WP/Involvement.php:1467
-#: src/TouchPoint-WP/TouchPointWP.php:1597
+#: src/TouchPoint-WP/TouchPointWP.php:1473
msgid "Marital Status"
msgstr ""
@@ -433,7 +433,7 @@ msgid "Invalid Post Type."
msgstr ""
#: src/TouchPoint-WP/Meeting.php:86
-#: src/TouchPoint-WP/TouchPointWP.php:907
+#: src/TouchPoint-WP/TouchPointWP.php:961
msgid "Only GET requests are allowed."
msgstr ""
@@ -474,16 +474,16 @@ msgstr ""
msgid "and"
msgstr ""
-#: src/TouchPoint-WP/Report.php:167
+#: src/TouchPoint-WP/Report.php:169
msgid "TouchPoint Reports"
msgstr ""
-#: src/TouchPoint-WP/Report.php:168
+#: src/TouchPoint-WP/Report.php:170
msgid "TouchPoint Report"
msgstr ""
#. translators: Last updated date/time for a report. %1$s is the date. %2$s is the time.
-#: src/TouchPoint-WP/Report.php:295
+#: src/TouchPoint-WP/Report.php:298
msgid "Updated on %1$s at %2$s"
msgstr ""
@@ -496,640 +496,680 @@ msgid "Every 15 minutes"
msgstr ""
#. translators: %s: taxonomy name, plural
-#: src/TouchPoint-WP/TouchPointWP.php:1201
+#: src/TouchPoint-WP/TouchPointWP.php:1255
msgid "Search %s"
msgstr ""
#. translators: %s: taxonomy name, plural
-#: src/TouchPoint-WP/TouchPointWP.php:1203
+#: src/TouchPoint-WP/TouchPointWP.php:1257
msgid "All %s"
msgstr ""
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/TouchPointWP.php:1205
+#: src/TouchPoint-WP/TouchPointWP.php:1259
msgid "Edit %s"
msgstr ""
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/TouchPointWP.php:1207
+#: src/TouchPoint-WP/TouchPointWP.php:1261
msgid "Update %s"
msgstr ""
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/TouchPointWP.php:1209
+#: src/TouchPoint-WP/TouchPointWP.php:1263
msgid "Add New %s"
msgstr ""
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/TouchPointWP.php:1211
+#: src/TouchPoint-WP/TouchPointWP.php:1265
msgid "New %s"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1228
+#: src/TouchPoint-WP/TouchPointWP.php:1282
msgid "Classify posts by their general locations."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1281
+#: src/TouchPoint-WP/TouchPointWP.php:1314
msgid "Classify posts by their church campus."
msgstr ""
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/TouchPointWP.php:1333
+#: src/TouchPoint-WP/TouchPointWP.php:1345
msgid "Classify things by %s."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1421
+#: src/TouchPoint-WP/TouchPointWP.php:1371
msgid "Classify involvements by the day on which they meet."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1422
+#: src/TouchPoint-WP/TouchPointWP.php:1372
msgid "Weekdays"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1459
+#: src/TouchPoint-WP/TouchPointWP.php:1394
msgid "Classify involvements by tense (present, future, past)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1460
+#: src/TouchPoint-WP/TouchPointWP.php:1395
msgid "Tense"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1460
+#: src/TouchPoint-WP/TouchPointWP.php:1395
msgid "Tenses"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1503
+#: src/TouchPoint-WP/TouchPointWP.php:1418
msgid "Classify involvements by the portion of the day in which they meet."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1504
+#: src/TouchPoint-WP/TouchPointWP.php:1419
msgid "Times of Day"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1557
+#: src/TouchPoint-WP/TouchPointWP.php:1447
msgid "Classify involvements and users by their age groups."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1558
+#: src/TouchPoint-WP/TouchPointWP.php:1448
msgid "Age Groups"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1596
+#: src/TouchPoint-WP/TouchPointWP.php:1472
msgid "Classify involvements by whether participants are mostly single or married."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1597
+#: src/TouchPoint-WP/TouchPointWP.php:1473
msgid "Marital Statuses"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:1641
+#: src/TouchPoint-WP/TouchPointWP.php:1503
msgid "Classify Partners by category chosen in settings."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2404
+#: src/TouchPoint-WP/TouchPointWP.php:2484
msgid "Unknown Type"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2458
+#: src/TouchPoint-WP/TouchPointWP.php:2538
msgid "Your Searches"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2461
+#: src/TouchPoint-WP/TouchPointWP.php:2541
msgid "Public Searches"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2464
+#: src/TouchPoint-WP/TouchPointWP.php:2544
msgid "Status Flags"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2469
-#: src/TouchPoint-WP/TouchPointWP.php:2470
+#: src/TouchPoint-WP/TouchPointWP.php:2549
+#: src/TouchPoint-WP/TouchPointWP.php:2550
msgid "Current Value"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2597
-#: src/TouchPoint-WP/TouchPointWP.php:2635
+#: src/TouchPoint-WP/TouchPointWP.php:2677
+#: src/TouchPoint-WP/TouchPointWP.php:2715
msgid "Invalid or incomplete API Settings."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2605
-#: src/TouchPoint-WP/TouchPointWP.php:2642
+#: src/TouchPoint-WP/TouchPointWP.php:2685
+#: src/TouchPoint-WP/TouchPointWP.php:2722
msgid "Host appears to be missing from TouchPoint-WP configuration."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2703
+#: src/TouchPoint-WP/TouchPointWP.php:2783
msgid "The scripts on TouchPoint that interact with this plugin are out-of-date, and an automatic update failed."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2762
+#: src/TouchPoint-WP/TouchPointWP.php:2842
msgid "People Query Failed"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:204
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:235
msgid "Basic Settings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:205
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:236
msgid "Connect to TouchPoint and choose which features you wish to use."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:209
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:240
msgid "Enable Authentication"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:210
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:241
msgid "Allow TouchPoint users to sign into this website with TouchPoint."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:220
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:252
msgid "Enable RSVP Tool"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:221
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:253
msgid "Add a crazy-simple RSVP button to WordPress event pages."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:227
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:260
msgid "Enable Involvements"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:228
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:261
msgid "Load Involvements from TouchPoint for involvement listings and entries native in your website."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:237
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:271
msgid "Enable Public People Lists"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:238
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:272
msgid "Import public people listings from TouchPoint (e.g. staff or elders)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:247
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:282
msgid "Enable Global Partner Listings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:248
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:283
msgid "Import ministry partners from TouchPoint to list publicly."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:257
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:293
msgid "Enable Campuses"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:258
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:294
msgid "Import campuses as a taxonomy. (You probably want to do this if you're multi-campus.)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:267
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:304
msgid "Display Name"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:268
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:305
msgid "What your church calls your TouchPoint database."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:278
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:315
msgid "TouchPoint Host Name"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:279
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:316
msgid "The domain for your TouchPoint database, without the https or any slashes."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:290
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:328
msgid "Custom Mobile App Deeplink Host Name"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:291
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:329
msgid ""
"The domain for your mobile app deeplinks, without the https or any slashes. If you aren't \r\n"
" using the custom mobile app, leave this blank."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:303
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:341
msgid "TouchPoint API Username"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:304
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:342
msgid "The username of a user account in TouchPoint with API permissions."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:314
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:353
msgid "TouchPoint API User Password"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:315
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:354
msgid "The password of a user account in TouchPoint with API permissions."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:326
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:366
msgid "TouchPoint API Script Name"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:327
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:367
msgid "The name of the Python script loaded into TouchPoint. Don't change this unless you know what you're doing."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:337
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:378
msgid "Google Maps Javascript API Key"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:338
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:379
msgid "Required for embedding maps."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:348
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:390
msgid "Google Maps Geocoding API Key"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:349
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:391
msgid "Optional. Allows for reverse geocoding of user locations."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:366
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:372
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:409
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:415
msgid "Generate Scripts"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:369
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:412
msgid ""
"Once your settings on this page are set and saved, use this tool to generate\r\n"
"the scripts needed for TouchPoint in a convenient installation package. "
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:371
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:414
msgid "Upload the package to {tpName} here"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:386
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:429
msgid "People"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:387
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:430
msgid "Manage how people are synchronized between TouchPoint and WordPress."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:391
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:434
msgid "Contact Keywords"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:392
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:435
msgid "These keywords will be used when someone clicks the \"Contact\" button on a Person's listing or profile."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:403
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:446
msgid "Extra Value for WordPress User ID"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:404
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:447
msgid "The name of the extra value to use for the WordPress User ID. If you are using multiple WordPress instances with one TouchPoint database, you will need these values to be unique between WordPress instances. In most cases, the default is fine."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:414
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:457
msgid "Extra Value: Biography"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:415
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:458
msgid "Import a Bio from a Person Extra Value field. Can be an HTML or Text Extra Value. This will overwrite any values set by WordPress. Leave blank to not import."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:425
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:660
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:468
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:705
msgid "Extra Values to Import"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:426
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:469
msgid "Import People Extra Value fields as User Meta data."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:442
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:485
msgid "Authentication"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:443
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:486
msgid "Allow users to log into WordPress using TouchPoint."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:447
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:490
msgid "Make TouchPoint the default authentication method."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:448
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:491
msgid "By checking this box, the TouchPoint login page will become the default. To prevent the redirect and reach the standard TouchPoint login page, add '"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:457
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:500
msgid "Enable Auto-Provisioning"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:458
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:501
msgid "Automatically create WordPress users, if needed, to match authenticated TouchPoint users."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:467
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:510
msgid "Change 'Edit Profile' links"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:468
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:511
msgid "\"Edit Profile\" links will take the user to their TouchPoint profile, instead of their WordPress profile."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:477
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:520
msgid "Enable full logout"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:478
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:521
msgid "Logout of TouchPoint when logging out of WordPress."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:484
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:527
msgid "Prevent Subscriber Admin Bar"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:485
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:528
msgid "By enabling this option, users who can't edit anything won't see the Admin bar."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:499
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:542
msgid "Involvements"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:500
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:543
msgid "Import Involvements from TouchPoint to list them on your website, for Small Groups, Classes, and more. Select the division(s) that immediately correspond to the type of Involvement you want to list. For example, if you want a Small Group list and have a Small Group Division, only select the Small Group Division. If you want Involvements to be filterable by additional Divisions, select those Divisions on the Divisions tab, not here."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:505
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:548
msgid "Involvement Post Types"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:533
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:577
msgid "Global Partners"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:534
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:578
msgid "Manage how global partners are imported from TouchPoint for listing on WordPress. Partners are grouped by family, and content is provided through Family Extra Values. This works for both People and Business records."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:538
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:582
msgid "Global Partner Name (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:539
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:583
msgid "What you call Global Partners at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:549
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:593
msgid "Global Partner Name (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:550
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:594
msgid "What you call a Global Partner at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:560
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:604
msgid "Global Partner Name for Secure Places (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:561
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:605
msgid "What you call Secure Global Partners at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:571
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:615
msgid "Global Partner Name for Secure Places (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:572
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:616
msgid "What you call a Secure Global Partner at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:582
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:626
msgid "Global Partner Slug"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:583
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:627
msgid "The root path for Global Partner posts"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:594
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:639
msgid "Saved Search"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:595
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:640
msgid "Anyone who is included in this saved search will be included in the listing."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:605
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:650
msgid "Extra Value: Description"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:606
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:651
msgid "Import a description from a Family Extra Value field. Can be an HTML or Text Extra Value. This becomes the body of the Global Partner post."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:616
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:661
msgid "Extra Value: Summary"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:617
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:662
msgid "Optional. Import a short description from a Family Extra Value field. Can be an HTML or Text Extra Value. If not provided, the full bio will be truncated."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:627
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:672
msgid "Latitude Override"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:628
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:673
msgid "Designate a text Family Extra Value that will contain a latitude that overrides any locations on the partner's profile for the partner map. Both latitude and longitude must be provided for an override to take place."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:638
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:683
msgid "Longitude Override"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:639
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:684
msgid "Designate a text Family Extra Value that will contain a longitude that overrides any locations on the partner's profile for the partner map. Both latitude and longitude must be provided for an override to take place."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:649
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:694
msgid "Public Location"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:650
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:695
msgid "Designate a text Family Extra Value that will contain the partner's location, as you want listed publicly. For partners who have DecoupleLocation enabled, this field will be associated with the map point, not the list entry."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:661
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:706
msgid "Import Family Extra Value fields as Meta data on the partner's post"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:672
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:717
msgid "Primary Taxonomy"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:673
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:718
msgid "Import a Family Extra Value as the primary means by which partners are organized."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:688
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:734
msgid "Events Calendar"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:689
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:735
msgid "Integrate with The Events Calendar from ModernTribe."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:693
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:739
msgid "Events for Custom Mobile App"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:696
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:742
msgid "To use your Events Calendar events in the Custom mobile app, set the Provider to Wordpress Plugin - Modern Tribe and use this url:"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:698
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:744
msgid "Preview"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:713
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:759
msgid "Use Standardizing Stylesheet"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:714
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:760
msgid "Inserts some basic CSS into the events feed to clean up display"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:724
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:771
+msgid "Meeting Calendars"
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:772
+msgid "Import Meetings from TouchPoint to a calendar on your website."
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:776
+msgid "Meetings Slug"
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:777
+msgid "The root path for Meetings"
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:789
+msgid "Months of History"
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:790
+msgid "Meetings will be kept for the public calendar until the event is this many months in the past. Note that due to limitations in TouchPoint's approach to events, Meetings cannot be fully updated once they occur."
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:799
+msgid "Months of Future"
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:800
+msgid "Meetings more than this many months in the future will not be imported."
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:809
+msgid "Meeting Deletion Handling"
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:810
+msgid "When a Meeting is deleted in TouchPoint that has already been imported to WordPress, how should that be handled?"
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:823
msgid "Divisions"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:725
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:824
msgid "Import Divisions from TouchPoint to your website as a taxonomy. These are used to classify users and involvements."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:729
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:828
msgid "Division Name (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:730
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:829
msgid "What you call Divisions at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:740
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:840
msgid "Division Name (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:741
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:841
msgid "What you call a Division at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:751
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:852
msgid "Division Slug"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:752
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:853
msgid "The root path for the Division Taxonomy"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:764
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:866
msgid "These Divisions will be imported for the taxonomy"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:777
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:783
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:879
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:885
msgid "Locations"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:778
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:880
msgid "Locations are physical places, probably campuses. None are required, but they can help present geographic information clearly."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:801
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:903
msgid "Campuses"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:802
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:904
msgid "Import Campuses from TouchPoint to your website as a taxonomy. These are used to classify users and involvements."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:809
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:911
msgid "Campus Name (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:810
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:912
msgid "What you call Campuses at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:820
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:923
msgid "Campus Name (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:821
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:924
msgid "What you call a Campus at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:831
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:935
msgid "Campus Slug"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:832
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:936
msgid "The root path for the Campus Taxonomy"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:846
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:951
msgid "Resident Codes"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:847
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:952
msgid "Import Resident Codes from TouchPoint to your website as a taxonomy. These are used to classify users and involvements that have locations."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:851
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:956
msgid "Resident Code Name (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:852
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:957
msgid "What you call Resident Codes at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:862
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:968
msgid "Resident Code Name (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:863
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:969
msgid "What you call a Resident Code at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:873
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:980
msgid "Resident Code Slug"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:874
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:981
msgid "The root path for the Resident Code Taxonomy"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1030
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1138
msgid "password saved"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1086
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1087
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1194
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1195
msgid "TouchPoint-WP"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1118
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1226
msgid "Settings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1346
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1449
msgid "Script Update Failed"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1462
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1578
msgid "TouchPoint-WP Settings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1513
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1629
msgid "Save Settings"
msgstr ""
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 1a38ecd4..22dc6ea8 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -66,6 +66,11 @@
*
* @property-read string ec_use_standardizing_style Whether to insert the standardizing stylesheet into mobile app requests.
*
+ * @property-read string mc_slug Slug for meetings in the meeting calendar (e.g. "events" for church.org/events)
+ * @property-read string mc_hist_months Number of months of history to keep.
+ * @property-read string mc_future_months Number of months into the future to import.
+ * @property-read string mc_deletion_method Determines how meetings should be handled in WordPress if they're deleted in TouchPoint
+ *
* @property-read string rc_name_plural What resident codes should be called, plural (e.g. "Resident Codes" or "Zones")
* @property-read string rc_name_singular What a resident code should be called, singular (e.g. "Resident Code" or "Zone")
* @property-read string rc_slug Slug for resident code taxonomy (e.g. "zones" for church.org/zones)
@@ -403,7 +408,7 @@ private function settingsFields($includeDetail = false): array
'description' => strtr(
'' . __('Once your settings on this page are set and saved, use this tool to generate
the scripts needed for TouchPoint in a convenient installation package. ', 'TouchPoint-WP') .
-'' . __('Upload the package to {tpName} here', 'TouchPoint-WP') . ' .
+'' . __('Upload the package to {tpName} here', 'TouchPoint-WP') . ' .
' . __('Generate Scripts', 'TouchPoint-WP') . '
',
[
@@ -756,6 +761,60 @@ private function settingsFields($includeDetail = false): array
];
}
+ // TODO add some kind of conditional here
+ $includeThis = $includeDetail === true || $includeDetail === 'events';
+ $tribe = TouchPointWP::useTribeCalendar();
+ $this->settings['meetCal'] = [
+ 'title' => __('Meeting Calendars', 'TouchPoint-WP'),
+ 'description' => __('Import Meetings from TouchPoint to a calendar on your website.', 'TouchPoint-WP'),
+ 'fields' => [
+ [
+ 'id' => 'mc_slug',
+ 'label' => __('Meetings Slug', 'TouchPoint-WP'),
+ 'description' => __(
+ 'The root path for Meetings',
+ 'TouchPoint-WP'
+ ),
+ 'type' => 'text',
+ 'default' => $tribe ? 'meetings' : 'events',
+ 'autoload' => true,
+ 'placeholder' => $tribe ? 'meetings' : 'events',
+ 'callback' => fn($new) => $this->validation_slug($new, 'mc_slug')
+ ],
+ [
+ 'id' => 'mc_hist_months',
+ 'label' => __( 'Months of History', 'TouchPoint-WP' ),
+ 'description' => __( 'Meetings will be kept for the public calendar until the event is this many months in the past. Note that due to limitations in TouchPoint\'s approach to events, Meetings cannot be fully updated once they occur.', 'TouchPoint-WP' ),
+ 'type' => 'number',
+ 'default' => 12,
+ 'placeholder' => 12,
+ 'max' => 36,
+ 'min' => 0
+ ],
+ [
+ 'id' => 'mc_future_months',
+ 'label' => __( 'Months of Future', 'TouchPoint-WP' ),
+ 'description' => __( 'Meetings more than this many months in the future will not be imported.', 'TouchPoint-WP' ),
+ 'type' => 'number',
+ 'default' => 12,
+ 'placeholder' => 12,
+ 'max' => 60,
+ 'min' => 0
+ ],
+ [
+ 'id' => 'mc_deletion_method',
+ 'label' => __( 'Meeting Deletion Handling', 'TouchPoint-WP' ),
+ 'description' => __( 'When a Meeting is deleted in TouchPoint that has already been imported to WordPress, how should that be handled?', 'TouchPoint-WP' ),
+ 'type' => 'select',
+ 'options' => [
+ 'delete' => 'Always delete from WordPress.',
+ 'cancel' => 'Mark the occurrence as cancelled.',
+ ],
+ 'default' => 'delete',
+ ],
+ ],
+ ];
+
$includeThis = $includeDetail === true || $includeDetail === 'divisions';
$this->settings['divisions'] = [
'title' => __('Divisions', 'TouchPoint-WP'),
@@ -1429,6 +1488,19 @@ public function registerSettings(): void
$args['sanitize_callback'] = fn($new) => null;
}
+ if ($field['type'] == 'number' && !isset($args['sanitize_callback'])) {
+ $args['sanitize_callback'] = function($new) {
+ $new = intval($new);
+ if (isset($field['min'])) {
+ $new = max($new, $field['min']);
+ }
+ if (isset($field['max'])) {
+ $new = min($new, $field['max']);
+ }
+ return $new;
+ };
+ }
+
$option_name = TouchPointWP::SETTINGS_PREFIX . $field['id'];
register_setting($this->parent::TOKEN . '_Settings', $option_name, $args);
From 470524f4a7f8429b83a7eb8dbdab88bf80c998ad Mon Sep 17 00:00:00 2001
From: "James K."
Date: Wed, 30 Aug 2023 12:00:57 -0400
Subject: [PATCH 029/226] revert temp debugging code
---
src/TouchPoint-WP/Involvement.php | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index 535687c3..60a33612 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -346,13 +346,6 @@ public static function updateFromTouchPoint(bool $verbose = false)
$verbose &= TouchPointWP::currentUserIsAdmin();
foreach (self::allTypeSettings() as $k => $type) {
-
- // TODO this is temp debugging code to allow only one post type to be synced during a force-sync.
- if ($verbose && isset($_GET['type'])) {
- if (intval($k) !== intval($_GET['type']))
- continue;
- }
-
if (count($type->importDivs) < 1) {
// Don't update if there aren't any divisions selected yet.
if ($verbose) {
@@ -2122,19 +2115,11 @@ final protected static function updateInvolvementPostsForType(
return false;
}
- $count = 0;
foreach ($invData as $inv) {
set_time_limit(15);
- $count++;
-
- if ($verbose) {
- var_dump($inv);
- }
- // TODO this is temp debugging code to allow only one post type to be synced during a force-sync.
- if ($verbose && isset($_GET['limit'])) {
- if ($count > intval($_GET['limit']))
- continue;
+ if ($verbose) {
+ var_dump($inv);
}
From 249a45d9d281ee4cfc925cb0a93566590a5085b6 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Sat, 7 Oct 2023 22:08:56 -0400
Subject: [PATCH 030/226] Spaces to tabs
---
src/TouchPoint-WP/Auth.php | 44 +-
src/TouchPoint-WP/EventsCalendar.php | 12 +-
src/TouchPoint-WP/Involvement.php | 170 ++--
.../Involvement_PostTypeSettings.php | 10 +-
src/TouchPoint-WP/Person.php | 30 +-
src/TouchPoint-WP/TouchPointWP.php | 750 +++++++++---------
src/TouchPoint-WP/TouchPointWP_AdminAPI.php | 20 +-
src/TouchPoint-WP/TouchPointWP_Exception.php | 14 +-
src/TouchPoint-WP/TouchPointWP_Settings.php | 356 ++++-----
src/TouchPoint-WP/Utilities.php | 34 +-
touchpoint-wp.php | 40 +-
11 files changed, 739 insertions(+), 741 deletions(-)
diff --git a/src/TouchPoint-WP/Auth.php b/src/TouchPoint-WP/Auth.php
index 8d914b6c..2dd31127 100644
--- a/src/TouchPoint-WP/Auth.php
+++ b/src/TouchPoint-WP/Auth.php
@@ -127,23 +127,23 @@ public static function footer()
// echo to print in footer
}
- /**
- * Renders the link used to log in through TouchPoint.
- */
- public static function printLoginLink()
- {
- $html = '';
- $url = self::getLoginUrl();
- /** @noinspection HtmlUnknownTarget */
- $html .= "";
- $html .= sprintf(
- // translators: %s is "what you call TouchPoint at your church", which is a setting
- __('Sign in with your %s account', 'TouchPoint-WP'),
- htmlentities(TouchPointWP::instance()->settings->system_name)
- );
- $html .= '
';
- echo $html;
- }
+ /**
+ * Renders the link used to log in through TouchPoint.
+ */
+ public static function printLoginLink()
+ {
+ $html = '';
+ $url = self::getLoginUrl();
+ /** @noinspection HtmlUnknownTarget */
+ $html .= "";
+ $html .= sprintf(
+ // translators: %s is "what you call TouchPoint at your church", which is a setting
+ __('Sign in with your %s account', 'TouchPoint-WP'),
+ htmlentities(TouchPointWP::instance()->settings->system_name)
+ );
+ $html .= '
';
+ echo $html;
+ }
/**
* Generates the URL used to initiate a sign-in with TouchPoint.
@@ -283,8 +283,8 @@ public static function redirectLoginFormMaybe()
public static function removeAdminBarMaybe()
{
$removeBar = (TouchPointWP::instance()->settings->auth_prevent_admin_bar === 'on')
- && ! is_admin()
- && ! current_user_can('edit_posts');
+ && ! is_admin()
+ && ! current_user_can('edit_posts');
$removeBar = apply_filters(TouchPointWP::HOOK_PREFIX . 'prevent_admin_bar', $removeBar);
@@ -424,9 +424,9 @@ public static function authenticate($user, $username, $password)
$s = Session::instance();
if ( ! $lst === $s->auth_sessionToken) {
return new WP_Error([
- 177004,
- __('Session could not be validated.', 'TouchPoint-WP')
- ]);
+ 177004,
+ __('Session could not be validated.', 'TouchPoint-WP')
+ ]);
}
$p->setLoginTokens(null, null);
diff --git a/src/TouchPoint-WP/EventsCalendar.php b/src/TouchPoint-WP/EventsCalendar.php
index 037a1302..e975ebe4 100644
--- a/src/TouchPoint-WP/EventsCalendar.php
+++ b/src/TouchPoint-WP/EventsCalendar.php
@@ -174,8 +174,8 @@ protected static function previewAppList(array $params = []): void
foreach ($eventsList as $i => $eo) {
echo "{$eo['title']} ";
$url = get_site_url() . "/" .
- TouchPointWP::API_ENDPOINT . "/" .
- TouchPointWP::API_ENDPOINT_APP_EVENTS . "/" . $i;
+ TouchPointWP::API_ENDPOINT . "/" .
+ TouchPointWP::API_ENDPOINT_APP_EVENTS . "/" . $i;
echo "";
}
}
@@ -197,8 +197,8 @@ public static function api(array $uri): bool
// Preview list
if (count($uri['path']) === 3 &&
- strtolower($uri['path'][2]) === 'preview' &&
- TouchPointWP::currentUserIsAdmin()
+ strtolower($uri['path'][2]) === 'preview' &&
+ TouchPointWP::currentUserIsAdmin()
) {
EventsCalendar::previewAppList($uri['query']);
exit;
@@ -206,8 +206,8 @@ public static function api(array $uri): bool
// Preview items
if (count($uri['path']) === 3 &&
- is_numeric($uri['path'][2]) &&
- TouchPointWP::currentUserIsAdmin()
+ is_numeric($uri['path'][2]) &&
+ TouchPointWP::currentUserIsAdmin()
) {
EventsCalendar::previewAppListItem($uri['query'], intval($uri['path'][2]));
exit;
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index 9323b417..2cf84ca1 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -96,7 +96,7 @@ class Involvement implements api, updatesViaCron, geo, module
* Involvement constructor.
*
* @param $object WP_Post|object an object representing the involvement's post.
- * Must have post_id AND inv id attributes.
+ * Must have post_id AND inv id attributes.
*
* @throws TouchPointWP_Exception
*/
@@ -210,8 +210,8 @@ protected function __construct(object $object)
// Geo
if (self::getSettingsForPostType($this->invType)->useGeo) {
if (property_exists($object, 'geo_lat') &&
- $object->geo_lat !== null &&
- $object->geo_lat !== '') {
+ $object->geo_lat !== null &&
+ $object->geo_lat !== '') {
// Probably a database query result
$this->geo = (object)[
'lat' => Utilities::toFloatOrNull($object->geo_lat),
@@ -472,7 +472,7 @@ public function useRegistrationForm(): bool
{
if (!isset($this->_useRegistrationForm)) {
$this->_useRegistrationForm = (get_post_meta($this->post_id, TouchPointWP::SETTINGS_PREFIX . "hasRegQuestions", true) === '1' ||
- intval(get_post_meta($this->post_id, TouchPointWP::SETTINGS_PREFIX . "regTypeId", true)) !== 1);
+ intval(get_post_meta($this->post_id, TouchPointWP::SETTINGS_PREFIX . "regTypeId", true)) !== 1);
}
return $this->_useRegistrationForm;
}
@@ -1023,8 +1023,8 @@ public static function doInvolvementList(WP_Query $q, $params = []): void
// CSS
/** @noinspection SpellCheckingInspection */
$params['includecss'] = ! isset($params['includecss']) ||
- $params['includecss'] === true ||
- $params['includecss'] === 'true';
+ $params['includecss'] === true ||
+ $params['includecss'] === 'true';
// Only group for single post types.
$groupBy = null;
@@ -1038,12 +1038,12 @@ public static function doInvolvementList(WP_Query $q, $params = []): void
if ($groupBy !== "" && taxonomy_exists($groupBy)) {
$terms = get_terms([
- 'taxonomy' => $groupBy,
- 'order' => $groupByOrder,
- 'orderby' => 'name',
- 'hide_empty' => true,
- 'fields' => 'id=>name'
- ]);
+ 'taxonomy' => $groupBy,
+ 'order' => $groupByOrder,
+ 'orderby' => 'name',
+ 'hide_empty' => true,
+ 'fields' => 'id=>name'
+ ]);
}
}
@@ -1141,12 +1141,12 @@ private static function getWpPostByInvolvementId($postType, $involvementId)
$involvementId = (string)$involvementId;
$q = new WP_Query([
- 'post_type' => $postType,
- 'meta_key' => self::INVOLVEMENT_META_KEY,
- 'meta_value' => $involvementId,
- 'numberposts' => 2
- // only need one, but if there's two, there should be an error condition.
- ]);
+ 'post_type' => $postType,
+ 'meta_key' => self::INVOLVEMENT_META_KEY,
+ 'meta_value' => $involvementId,
+ 'numberposts' => 2
+ // only need one, but if there's two, there should be an error condition.
+ ]);
$posts = $q->get_posts();
$counts = count($posts);
if ($counts > 1) { // multiple posts match, which isn't great.
@@ -1322,9 +1322,7 @@ protected static final function filterDropdownHtml(array $params, Involvement_Po
// Division
if (in_array('div', $filters)) {
$exclude = $settings->importDivs;
- if (count(
- $exclude
- ) == 1) { // Exclude the imported div if there's only one, as all invs would have that div.
+ if (count($exclude) == 1) { // Exclude the imported div if there's only one as all would have it.
$mq = ['relation' => "AND"];
foreach ($exclude as $e) {
$mq[] = [
@@ -1346,11 +1344,11 @@ protected static final function filterDropdownHtml(array $params, Involvement_Po
}
$dvName = TouchPointWP::instance()->settings->dv_name_singular;
$dvList = get_terms([
- 'taxonomy' => TouchPointWP::TAX_DIV,
- 'hide_empty' => true,
- 'meta_query' => $mq,
- TouchPointWP::HOOK_PREFIX . 'post_type' => $postType
- ]);
+ 'taxonomy' => TouchPointWP::TAX_DIV,
+ 'hide_empty' => true,
+ 'meta_query' => $mq,
+ TouchPointWP::HOOK_PREFIX . 'post_type' => $postType
+ ]);
$dvList = TouchPointWP::orderHierarchicalTerms($dvList, true);
if (count($dvList) > 1) {
$content .= "";
@@ -1505,11 +1503,11 @@ protected static final function filterDropdownHtml(array $params, Involvement_Po
if (in_array('agegroup', $filters)) {
$agName = __("Age", 'TouchPoint-WP');
$agList = get_terms([
- 'taxonomy' => TouchPointWP::TAX_AGEGROUP,
- 'hide_empty' => true,
- 'orderby' => 't.id',
- TouchPointWP::HOOK_PREFIX . 'post_type' => $postType
- ]);
+ 'taxonomy' => TouchPointWP::TAX_AGEGROUP,
+ 'hide_empty' => true,
+ 'orderby' => 't.id',
+ TouchPointWP::HOOK_PREFIX . 'post_type' => $postType
+ ]);
if (is_array($agList) && count($agList) > 1) {
$content .= "";
$content .= "$agName $any ";
@@ -1623,40 +1621,40 @@ public static function ajaxNearby(): void
if ( ! $settings) {
http_response_code(Http::NOT_FOUND);
echo json_encode([
- "invList" => [],
- "error" => "This involvement type doesn't exist.",
- "error_i18n" => __("This involvement type doesn't exist.", 'TouchPoint-WP')
- ]);
+ "invList" => [],
+ "error" => "This involvement type doesn't exist.",
+ "error_i18n" => __("This involvement type doesn't exist.", 'TouchPoint-WP')
+ ]);
exit;
}
if ( ! $settings->useGeo) {
http_response_code(Http::EXPECTATION_FAILED);
echo json_encode([
- "invList" => [],
- "error" => "This involvement type doesn't have geographic locations enabled.",
- "error_i18n" => __(
- "This involvement type doesn't have geographic locations enabled.",
- 'TouchPoint-WP'
- )
- ]);
+ "invList" => [],
+ "error" => "This involvement type doesn't have geographic locations enabled.",
+ "error_i18n" => __(
+ "This involvement type doesn't have geographic locations enabled.",
+ 'TouchPoint-WP'
+ )
+ ]);
exit;
}
$r = [];
if ($lat === "null" || $lng === "null" ||
- $lat === null || $lng === null) {
+ $lat === null || $lng === null) {
$geoObj = TouchPointWP::instance()->geolocate();
if ($geoObj === false) {
http_response_code(Http::PRECONDITION_FAILED);
echo json_encode([
- "invList" => [],
- "error" => "Could not locate.",
- "error_i18n" => __("Could not locate.", 'TouchPoint-WP'),
- "geo" => false
- ]);
+ "invList" => [],
+ "error" => "Could not locate.",
+ "error_i18n" => __("Could not locate.", 'TouchPoint-WP'),
+ "geo" => false
+ ]);
exit;
}
@@ -1677,10 +1675,10 @@ public static function ajaxNearby(): void
if ($invs === null) {
http_response_code(Http::NOT_FOUND);
echo json_encode([
- "invList" => [],
- "error" => sprintf("No %s Found.", $settings->namePlural),
- "error_i18n" => sprintf(__("No %s Found.", "TouchPoint-WP"), $settings->namePlural)
- ]);
+ "invList" => [],
+ "error" => sprintf("No %s Found.", $settings->namePlural),
+ "error_i18n" => sprintf(__("No %s Found.", "TouchPoint-WP"), $settings->namePlural)
+ ]);
exit;
}
@@ -1714,12 +1712,12 @@ public static function ajaxNearby(): void
* @param int $limit Number of results to return. 0-100 inclusive.
*
* @return object[]|null An array of database query result objects, or null if the location isn't provided or
- * valid.
+ * valid.
*/
private static function getInvsNear(float $lat, float $lng, string $postType, int $limit = 3): ?array
{
if ($lat > 90 || $lat < -90 ||
- $lng > 180 || $lng < -180
+ $lng > 180 || $lng < -180
) {
return null;
}
@@ -1895,8 +1893,8 @@ public static function updateCron(): void
public function getDistance(bool $useHiForFalse = false)
{
if ( ! isset(self::$compareGeo->lat) || ! isset(self::$compareGeo->lng) ||
- ! isset($this->geo->lat) || ! isset($this->geo->lng) ||
- $this->geo->lat === null || $this->geo->lng === null) {
+ ! isset($this->geo->lat) || ! isset($this->geo->lng) ||
+ $this->geo->lat === null || $this->geo->lng === null) {
return $useHiForFalse ? 25000 : false;
}
@@ -2127,9 +2125,9 @@ final protected static function updateInvolvementPostsForType(
foreach ($invData as $inv) {
set_time_limit(15);
- if ($verbose) {
- var_dump($inv);
- }
+ if ($verbose) {
+ var_dump($inv);
+ }
////////////////////////
@@ -2230,7 +2228,7 @@ final protected static function updateInvolvementPostsForType(
}
if (in_array("registrationEnded", $typeSets->excludeIf) &&
- $inv->regEnd !== null && $inv->regEnd < $now) {
+ $inv->regEnd !== null && $inv->regEnd < $now) {
if ($verbose) {
echo "Stopping processing because Involvements whose registrations have ended are excluded. Involvement will be deleted from WordPress.
";
}
@@ -2447,7 +2445,7 @@ final protected static function updateInvolvementPostsForType(
if ($typeSets->useGeo) {
// Handle locations
if (property_exists($inv, "lat") && $inv->lat !== null &&
- property_exists($inv, "lng") && $inv->lng !== null) {
+ property_exists($inv, "lng") && $inv->lng !== null) {
update_post_meta($post->ID, TouchPointWP::SETTINGS_PREFIX . "geo_lat", $inv->lat);
update_post_meta($post->ID, TouchPointWP::SETTINGS_PREFIX . "geo_lng", $inv->lng);
} else {
@@ -2546,10 +2544,10 @@ final protected static function updateInvolvementPostsForType(
// Delete posts that are no longer current
$q = new WP_Query([
- 'post_type' => $typeSets->postType,
- 'nopaging' => true,
- 'post__not_in' => $postsToKeep
- ]);
+ 'post_type' => $typeSets->postType,
+ 'nopaging' => true,
+ 'post__not_in' => $postsToKeep
+ ]);
$removals = 0;
foreach ($q->get_posts() as $post) {
set_time_limit(10);
@@ -2744,7 +2742,7 @@ public function toJsonLD(): ?array
* Get notable attributes, such as gender restrictions, as strings.
*
* @param array $exclude Attributes listed here will be excluded. (e.g. if shown for a parent inv, not needed
- * here.)
+ * here.)
*
* @return string[]
*/
@@ -2789,13 +2787,13 @@ public function notableAttributes(array $exclude = []): array
$r = array_filter($r, fn($i) => ! in_array($i, $exclude));
if ($this->hasGeo() &&
- (
- $exclude === [] ||
- (
- $this->locationName !== null &&
- ! in_array($this->locationName, $exclude)
- )
- )
+ (
+ $exclude === [] ||
+ (
+ $this->locationName !== null &&
+ ! in_array($this->locationName, $exclude)
+ )
+ )
) {
$dist = $this->getDistance();
if ($dist !== false) {
@@ -2909,7 +2907,7 @@ public static function getJsInstantiationString(): string
$listStr = json_encode($queue);
return "\ttpvm.addEventListener('Involvement_class_loaded', function() {
- TP_Involvement.fromObjArray($listStr);\n\t});\n";
+ TP_Involvement.fromObjArray($listStr);\n\t});\n";
}
public function getTouchPointId(): int
@@ -2937,9 +2935,9 @@ private static function ajaxInvJoin(): void
} else {
http_response_code(Http::NOT_FOUND);
echo json_encode([
- 'error' => "Invalid Post Type.",
- 'error_i18n' => __("Invalid Post Type.", 'TouchPoint-WP')
- ]);
+ 'error' => "Invalid Post Type.",
+ 'error_i18n' => __("Invalid Post Type.", 'TouchPoint-WP')
+ ]);
exit;
}
@@ -2991,9 +2989,9 @@ private static function ajaxContact(): void
if (!$validate) {
http_response_code(Http::BAD_REQUEST);
echo json_encode([
- 'error' => $result,
- 'error_i18n' => __("Contact Blocked for Spam.", 'TouchPoint-WP')
- ]);
+ 'error' => $result,
+ 'error_i18n' => __("Contact Blocked for Spam.", 'TouchPoint-WP')
+ ]);
exit;
}
@@ -3001,9 +2999,9 @@ private static function ajaxContact(): void
if (!!$settings) {
if (!self::allowContact($inputData->invType)) {
echo json_encode([
- 'error' => "Contact Prohibited.",
- 'error_i18n' => __("Contact Prohibited.", 'TouchPoint-WP')
- ]);
+ 'error' => "Contact Prohibited.",
+ 'error_i18n' => __("Contact Prohibited.", 'TouchPoint-WP')
+ ]);
exit;
}
@@ -3014,9 +3012,9 @@ private static function ajaxContact(): void
} else {
http_response_code(Http::NOT_FOUND);
echo json_encode([
- 'error' => "Invalid Post Type.",
- 'error_i18n' => __("Invalid Post Type.", 'TouchPoint-WP')
- ]);
+ 'error' => "Invalid Post Type.",
+ 'error_i18n' => __("Invalid Post Type.", 'TouchPoint-WP')
+ ]);
exit;
}
diff --git a/src/TouchPoint-WP/Involvement_PostTypeSettings.php b/src/TouchPoint-WP/Involvement_PostTypeSettings.php
index 3dee09d2..57dd8cfc 100644
--- a/src/TouchPoint-WP/Involvement_PostTypeSettings.php
+++ b/src/TouchPoint-WP/Involvement_PostTypeSettings.php
@@ -167,11 +167,11 @@ public static function getForInvType(string $postType): ?Involvement_PostTypeSet
$prefixLength = strlen(self::POST_TYPE_PREFIX);
foreach (self::instance() as $type) {
if ($type->postType === $postType ||
- $type->__get('postType') === $postType ||
- (
- substr($type->postType, 0, $prefixLength) === self::POST_TYPE_PREFIX &&
- substr($type->postType, $prefixLength) === $postType
- )
+ $type->__get('postType') === $postType ||
+ (
+ substr($type->postType, 0, $prefixLength) === self::POST_TYPE_PREFIX &&
+ substr($type->postType, $prefixLength) === $postType
+ )
) {
return $type;
}
diff --git a/src/TouchPoint-WP/Person.php b/src/TouchPoint-WP/Person.php
index f63e2c0e..a26189d9 100644
--- a/src/TouchPoint-WP/Person.php
+++ b/src/TouchPoint-WP/Person.php
@@ -41,7 +41,7 @@
* @property-read ?WP_Term resCode The ResCode taxonomy, if present
* @property ?int rescode_term_id The ResCode term ID
* @property ?string $loginSessionToken A token that is saved on the Session variable and used to ensure links
- * aren't used between sessions.
+ * aren't used between sessions.
* @property ?string $loginToken A token used to validate the user.
*/
class Person extends WP_User implements api, JsonSerializable, module, updatesViaCron
@@ -105,7 +105,7 @@ class Person extends WP_User implements api, JsonSerializable, module, updatesVi
'user_activation_key',
'spam',
'show_admin_bar_front',
-// 'role', // Excluding prevents this from being set through __set
+// 'role', // Excluding prevents this from being set through __set
'locale'
];
@@ -435,7 +435,7 @@ public static function peopleListShortcode($params = [], string $content = ""):
self::$_indexingQueries['inv'][$iid] = [
'invId' => $iid,
'memTypes' => null,
-// 'subGroups' => null,
+// 'subGroups' => null,
'with_subGroups' => false // populated below
];
}
@@ -723,11 +723,11 @@ protected static function updateFromTouchPoint(bool $verbose = false)
self::$_indexingQueries['inv'][$iid] = [
'invId' => $iid,
'memTypes' => $type->leaderTypeInts(),
-// 'subGroups' => null,
+// 'subGroups' => null,
'with_subGroups' => false
];
} elseif (is_array(self::$_indexingQueries['inv'][$iid]['memTypes'])) {
- $r = array_merge(
+ $r = array_merge(
self::$_indexingQueries['inv'][$iid]['memTypes'],
$type->leaderTypeInts()
);
@@ -1168,7 +1168,7 @@ protected function resCode(): ?WP_Term
*
* @param ?string $context A reference to where the action buttons are meant to be used.
* @param string $btnClass A string for classes to add to the buttons. Note that buttons can be a or button
- * elements.
+ * elements.
*
* @return string
*/
@@ -1537,9 +1537,9 @@ public static function ident($inputData): array
if (!$valid) {
http_response_code(Http::BAD_REQUEST);
echo json_encode([
- 'error' => $comment,
- 'error_i18n' => __("Registration Blocked for Spam.", 'TouchPoint-WP')
- ]);
+ 'error' => $comment,
+ 'error_i18n' => __("Registration Blocked for Spam.", 'TouchPoint-WP')
+ ]);
exit;
}
unset($valid, $comment);
@@ -1605,9 +1605,9 @@ private static function ajaxSrc(): void
if ($onBehalfOf === null) {
http_response_code(Http::UNAUTHORIZED);
echo json_encode([
- "error" => "Not Authorized.",
- "error_i18n" => __("You may need to sign in.", 'TouchPoint-WP')
- ]);
+ "error" => "Not Authorized.",
+ "error_i18n" => __("You may need to sign in.", 'TouchPoint-WP')
+ ]);
exit;
}
@@ -1733,9 +1733,9 @@ private static function ajaxContact(): void
if (!$validate) {
http_response_code(Http::BAD_REQUEST);
echo json_encode([
- 'error' => $result,
- 'error_i18n' => __("Contact Blocked for Spam.", 'TouchPoint-WP')
- ]);
+ 'error' => $result,
+ 'error_i18n' => __("Contact Blocked for Spam.", 'TouchPoint-WP')
+ ]);
exit;
}
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index 055552bc..80d53bf8 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -243,9 +243,9 @@ protected function __construct(string $file = '')
// add_action( 'admin_enqueue_scripts', [$this, 'admin_enqueue_styles'], 10, 1 ); // TODO restore?
// Load API for generic admin functions.
-// if (is_admin()) {
-// $this->admin(); // SOMEDAY if we ever need to interact with other post types, this should be uncommented.
-// }
+// if (is_admin()) {
+// $this->admin(); // SOMEDAY if we ever need to interact with other post types, this should be uncommented.
+// }
add_filter('do_parse_request', [$this, 'parseRequest'], 10, 3);
@@ -365,18 +365,18 @@ public static function postHeadersAndFiltering(): string
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
echo json_encode([
- 'error' => 'Only POST requests are allowed.',
- 'error_i18n' => __("Only POST requests are allowed.", 'TouchPoint-WP')
- ]);
+ 'error' => 'Only POST requests are allowed.',
+ 'error_i18n' => __("Only POST requests are allowed.", 'TouchPoint-WP')
+ ]);
exit;
}
$inputData = file_get_contents('php://input');
if ($inputData[0] !== '{') {
echo json_encode([
- 'error' => 'Invalid data provided.',
- 'error_i18n' => __("Invalid data provided.", 'TouchPoint-WP')
- ]);
+ 'error' => 'Invalid data provided.',
+ 'error_i18n' => __("Invalid data provided.", 'TouchPoint-WP')
+ ]);
exit;
}
@@ -427,7 +427,7 @@ public function parseRequest($continue, $wp, $extraVars): bool
// App Events Endpoint
if ($reqUri['path'][1] === TouchPointWP::API_ENDPOINT_APP_EVENTS &&
- TouchPointWP::useTribeCalendar()
+ TouchPointWP::useTribeCalendar()
) {
if ( ! EventsCalendar::api($reqUri)) {
return $continue;
@@ -436,7 +436,7 @@ public function parseRequest($continue, $wp, $extraVars): bool
// Involvement endpoint
if ($reqUri['path'][1] === TouchPointWP::API_ENDPOINT_INVOLVEMENT &&
- $this->settings->enable_involvements === "on"
+ $this->settings->enable_involvements === "on"
) {
if ( ! Involvement::api($reqUri)) {
return $continue;
@@ -445,7 +445,7 @@ public function parseRequest($continue, $wp, $extraVars): bool
// Global Partner endpoint
if ($reqUri['path'][1] === TouchPointWP::API_ENDPOINT_GLOBAL &&
- $this->settings->enable_global === "on"
+ $this->settings->enable_global === "on"
) {
if ( ! Partner::api($reqUri)) {
return $continue;
@@ -475,7 +475,7 @@ public function parseRequest($continue, $wp, $extraVars): bool
// Auth endpoints
if ($reqUri['path'][1] === TouchPointWP::API_ENDPOINT_AUTH &&
- $this->settings->enable_authentication === "on"
+ $this->settings->enable_authentication === "on"
) {
if ( ! Auth::api($reqUri)) {
return $continue;
@@ -499,7 +499,7 @@ public function parseRequest($continue, $wp, $extraVars): bool
// Geolocate via IP
if ($reqUri['path'][1] === TouchPointWP::API_ENDPOINT_GEOLOCATE &&
- count($reqUri['path']) === 2) {
+ count($reqUri['path']) === 2) {
$this->ajaxGeolocate();
}
}
@@ -652,45 +652,45 @@ public function loadLocalizations()
load_plugin_textdomain('TouchPoint-WP', false, $dir . '/i18n/');
}
- /**
- * Create or update database tables
- */
- protected function createTables(): void
- {
- global $wpdb;
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
-
- // IP Geo Caching table
- $tableName = $wpdb->base_prefix . TouchPointWP::TABLE_IP_GEO;
- $sql = "CREATE TABLE $tableName (
- id int(10) unsigned NOT NULL auto_increment,
- ip varbinary(16) NOT NULL UNIQUE,
- updatedDT datetime DEFAULT NOW(),
- data text NOT NULL,
- PRIMARY KEY (id)
- )";
- dbDelta($sql);
- }
+ /**
+ * Create or update database tables
+ */
+ protected function createTables(): void
+ {
+ global $wpdb;
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
- /**
+ // IP Geo Caching table
+ $tableName = $wpdb->base_prefix . TouchPointWP::TABLE_IP_GEO;
+ $sql = "CREATE TABLE $tableName (
+ id int(10) unsigned NOT NULL auto_increment,
+ ip varbinary(16) NOT NULL UNIQUE,
+ updatedDT datetime DEFAULT NOW(),
+ data text NOT NULL,
+ PRIMARY KEY (id)
+ )";
+ dbDelta($sql);
+ }
+
+ /**
* Compare the version numbers to determine if a migration is needed.
*/
public function migrate($force = false): void
{
if ($this->settings->version === self::VERSION && !$force) {
- return;
- }
+ return;
+ }
- $this->createTables();
+ $this->createTables();
- if (self::$_hasBeenInited) {
- $this->insertTerms();
- } else {
- add_action(self::INIT_ACTION_HOOK, [$this, 'insertTerms']);
- }
+ if (self::$_hasBeenInited) {
+ $this->insertTerms();
+ } else {
+ add_action(self::INIT_ACTION_HOOK, [$this, 'insertTerms']);
+ }
- $this->settings->migrate();
- }
+ $this->settings->migrate();
+ }
/**
* Load the settings, connect the references, and check that there aren't pending migrations.
@@ -752,7 +752,7 @@ public static function load($file): TouchPointWP
// Load Events if enabled (by presence of Events Calendar plugin)
if (self::useTribeCalendar()
- && ! class_exists("tp\TouchPointWP\EventsCalendar")) {
+ && ! class_exists("tp\TouchPointWP\EventsCalendar")) {
if ( ! TOUCHPOINT_COMPOSER_ENABLED) {
require_once 'EventsCalendar.php';
}
@@ -770,21 +770,21 @@ public static function load($file): TouchPointWP
}
/**
- * @var bool True of the init process has run. False if not. Prevents things from happening twice, which can cause errors.
- */
- private static bool $_hasBeenInited = false;
+ * @var bool True of the init process has run. False if not. Prevents things from happening twice, which can cause errors.
+ */
+ private static bool $_hasBeenInited = false;
- /**
- * Initialize the plugin.
- *
- * @return void
- */
- public static function init(): void
- {
- if (self::$_hasBeenInited)
- return;
+ /**
+ * Initialize the plugin.
+ *
+ * @return void
+ */
+ public static function init(): void
+ {
+ if (self::$_hasBeenInited)
+ return;
- self::instance()->loadLocalizations();
+ self::instance()->loadLocalizations();
self::instance()->registerTaxonomies();
@@ -796,19 +796,19 @@ public static function init(): void
self::$_hasBeenInited = true;
- self::requireScript("base");
+ self::requireScript("base");
do_action(self::INIT_ACTION_HOOK);
}
/**
- * Prints the inline 'base' script. This is meant to be called in the wp_head and admin_head, and should only be
- * called once on a page, but that is not automatically validated.
- *
- * @return void
- */
- public static function renderBaseInlineScript(): void
- {
+ * Prints the inline 'base' script. This is meant to be called in the wp_head and admin_head, and should only be
+ * called once on a page, but that is not automatically validated.
+ *
+ * @return void
+ */
+ public static function renderBaseInlineScript(): void
+ {
include self::instance()->assets_dir . '/js/base-inline.php';
}
@@ -823,17 +823,17 @@ public function registerScriptsAndStyles(): void
false
);
- wp_register_script(
- self::SHORTCODE_PREFIX . 'base-defer',
- $this->assets_url . 'js/base-defer' . $this->script_ext,
- [self::SHORTCODE_PREFIX . 'base', 'wp-i18n'],
- self::VERSION,
- true
- );
- wp_set_script_translations(
- self::SHORTCODE_PREFIX . 'base-defer',
- 'TouchPoint-WP', $this->getJsLocalizationDir()
- );
+ wp_register_script(
+ self::SHORTCODE_PREFIX . 'base-defer',
+ $this->assets_url . 'js/base-defer' . $this->script_ext,
+ [self::SHORTCODE_PREFIX . 'base', 'wp-i18n'],
+ self::VERSION,
+ true
+ );
+ wp_set_script_translations(
+ self::SHORTCODE_PREFIX . 'base-defer',
+ 'TouchPoint-WP', $this->getJsLocalizationDir()
+ );
wp_register_script(
self::SHORTCODE_PREFIX . 'swal2-defer',
@@ -893,9 +893,9 @@ public function registerScriptsAndStyles(): void
Partner::registerScriptsAndStyles();
}
-// if ( ! ! $this->auth) {
-// Auth::registerScriptsAndStyles();
-// }
+// if ( ! ! $this->auth) {
+// Auth::registerScriptsAndStyles();
+// }
if ( ! ! $this->rsvp) {
Meeting::registerScriptsAndStyles();
@@ -966,11 +966,11 @@ public static function requireStyle(string $name = null): void
public function filterByTag(?string $tag, ?string $handle): string
{
if (strpos($tag, 'async') !== false &&
- strpos($handle, '-async') > 0) {
+ strpos($handle, '-async') > 0) {
$tag = str_replace(' src=', ' async="async" src=', $tag);
}
if (strpos($tag, 'defer') !== false &&
- strpos($handle, '-defer') > 0
+ strpos($handle, '-defer') > 0
) {
$tag = str_replace('"
- print(
- "")
+ print("")
apiCalled = True
if ("login" in Data.a or Data.r != '') and model.HttpMethod == "get": # r parameter implies desired redir after login.
@@ -1115,6 +1141,7 @@ def get_person_info_for_sync(person_obj):
path = ""
# add host if missing
+ # noinspection HttpUrlsUsage
if not r[0:8].lower() == "https://" and not r[0:7].lower() == "http://" and not r.split('/', 1)[
0].__contains__('.'):
if r[0] == '/':
diff --git a/touchpoint-wp.php b/touchpoint-wp.php
index b6057c06..1289e676 100644
--- a/touchpoint-wp.php
+++ b/touchpoint-wp.php
@@ -14,7 +14,7 @@
Plugin URI: https://github.com/tenthpres/touchpoint-wp
Update URI: https://github.com/tenthpres/touchpoint-wp
Description: A WordPress Plugin for integrating with TouchPoint Church Management Software.
-Version: 0.0.35
+Version: 0.0.36
Author: James K
Author URI: https://github.com/jkrrv
License: AGPLv3+
From dd82650338d017625afaacb2c89d6e73d44bfcba Mon Sep 17 00:00:00 2001
From: "James K."
Date: Tue, 17 Oct 2023 11:29:52 -0400
Subject: [PATCH 033/226] version bump
---
composer.json | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/composer.json b/composer.json
index e8040e13..595caf68 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"description": "A WordPress Plugin for integrating with TouchPoint Church Management Software.",
"license": "AGPL-3.0-or-later",
"type": "wordpress-plugin",
- "version": "0.0.35",
+ "version": "0.0.36",
"keywords": [
"wordpress",
"wp",
diff --git a/package.json b/package.json
index aba6a642..dfe4f2a0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "touchpoint-wp",
- "version": "0.0.35",
+ "version": "0.0.36",
"description": "A WordPress Plugin for integrating with TouchPoint Church Management Software.",
"directories": {
"doc": "docs"
From 73cd2f434a99f9c251c7c7847afd9d982813026f Mon Sep 17 00:00:00 2001
From: "James K."
Date: Tue, 17 Oct 2023 11:31:40 -0400
Subject: [PATCH 034/226] Resolve an issue when the partner tax isn't defined.
---
src/TouchPoint-WP/Partner.php | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/TouchPoint-WP/Partner.php b/src/TouchPoint-WP/Partner.php
index 43680789..911d348a 100644
--- a/src/TouchPoint-WP/Partner.php
+++ b/src/TouchPoint-WP/Partner.php
@@ -118,12 +118,15 @@ protected function __construct(object $object)
throw new TouchPointWP_Exception("Could not construct a Partner with the information provided.");
}
- $terms = wp_get_post_terms(
- $this->post_id,
- [
- Taxonomies::TAX_GP_CATEGORY
- ]
- );
+ $terms = [];
+ if (TouchPointWP::instance()->settings->global_primary_tax !== "") {
+ $terms = wp_get_post_terms(
+ $this->post_id,
+ [
+ Taxonomies::TAX_GP_CATEGORY
+ ]
+ );
+ }
if (is_array($terms) && count($terms) > 0) {
$hookLength = strlen(TouchPointWP::HOOK_PREFIX);
@@ -503,9 +506,15 @@ public static function updateFromTouchPoint(bool $verbose = false)
}
// Delete terms that are no longer used
- $terms = get_terms(['taxonomy' => Taxonomies::TAX_GP_CATEGORY, 'hide_empty' => false, 'exclude' => $termsToKeep]);
- foreach ($terms as $term) {
- wp_delete_term($term->term_id, Taxonomies::TAX_GP_CATEGORY);
+ if (TouchPointWP::instance()->settings->global_primary_tax !== "") {
+ $terms = get_terms(
+ ['taxonomy' => Taxonomies::TAX_GP_CATEGORY, 'hide_empty' => false, 'exclude' => $termsToKeep]
+ );
+ if (!is_wp_error($terms)) {
+ foreach ($terms as $term) {
+ wp_delete_term($term->term_id, Taxonomies::TAX_GP_CATEGORY);
+ }
+ }
}
if ($count !== 0) {
From 964e009511dbdf3b99e69d2e2d2f18ce885ac1d7 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Tue, 17 Oct 2023 11:34:43 -0400
Subject: [PATCH 035/226] Resolve an issue with button alignment for actions.
---
assets/template/partials-template-style.css | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/assets/template/partials-template-style.css b/assets/template/partials-template-style.css
index 220c3d9e..a3294d0f 100644
--- a/assets/template/partials-template-style.css
+++ b/assets/template/partials-template-style.css
@@ -84,13 +84,20 @@ article.inv-list-item h2 a {
text-align: right;
}
+.partner-actions button,
+.partner-actions a.button,
+.involvement-actions button,
+.involvement-actions a.button {
+ display: inline-block;
+}
+
.partner-list-item .partner-actions button,
.partner-list-item .partner-actions a.button,
.inv-list-item .involvement-actions button,
.inv-list-item .involvement-actions a.button,
.inv-list-item .child-involvements a {
- position:relative;
- z-index:10;
+ position: relative;
+ z-index: 10;
}
.partner-list-item div.post-meta-single,
From 1af9f25e1a08484f687ea568d725ce48beb75f64 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Tue, 17 Oct 2023 11:36:33 -0400
Subject: [PATCH 036/226] Move Templates to override to Module.
---
src/TouchPoint-WP/Involvement.php | 2 +-
src/TouchPoint-WP/Partner.php | 2 +-
src/TouchPoint-WP/module.php | 8 ++++++++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index ed44fa8d..77fca246 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -402,7 +402,7 @@ public static function templateFilter(string $template): string
{
if (apply_filters(TouchPointWP::HOOK_PREFIX . 'use_default_templates', true, self::class)) {
$postTypesToFilter = Involvement_PostTypeSettings::getPostTypes();
- $templateFilesToOverwrite = TouchPointWP::TEMPLATES_TO_OVERWRITE;
+ $templateFilesToOverwrite = self::TEMPLATES_TO_OVERWRITE;
if (count($postTypesToFilter) == 0) {
return $template;
diff --git a/src/TouchPoint-WP/Partner.php b/src/TouchPoint-WP/Partner.php
index 911d348a..ee799b4d 100644
--- a/src/TouchPoint-WP/Partner.php
+++ b/src/TouchPoint-WP/Partner.php
@@ -540,7 +540,7 @@ public static function templateFilter(string $template): string
{
if (apply_filters(TouchPointWP::HOOK_PREFIX . 'use_default_templates', true, self::class)) {
$postTypesToFilter = self::POST_TYPE;
- $templateFilesToOverwrite = TouchPointWP::TEMPLATES_TO_OVERWRITE;
+ $templateFilesToOverwrite = self::TEMPLATES_TO_OVERWRITE;
if ( ! in_array(ltrim(strrchr($template, '/'), '/'), $templateFilesToOverwrite)) {
return $template;
diff --git a/src/TouchPoint-WP/module.php b/src/TouchPoint-WP/module.php
index d58a09a3..8c34d20c 100644
--- a/src/TouchPoint-WP/module.php
+++ b/src/TouchPoint-WP/module.php
@@ -16,4 +16,12 @@ interface module
* @return bool
*/
public static function load(): bool;
+
+ public const TEMPLATES_TO_OVERWRITE = [
+ 'archive.php',
+ 'singular.php',
+ 'single.php',
+ 'index.php',
+ 'template-canvas.php'
+ ];
}
\ No newline at end of file
From ed9a5c0a64f9f34e569a8ee466f07e7cf7679ac9 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Tue, 17 Oct 2023 19:11:40 -0400
Subject: [PATCH 037/226] Resolve an issue with Locations. Revisit of #113.
---
src/TouchPoint-WP/{Utilities => }/Geo.php | 33 +++++++++++---
src/TouchPoint-WP/Involvement.php | 24 +++++-----
src/TouchPoint-WP/Location.php | 20 ++++-----
src/TouchPoint-WP/Partner.php | 16 +++----
src/TouchPoint-WP/TouchPointWP.php | 55 +++++++++++------------
src/TouchPoint-WP/{geo.php => hasGeo.php} | 4 +-
touchpoint-wp.php | 4 +-
7 files changed, 89 insertions(+), 67 deletions(-)
rename src/TouchPoint-WP/{Utilities => }/Geo.php (50%)
rename src/TouchPoint-WP/{geo.php => hasGeo.php} (88%)
diff --git a/src/TouchPoint-WP/Utilities/Geo.php b/src/TouchPoint-WP/Geo.php
similarity index 50%
rename from src/TouchPoint-WP/Utilities/Geo.php
rename to src/TouchPoint-WP/Geo.php
index 618b210c..b9c7b32f 100644
--- a/src/TouchPoint-WP/Utilities/Geo.php
+++ b/src/TouchPoint-WP/Geo.php
@@ -3,14 +3,32 @@
* @package TouchPointWP
*/
-namespace tp\TouchPointWP\Utilities;
+namespace tp\TouchPointWP;
+
+use stdClass;
+
+if ( ! defined('ABSPATH')) {
+ exit(1);
+}
+
/**
- * Utility class for geographical attributes and calculations. Not to be confused with the geo interface.
- * @see \tp\TouchPointWP\geo
+ * A standardized set of fields for geographical information.
*/
-abstract class Geo
+class Geo extends stdClass
{
+ public ?float $lat = null;
+ public ?float $lng = null;
+ public ?string $human = null;
+ public ?string $type = null;
+
+ public function __construct(?float $lat = null, ?float $lng = null, ?string $human = null, ?string $type = null) {
+ $this->lat = $lat;
+ $this->lng = $lng;
+ $this->human = $human;
+ $this->type = $type;
+ }
+
/**
* Get distance between two geographic points by lat/lng pairs. Returns a number in miles.
*
@@ -28,8 +46,11 @@ public static function distance(float $latA, float $lngA, float $latB, float $ln
$latB_r = deg2rad($latB);
$lngB_r = deg2rad($lngB);
- return round(3959 * acos(
+ return round(
+ 3959 * acos(
cos($latA_r) * cos($latB_r) * cos($lngB_r - $lngA_r) + sin($latA_r) * sin($latB_r)
- ), 1);
+ ),
+ 1
+ );
}
}
\ No newline at end of file
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index 77fca246..c42d3299 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -15,7 +15,6 @@
require_once "jsonLd.php";
require_once "updatesViaCron.php";
require_once "Utilities.php";
- require_once "Utilities/Geo.php";
require_once "Involvement_PostTypeSettings.php";
}
@@ -34,7 +33,7 @@
/**
* Fundamental object meant to correspond to an Involvement in TouchPoint
*/
-class Involvement implements api, updatesViaCron, geo, module
+class Involvement implements api, updatesViaCron, hasGeo, module
{
use jsInstantiation;
use jsonLd;
@@ -1658,6 +1657,10 @@ public static function ajaxNearby(): void
exit;
}
+ if ($geoObj->type == "loc") {
+ $geoObj->type = "ip";
+ }
+
$lat = $geoObj->lat;
$lng = $geoObj->lng;
@@ -1666,6 +1669,7 @@ public static function ajaxNearby(): void
$geoObj = TouchPointWP::instance()->reverseGeocode($lat, $lng);
if ($geoObj !== false) {
+ $geoObj->type = "nav";
$r['geo'] = $geoObj;
}
}
@@ -1897,7 +1901,7 @@ public function getDistance(bool $useHiForFalse = false)
return $useHiForFalse ? 25000 : false;
}
- return Utilities\Geo::distance(
+ return Geo::distance(
$this->geo->lat,
$this->geo->lng,
self::$compareGeo->lat,
@@ -2049,15 +2053,15 @@ public function hasGeo(): bool
return $this->geo !== null && $this->geo->lat !== null && $this->geo->lng !== null;
}
- public function asGeoIFace(string $type = "unknown"): ?object
+ public function asGeoIFace(string $type = "unknown"): ?Geo
{
if ($this->hasGeo()) {
- return (object)[
- 'lat' => $this->geo->lat,
- 'lng' => $this->geo->lng,
- 'human' => $this->name,
- 'type' => $type
- ];
+ return new Geo(
+ $this->geo->lat,
+ $this->geo->lng,
+ $this->name,
+ $type
+ );
}
return null;
diff --git a/src/TouchPoint-WP/Location.php b/src/TouchPoint-WP/Location.php
index eb548e6a..ffb27c1b 100644
--- a/src/TouchPoint-WP/Location.php
+++ b/src/TouchPoint-WP/Location.php
@@ -9,14 +9,14 @@
* A Location is generally a physical place, with an internet connection. These likely correspond to campuses, but
* don't necessarily need to.
*/
-class Location implements geo
+class Location implements hasGeo
{
protected static ?array $_locations = null;
public string $name;
public ?float $lat;
public ?float $lng;
- public float $radius;
+ public float $radius; // miles
public array $ipAddresses;
protected function __construct($data)
@@ -79,15 +79,15 @@ public function hasGeo(): bool
return $this->lat !== null && $this->lng !== null;
}
- public function asGeoIFace(string $type = "unknown"): ?object
+ public function asGeoIFace(string $type = "unknown"): ?Geo
{
if ($this->hasGeo()) {
- return (object)[
- 'lat' => $this->lat,
- 'lng' => $this->lng,
- 'human' => $this->name,
- 'type' => $type
- ];
+ return new Geo(
+ $this->lat,
+ $this->lng,
+ $this->name,
+ $type
+ );
}
return null;
@@ -97,7 +97,7 @@ public static function getLocationForLatLng(float $lat, float $lng): ?Location
{
$locs = self::getLocations();
foreach ($locs as $l) {
- $d = Utilities\Geo::distance($lat, $lng, $l->lat, $l->lng);
+ $d = Geo::distance($lat, $lng, $l->lat, $l->lng);
if ($d <= $l->radius) {
return $l;
}
diff --git a/src/TouchPoint-WP/Partner.php b/src/TouchPoint-WP/Partner.php
index ee799b4d..e3239b59 100644
--- a/src/TouchPoint-WP/Partner.php
+++ b/src/TouchPoint-WP/Partner.php
@@ -26,7 +26,7 @@
/**
* An Outreach partner, corresponding to a family in TouchPoint.
*/
-class Partner implements api, JsonSerializable, updatesViaCron, geo, module
+class Partner implements api, JsonSerializable, updatesViaCron, hasGeo, module
{
use jsInstantiation {
jsInstantiation::enqueueForJsInstantiation as protected enqueueForJsInstantiationTrait;
@@ -1385,15 +1385,15 @@ public function hasGeo(): bool
return $this->geo !== null;
}
- public function asGeoIFace(string $type = "unknown"): ?object
+ public function asGeoIFace(string $type = "unknown"): ?Geo
{
if ($this->hasGeo()) {
- return (object)[
- 'lat' => $this->geo->lat,
- 'lng' => $this->geo->lng,
- 'human' => $this->name,
- 'type' => $type
- ];
+ return new Geo(
+ $this->geo->lat,
+ $this->geo->lng,
+ $this->name,
+ $type
+ );
}
return null;
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index d56b3bfa..f0e7aa5e 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -959,7 +959,7 @@ public function ajaxGeolocate(): void
/**
* @param bool $useApi Set false to only use cached data, and not the IP API.
*
- * @return stdClass|false An object with 'lat', 'lng', and 'human' attributes, if a location could be identified.
+ * @return Geo|false An object with 'lat', 'lng', and 'human' attributes, if a location could be identified.
* Or, false if not available.
*/
public function geolocate(bool $useApi = true, bool $includeRaw = false)
@@ -974,7 +974,7 @@ public function geolocate(bool $useApi = true, bool $includeRaw = false)
$return = Location::getLocationForIP($ip);
if ($return !== null && $return->lat !== null && $return->lng !== null) {
- return $return->asGeoIFace('ip');
+ return $return->asGeoIFace('loc');
}
try {
@@ -1011,24 +1011,18 @@ public function geolocate(bool $useApi = true, bool $includeRaw = false)
$human = $d->city . ", " . $d->country_name;
}
+ $r = new Geo(
+ $d->latitude,
+ $d->longitude,
+ $human,
+ 'ip'
+ );
+
if ($includeRaw) {
- /** @see geo::asGeoIFace() */
- return (object)[
- 'lat' => $d->latitude,
- 'lng' => $d->longitude,
- 'human' => $human,
- 'type' => 'ip',
- 'raw' => $d
- ];
- } else {
- /** @see geo::asGeoIFace() */
- return (object)[
- 'lat' => $d->latitude,
- 'lng' => $d->longitude,
- 'human' => $human,
- 'type' => 'ip'
- ];
+ $r->raw = $d;
}
+
+ return $r;
}
/**
@@ -1036,7 +1030,7 @@ public function geolocate(bool $useApi = true, bool $includeRaw = false)
* @param float $lng Longitude
* @param bool $includeIpLoc Whether to use IP geolocation as a fallback data source.
*
- * @return object|false An object with a 'human' attribute, if a location could be identified. Or, false if not
+ * @return Geo|false An object with a 'human' attribute, if a location could be identified. Or, false if not
* available.
*/
public function reverseGeocode(float $lat, float $lng, bool $includeIpLoc = true)
@@ -1050,6 +1044,13 @@ public function reverseGeocode(float $lat, float $lng, bool $includeIpLoc = true
return $r->asGeoIFace('loc');
}
+ if ($includeIpLoc) {
+ $r = Location::getLocationForIP();
+ if ($r !== null) {
+ return $r->asGeoIFace('ip');
+ }
+ }
+
if ($this->settings->google_geo_api_key !== "") {
$reqData = [
'key' => $this->settings->google_geo_api_key,
@@ -1083,16 +1084,12 @@ public function reverseGeocode(float $lat, float $lng, bool $includeIpLoc = true
$human = $out['locality'] . ", " . $out['country_long'];
}
- $out['human'] = $human;
-
- return (object)$out;
- }
- }
-
- if ($includeIpLoc) {
- $r = Location::getLocationForIP();
- if ($r !== null) {
- return $r->asGeoIFace('loc');
+ return new Geo(
+ $out['lat'],
+ $out['lng'],
+ $human,
+ 'nav',
+ );
}
}
diff --git a/src/TouchPoint-WP/geo.php b/src/TouchPoint-WP/hasGeo.php
similarity index 88%
rename from src/TouchPoint-WP/geo.php
rename to src/TouchPoint-WP/hasGeo.php
index 63e137cf..d70f2cc3 100644
--- a/src/TouchPoint-WP/geo.php
+++ b/src/TouchPoint-WP/hasGeo.php
@@ -13,7 +13,7 @@
/**
* For classes that have geographic attributes, or potential geographic attributes
*/
-interface geo
+interface hasGeo
{
/**
@@ -31,5 +31,5 @@ public function hasGeo(): bool;
*
* @return object|null
*/
- public function asGeoIFace(string $type = "unknown"): ?object;
+ public function asGeoIFace(string $type = "unknown"): ?Geo;
}
\ No newline at end of file
diff --git a/touchpoint-wp.php b/touchpoint-wp.php
index 1289e676..0a26ed1b 100644
--- a/touchpoint-wp.php
+++ b/touchpoint-wp.php
@@ -49,11 +49,11 @@
require_once __DIR__ . "/src/TouchPoint-WP/api.php";
require_once __DIR__ . "/src/TouchPoint-WP/module.php";
require_once __DIR__ . "/src/TouchPoint-WP/Utilities/Cleanup.php";
- require_once __DIR__ . "/src/TouchPoint-WP/Utilities/Geo.php";
+ require_once __DIR__ . "/src/TouchPoint-WP/Geo.php";
require_once __DIR__ . "/src/TouchPoint-WP/Utilities/PersonArray.php";
require_once __DIR__ . "/src/TouchPoint-WP/Utilities/Http.php";
require_once __DIR__ . "/src/TouchPoint-WP/Taxonomies.php";
- require_once __DIR__ . "/src/TouchPoint-WP/geo.php";
+ require_once __DIR__ . "/src/TouchPoint-WP/hasGeo.php";
require_once __DIR__ . "/src/TouchPoint-WP/Person.php";
require_once __DIR__ . "/src/TouchPoint-WP/Involvement.php";
From 439c59feff5ab8a481b6dd58a0c6569c4b85effa Mon Sep 17 00:00:00 2001
From: "James K."
Date: Tue, 17 Oct 2023 19:33:51 -0400
Subject: [PATCH 038/226] Resolve an issue with removing taxonomy terms that
are no longer relevant.
---
src/TouchPoint-WP/Taxonomies.php | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/TouchPoint-WP/Taxonomies.php b/src/TouchPoint-WP/Taxonomies.php
index ea5097bb..e33befc5 100644
--- a/src/TouchPoint-WP/Taxonomies.php
+++ b/src/TouchPoint-WP/Taxonomies.php
@@ -104,8 +104,10 @@ public static function insertTermsForArrayBasedTaxonomy(array $list, string $tax
// Delete any terms that are no longer current.
$terms = get_terms(['taxonomy' => $taxonomy, 'hide_empty' => false, 'exclude' => $existingIds]);
- foreach ($terms as $term) {
- wp_delete_term($term->term_id, $taxonomy);
+ if (!is_wp_error($terms)) {
+ foreach ($terms as $term) {
+ wp_delete_term($term->term_id, $taxonomy);
+ }
}
}
@@ -158,8 +160,10 @@ public static function insertTermsForLookupBasedTaxonomy(array $list, string $ta
// Delete any terms that are no longer current.
$terms = get_terms(['taxonomy' => $taxonomy, 'hide_empty' => false, 'exclude' => $existingIds]);
- foreach ($terms as $term) {
- wp_delete_term($term->term_id, $taxonomy);
+ if (!is_wp_error($terms)) {
+ foreach ($terms as $term) {
+ wp_delete_term($term->term_id, $taxonomy);
+ }
}
}
@@ -379,8 +383,10 @@ public static function insertTerms(TouchPointWP $instance)
// Delete any terms that are no longer current.
$terms = get_terms(['taxonomy' => self::TAX_DIV, 'hide_empty' => false, 'exclude' => $existingIds]);
- foreach ($terms as $term) {
- wp_delete_term($term->term_id, self::TAX_DIV);
+ if (!is_wp_error($terms)) {
+ foreach ($terms as $term) {
+ wp_delete_term($term->term_id, self::TAX_DIV);
+ }
}
}
From 848e5436acdf58cf78aa33aea09e206087adfba3 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Tue, 17 Oct 2023 19:34:23 -0400
Subject: [PATCH 039/226] Rm Templates to overwrite, which has moved.
---
src/TouchPoint-WP/TouchPointWP.php | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index f0e7aa5e..7dde6f65 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -55,14 +55,6 @@ class TouchPointWP
public const API_ENDPOINT_CLEANUP = "cleanup";
public const API_ENDPOINT_GEOLOCATE = "geolocate";
- public const TEMPLATES_TO_OVERWRITE = [
- 'archive.php',
- 'singular.php',
- 'single.php',
- 'index.php',
- 'template-canvas.php'
- ];
-
/**
* Prefix to use for all shortcodes.
*/
From 55edb206f36bdc9ff3a25ae135eef9570e34abb7 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Wed, 18 Oct 2023 18:37:40 -0400
Subject: [PATCH 040/226] Fix an issue with sorting Involvements
---
src/TouchPoint-WP/Involvement.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index c42d3299..a164957f 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -1108,7 +1108,10 @@ public static function doInvolvementList(WP_Query $q, $params = []): void
usort($posts, [Involvement::class, 'sortPosts']);
- foreach ($posts as $post) {
+ foreach ($posts as $postI) {
+ global $post;
+ $post = $postI;
+
$loadedPart = get_template_part('list-item', 'involvement-list-item');
if ($loadedPart === false) {
require TouchPointWP::$dir . "/src/templates/parts/involvement-list-item.php";
From 046c48834d97e7284f61ea9fad5d5377289b9558 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Wed, 18 Oct 2023 22:38:54 -0400
Subject: [PATCH 041/226] Rm unneeded loop
---
src/TouchPoint-WP/Involvement.php | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index a164957f..253afe9e 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -571,22 +571,11 @@ public function nextMeeting(): ?DateTimeImmutable
// schedules
foreach ($this->schedules() as $s) {
$mdt = $s->next;
- if ($mdt > $now) {
- if ($this->_nextMeeting === null || $mdt < $this->_nextMeeting) {
- $this->_nextMeeting = $mdt;
- }
+ if ($mdt <= $now) { // If "next meeting" is past, add a week and re-check.
+ $mdt = $mdt->modify("+1 week");
}
- }
- }
-
- // schedules + 1 week (assumes schedules are recurring weekly)
- if ($this->_nextMeeting === null) { // really only needed if we don't have a date yet.
- foreach ($this->schedules() as $s) {
- $mdt = $s->next->modify("+1 week");
- if ($mdt > $now) {
- if ($this->_nextMeeting === null || $mdt < $this->_nextMeeting) {
- $this->_nextMeeting = $mdt;
- }
+ if ($this->_nextMeeting === null || $mdt < $this->_nextMeeting) {
+ $this->_nextMeeting = $mdt;
}
}
}
From fa3ae469ce24d848bf089e8ad053d4c4c63dadd0 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Sun, 22 Oct 2023 22:46:51 -0400
Subject: [PATCH 042/226] Version bump to 1.0.0
---
composer.json | 2 +-
i18n/TouchPoint-WP.pot | 4 ++--
package.json | 2 +-
src/TouchPoint-WP/EventsCalendar.php | 2 +-
src/TouchPoint-WP/TouchPointWP.php | 4 ++--
src/TouchPoint-WP/TouchPointWP_Settings.php | 2 +-
src/python/WebApi.py | 2 +-
touchpoint-wp.php | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/composer.json b/composer.json
index 595caf68..ebee13e1 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"description": "A WordPress Plugin for integrating with TouchPoint Church Management Software.",
"license": "AGPL-3.0-or-later",
"type": "wordpress-plugin",
- "version": "0.0.36",
+ "version": "1.0.0",
"keywords": [
"wordpress",
"wp",
diff --git a/i18n/TouchPoint-WP.pot b/i18n/TouchPoint-WP.pot
index ca5e1494..a6df4947 100644
--- a/i18n/TouchPoint-WP.pot
+++ b/i18n/TouchPoint-WP.pot
@@ -2,14 +2,14 @@
# This file is distributed under the AGPLv3+.
msgid ""
msgstr ""
-"Project-Id-Version: TouchPoint WP 0.0.35\n"
+"Project-Id-Version: TouchPoint WP 1.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/TouchPoint-WP\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2023-10-07T21:31:31+00:00\n"
+"POT-Creation-Date: 2023-10-19T02:39:34+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.8.1\n"
"X-Domain: TouchPoint-WP\n"
diff --git a/package.json b/package.json
index dfe4f2a0..0e882e0a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "touchpoint-wp",
- "version": "0.0.36",
+ "version": "1.0.0",
"description": "A WordPress Plugin for integrating with TouchPoint Church Management Software.",
"directories": {
"doc": "docs"
diff --git a/src/TouchPoint-WP/EventsCalendar.php b/src/TouchPoint-WP/EventsCalendar.php
index 5fc66a84..5ee9728d 100644
--- a/src/TouchPoint-WP/EventsCalendar.php
+++ b/src/TouchPoint-WP/EventsCalendar.php
@@ -19,7 +19,7 @@
* Provides an interface to bridge the gap between The Events Calendar plugin (by ModernTribe) and the TouchPoint
* mobile app.
*
- * @deprecated since 0.0.36
+ * @deprecated since 1.0.0
*/
abstract class EventsCalendar implements api, module
{
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index 7dde6f65..e894b384 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -32,7 +32,7 @@ class TouchPointWP
/**
* Version number
*/
- public const VERSION = "0.0.36";
+ public const VERSION = "1.0.0";
/**
* The Token
@@ -1320,7 +1320,7 @@ public static function useTribeCalendarPro(): bool
*
* @return bool
*
- * @deprecated since 0.0.36 -- Will not be necessary once mobile 3.0 exists.
+ * @deprecated since 1.0.0 -- Will not be necessary once mobile 3.0 exists.
*/
public static function useTribeCalendar(): bool
{
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index d7d2c8bb..16ccd7be 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -1483,7 +1483,7 @@ public function migrate(): void
}
// 0.0.31 - Add lookup IDs to ResCodes
- // 0.0.36 - Cleanup possible duplicate terms
+ // 1.0.0 - Cleanup possible duplicate terms
Taxonomies::$forceTermLookupIdUpdate = true;
// Update version string
diff --git a/src/python/WebApi.py b/src/python/WebApi.py
index 27956377..19c88254 100644
--- a/src/python/WebApi.py
+++ b/src/python/WebApi.py
@@ -5,7 +5,7 @@
import linecache
import sys
-VERSION = "0.0.36"
+VERSION = "1.0.0"
sgContactEvName = "Contact"
diff --git a/touchpoint-wp.php b/touchpoint-wp.php
index 0a26ed1b..fa2456b9 100644
--- a/touchpoint-wp.php
+++ b/touchpoint-wp.php
@@ -14,7 +14,7 @@
Plugin URI: https://github.com/tenthpres/touchpoint-wp
Update URI: https://github.com/tenthpres/touchpoint-wp
Description: A WordPress Plugin for integrating with TouchPoint Church Management Software.
-Version: 0.0.36
+Version: 1.0.0
Author: James K
Author URI: https://github.com/jkrrv
License: AGPLv3+
From 0c0f8ec1963ef8c9d73a1213e9c499c859861663 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Tue, 24 Oct 2023 14:49:13 -0400
Subject: [PATCH 043/226] i18n for Google Maps
---
src/TouchPoint-WP/TouchPointWP.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index e894b384..d9631480 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -815,10 +815,11 @@ public function registerScriptsAndStyles(): void
true
);
+ $lang = strtolower(get_locale());
wp_register_script(
TouchPointWP::SHORTCODE_PREFIX . "googleMaps",
sprintf(
- "https://maps.googleapis.com/maps/api/js?key=%s&v=3&libraries=geometry",
+ "https://maps.googleapis.com/maps/api/js?key=%s&v=3&libraries=geometry&language=$lang",
TouchPointWP::instance()->settings->google_maps_api_key
),
[TouchPointWP::SHORTCODE_PREFIX . "base-defer"],
From 034cb1618b1cddbf0ea3294298127c290f33ed98 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 26 Oct 2023 18:20:37 -0400
Subject: [PATCH 044/226] Resolve issue with parameter not always being
defined.
---
src/TouchPoint-WP/Taxonomies.php | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/TouchPoint-WP/Taxonomies.php b/src/TouchPoint-WP/Taxonomies.php
index e33befc5..f9ff8372 100644
--- a/src/TouchPoint-WP/Taxonomies.php
+++ b/src/TouchPoint-WP/Taxonomies.php
@@ -258,12 +258,16 @@ public static function getTermsClauses($clauses, $taxonomy, $args): array
* Insert the terms for the registered taxonomies. (This is supposed to happen a while after the taxonomies are
* loaded.)
*
- * @param TouchPointWP $instance
+ * @param ?TouchPointWP $instance
*
* @return void
*/
- public static function insertTerms(TouchPointWP $instance)
+ public static function insertTerms(TouchPointWP $instance = null)
{
+ if ($instance === null) {
+ $instance = TouchPointWP::instance();
+ }
+
// Resident Codes
$types = self::getPostTypesForTaxonomy($instance, self::TAX_RESCODE);
if (count($types) > 0) {
From 7d5244d780fb0738fefc4b23c2bb434639509c16 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Wed, 1 Nov 2023 16:06:32 -0400
Subject: [PATCH 045/226] JS file watchers.
---
.idea/watcherTasks.xml | 36 ++++++++++++++++++++++++++++--------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml
index f9519dfe..cc2fc94a 100644
--- a/.idea/watcherTasks.xml
+++ b/.idea/watcherTasks.xml
@@ -22,22 +22,22 @@
-
+
-
-
+
+
-
-
+
+
-
+
@@ -46,9 +46,9 @@
-
+
-
+
@@ -61,6 +61,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 67acd5b5be2b0eddfcdb6d1683c0a88fda44c94a Mon Sep 17 00:00:00 2001
From: "James K."
Date: Wed, 3 Jan 2024 11:29:43 -0500
Subject: [PATCH 046/226] Converting schedule portion of schedule query to JSON
to prepare for future changes to schedules.
---
src/TouchPoint-WP/Involvement.php | 6 +++---
src/python/WebApi.py | 29 +++++++++--------------------
2 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index 253afe9e..6b125d41 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -570,7 +570,7 @@ public function nextMeeting(): ?DateTimeImmutable
// schedules
foreach ($this->schedules() as $s) {
- $mdt = $s->next;
+ $mdt = $s->nextStartDt;
if ($mdt <= $now) { // If "next meeting" is past, add a week and re-check.
$mdt = $mdt->modify("+1 week");
}
@@ -606,7 +606,7 @@ private static function computeCommonOccurrences(array $meetings = [], array $sc
continue;
}
- $dt = $s->next;
+ $dt = $s->nextStartDt;
$coInx = $dt->format('w-Hi');
$commonOccurrences[$coInx] = [
@@ -2144,7 +2144,7 @@ final protected static function updateInvolvementPostsForType(Involvement_PostTy
// Meeting and Schedule date/time strings as DateTimeImmutables
foreach ($inv->schedules as $i => $s) {
try {
- $s->next = new DateTimeImmutable($s->next, $siteTz);
+ $s->nextStartDt = new DateTimeImmutable($s->nextStartDt, $siteTz);
} catch (Exception $e) {
unset($inv->schedules[$i]);
}
diff --git a/src/python/WebApi.py b/src/python/WebApi.py
index 19c88254..22aa0219 100644
--- a/src/python/WebApi.py
+++ b/src/python/WebApi.py
@@ -281,25 +281,16 @@ def get_person_info_for_sync(person_obj):
),
-- pull aggregate schedules for all target organizations
cteSchedule AS
- (SELECT OrganizationId, STRING_AGG(sdt, ' | ') WITHIN GROUP (ORDER BY sdt ASC) AS OrgSchedule
- FROM (
- SELECT o.OrganizationId, CONCAT(FORMAT(os.NextMeetingDate, 'yyyy-MM-ddTHH:mm:ss'), '|S') as sdt
+ (SELECT cto.OrganizationId,
+ (
+ SELECT FORMAT(os.NextMeetingDate, 'yyyy-MM-ddTHH:mm:ss') as nextStartDt
FROM dbo.OrgSchedule os WITH(NOLOCK)
INNER JOIN cteTargetOrgs o
ON os.OrganizationId = o.OrganizationId
- ) s_agg
- GROUP BY s_agg.OrganizationId),
- -- pull aggregate meetings for all target organizations
- cteMeetings AS
- (SELECT OrganizationId, STRING_AGG(sdt, ' | ') WITHIN GROUP (ORDER BY sdt ASC) AS OrgMeetings
- FROM (
- SELECT o.OrganizationId, CONCAT(FORMAT(m.meetingDate, 'yyyy-MM-ddTHH:mm:ss'), '|M') as sdt
- FROM dbo.Meetings as m WITH(NOLOCK)
- INNER JOIN cteTargetOrgs o
- ON m.OrganizationId = o.OrganizationId
- WHERE m.meetingDate > getdate()
- ) m_agg
- GROUP BY m_agg.OrganizationId),
+ WHERE cto.OrganizationId = os.OrganizationId
+ FOR JSON PATH
+ ) as OrgSchedule
+ FROM cteTargetOrgs cto),
-- pull aggregate divisions for all target organizations
cteDivision AS
(SELECT OrganizationId, STRING_AGG(divId, ',') WITHIN GROUP (ORDER BY divId ASC) AS OrgDivision
@@ -410,10 +401,8 @@ def get_person_info_for_sync(person_obj):
g.meetings = []
if g.schedules is not None:
- # noinspection PyUnresolvedReferences
- g.schedules = g.schedules.split(' | ')
- for i, s in enumerate(g.schedules):
- g.schedules[i] = {'next': s[0:19], 'type': s[20:]}
+ # noinspection PyTypeChecker
+ g.schedules = json.loads(g.schedules)
else:
g.schedules = []
From d269170d8be9ae01d9f374bed66371e95e13869a Mon Sep 17 00:00:00 2001
From: "James K."
Date: Wed, 3 Jan 2024 23:12:01 -0500
Subject: [PATCH 047/226] API updates for Events
---
src/python/WebApi.py | 124 +++++++++++++++++++++++++++++++------------
1 file changed, 89 insertions(+), 35 deletions(-)
diff --git a/src/python/WebApi.py b/src/python/WebApi.py
index 22aa0219..5652be52 100644
--- a/src/python/WebApi.py
+++ b/src/python/WebApi.py
@@ -187,11 +187,17 @@ def get_person_info_for_sync(person_obj):
Data.Title = "Saved Searches"
-if "InvsForDivs" in Data.a:
+if "Invs" in Data.a:
apiCalled = True
regex = re.compile('[^0-9,]')
divs = regex.sub('', Data.divs)
+ if (len(divs)) < 1:
+ divs = '0'
+
+ mtgHist = -int(Data.mtgHist) if Data.mtgHist != "" else 0
+ mtgFuture = int(Data.mtgFuture) if Data.mtgFuture != "" else 365
+ featMtgs = 1 if Data.featMtgs != "" else 2 # value is directly used in SQL comparison.
leadMemTypes = Data.leadMemTypes or ""
leadMemTypes = regex.sub('', leadMemTypes)
@@ -203,7 +209,7 @@ def get_person_info_for_sync(person_obj):
hostMemTypes = "NULL"
# noinspection SqlResolve,SqlUnusedCte,SqlRedundantOrderingDirection
- invSql = '''
+ invSql = ('''
WITH cteTargetOrgs as
(
SELECT
@@ -223,6 +229,9 @@ def get_person_info_for_sync(person_obj):
o.OrgPickList,
o.MainLeaderId,
o.ImageUrl,
+ o.BadgeUrl,
+ o.RegistrationMobileId,
+ o.ShowRegistrantsInMobile,
o.CampusId,
o.RegSettingXml.exist('/Settings/AskItems') AS hasRegQuestions,
FORMAT(o.RegStart, 'yyyy-MM-ddTHH:mm:ss') AS regStart,
@@ -230,13 +239,24 @@ def get_person_info_for_sync(person_obj):
FORMAT(o.FirstMeetingDate, 'yyyy-MM-ddTHH:mm:ss') AS firstMeeting,
FORMAT(o.LastMeetingDate, 'yyyy-MM-ddTHH:mm:ss') AS lastMeeting
FROM dbo.Organizations o
- WHERE o.OrganizationId = (
- SELECT MIN(OrgId) min
- FROM dbo.DivOrg do
- WHERE do.OrgId = o.OrganizationId
- AND do.DivId IN ({})
+ WHERE ( o.OrganizationId = (
+ SELECT MIN(OrgId) min
+ FROM dbo.DivOrg do
+ WHERE do.OrgId = o.OrganizationId
+ AND do.DivId IN ({0})
+ )
+ AND o.organizationStatusId = 30
+ )
+ OR ( o.ShowInSites = {2}
+ AND o.OrganizationId = (
+ SELECT MIN(m.OrganizationId) org
+ FROM Meetings m
+ WHERE m.OrganizationId = o.OrganizationId
+ AND m.MeetingDate > DATEADD(day, {3}, GETDATE())
+ AND m.MeetingDate < DATEADD(day, {4}, GETDATE())
+ GROUP BY m.OrganizationId
+ )
)
- AND o.organizationStatusId = 30
),
-- select all members for these organizations to avoid multiple scans of Organization members table
cteOrganizationMembers AS
@@ -263,21 +283,39 @@ def get_person_info_for_sync(person_obj):
(SELECT OrganizationId, STRING_AGG(ag, ',') WITHIN GROUP (ORDER BY ag ASC) AS PeopleAge
FROM (
SELECT omi.OrganizationId,
- (CASE
- WHEN pi.Age > 69 THEN '70+'
- ELSE CONVERT(VARCHAR(2), (FLOOR(pi.Age / 10.0) * 10), 70) + 's'
- END) as ag
+ (IIF(pi.Age > 69, '70+', CONVERT(VARCHAR(2), (FLOOR(pi.Age / 10.0) * 10), 70) + 's')) as ag
FROM cteOrganizationMembers omi
INNER JOIN dbo.People pi WITH(NOLOCK)
ON omi.PeopleId = pi.PeopleId
WHERE pi.Age > 19
GROUP BY omi.OrganizationId,
- (CASE
- WHEN pi.Age > 69 THEN '70+'
- ELSE CONVERT(VARCHAR(2), (FLOOR(pi.Age / 10.0) * 10), 70) + 's'
- END)
+ (IIF(pi.Age > 69, '70+', CONVERT(VARCHAR(2), (FLOOR(pi.Age / 10.0) * 10), 70) + 's'))
) AS ag_agg
GROUP BY ag_agg.OrganizationId
+ ), ''' + '''
+ -- pull aggregate meetings for all target organizations
+ cteMeeting AS
+ (
+ SELECT cto.OrganizationId,
+ (
+ SELECT om.MeetingId as mtgId,
+ FORMAT(om.meetingDate, 'yyyy-MM-ddTHH:mm:ss') as mtgStartDt,
+ null as mtgEndDt, -- TODO end time
+ om.Location as location,
+ om.Description as name,
+ 1 - om.DidNotMeet as status,
+ om.Capacity as capacity,
+ CAST(me.Data as INT) as parentMtgId
+ FROM dbo.Meetings om
+ INNER JOIN cteTargetOrgs o
+ ON om.OrganizationId = o.OrganizationId
+ LEFT JOIN dbo.MeetingExtra me
+ ON om.MeetingId = me.MeetingId AND 'ParentMeeting' = me.Field
+ WHERE om.MeetingDate > DATEADD(day, {3}, GETDATE())
+ AND om.OrganizationId = cto.OrganizationId
+ FOR JSON PATH, INCLUDE_NULL_VALUES
+ ) as OrgMeetings
+ FROM cteTargetOrgs cto
),
-- pull aggregate schedules for all target organizations
cteSchedule AS
@@ -288,7 +326,7 @@ def get_person_info_for_sync(person_obj):
INNER JOIN cteTargetOrgs o
ON os.OrganizationId = o.OrganizationId
WHERE cto.OrganizationId = os.OrganizationId
- FOR JSON PATH
+ FOR JSON PATH, INCLUDE_NULL_VALUES
) as OrgSchedule
FROM cteTargetOrgs cto),
-- pull aggregate divisions for all target organizations
@@ -320,7 +358,7 @@ def get_person_info_for_sync(person_obj):
(SELECT TOP 1 omh.PeopleId
FROM dbo.OrganizationMembers omh
WHERE o.OrganizationId = omh.OrganizationId
- AND omh.MemberTypeId IN ({})) = ph.PeopleId
+ AND omh.MemberTypeId IN ({1})) = ph.PeopleId
LEFT JOIN dbo.Families fh ON
ph.FamilyId = fh.FamilyId
LEFT JOIN dbo.AddressInfo paih ON
@@ -350,6 +388,9 @@ def get_person_info_for_sync(person_obj):
, o.[OrgPickList] AS [orgPickList]
, o.[MainLeaderId] AS [mainLeaderId]
, o.[ImageUrl] AS [imageUrl]
+ , o.[BadgeUrl] AS [badgeUrl]
+ , o.[RegistrationMobileId] AS [registrationMobileId]
+ , o.[ShowRegistrantsInMobile] AS [showRegistrantsInMobile]
, o.[hasRegQuestions] AS [hasRegQuestions]
, o.[regStart] AS [regStart]
, o.[regEnd] AS [regEnd]
@@ -373,7 +414,7 @@ def get_person_info_for_sync(person_obj):
ON o.OrganizationId = aa.OrganizationId
LEFT JOIN cteSchedule s
ON o.OrganizationId = s.OrganizationId
- LEFT JOIN cteMeetings m
+ LEFT JOIN cteMeeting m
ON o.OrganizationId = m.OrganizationId
LEFT JOIN cteDivision d
ON o.OrganizationId = d.OrganizationId
@@ -381,7 +422,7 @@ def get_person_info_for_sync(person_obj):
ON o.OrganizationId = ol.OrganizationId
LEFT JOIN lookup.Campus c
ON o.CampusId = c.Id
- ORDER BY o.parentInvId ASC, o.OrganizationId ASC'''.format(divs, hostMemTypes)
+ ORDER BY o.parentInvId ASC, o.OrganizationId ASC''').format(divs, hostMemTypes, featMtgs, mtgHist, mtgFuture)
groups = model.SqlListDynamicData(invSql)
@@ -393,10 +434,8 @@ def get_person_info_for_sync(person_obj):
g.divs = g.divs.split(',')
if g.meetings is not None:
- # noinspection PyUnresolvedReferences
- g.meetings = g.meetings.split(' | ')
- for i, s in enumerate(g.meetings):
- g.meetings[i] = {'dt': s[0:19], 'type': s[20:]}
+ # noinspection PyTypeChecker
+ g.meetings = json.loads(g.meetings)
else:
g.meetings = []
@@ -913,11 +952,13 @@ def get_person_info_for_sync(person_obj):
# Prep SQL for People Extra Values
pevSql = ''
- if inData.has_key('meta') and isinstance(inData['meta'], dict) and inData['meta'].has_key('pev') and len(inData['meta']['pev']) > 0:
+ if inData.has_key('meta') and isinstance(inData['meta'], dict) and inData['meta'].has_key('pev') and len(
+ inData['meta']['pev']) > 0:
pevSql = []
for pev in inData['meta']['pev']:
pevSql.append("([Field] = '{}' AND [Type] = '{}')".format(pev['field'], pev['type']))
- # noinspection SqlResolve
+
+ # noinspection SqlResolve,Annotator
pevSql = """SELECT Field, StrValue, DateValue, Data, IntValue, BitValue, [Type],
CONCAT('pev', SUBSTRING(CONVERT(NVARCHAR(18), HASHBYTES('MD2', CONCAT([Field], [Type])), 1), 3, 8)) Hash
FROM PeopleExtra
@@ -931,8 +972,9 @@ def get_person_info_for_sync(person_obj):
fevSql = []
for fev in inData['meta']['fev']:
fevSql.append("([Field] = '{}' AND [Type] = '{}')".format(fev['field'], fev['type']))
+
if len(fevSql) > 0:
- # noinspection SqlResolve
+ # noinspection SqlResolve,Annotator
fevSql = """SELECT Field, StrValue, DateValue, Data, IntValue, BitValue, [Type],
CONCAT('fev', SUBSTRING(CONVERT(NVARCHAR(18), HASHBYTES('MD2', CONCAT([Field], [Type])), 1), 3, 8)) Hash
FROM FamilyExtra
@@ -940,10 +982,22 @@ def get_person_info_for_sync(person_obj):
else:
fevSql = ''
- # noinspection SqlResolve
- invSql = "SELECT om.OrganizationId iid, CONCAT('mt', mt.Id) memType, CONCAT('at', at.Id) attType, om.UserData descr FROM OrganizationMembers om LEFT JOIN lookup.MemberType mt on om.MemberTypeId = mt.Id LEFT JOIN lookup.AttendType at ON mt.AttendanceTypeId = at.Id WHERE om.Pending = 0 AND mt.Inactive = 0 AND at.Guest = 0 AND om.PeopleId = {0} AND om.OrganizationId IN ({1})"
-
- # noinspection SqlResolve
+ # noinspection SqlResolve,Annotator
+ invSql = """SELECT om.OrganizationId iid,
+ CONCAT('mt', mt.Id) memType,
+ CONCAT('at', at.Id) attType,
+ om.UserData descr
+ FROM OrganizationMembers om
+ LEFT JOIN lookup.MemberType mt
+ ON om.MemberTypeId = mt.Id
+ LEFT JOIN lookup.AttendType at
+ ON mt.AttendanceTypeId = at.Id
+ WHERE om.Pending = 0
+ AND mt.Inactive = 0
+ AND at.Guest = 0
+ AND om.PeopleId = {0} AND om.OrganizationId IN ({1})"""
+
+ # noinspection SqlResolve,Annotator
famGeoSql = """SELECT geo.Longitude, geo.Latitude
FROM AddressInfo ai LEFT JOIN Geocodes geo ON ai.FullAddress = geo.Address WHERE ai.FamilyId = {}"""
@@ -1032,7 +1086,6 @@ def get_person_info_for_sync(person_obj):
Data.rules = rules # handy for debugging
Data.success = True
-
if "report_run" in Data.a and model.HttpMethod == "post":
apiCalled = True
@@ -1096,7 +1149,8 @@ def get_person_info_for_sync(person_obj):
model.Title = "Logging out..."
model.Header = "Logging out..."
model.Script = ""
- print("")
+ print(
+ "")
apiCalled = True
if ("login" in Data.a or Data.r != '') and model.HttpMethod == "get": # r parameter implies desired redir after login.
@@ -1214,8 +1268,8 @@ def get_person_info_for_sync(person_obj):
model.Title = "Error"
model.Header = "Something went wrong."
- print("Please email the following error message to " + model.Setting("AdminMail",
- "the church staff") + " .
")
+ print("Please email the following error message to " +
+ model.Setting("AdminMail", "the church staff") + " .
")
print(response)
print_exception()
print(" ")
From 40ec8177517c5f6584b17d414845f98654ec38de Mon Sep 17 00:00:00 2001
From: "James K."
Date: Wed, 3 Jan 2024 23:17:54 -0500
Subject: [PATCH 048/226] typo
---
src/TouchPoint-WP/Partner.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/Partner.php b/src/TouchPoint-WP/Partner.php
index e3239b59..e0c72262 100644
--- a/src/TouchPoint-WP/Partner.php
+++ b/src/TouchPoint-WP/Partner.php
@@ -390,7 +390,7 @@ public static function updateFromTouchPoint(bool $verbose = false)
// Excerpt / Summary
$post->post_excerpt = self::getFamEvAsContent($summaryEv, $f, null);
- // Partner Category This can't be moved to Taxonomy class because values aren't know.n.
+ // Partner Category This can't be moved to Taxonomy class because values aren't known.
if ($categoryEv !== '') {
$category = $f->familyEV->$categoryEv->value ?? null;
// Insert Term if new
From e8c0e0c6347a08a93a8897d9b6bae438159c9dcb Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 4 Jan 2024 08:39:02 -0500
Subject: [PATCH 049/226] API updates. Settings for Events.
---
src/TouchPoint-WP/Involvement.php | 27 ++++++----
.../Involvement_PostTypeSettings.php | 2 +
src/TouchPoint-WP/TouchPointWP_Settings.php | 6 +--
src/templates/admin/invKoForm.php | 10 ++++
src/templates/meeting-archive.php | 51 +++++++++++++++++++
5 files changed, 84 insertions(+), 12 deletions(-)
create mode 100644 src/templates/meeting-archive.php
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index 6b125d41..d58dc941 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -560,7 +560,7 @@ public function nextMeeting(): ?DateTimeImmutable
if ($this->_nextMeeting === null) {
// meetings
foreach ($this->meetings() as $m) {
- $mdt = $m->dt;
+ $mdt = $m->mtgStartDt;
if ($mdt > $now) {
if ($this->_nextMeeting === null || $mdt < $this->_nextMeeting) {
$this->_nextMeeting = $mdt;
@@ -622,7 +622,7 @@ private static function computeCommonOccurrences(array $meetings = [], array $sc
continue;
}
- $dt = $m->dt;
+ $dt = $m->mtgStartDt;
if ($dt < $now) {
continue;
@@ -2085,11 +2085,12 @@ final protected static function updateInvolvementPostsForType(Involvement_PostTy
}
try {
- $response = TouchPointWP::instance()->apiGet(
- "InvsForDivs",
- array_merge($qOpts, ['divs' => $divs]),
- 180
- );
+ $qOpts['divs'] = $divs;
+ if ($typeSets->importMeetings) {
+ $qOpts['mtgHist'] = TouchPointWP::instance()->settings->mc_archive_days;
+ $qOpts['mtgFuture'] = TouchPointWP::instance()->settings->mc_future_days;
+ }
+ $response = TouchPointWP::instance()->apiGet("Invs", $qOpts, 180);
} catch (TouchPointWP_Exception $e) {
return false;
}
@@ -2108,6 +2109,9 @@ final protected static function updateInvolvementPostsForType(Involvement_PostTy
$now = new DateTimeImmutable(null, $siteTz);
$aYear = new DateInterval('P1Y');
$nowPlus1Y = $now->add($aYear);
+ $histDays = TouchPointWP::instance()->settings->mc_hist_days;
+ $histVal = new DateInterval("P{$histDays}D");
+ $nowMinusH = $now->sub($histVal);
unset($aYear);
} catch (Exception $e) {
return false;
@@ -2151,7 +2155,9 @@ final protected static function updateInvolvementPostsForType(Involvement_PostTy
}
foreach ($inv->meetings as $i => $m) {
try {
- $m->dt = new DateTimeImmutable($m->dt, $siteTz);
+ $m->mtgStartDt = new DateTimeImmutable($m->mtgStartDt, $siteTz);
+ $m->mtgEndDt = ($m->mtgEndDt == null ? null :
+ new DateTimeImmutable($m->mtgEndDt, $siteTz));
} catch (Exception $e) {
unset($inv->meetings[$i]);
}
@@ -2183,7 +2189,10 @@ final protected static function updateInvolvementPostsForType(Involvement_PostTy
// 'continue' causes involvement to be deleted (or not created).
// Filter by end dates to stay relevant
- if ($inv->lastMeeting !== null && $inv->lastMeeting < $now) { // last meeting already happened.
+ if ($inv->lastMeeting !== null && (
+ (!$typeSets->importMeetings && $inv->lastMeeting < $now) ||
+ ($typeSets->importMeetings && $inv->lastMeeting < $nowMinusH))
+ ) { // last meeting was long enough ago to no longer be relevant.
if ($verbose) {
echo "Stopping processing because all meetings are in the past. Involvement will be deleted from WordPress.
";
}
diff --git a/src/TouchPoint-WP/Involvement_PostTypeSettings.php b/src/TouchPoint-WP/Involvement_PostTypeSettings.php
index 57dd8cfc..aa7c63d5 100644
--- a/src/TouchPoint-WP/Involvement_PostTypeSettings.php
+++ b/src/TouchPoint-WP/Involvement_PostTypeSettings.php
@@ -22,6 +22,7 @@
* @property-read bool $useImages
* @property-read bool $useGeo
* @property-read bool $hierarchical
+ * @property-read bool $importMeetings
* @property-read string $groupBy
* @property-read string[] $excludeIf
* @property-read string[] $leaderTypes
@@ -45,6 +46,7 @@ class Involvement_PostTypeSettings
protected bool $useImages = false;
protected bool $useGeo = false;
protected bool $hierarchical = false;
+ protected bool $importMeetings = false;
protected string $groupBy = "";
protected array $excludeIf = [];
protected array $leaderTypes = [];
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 16ccd7be..cffa8560 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -69,9 +69,9 @@
* @property-read string ec_use_standardizing_style Whether to insert the standardizing stylesheet into mobile app requests.
*
* @property-read string mc_slug Slug for meetings in the meeting calendar (e.g. "events" for church.org/events)
- * @property-read string mc_future_days Number of days into the future to import.
- * @property-read string mc_archive_days Number of days to wait to move something to history.
- * @property-read string mc_hist_days Number of days of history to keep.
+ * @property-read int mc_future_days Number of days into the future to import.
+ * @property-read int mc_archive_days Number of days to wait to move something to history.
+ * @property-read int mc_hist_days Number of days of history to keep.
* @property-read string mc_deletion_method Determines how meetings should be handled in WordPress if they're deleted in TouchPoint
*
* @property-read string rc_name_plural What resident codes should be called, plural (e.g. "Resident Codes" or "Zones")
diff --git a/src/templates/admin/invKoForm.php b/src/templates/admin/invKoForm.php
index a4fc25c1..759c1979 100644
--- a/src/templates/admin/invKoForm.php
+++ b/src/templates/admin/invKoForm.php
@@ -72,6 +72,15 @@
+ enable_meeting_cal === "on") { ?>
+
+
+
+
+
+
+
+
@@ -242,6 +251,7 @@ function InvType(data) {
this.useImages = ko.observable(data.useImages ?? true);
this.excludeIf = ko.observable(data.excludeIf ?? []);
this.hierarchical = ko.observable(data.hierarchical ?? false);
+ this.importMeetings = ko.observable(data.importMeetings ?? false);
this.groupBy = ko.observable(data.groupBy ?? "");
this.leaderTypes = ko.observableArray(data.leaderTypes ?? []);
this.hostTypes = ko.observableArray(data.hostTypes ?? []);
diff --git a/src/templates/meeting-archive.php b/src/templates/meeting-archive.php
new file mode 100644
index 00000000..71721111
--- /dev/null
+++ b/src/templates/meeting-archive.php
@@ -0,0 +1,51 @@
+name : false;
+
+get_header($postType);
+
+$description = get_the_archive_description();
+
+if (have_posts()) {
+ global $wp_query;
+
+ TouchPointWP::enqueuePartialsStyle();
+ ?>
+
+
+ tax_query->queries = $taxQuery;
+ $wp_query->query_vars['tax_query'] = $taxQuery;
+ $wp_query->is_tax = false; // prevents templates from thinking this is a taxonomy archive
+} else {
+ $loadedPart = get_template_part('list-none', 'meeting-list-none');
+ if ($loadedPart === false) {
+ require TouchPointWP::$dir . "/src/templates/parts/meeting-list-none.php";
+ }
+}
+
+get_footer();
\ No newline at end of file
From c11f0bdc2949c161b6342a7010eb089416e1b803 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 4 Jan 2024 08:39:24 -0500
Subject: [PATCH 050/226] Resolve an issue when user isn't logged in.
---
src/TouchPoint-WP/TouchPointWP.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index d9631480..c72eb492 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -500,6 +500,10 @@ public static function currentUserIsAdmin(): bool
return false;
}
+ if ( ! function_exists('wp_get_current_user')) {
+ return false;
+ }
+
return current_user_can('manage_options');
}
From 964d9873d1da4b360c1bd5dc39408ecf7b0413ad Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 4 Jan 2024 23:10:00 -0500
Subject: [PATCH 051/226] Fix #162, I think?
---
src/TouchPoint-WP/Involvement.php | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index d58dc941..eee47660 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -664,11 +664,14 @@ protected function scheduleString_calc(): ?string
$timeStr = substr($k, 2);
if ( ! in_array($timeStr, $uniqueTimeStrings, true)) {
$uniqueTimeStrings[] = $timeStr;
+ }
- $weekday = "d" . $k[0];
- if ( ! isset($days[$weekday])) {
- $days[$weekday] = [];
- }
+ $weekday = "d" . $k[0];
+ if ( ! isset($days[$weekday])) {
+ $days[$weekday] = [];
+ }
+
+ if ( ! in_array($co['example'], $days[$weekday], true)) {
$days[$weekday][] = $co['example'];
}
}
From 8a2e809d42d38caa01a42f8fb19f35297cfb8292 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 4 Jan 2024 23:30:48 -0500
Subject: [PATCH 052/226] Resolve an issue where filters don't work if the map
failed to load.
---
assets/js/base-defer.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/assets/js/base-defer.js b/assets/js/base-defer.js
index f33625f2..72b7b7ba 100644
--- a/assets/js/base-defer.js
+++ b/assets/js/base-defer.js
@@ -354,7 +354,11 @@ class TP_MapMarker
}
get inBounds() {
- return this.gMkr.getMap().getBounds().contains(this.gMkr.getPosition());
+ let map = this.gMkr.getMap();
+ if (!map) { // if map failed to render for some reason, this prevents entries from being hidden.
+ return true;
+ }
+ return map.getBounds().contains(this.gMkr.getPosition());
}
get useIcon() {
From 5ad2f0180bd60872288275a6158eecdc0cadbd76 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Fri, 5 Jan 2024 09:45:23 -0500
Subject: [PATCH 053/226] Moving meta key; php 8 syntax
---
src/TouchPoint-WP/Involvement.php | 14 ++++++--------
src/TouchPoint-WP/Partner.php | 3 ++-
src/TouchPoint-WP/Person.php | 2 +-
src/TouchPoint-WP/TouchPointWP.php | 7 ++++---
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index eee47660..7c5e3c50 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -86,8 +86,6 @@ class Involvement implements api, updatesViaCron, hasGeo, module
public string $post_excerpt;
protected WP_Post $post;
- public const INVOLVEMENT_META_KEY = TouchPointWP::SETTINGS_PREFIX . "invId";
-
public object $attributes;
protected array $divisions;
@@ -107,7 +105,7 @@ protected function __construct(object $object)
// WP_Post Object
$this->post = $object;
$this->name = $object->post_title;
- $this->invId = intval($object->{self::INVOLVEMENT_META_KEY});
+ $this->invId = intval($object->{TouchPointWP::INVOLVEMENT_META_KEY});
$this->post_id = $object->ID;
$this->invType = get_post_type($this->post_id);
@@ -1136,7 +1134,7 @@ private static function getWpPostByInvolvementId($postType, $involvementId)
$q = new WP_Query([
'post_type' => $postType,
- 'meta_key' => self::INVOLVEMENT_META_KEY,
+ 'meta_key' => TouchPointWP::INVOLVEMENT_META_KEY,
'meta_value' => $involvementId,
'numberposts' => 2
// only need one, but if there's two, there should be an error condition.
@@ -1551,7 +1549,7 @@ protected static final function filterDropdownHtml(array $params, Involvement_Po
*/
public static function fromPost(WP_Post $post): Involvement
{
- $iid = intval($post->{self::INVOLVEMENT_META_KEY});
+ $iid = intval($post->{TouchPointWP::INVOLVEMENT_META_KEY});
if ( ! isset(self::$_instances[$iid])) {
self::$_instances[$iid] = new Involvement($post);
@@ -2270,7 +2268,7 @@ final protected static function updateInvolvementPostsForType(Involvement_PostTy
'post_type' => $typeSets->postType,
'post_name' => $titleToUse,
'meta_input' => [
- self::INVOLVEMENT_META_KEY => $inv->involvementId
+ TouchPointWP::INVOLVEMENT_META_KEY => $inv->involvementId
]
]
);
@@ -2288,7 +2286,7 @@ final protected static function updateInvolvementPostsForType(Involvement_PostTy
}
/** @var $post WP_Post */
- if ($inv->description == null || trim($inv->description) == "") {
+ if ($inv->description == null || trim($inv->description) === "") {
$post->post_content = null;
} else {
$post->post_content = Utilities::standardizeHtml($inv->description, "involvement-import");
@@ -2585,7 +2583,7 @@ public static function filterPublishDate($theDate, $format, $post = null): strin
$post = get_post($post);
}
- $theDate = self::scheduleString(intval($post->{self::INVOLVEMENT_META_KEY})) ?? "";
+ $theDate = self::scheduleString(intval($post->{TouchPointWP::INVOLVEMENT_META_KEY})) ?? "";
}
return $theDate;
diff --git a/src/TouchPoint-WP/Partner.php b/src/TouchPoint-WP/Partner.php
index e0c72262..bf933d01 100644
--- a/src/TouchPoint-WP/Partner.php
+++ b/src/TouchPoint-WP/Partner.php
@@ -18,6 +18,7 @@
use Exception;
use JsonSerializable;
+use stdClass;
use WP_Error;
use WP_Post;
use WP_Query;
@@ -81,7 +82,7 @@ class Partner implements api, JsonSerializable, updatesViaCron, hasGeo, module
*/
protected function __construct(object $object)
{
- $this->attributes = (object)[];
+ $this->attributes = new stdClass();
if (gettype($object) === "object" && get_class($object) == WP_Post::class) {
// WP_Post Object
diff --git a/src/TouchPoint-WP/Person.php b/src/TouchPoint-WP/Person.php
index c6f9aa57..eecd2e44 100644
--- a/src/TouchPoint-WP/Person.php
+++ b/src/TouchPoint-WP/Person.php
@@ -707,7 +707,7 @@ protected static function updateFromTouchPoint(bool $verbose = false)
// Get the InvIds for the Involvement Type's Posts
$postType = $type->postTypeWithPrefix();
- $key = Involvement::INVOLVEMENT_META_KEY;
+ $key = TouchPointWP::INVOLVEMENT_META_KEY;
global $wpdb;
/** @noinspection SqlResolve */
$sql = "SELECT pm.meta_value AS iid
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index c72eb492..b551dfee 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -91,6 +91,10 @@ class TouchPointWP
public const CACHE_NONE = 20;
private static int $cacheLevel = self::CACHE_PUBLIC;
+
+ public const INVOLVEMENT_META_KEY = TouchPointWP::SETTINGS_PREFIX . "invId";
+
+
/**
* @var string Used for imploding arrays together in human-friendly formats.
*/
@@ -673,9 +677,6 @@ public static function load($file): TouchPointWP
// Load Involvements tool if enabled.
if ($instance->settings->enable_involvements === "on") {
- if ( ! TOUCHPOINT_COMPOSER_ENABLED) {
- require_once 'Involvement.php';
- }
$instance->involvements = Involvement::load();
}
From 95cb7859ddd1ee7cb4f7a3d21d53bec582b439e5 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Sat, 6 Jan 2024 19:24:35 -0500
Subject: [PATCH 054/226] Month calendar grid function
---
src/TouchPoint-WP/Meeting.php | 79 +++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
diff --git a/src/TouchPoint-WP/Meeting.php b/src/TouchPoint-WP/Meeting.php
index 5810a997..f8e77db2 100644
--- a/src/TouchPoint-WP/Meeting.php
+++ b/src/TouchPoint-WP/Meeting.php
@@ -66,6 +66,85 @@ public static function api(array $uri): bool
return false;
}
+ /**
+ * Print a calendar grid for a given month and year.
+ *
+ * @param WP_Query $q
+ * @param int|null $month
+ * @param int|null $year
+ *
+ * @return void
+ */
+ public static function printCalendarGrid(WP_Query $q, int $month = null, int $year = null)
+ {
+ try {
+ // Validate month & year; create $d as a day within the month
+ $tz = wp_timezone();
+ if ($month < 1 || $month > 12 || $year < 2020 || $year > 2100) {
+ $d = new DateTime('now', $tz);
+ $d = new DateTime($d->format('Y-m-01'), $tz);
+ } else {
+ $d = new DateTime("$year-$month-01", $tz);
+ }
+ } catch (Exception $e) {
+ echo "";
+ return;
+ }
+
+ // Get the day of the week for the first day of the month (0 = Sunday, 1 = Monday, ..., 6 = Saturday)
+ $offsetDays = intval($d->format('w')); // w: Numeric representation of the day of the week
+ $d->modify("-$offsetDays days");
+
+ // Create a table to display the calendar
+ echo ''; // TODO 1i18n
+ echo 'Sun Mon Tue Wed Thu Fri Sat ';
+
+ $isMonthBefore = ($offsetDays !== 0);
+ $isMonthAfter = false;
+ $aDay = new DateInterval("P1D");
+
+ // Loop through the days of the month
+ do {
+ $cellClass = "";
+ if ($isMonthBefore) {
+ $cellClass = "before";
+ } elseif ($isMonthAfter) {
+ $cellClass = "after";
+ }
+
+ $day = $d->format("j");
+ $wd = $d->format("w");
+
+ if ($wd === '0') {
+ echo "";
+ }
+
+ // Print the cell
+ echo "";
+ echo "$day ";
+ // TODO print items
+ echo " ";
+
+ if ($wd === '6') {
+ echo " ";
+ }
+
+ // Increment days
+ $mo1 = $d->format('n');
+ $d->add($aDay);
+ $mo2 = $d->format('n');
+
+ if ($mo1 !== $mo2) {
+ if ($isMonthBefore) {
+ $isMonthBefore = false;
+ } else {
+ $isMonthAfter = true;
+ }
+ }
+ } while (!$isMonthAfter || $d->format('w') !== '0');
+ echo '
';
+ }
+
/**
* @param $opts
*
From cd0920536033a9cc0673029c2cec9522cc9ed119 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Wed, 17 Jan 2024 14:50:38 -0500
Subject: [PATCH 055/226] Moving function related to translation to a separate
class.
---
src/TouchPoint-WP/Utilities/Translation.php | 52 +++++++++++++++++++++
1 file changed, 52 insertions(+)
create mode 100644 src/TouchPoint-WP/Utilities/Translation.php
diff --git a/src/TouchPoint-WP/Utilities/Translation.php b/src/TouchPoint-WP/Utilities/Translation.php
new file mode 100644
index 00000000..6447b5ae
--- /dev/null
+++ b/src/TouchPoint-WP/Utilities/Translation.php
@@ -0,0 +1,52 @@
+settings->camp_name_singular;
+ return strtolower($cName) == "language";
+ }
+
+ /**
+ * Take a string and return the language code that it matches. Null if no match or WPML isn't enabled.
+ *
+ * @param string $string
+ *
+ * @return string|null
+ */
+ public static function getWpmlLangCodeForString(string $string): ?string
+ {
+ if (!defined("ICL_LANGUAGE_CODE")) {
+ return null;
+ }
+
+ global $wpdb;
+
+ $lang_code_query = "
+ SELECT language_code
+ FROM {$wpdb->prefix}icl_languages_translations
+ WHERE name = %s OR language_code = %s
+ ";
+
+ return $wpdb->get_var($wpdb->prepare($lang_code_query, $string, $string));
+ }
+}
\ No newline at end of file
From 1e25defcac623d62992eba774fdbf5fc9af8b849 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Wed, 17 Jan 2024 14:51:46 -0500
Subject: [PATCH 056/226] Adding a function for now+1y because that's common
enough.
---
src/TouchPoint-WP/Utilities.php | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/TouchPoint-WP/Utilities.php b/src/TouchPoint-WP/Utilities.php
index 8853c6cf..fa965942 100644
--- a/src/TouchPoint-WP/Utilities.php
+++ b/src/TouchPoint-WP/Utilities.php
@@ -5,6 +5,7 @@
namespace tp\TouchPointWP;
+use DateInterval;
use DateTimeImmutable;
use DateTimeInterface;
use Exception;
@@ -54,7 +55,21 @@ public static function dateTimeNow(): DateTimeImmutable
return self::$_dateTimeNow;
}
+ /**
+ * @return DateTimeImmutable
+ */
+ public static function dateTimeNowPlus1Y(): DateTimeImmutable
+ {
+ if (self::$_dateTimeNowPlus1Y === null) {
+ $aYear = new DateInterval('P1Y');
+ self::$_dateTimeNowPlus1Y = self::dateTimeNow()->add($aYear);
+ }
+
+ return self::$_dateTimeNowPlus1Y;
+ }
+
private static ?DateTimeImmutable $_dateTimeNow = null;
+ private static ?DateTimeImmutable $_dateTimeNowPlus1Y = null;
/**
* Gets the plural form of a weekday name.
@@ -391,10 +406,10 @@ public static function getAllHeaders(): array
* @param string|null $newUrl
* @param string $title
*
- * @return void
+ * @return int|string The attachmentId for the image. Can be reused for other posts.
* @since 0.0.24
*/
- public static function updatePostImageFromUrl(int $postId, ?string $newUrl, string $title): void
+ public static function updatePostImageFromUrl(int $postId, ?string $newUrl, string $title)
{
// Required for image handling
require_once(ABSPATH . 'wp-admin/includes/media.php');
@@ -434,7 +449,13 @@ public static function updatePostImageFromUrl(int $postId, ?string $newUrl, stri
} catch (Exception $e) {
echo "Exception occurred: " . $e->getMessage();
wp_delete_attachment($attId, true);
+ return 0;
+ }
+ if (is_wp_error($attId)) {
+ echo "Exception occurred: " . $attId->get_error_message();
+ return 0;
}
+ return $attId;
}
/**
From e6bd5e30761c8ce1a12e07bd2898c5ed8021ebe4 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Mon, 22 Jan 2024 15:00:41 -0500
Subject: [PATCH 057/226] Allowing standardizeHtml to take a null input
(converting it to a blank)
---
src/TouchPoint-WP/Utilities.php | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/TouchPoint-WP/Utilities.php b/src/TouchPoint-WP/Utilities.php
index fa965942..3f42ed54 100644
--- a/src/TouchPoint-WP/Utilities.php
+++ b/src/TouchPoint-WP/Utilities.php
@@ -508,13 +508,17 @@ public static function standardizeHTags(int $maxAllowed, string $input): string
}
/**
- * @param string $html The HTML to be standardized.
+ * @param ?string $html The HTML to be standardized.
* @param ?string $context A context string to pass to hooks.
*
* @return string
*/
- public static function standardizeHtml(string $html, ?string $context = null): string
+ public static function standardizeHtml(?string $html, ?string $context = null): string
{
+ if ($html === null) {
+ $html = "";
+ }
+
// The tp_standardize_html filter would completely replace the pre-defined process.
$o = apply_filters(TouchPointWP::HOOK_PREFIX . 'standardize_html', $html, $context);
if ($o !== $html) {
From c633e5c4927549be57baa2806f2dd84d0b98c85e Mon Sep 17 00:00:00 2001
From: "James K."
Date: Mon, 22 Jan 2024 21:43:04 -0500
Subject: [PATCH 058/226] standards compliance for php 8
---
src/TouchPoint-WP/Report.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/TouchPoint-WP/Report.php b/src/TouchPoint-WP/Report.php
index 29f98c80..7312ecfb 100644
--- a/src/TouchPoint-WP/Report.php
+++ b/src/TouchPoint-WP/Report.php
@@ -352,7 +352,7 @@ public function getPost(bool $create = false): ?WP_Post
new TouchPointWP_Exception("Multiple Posts Exist", 170006);
}
if ($counts > 0) { // post exists already.
- $this->post = $reportPosts[0];
+ $this->post = reset($reportPosts);
} elseif ($create) {
$postId = wp_insert_post([
'post_type' => self::POST_TYPE,
@@ -602,9 +602,9 @@ public static function updateCron(): void
/**
* Handle which data should be converted to JSON. Used for posting to the API.
*
- * @return mixed data which can be serialized by json_encode
+ * @return array data which can be serialized by json_encode
*/
- public function jsonSerialize()
+ public function jsonSerialize(): array
{
return [
'name' => $this->name,
From d39d06edd84a0806a3a2937759393aaf2b53a91c Mon Sep 17 00:00:00 2001
From: "James K."
Date: Wed, 7 Feb 2024 11:12:31 -0500
Subject: [PATCH 059/226] Rename phpdoc.xml. Closes #167.
---
phpdoc.xml => phpdoc.dist.xml | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename phpdoc.xml => phpdoc.dist.xml (100%)
diff --git a/phpdoc.xml b/phpdoc.dist.xml
similarity index 100%
rename from phpdoc.xml
rename to phpdoc.dist.xml
From 7c22bd3ce9d504212618e843caddadc854255494 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Sat, 10 Feb 2024 18:14:17 -0500
Subject: [PATCH 060/226] php min to 8.0. V back to 0.0.90. Related changes.
---
.idea/php.xml | 2 +-
composer.json | 4 +-
package.json | 2 +-
src/TouchPoint-WP/EventsCalendar.php | 2 +-
src/TouchPoint-WP/Involvement.php | 45 ++--
.../Involvement_PostTypeSettings.php | 32 ++-
src/TouchPoint-WP/TouchPointWP.php | 54 ++--
src/TouchPoint-WP/TouchPointWP_AdminAPI.php | 7 +-
src/TouchPoint-WP/TouchPointWP_Settings.php | 230 ++++++++++--------
src/TouchPoint-WP/Utilities.php | 65 +++--
src/python/WebApi.py | 2 +-
touchpoint-wp.php | 2 +-
12 files changed, 268 insertions(+), 179 deletions(-)
diff --git a/.idea/php.xml b/.idea/php.xml
index 299cb8ee..a20c6b90 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/composer.json b/composer.json
index ebee13e1..8a9d67f0 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"description": "A WordPress Plugin for integrating with TouchPoint Church Management Software.",
"license": "AGPL-3.0-or-later",
"type": "wordpress-plugin",
- "version": "1.0.0",
+ "version": "0.0.90",
"keywords": [
"wordpress",
"wp",
@@ -27,7 +27,7 @@
}
},
"require": {
- "php": ">=7.4.0",
+ "php": ">=8.0",
"composer/installers": "~1.0",
"ext-json": "*",
"ext-zip": "*"
diff --git a/package.json b/package.json
index 0e882e0a..4e5933cd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "touchpoint-wp",
- "version": "1.0.0",
+ "version": "0.0.90",
"description": "A WordPress Plugin for integrating with TouchPoint Church Management Software.",
"directories": {
"doc": "docs"
diff --git a/src/TouchPoint-WP/EventsCalendar.php b/src/TouchPoint-WP/EventsCalendar.php
index 5ee9728d..a6bf27d5 100644
--- a/src/TouchPoint-WP/EventsCalendar.php
+++ b/src/TouchPoint-WP/EventsCalendar.php
@@ -19,7 +19,7 @@
* Provides an interface to bridge the gap between The Events Calendar plugin (by ModernTribe) and the TouchPoint
* mobile app.
*
- * @deprecated since 1.0.0
+ * @deprecated since 0.0.90
*/
abstract class EventsCalendar implements api, module
{
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index 7c5e3c50..77cf67b1 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -25,7 +25,7 @@
use tp\TouchPointWP\Utilities\Http;
use tp\TouchPointWP\Utilities\PersonArray;
use tp\TouchPointWP\Utilities\PersonQuery;
-use WP_Error;
+use tp\TouchPointWP\Utilities\Translation;
use WP_Post;
use WP_Query;
use WP_Term;
@@ -140,7 +140,7 @@ protected function __construct(object $object)
}
// clean up involvement type to not have hook prefix, if it does.
- if (strpos($this->invType, TouchPointWP::HOOK_PREFIX) === 0) {
+ if (str_starts_with($this->invType, TouchPointWP::HOOK_PREFIX)) {
$this->invType = substr($this->invType, strlen(TouchPointWP::HOOK_PREFIX));
}
@@ -171,7 +171,7 @@ protected function __construct(object $object)
'slug' => $t->slug
];
$ta = $t->taxonomy;
- if (strpos($ta, TouchPointWP::HOOK_PREFIX) === 0) {
+ if (str_starts_with($ta, TouchPointWP::HOOK_PREFIX)) {
$ta = substr_replace($ta, "", 0, $hookLength);
}
if ( ! isset($this->attributes->$ta)) {
@@ -252,8 +252,6 @@ final protected static function &allTypeSettings(): array
public static function init(): void
{
foreach (self::allTypeSettings() as $type) {
- /** @var $type Involvement_PostTypeSettings */
-
register_post_type(
$type->postType,
[
@@ -330,9 +328,9 @@ public static function checkUpdates(): void
*
* @param bool $verbose Whether to print debugging info.
*
- * @return false|int False on failure, or the number of groups that were updated or deleted.
+ * @return int False on failure, or the number of groups that were updated or deleted.
*/
- public static function updateFromTouchPoint(bool $verbose = false)
+ public final static function updateFromTouchPoint(bool $verbose = false): int
{
$count = 0;
$success = true;
@@ -432,7 +430,7 @@ public static function templateFilter(string $template): string
* @return bool|string True if involvement can be joined. False if no registration exists. Or, a string with why
* it can't be joined otherwise.
*/
- public function acceptingNewMembers()
+ public function acceptingNewMembers(): bool|string
{
if (get_post_meta($this->post_id, TouchPointWP::SETTINGS_PREFIX . "groupFull", true) === '1') {
return __("Currently Full", 'TouchPoint-WP');
@@ -442,7 +440,7 @@ public function acceptingNewMembers()
return __("Currently Closed", 'TouchPoint-WP');
}
- $now = current_datetime();
+ $now = Utilities::dateTimeNow();
$regStart = get_post_meta($this->post_id, TouchPointWP::SETTINGS_PREFIX . "regStart", true);
if ($regStart !== false && $regStart !== '' && $regStart > $now) {
return __("Registration Not Open Yet", 'TouchPoint-WP');
@@ -517,7 +515,7 @@ protected function schedules(): array
* @param int $invId
* @param ?Involvement $inv
*
- * @return string
+ * @return ?string
*/
public static function scheduleString(int $invId, $inv = null): ?string
{
@@ -529,7 +527,7 @@ public static function scheduleString(int $invId, $inv = null): ?string
if (! $inv) {
try {
$inv = self::fromInvId($invId);
- } catch (TouchPointWP_Exception $e) {
+ } catch (TouchPointWP_Exception) {
return null;
}
}
@@ -542,7 +540,7 @@ public static function scheduleString(int $invId, $inv = null): ?string
self::SCHEDULE_STRING_CACHE_EXPIRATION
);
}
- return $inv->_scheduleString;
+ return $inv->_scheduleString === "" ? null : $inv->_scheduleString;
}
/**
@@ -646,11 +644,11 @@ private static function computeCommonOccurrences(array $meetings = [], array $sc
*
* @return string
*/
- protected function scheduleString_calc(): ?string
+ protected function scheduleString_calc(): string
{
$commonOccurrences = self::computeCommonOccurrences($this->meetings(), $this->schedules());
- $dayStr = null;
+ $dayStr = "";
$timeFormat = get_option('time_format');
$dateFormat = get_option('date_format');
@@ -884,7 +882,7 @@ public static function actionsShortcode($params = [], string $content = ""): str
try {
$inv = self::fromPost($post);
$iid = $inv->invId;
- } catch (TouchPointWP_Exception $e) {
+ } catch (TouchPointWP_Exception) {
$iid = null;
}
}
@@ -1543,14 +1541,18 @@ protected static final function filterDropdownHtml(array $params, Involvement_Po
*
* @param WP_Post $post
*
- * @return Involvement
+ * @return ?Involvement
*
* @throws TouchPointWP_Exception If the involvement can't be created from the post, an exception is thrown.
*/
- public static function fromPost(WP_Post $post): Involvement
+ public static function fromPost(WP_Post $post): ?Involvement
{
$iid = intval($post->{TouchPointWP::INVOLVEMENT_META_KEY});
+ if ($iid === 0) {
+ return null;
+ }
+
if ( ! isset(self::$_instances[$iid])) {
self::$_instances[$iid] = new Involvement($post);
}
@@ -1584,6 +1586,7 @@ public static function api(array $uri): bool
case "nearby":
TouchPointWP::doCacheHeaders(TouchPointWP::CACHE_PRIVATE);
self::ajaxNearby();
+ /** @noinspection PhpUnreachableStatementInspection */
exit;
case "force-sync":
@@ -1872,7 +1875,7 @@ public static function updateCron(): void
{
try {
self::updateFromTouchPoint();
- } catch (Exception $ex) {
+ } catch (Exception) {
}
}
@@ -1955,7 +1958,7 @@ public static function sortPosts(WP_Post $a, WP_Post $b): int
$b = self::fromPost($b);
return self::sort($a, $b);
- } catch (TouchPointWP_Exception $ex) {
+ } catch (TouchPointWP_Exception) {
return $a <=> $b;
}
}
@@ -2114,7 +2117,7 @@ final protected static function updateInvolvementPostsForType(Involvement_PostTy
$histVal = new DateInterval("P{$histDays}D");
$nowMinusH = $now->sub($histVal);
unset($aYear);
- } catch (Exception $e) {
+ } catch (Exception) {
return false;
}
@@ -2610,7 +2613,7 @@ public static function filterAuthor($author): string
$i = Involvement::fromPost($post);
$author = $i->leaders()->__toString();
- } catch (TouchPointWP_Exception $e) {
+ } catch (TouchPointWP_Exception) {
}
}
diff --git a/src/TouchPoint-WP/Involvement_PostTypeSettings.php b/src/TouchPoint-WP/Involvement_PostTypeSettings.php
index aa7c63d5..ae8bcb17 100644
--- a/src/TouchPoint-WP/Involvement_PostTypeSettings.php
+++ b/src/TouchPoint-WP/Involvement_PostTypeSettings.php
@@ -94,6 +94,25 @@ public function __construct(object $o)
}
}
+ /**
+ * Get a list of all division IDs that are being imported by all types.
+ *
+ * @return int[]
+ */
+ public static function getAllDivs(): array
+ {
+ $r = [];
+ foreach (self::instance() as $s) {
+ $r = [...$r, ...$s->importDivs];
+ }
+ return array_unique($r);
+ }
+
+ /**
+ * Get the Post Type for use with WordPress functions
+ *
+ * @return string
+ */
public function postTypeWithPrefix(): string
{
self::instance();
@@ -101,6 +120,11 @@ public function postTypeWithPrefix(): string
return TouchPointWP::HOOK_PREFIX . $this->postType;
}
+ /**
+ * Get the Post Type without the hook prefix.
+ *
+ * @return string
+ */
public function postTypeWithoutPrefix(): string
{
self::instance();
@@ -216,7 +240,7 @@ public static function validateNewSettings(string $new): string
$name = preg_replace('/\W+/', '-', strtolower($type->namePlural));
try {
$type->slug = $name . ($first ? "" : "-" . bin2hex(random_bytes(1)));
- } catch (Exception $e) {
+ } catch (Exception) {
$type->slug = $name . ($first ? "" : "-" . bin2hex($count++));
}
$first = false;
@@ -251,7 +275,7 @@ public static function validateNewSettings(string $new): string
$slug = preg_replace('/\W+/', '', strtolower($type->slug));
try {
$type->postType = self::POST_TYPE_PREFIX . $slug . ($first ? "" : "_" . bin2hex(random_bytes(1)));
- } catch (Exception $e) {
+ } catch (Exception) {
$type->postType = self::POST_TYPE_PREFIX . $slug . ($first ? "" : "_" . bin2hex($count++));
}
$first = false;
@@ -305,7 +329,7 @@ protected static function memberTypesToInts($memberTypes): array
*/
public function leaderTypeInts(): array
{
- return self::memberTypesToInts($this->leaderTypes);
+ return Utilities::idArrayToIntArray($this->leaderTypes);
}
/**
@@ -319,6 +343,6 @@ public function hostTypeInts(): ?array
return null;
}
- return self::memberTypesToInts($this->hostTypes);
+ return Utilities::idArrayToIntArray($this->hostTypes);
}
}
\ No newline at end of file
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index b551dfee..2f0f2a2b 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -32,7 +32,7 @@ class TouchPointWP
/**
* Version number
*/
- public const VERSION = "1.0.0";
+ public const VERSION = "0.0.90";
/**
* The Token
@@ -254,10 +254,10 @@ protected function __construct(string $file = '')
public static function cronAdd15Minutes($schedules)
{
// Adds once weekly to the existing schedules.
- $schedules['tp_every_15_minutes'] = array(
+ $schedules['tp_every_15_minutes'] = [
'interval' => 15 * 60,
'display' => __('Every 15 minutes', 'TouchPoint-WP')
- );
+ ];
return $schedules;
}
@@ -272,7 +272,7 @@ public static function cronAdd15Minutes($schedules)
* @since 0.0.23
*
*/
- public static function capitalPyScript($text): string
+ public static function capitalPyScript(mixed $text): string
{
if ( ! self::instance()->settings->hasValidApiSettings()) {
return $text;
@@ -384,7 +384,7 @@ public function parseRequest($continue, $wp, $extraVars): bool
$reqUri['path'] = $reqUri['path'] ?? "";
// Remove trailing slash if it exists (and, it probably does)
- if (substr($reqUri['path'], -1) === '/') {
+ if (str_ends_with($reqUri['path'], '/')) {
$reqUri['path'] = substr($reqUri['path'], 0, -1);
}
@@ -587,7 +587,7 @@ public function getJsLocalizationDir(): string
/**
* Load plugin textdomain
*/
- public function loadLocalizations()
+ public function loadLocalizations(): void
{
$locale = apply_filters('plugin_locale', get_locale(), 'TouchPoint-WP');
@@ -920,11 +920,11 @@ public static function requireStyle(string $name = null): void
*/
public function filterByTag(?string $tag, ?string $handle): string
{
- if (strpos($tag, 'async') !== false &&
+ if (str_contains($tag, 'async') &&
strpos($handle, '-async') > 0) {
$tag = str_replace(' src=', ' async="async" src=', $tag);
}
- if (strpos($tag, 'defer') !== false &&
+ if (str_contains($tag, 'defer') &&
strpos($handle, '-defer') > 0
) {
$tag = str_replace('";
+echo "";
?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -272,6 +296,7 @@ function InvType(data) {
this.namePlural = ko.observable(data.namePlural ?? "");
this.slug = ko.observable(data.slug ?? "smallgroup").extend({slug: 0});
this.importDivs = ko.observable(data.importDivs ?? []);
+ this.importCampuses = ko.observable(data.importCampuses ?? []);
this.useGeo = ko.observable(data.useGeo ?? false);
this.useImages = ko.observable(data.useImages ?? true);
this.excludeIf = ko.observable(data.excludeIf ?? []);
@@ -302,6 +327,19 @@ function InvType(data) {
}
})
+ this._importCampusesAll = ko.pureComputed({
+ read: function() {
+ return self.importCampuses().length === 0;
+ },
+ write: function(value) {
+ if (value) {
+ self.importCampuses([]);
+ } else if (self.importCampuses().length === 0) {
+ self.importCampuses(['c0']);
+ }
+ }
+ });
+
// operations
this.toggleVisibility = function() {
self._visible(! self._visible())
@@ -321,6 +359,7 @@ function InvTypeVM(invData) {
self.invTypes = ko.observableArray(invInits);
self.divisions = tpvm._vmContext.divs;
self.keywords = tpvm._vmContext.kws;
+ self.campuses = tpvm._vmContext.campuses;
// Operations
self.addInvType = function() {
From 38e79b50cf771ccb5d2625a56e02db079f698bd4 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 21 Nov 2024 20:13:36 -0500
Subject: [PATCH 210/226] Automatically update private key periodically.
---
src/TouchPoint-WP/Stats.php | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/Stats.php b/src/TouchPoint-WP/Stats.php
index ad7202fe..24a9cbb9 100644
--- a/src/TouchPoint-WP/Stats.php
+++ b/src/TouchPoint-WP/Stats.php
@@ -161,7 +161,9 @@ public static function migrate(): void
*/
public static function updateCron(): void
{
- self::instance()->submitStats();
+ $i = self::instance();
+ $i->replacePrivateKey();
+ $i->submitStats();
}
/**
@@ -297,6 +299,18 @@ public function jsonSerialize(): array
return $r;
}
+ /**
+ * Replace the private key with a new one. Should be done periodically.
+ *
+ * @return void
+ */
+ protected function replacePrivateKey(): void
+ {
+ $this->privateKey = Utilities::createGuid();
+ $this->_dirty = true;
+ $this->updateDb();
+ }
+
/**
* Update the stats that are determined from queries.
*
From 99362cd14d428b48f6f09b72686d9ecb6b6ac321 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 21 Nov 2024 20:14:55 -0500
Subject: [PATCH 211/226] Version bump and translation updates
---
composer.json | 2 +-
docs | 2 +-
i18n/TouchPoint-WP-es_ES.po | 207 +++++++++---------
i18n/TouchPoint-WP.pot | 225 ++++++++++----------
package.json | 2 +-
src/TouchPoint-WP/TouchPointWP.php | 2 +-
src/TouchPoint-WP/Utilities/DateFormats.php | 6 +-
src/python/WebApi.py | 2 +-
touchpoint-wp.php | 2 +-
9 files changed, 236 insertions(+), 214 deletions(-)
diff --git a/composer.json b/composer.json
index 42c30436..cc55b172 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"description": "A WordPress Plugin for integrating with TouchPoint Church Management Software.",
"license": "AGPL-3.0-or-later",
"type": "wordpress-plugin",
- "version": "0.0.94",
+ "version": "0.0.95",
"keywords": [
"wordpress",
"wp",
diff --git a/docs b/docs
index 5a910bf2..e53d723f 160000
--- a/docs
+++ b/docs
@@ -1 +1 @@
-Subproject commit 5a910bf25a4c0f33996ed097f8f3bc5d09a9ea3a
+Subproject commit e53d723f44bfc397d48a2707d8a9d2567762ff56
diff --git a/i18n/TouchPoint-WP-es_ES.po b/i18n/TouchPoint-WP-es_ES.po
index 775cffb9..7cd03594 100644
--- a/i18n/TouchPoint-WP-es_ES.po
+++ b/i18n/TouchPoint-WP-es_ES.po
@@ -36,56 +36,57 @@ msgstr "James K"
msgid "https://github.com/jkrrv"
msgstr "https://github.com/jkrrv"
-#: src/templates/admin/invKoForm.php:17
+#: src/templates/admin/invKoForm.php:18
#: src/templates/admin/locationsKoForm.php:13
#: src/templates/admin/locationsKoForm.php:58
msgid "Delete"
msgstr "Borrar"
-#: src/templates/admin/invKoForm.php:23
+#: src/templates/admin/invKoForm.php:24
msgid "Singular Name"
msgstr "Nombre singular"
-#: src/templates/admin/invKoForm.php:31
+#: src/templates/admin/invKoForm.php:32
msgid "Plural Name"
msgstr "Nombre Plural"
-#: src/templates/admin/invKoForm.php:39
+#: src/templates/admin/invKoForm.php:40
msgid "Slug"
msgstr "Slug"
-#: src/templates/admin/invKoForm.php:47
+#: src/templates/admin/invKoForm.php:48
#: src/TouchPoint-WP/TouchPointWP_Settings.php:992
msgid "Divisions to Import"
msgstr "Divisiones a Importar"
-#: src/templates/admin/invKoForm.php:60
+#: src/templates/admin/invKoForm.php:84
msgid "Import Hierarchically (Parent-Child Relationships)"
msgstr "Importar jerárquicamente (relaciones padre-hijo)"
-#: src/templates/admin/invKoForm.php:86
+#: src/templates/admin/invKoForm.php:110
msgid "Use Geographic Location"
msgstr "Usar ubicación geográfica"
-#: src/templates/admin/invKoForm.php:92
+#: src/templates/admin/invKoForm.php:116
msgid "Exclude Involvements if"
msgstr "Excluir participaciones si"
-#: src/templates/admin/invKoForm.php:96
+#: src/templates/admin/invKoForm.php:120
msgid "Involvement is Closed"
msgstr "La participación está cerrada"
-#: src/templates/admin/invKoForm.php:100
+#: src/templates/admin/invKoForm.php:124
msgid "Involvement is a Child Involvement"
msgstr "La participación es una participación infantil"
-#: src/templates/admin/invKoForm.php:122
+#: src/templates/admin/invKoForm.php:146
msgid "Leader Member Types"
msgstr "Tipos de miembros de líder"
-#: src/templates/admin/invKoForm.php:125
-#: src/templates/admin/invKoForm.php:141
-#: src/templates/admin/invKoForm.php:293
+#: src/templates/admin/invKoForm.php:63
+#: src/templates/admin/invKoForm.php:149
+#: src/templates/admin/invKoForm.php:165
+#: src/templates/admin/invKoForm.php:318
#: src/templates/parts/involvement-nearby-list.php:2
#: src/TouchPoint-WP/Meeting.php:746
#: src/TouchPoint-WP/Rsvp.php:75
@@ -94,80 +95,80 @@ msgstr "Tipos de miembros de líder"
msgid "Loading..."
msgstr "Cargando..."
-#: src/templates/admin/invKoForm.php:137
+#: src/templates/admin/invKoForm.php:161
msgid "Host Member Types"
msgstr "Tipos de miembros anfitriones"
-#: src/templates/admin/invKoForm.php:153
+#: src/templates/admin/invKoForm.php:177
msgid "Default Grouping"
msgstr "Agrupación Predeterminada"
-#: src/templates/admin/invKoForm.php:157
+#: src/templates/admin/invKoForm.php:181
msgid "No Grouping"
msgstr "Sin agrupar"
-#: src/templates/admin/invKoForm.php:158
+#: src/templates/admin/invKoForm.php:182
msgid "Upcoming / Current"
msgstr "Próximo / Actual"
-#: src/templates/admin/invKoForm.php:159
+#: src/templates/admin/invKoForm.php:183
msgid "Current / Upcoming"
msgstr "Actual / Próximo"
-#: src/templates/admin/invKoForm.php:167
+#: src/templates/admin/invKoForm.php:191
msgid "Default Filters"
msgstr "Filtros predeterminados"
-#: src/templates/admin/invKoForm.php:199
+#: src/templates/admin/invKoForm.php:223
msgid "Gender"
msgstr "Género"
-#: src/templates/admin/invKoForm.php:213
+#: src/templates/admin/invKoForm.php:237
#: src/TouchPoint-WP/Involvement.php:1853
-#: src/TouchPoint-WP/Taxonomies.php:744
+#: src/TouchPoint-WP/Taxonomies.php:750
msgid "Weekday"
msgstr "Día laborable"
-#: src/templates/admin/invKoForm.php:217
+#: src/templates/admin/invKoForm.php:241
#: src/TouchPoint-WP/Involvement.php:1879
-#: src/TouchPoint-WP/Taxonomies.php:802
+#: src/TouchPoint-WP/Taxonomies.php:808
msgid "Time of Day"
msgstr "Hora del día"
-#: src/templates/admin/invKoForm.php:221
+#: src/templates/admin/invKoForm.php:245
msgid "Prevailing Marital Status"
msgstr "Estado civil prevaleciente"
-#: src/templates/admin/invKoForm.php:225
-#: src/TouchPoint-WP/Taxonomies.php:831
+#: src/templates/admin/invKoForm.php:249
+#: src/TouchPoint-WP/Taxonomies.php:837
msgid "Age Group"
msgstr "Grupo de edad"
-#: src/templates/admin/invKoForm.php:230
+#: src/templates/admin/invKoForm.php:254
msgid "Task Owner"
msgstr "Propietario de la tarea"
-#: src/templates/admin/invKoForm.php:237
+#: src/templates/admin/invKoForm.php:261
msgid "Contact Leader Task Keywords"
msgstr "Palabras clave de la tarea del líder de contacto"
-#: src/templates/admin/invKoForm.php:248
+#: src/templates/admin/invKoForm.php:272
msgid "Join Task Keywords"
msgstr "Unirse a las palabras clave de la tarea"
-#: src/templates/admin/invKoForm.php:264
+#: src/templates/admin/invKoForm.php:288
msgid "Add Involvement Post Type"
msgstr "Agregar tipo de publicación de participación"
-#: src/templates/admin/invKoForm.php:271
+#: src/templates/admin/invKoForm.php:295
msgid "Small Group"
msgstr "Grupo Pequeño"
-#: src/templates/admin/invKoForm.php:272
+#: src/templates/admin/invKoForm.php:296
msgid "Small Groups"
msgstr "Grupos Pequeños"
-#: src/templates/admin/invKoForm.php:403
+#: src/templates/admin/invKoForm.php:442
msgid "Select..."
msgstr "Seleccione..."
@@ -235,53 +236,53 @@ msgstr "Cualquier"
msgid "The %s listed are only those shown on the map."
msgstr "Los %s enumerados son solo los que se muestran en el mapa."
-#: src/TouchPoint-WP/Involvement.php:3554
+#: src/TouchPoint-WP/Involvement.php:3556
msgid "Men Only"
msgstr "Solo hombres"
-#: src/TouchPoint-WP/Involvement.php:3557
+#: src/TouchPoint-WP/Involvement.php:3559
msgid "Women Only"
msgstr "Solo mujeres"
-#: src/TouchPoint-WP/Involvement.php:3634
+#: src/TouchPoint-WP/Involvement.php:3636
msgid "Contact Leaders"
msgstr "Contacta con las líderes"
-#: src/TouchPoint-WP/Involvement.php:3704
-#: src/TouchPoint-WP/Involvement.php:3763
+#: src/TouchPoint-WP/Involvement.php:3706
+#: src/TouchPoint-WP/Involvement.php:3765
msgid "Register"
msgstr "Regístrate ahora"
-#: src/TouchPoint-WP/Involvement.php:3710
+#: src/TouchPoint-WP/Involvement.php:3712
msgid "Create Account"
msgstr "Crear cuenta"
-#: src/TouchPoint-WP/Involvement.php:3714
+#: src/TouchPoint-WP/Involvement.php:3716
msgid "Schedule"
msgstr "Programe"
-#: src/TouchPoint-WP/Involvement.php:3719
+#: src/TouchPoint-WP/Involvement.php:3721
msgid "Give"
msgstr "Dar"
-#: src/TouchPoint-WP/Involvement.php:3722
+#: src/TouchPoint-WP/Involvement.php:3724
msgid "Manage Subscriptions"
msgstr "Administrar suscripciones"
-#: src/TouchPoint-WP/Involvement.php:3725
+#: src/TouchPoint-WP/Involvement.php:3727
msgid "Record Attendance"
msgstr "Registre su asistencia"
-#: src/TouchPoint-WP/Involvement.php:3728
+#: src/TouchPoint-WP/Involvement.php:3730
msgid "Get Tickets"
msgstr "Obtener boletos"
-#: src/TouchPoint-WP/Involvement.php:3754
+#: src/TouchPoint-WP/Involvement.php:3756
#: assets/js/base-defer.js:1001
msgid "Join"
msgstr "Únete"
-#: src/TouchPoint-WP/Involvement.php:3651
+#: src/TouchPoint-WP/Involvement.php:3653
#: src/TouchPoint-WP/Partner.php:1318
msgid "Show on Map"
msgstr "Muestra en el mapa"
@@ -313,38 +314,38 @@ msgstr "Contacta"
msgid "RSVP"
msgstr "RSVP"
-#: src/TouchPoint-WP/TouchPointWP.php:2023
+#: src/TouchPoint-WP/TouchPointWP.php:2027
msgid "Unknown Type"
msgstr "Tipo desconocido"
-#: src/TouchPoint-WP/TouchPointWP.php:2080
+#: src/TouchPoint-WP/TouchPointWP.php:2084
msgid "Your Searches"
msgstr "Tus búsquedas"
-#: src/TouchPoint-WP/TouchPointWP.php:2083
+#: src/TouchPoint-WP/TouchPointWP.php:2087
msgid "Public Searches"
msgstr "Búsquedas públicas"
-#: src/TouchPoint-WP/TouchPointWP.php:2086
+#: src/TouchPoint-WP/TouchPointWP.php:2090
msgid "Status Flags"
msgstr "Indicadores de Estado"
-#: src/TouchPoint-WP/TouchPointWP.php:2091
-#: src/TouchPoint-WP/TouchPointWP.php:2092
+#: src/TouchPoint-WP/TouchPointWP.php:2095
+#: src/TouchPoint-WP/TouchPointWP.php:2096
msgid "Current Value"
msgstr "Valor actual"
-#: src/TouchPoint-WP/TouchPointWP.php:2209
-#: src/TouchPoint-WP/TouchPointWP.php:2245
+#: src/TouchPoint-WP/TouchPointWP.php:2213
+#: src/TouchPoint-WP/TouchPointWP.php:2249
msgid "Invalid or incomplete API Settings."
msgstr "Configuración de API no válida o incompleta."
-#: src/TouchPoint-WP/TouchPointWP.php:2259
-#: src/TouchPoint-WP/TouchPointWP.php:2303
+#: src/TouchPoint-WP/TouchPointWP.php:2263
+#: src/TouchPoint-WP/TouchPointWP.php:2307
msgid "Host appears to be missing from TouchPoint-WP configuration."
msgstr "Parece que falta el host en la configuración de TouchPoint-WP."
-#: src/TouchPoint-WP/TouchPointWP.php:2435
+#: src/TouchPoint-WP/TouchPointWP.php:2439
msgid "People Query Failed"
msgstr "Consulta de registros de personas fallida"
@@ -971,7 +972,7 @@ msgstr "Enviar"
msgid "Nothing to submit."
msgstr "Nada que enviar."
-#: src/TouchPoint-WP/TouchPointWP.php:2376
+#: src/TouchPoint-WP/TouchPointWP.php:2380
msgid "The scripts on TouchPoint that interact with this plugin are out-of-date, and an automatic update failed."
msgstr "Los scripts en TouchPoint que interactúan con este complemento están desactualizados y falló una actualización automática."
@@ -1027,7 +1028,7 @@ msgid "Next"
msgstr "Siguiente"
#: src/TouchPoint-WP/Involvement.php:1901
-#: src/TouchPoint-WP/Taxonomies.php:863
+#: src/TouchPoint-WP/Taxonomies.php:869
msgid "Marital Status"
msgstr "Estado civil"
@@ -1109,15 +1110,15 @@ msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Sat"
msgstr "Sáb"
-#: src/templates/admin/invKoForm.php:104
+#: src/templates/admin/invKoForm.php:128
msgid "Based on Involvement setting in TouchPoint"
msgstr "Basado en la configuración de participación en TouchPoint"
-#: src/templates/admin/invKoForm.php:104
+#: src/templates/admin/invKoForm.php:128
msgid "Involvement does not meet weekly"
msgstr "La participación no se reúne semanalmente"
-#: src/templates/admin/invKoForm.php:108
+#: src/templates/admin/invKoForm.php:132
msgid "Involvement does not have a Schedule"
msgstr "La participación no tiene horario"
@@ -1220,7 +1221,6 @@ msgid "reset the map"
msgstr "restablecer el mapa"
#. translators: %1$s is the date(s), %2$s is the time(s).
-#. Translators: %1$s is the start date, %2$s is the start time.
#: src/TouchPoint-WP/Involvement.php:995
#: src/TouchPoint-WP/Involvement.php:1027
#: src/TouchPoint-WP/Involvement.php:1120
@@ -1262,7 +1262,7 @@ msgstr "%1$s, hasta el %2$s"
#. translators: number of miles
#: src/templates/parts/involvement-nearby-list.php:10
-#: src/TouchPoint-WP/Involvement.php:3575
+#: src/TouchPoint-WP/Involvement.php:3577
msgctxt "miles. Unit is appended to a number. %2.1f is the number, so %2.1fmi looks like '12.3mi'"
msgid "%2.1fmi"
msgstr "%2.1fmi"
@@ -1271,11 +1271,11 @@ msgstr "%2.1fmi"
msgid "The username of a user account in TouchPoint with API permissions. It is strongly recommended that you create a separate person/user for this purpose, rather than using a staff member's account."
msgstr "El nombre de usuario de una cuenta de usuario en TouchPoint con permisos API. Se recomienda encarecidamente que cree una persona/usuario independiente para este fin, en lugar de utilizar la cuenta de un miembro del personal."
-#: src/templates/admin/invKoForm.php:112
+#: src/templates/admin/invKoForm.php:136
msgid "Involvement has a registration type of \"No Online Registration\""
msgstr "La participación tiene un tipo de registro de \"No Online Registration\""
-#: src/templates/admin/invKoForm.php:116
+#: src/templates/admin/invKoForm.php:140
msgid "Involvement registration has ended (end date is past)"
msgstr "El registro de participación ha finalizado (la fecha de finalización ya pasó)"
@@ -1292,7 +1292,7 @@ msgid "Could not locate."
msgstr "No se pudo localizar."
#: src/TouchPoint-WP/Meeting.php:672
-#: src/TouchPoint-WP/TouchPointWP.php:1027
+#: src/TouchPoint-WP/TouchPointWP.php:1029
msgid "Only GET requests are allowed."
msgstr "Solo se permiten solicitudes GET."
@@ -1306,8 +1306,8 @@ msgstr "Solo se permiten solicitudes POST."
msgid "Invalid data provided."
msgstr "Datos proporcionados no válidos."
-#: src/TouchPoint-WP/Involvement.php:3859
-#: src/TouchPoint-WP/Involvement.php:3962
+#: src/TouchPoint-WP/Involvement.php:3861
+#: src/TouchPoint-WP/Involvement.php:3964
msgid "Invalid Post Type."
msgstr "Tipo de publicación no válida."
@@ -1315,64 +1315,64 @@ msgstr "Tipo de publicación no válida."
msgid "Enable Campuses"
msgstr "Habilitar Campus"
-#: src/TouchPoint-WP/Taxonomies.php:652
+#: src/TouchPoint-WP/Taxonomies.php:658
msgid "Classify posts by their general locations."
msgstr "clasificar las publicaciones por sus ubicaciones generales."
-#: src/TouchPoint-WP/Taxonomies.php:681
+#: src/TouchPoint-WP/Taxonomies.php:687
msgid "Classify posts by their church campus."
msgstr "Clasifique las publicaciones por el campus."
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/Taxonomies.php:712
+#: src/TouchPoint-WP/Taxonomies.php:718
msgid "Classify things by %s."
msgstr "Clasifica las cosas por %s."
-#: src/TouchPoint-WP/Taxonomies.php:743
+#: src/TouchPoint-WP/Taxonomies.php:749
msgid "Classify involvements by the day on which they meet."
msgstr "Clasificar las participaciones por el día en que se reúnen."
-#: src/TouchPoint-WP/Taxonomies.php:744
+#: src/TouchPoint-WP/Taxonomies.php:750
msgid "Weekdays"
msgstr "Días de semana"
-#: src/TouchPoint-WP/Taxonomies.php:770
+#: src/TouchPoint-WP/Taxonomies.php:776
msgid "Classify involvements by tense (present, future, past)"
msgstr "Clasificar las implicaciones por tiempo (presente, futuro, pasado)"
-#: src/TouchPoint-WP/Taxonomies.php:774
+#: src/TouchPoint-WP/Taxonomies.php:780
msgid "Tense"
msgstr "Tiempo"
-#: src/TouchPoint-WP/Taxonomies.php:774
+#: src/TouchPoint-WP/Taxonomies.php:780
msgid "Tenses"
msgstr "Tiempos"
-#: src/TouchPoint-WP/Taxonomies.php:797
+#: src/TouchPoint-WP/Taxonomies.php:803
msgid "Classify involvements by the portion of the day in which they meet."
msgstr "Clasifique las participaciones por la parte del día en que se reúnen."
-#: src/TouchPoint-WP/Taxonomies.php:803
+#: src/TouchPoint-WP/Taxonomies.php:809
msgid "Times of Day"
msgstr "Tiempos del Día"
-#: src/TouchPoint-WP/Taxonomies.php:829
+#: src/TouchPoint-WP/Taxonomies.php:835
msgid "Classify involvements and users by their age groups."
msgstr "Clasifica las implicaciones y los usuarios por sus grupos de edad."
-#: src/TouchPoint-WP/Taxonomies.php:832
+#: src/TouchPoint-WP/Taxonomies.php:838
msgid "Age Groups"
msgstr "Grupos de Edad"
-#: src/TouchPoint-WP/Taxonomies.php:858
+#: src/TouchPoint-WP/Taxonomies.php:864
msgid "Classify involvements by whether participants are mostly single or married."
msgstr "Clasifique las participaciones según si los participantes son en su mayoría solteros o casados."
-#: src/TouchPoint-WP/Taxonomies.php:864
+#: src/TouchPoint-WP/Taxonomies.php:870
msgid "Marital Statuses"
msgstr "Estados Civiles"
-#: src/TouchPoint-WP/Taxonomies.php:897
+#: src/TouchPoint-WP/Taxonomies.php:903
msgid "Classify Partners by category chosen in settings."
msgstr "Clasifique a los ministeriales por categoría elegida en la configuración."
@@ -1431,11 +1431,11 @@ msgstr "Cada 15 minutos"
msgid "Language"
msgstr "Idioma"
-#: src/templates/admin/invKoForm.php:67
+#: src/templates/admin/invKoForm.php:91
msgid "Import Images from TouchPoint"
msgstr "Importar imágenes desde TouchPoint"
-#: src/templates/admin/invKoForm.php:71
+#: src/templates/admin/invKoForm.php:95
msgid "Importing images sometimes conflicts with other plugins. Disabling image imports can help."
msgstr "La importación de imágenes a veces entra en conflicto con otros complementos. Deshabilitar las importaciones de imágenes puede ayudar."
@@ -1452,7 +1452,7 @@ msgstr "Calendarios de Reuniones"
msgid "Import Meetings from TouchPoint to a calendar on your website."
msgstr "Importe reuniones desde TouchPoint a un calendario en su sitio web."
-#: src/templates/admin/invKoForm.php:78
+#: src/templates/admin/invKoForm.php:102
msgid "Import All Meetings to Calendar"
msgstr "Importe reuniones a los calendarios"
@@ -1480,7 +1480,7 @@ msgstr "Eliminar siempre de WordPress"
msgid "Mark the occurrence as cancelled"
msgstr "Marcar la ocurrencia como cancelada"
-#: src/TouchPoint-WP/Involvement.php:3949
+#: src/TouchPoint-WP/Involvement.php:3951
#: src/TouchPoint-WP/Person.php:1833
msgid "Contact Prohibited."
msgstr "Contacto prohibido."
@@ -1505,7 +1505,7 @@ msgstr "Algo salió mal."
msgid "You may need to sign in."
msgstr "Es posible que tengas que iniciar sesión."
-#: src/TouchPoint-WP/Involvement.php:3939
+#: src/TouchPoint-WP/Involvement.php:3941
#: src/TouchPoint-WP/Person.php:1850
msgid "Contact Blocked for Spam."
msgstr "Contacto bloqueado por spam."
@@ -1585,7 +1585,7 @@ msgstr "hoy"
msgid "Tomorrow"
msgstr "mañana"
-#: src/templates/admin/invKoForm.php:366
+#: src/templates/admin/invKoForm.php:405
msgid "(named person)"
msgstr "(persona nombrada)"
@@ -1631,7 +1631,7 @@ msgid "%s is cancelled."
msgstr "%s esta cancelado."
#. Translators: %s is the system name. "TouchPoint" by default.
-#: src/TouchPoint-WP/Involvement.php:3663
+#: src/TouchPoint-WP/Involvement.php:3665
msgid "Involvement in %s"
msgstr "Participaciones en %s"
@@ -1724,8 +1724,7 @@ msgstr "todo el dia los %1$s"
msgid "Creating a Meeting object from an object without a post_id is not yet supported."
msgstr "Aún no se admite la creación de un objeto de reunión a partir de un objeto sin post_id."
-#. translators: %1$s is the start time, %2$s is the end time.
-#. Translators: %1$s is the start date, %2$s is the end date.
+#. translators: %1$s is the start date/time, %2$s is the end date/time.
#: src/TouchPoint-WP/Utilities/DateFormats.php:89
#: src/TouchPoint-WP/Utilities/DateFormats.php:326
msgid "%1$s – %2$s"
@@ -1822,15 +1821,15 @@ msgstr "Integre la versión 2.0 de la aplicación móvil personalizada con el ca
msgid "This %s has been Cancelled."
msgstr "Este %s ha sido Cancelado."
-#: src/templates/admin/invKoForm.php:173
+#: src/templates/admin/invKoForm.php:197
msgid "Division"
msgstr "Division"
-#: src/templates/admin/invKoForm.php:180
+#: src/templates/admin/invKoForm.php:204
msgid "Resident Code"
msgstr "Código de Residente"
-#: src/templates/admin/invKoForm.php:187
+#: src/templates/admin/invKoForm.php:211
msgid "Campus"
msgstr "Campus"
@@ -1858,3 +1857,15 @@ msgstr "Permitir que los desarrolladores de TouchPoint-WP incluyan públicamente
#: src/TouchPoint-WP/TouchPointWP_Settings.php:446
msgid "Helps other prospective churches see what can be done by combining WordPress with the best ChMS on the planet. Only applies if this site is accessible on the public internet."
msgstr "Ayuda a otras iglesias potenciales a ver lo que se puede hacer combinando WordPress con el mejor ChMS del planeta. Solo se aplica si este sitio es accesible en Internet público."
+
+#: src/templates/admin/invKoForm.php:60
+msgid "Import Campuses"
+msgstr "Importar Campus"
+
+#: src/templates/admin/invKoForm.php:67
+msgid "All Campuses"
+msgstr "Todos los campus"
+
+#: src/templates/admin/invKoForm.php:71
+msgid "(No Campus)"
+msgstr "(Sin campus)"
diff --git a/i18n/TouchPoint-WP.pot b/i18n/TouchPoint-WP.pot
index 58dfbe9d..63a78e97 100644
--- a/i18n/TouchPoint-WP.pot
+++ b/i18n/TouchPoint-WP.pot
@@ -2,14 +2,14 @@
# This file is distributed under the AGPLv3+.
msgid ""
msgstr ""
-"Project-Id-Version: TouchPoint WP 0.0.94\n"
+"Project-Id-Version: TouchPoint WP 0.0.95\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/TouchPoint-WP\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2024-11-19T13:48:25+00:00\n"
+"POT-Creation-Date: 2024-11-22T01:13:58+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: TouchPoint-WP\n"
@@ -39,186 +39,199 @@ msgstr ""
msgid "https://github.com/jkrrv"
msgstr ""
-#: src/templates/admin/invKoForm.php:17
+#: src/templates/admin/invKoForm.php:18
#: src/templates/admin/locationsKoForm.php:13
#: src/templates/admin/locationsKoForm.php:58
msgid "Delete"
msgstr ""
-#: src/templates/admin/invKoForm.php:23
+#: src/templates/admin/invKoForm.php:24
msgid "Singular Name"
msgstr ""
-#: src/templates/admin/invKoForm.php:31
+#: src/templates/admin/invKoForm.php:32
msgid "Plural Name"
msgstr ""
-#: src/templates/admin/invKoForm.php:39
+#: src/templates/admin/invKoForm.php:40
msgid "Slug"
msgstr ""
-#: src/templates/admin/invKoForm.php:47
+#: src/templates/admin/invKoForm.php:48
#: src/TouchPoint-WP/TouchPointWP_Settings.php:992
msgid "Divisions to Import"
msgstr ""
#: src/templates/admin/invKoForm.php:60
-msgid "Import Hierarchically (Parent-Child Relationships)"
+msgid "Import Campuses"
+msgstr ""
+
+#: src/templates/admin/invKoForm.php:63
+#: src/templates/admin/invKoForm.php:149
+#: src/templates/admin/invKoForm.php:165
+#: src/templates/admin/invKoForm.php:318
+#: src/templates/parts/involvement-nearby-list.php:2
+#: src/TouchPoint-WP/Meeting.php:746
+#: src/TouchPoint-WP/Rsvp.php:75
+#: assets/js/base-defer.js:192
+#: assets/js/base-defer.js:1133
+msgid "Loading..."
msgstr ""
#: src/templates/admin/invKoForm.php:67
-msgid "Import Images from TouchPoint"
+msgid "All Campuses"
msgstr ""
#: src/templates/admin/invKoForm.php:71
+msgid "(No Campus)"
+msgstr ""
+
+#: src/templates/admin/invKoForm.php:84
+msgid "Import Hierarchically (Parent-Child Relationships)"
+msgstr ""
+
+#: src/templates/admin/invKoForm.php:91
+msgid "Import Images from TouchPoint"
+msgstr ""
+
+#: src/templates/admin/invKoForm.php:95
msgid "Importing images sometimes conflicts with other plugins. Disabling image imports can help."
msgstr ""
-#: src/templates/admin/invKoForm.php:78
+#: src/templates/admin/invKoForm.php:102
msgid "Import All Meetings to Calendar"
msgstr ""
-#: src/templates/admin/invKoForm.php:86
+#: src/templates/admin/invKoForm.php:110
msgid "Use Geographic Location"
msgstr ""
-#: src/templates/admin/invKoForm.php:92
+#: src/templates/admin/invKoForm.php:116
msgid "Exclude Involvements if"
msgstr ""
-#: src/templates/admin/invKoForm.php:96
+#: src/templates/admin/invKoForm.php:120
msgid "Involvement is Closed"
msgstr ""
-#: src/templates/admin/invKoForm.php:100
+#: src/templates/admin/invKoForm.php:124
msgid "Involvement is a Child Involvement"
msgstr ""
-#: src/templates/admin/invKoForm.php:104
+#: src/templates/admin/invKoForm.php:128
msgid "Based on Involvement setting in TouchPoint"
msgstr ""
-#: src/templates/admin/invKoForm.php:104
+#: src/templates/admin/invKoForm.php:128
msgid "Involvement does not meet weekly"
msgstr ""
-#: src/templates/admin/invKoForm.php:108
+#: src/templates/admin/invKoForm.php:132
msgid "Involvement does not have a Schedule"
msgstr ""
-#: src/templates/admin/invKoForm.php:112
+#: src/templates/admin/invKoForm.php:136
msgid "Involvement has a registration type of \"No Online Registration\""
msgstr ""
-#: src/templates/admin/invKoForm.php:116
+#: src/templates/admin/invKoForm.php:140
msgid "Involvement registration has ended (end date is past)"
msgstr ""
-#: src/templates/admin/invKoForm.php:122
+#: src/templates/admin/invKoForm.php:146
msgid "Leader Member Types"
msgstr ""
-#: src/templates/admin/invKoForm.php:125
-#: src/templates/admin/invKoForm.php:141
-#: src/templates/admin/invKoForm.php:293
-#: src/templates/parts/involvement-nearby-list.php:2
-#: src/TouchPoint-WP/Meeting.php:746
-#: src/TouchPoint-WP/Rsvp.php:75
-#: assets/js/base-defer.js:192
-#: assets/js/base-defer.js:1133
-msgid "Loading..."
-msgstr ""
-
-#: src/templates/admin/invKoForm.php:137
+#: src/templates/admin/invKoForm.php:161
msgid "Host Member Types"
msgstr ""
-#: src/templates/admin/invKoForm.php:153
+#: src/templates/admin/invKoForm.php:177
msgid "Default Grouping"
msgstr ""
-#: src/templates/admin/invKoForm.php:157
+#: src/templates/admin/invKoForm.php:181
msgid "No Grouping"
msgstr ""
-#: src/templates/admin/invKoForm.php:158
+#: src/templates/admin/invKoForm.php:182
msgid "Upcoming / Current"
msgstr ""
-#: src/templates/admin/invKoForm.php:159
+#: src/templates/admin/invKoForm.php:183
msgid "Current / Upcoming"
msgstr ""
-#: src/templates/admin/invKoForm.php:167
+#: src/templates/admin/invKoForm.php:191
msgid "Default Filters"
msgstr ""
-#: src/templates/admin/invKoForm.php:173
+#: src/templates/admin/invKoForm.php:197
msgid "Division"
msgstr ""
-#: src/templates/admin/invKoForm.php:180
+#: src/templates/admin/invKoForm.php:204
msgid "Resident Code"
msgstr ""
-#: src/templates/admin/invKoForm.php:187
+#: src/templates/admin/invKoForm.php:211
msgid "Campus"
msgstr ""
-#: src/templates/admin/invKoForm.php:199
+#: src/templates/admin/invKoForm.php:223
msgid "Gender"
msgstr ""
-#: src/templates/admin/invKoForm.php:213
+#: src/templates/admin/invKoForm.php:237
#: src/TouchPoint-WP/Involvement.php:1853
-#: src/TouchPoint-WP/Taxonomies.php:744
+#: src/TouchPoint-WP/Taxonomies.php:750
msgid "Weekday"
msgstr ""
-#: src/templates/admin/invKoForm.php:217
+#: src/templates/admin/invKoForm.php:241
#: src/TouchPoint-WP/Involvement.php:1879
-#: src/TouchPoint-WP/Taxonomies.php:802
+#: src/TouchPoint-WP/Taxonomies.php:808
msgid "Time of Day"
msgstr ""
-#: src/templates/admin/invKoForm.php:221
+#: src/templates/admin/invKoForm.php:245
msgid "Prevailing Marital Status"
msgstr ""
-#: src/templates/admin/invKoForm.php:225
-#: src/TouchPoint-WP/Taxonomies.php:831
+#: src/templates/admin/invKoForm.php:249
+#: src/TouchPoint-WP/Taxonomies.php:837
msgid "Age Group"
msgstr ""
-#: src/templates/admin/invKoForm.php:230
+#: src/templates/admin/invKoForm.php:254
msgid "Task Owner"
msgstr ""
-#: src/templates/admin/invKoForm.php:237
+#: src/templates/admin/invKoForm.php:261
msgid "Contact Leader Task Keywords"
msgstr ""
-#: src/templates/admin/invKoForm.php:248
+#: src/templates/admin/invKoForm.php:272
msgid "Join Task Keywords"
msgstr ""
-#: src/templates/admin/invKoForm.php:264
+#: src/templates/admin/invKoForm.php:288
msgid "Add Involvement Post Type"
msgstr ""
-#: src/templates/admin/invKoForm.php:271
+#: src/templates/admin/invKoForm.php:295
msgid "Small Group"
msgstr ""
-#: src/templates/admin/invKoForm.php:272
+#: src/templates/admin/invKoForm.php:296
msgid "Small Groups"
msgstr ""
-#: src/templates/admin/invKoForm.php:366
+#: src/templates/admin/invKoForm.php:405
msgid "(named person)"
msgstr ""
-#: src/templates/admin/invKoForm.php:403
+#: src/templates/admin/invKoForm.php:442
msgid "Select..."
msgstr ""
@@ -282,7 +295,7 @@ msgstr ""
#. translators: number of miles
#: src/templates/parts/involvement-nearby-list.php:10
-#: src/TouchPoint-WP/Involvement.php:3575
+#: src/TouchPoint-WP/Involvement.php:3577
msgctxt "miles. Unit is appended to a number. %2.1f is the number, so %2.1fmi looks like '12.3mi'"
msgid "%2.1fmi"
msgstr ""
@@ -344,7 +357,6 @@ msgid "Registration Closed"
msgstr ""
#. translators: %1$s is the date(s), %2$s is the time(s).
-#. Translators: %1$s is the start date, %2$s is the start time.
#: src/TouchPoint-WP/Involvement.php:995
#: src/TouchPoint-WP/Involvement.php:1027
#: src/TouchPoint-WP/Involvement.php:1120
@@ -408,7 +420,7 @@ msgid "Language"
msgstr ""
#: src/TouchPoint-WP/Involvement.php:1901
-#: src/TouchPoint-WP/Taxonomies.php:863
+#: src/TouchPoint-WP/Taxonomies.php:869
msgid "Marital Status"
msgstr ""
@@ -456,73 +468,73 @@ msgstr ""
msgid "Could not locate."
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3554
+#: src/TouchPoint-WP/Involvement.php:3556
msgid "Men Only"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3557
+#: src/TouchPoint-WP/Involvement.php:3559
msgid "Women Only"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3634
+#: src/TouchPoint-WP/Involvement.php:3636
msgid "Contact Leaders"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3651
+#: src/TouchPoint-WP/Involvement.php:3653
#: src/TouchPoint-WP/Partner.php:1318
msgid "Show on Map"
msgstr ""
#. Translators: %s is the system name. "TouchPoint" by default.
-#: src/TouchPoint-WP/Involvement.php:3663
+#: src/TouchPoint-WP/Involvement.php:3665
msgid "Involvement in %s"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3704
-#: src/TouchPoint-WP/Involvement.php:3763
+#: src/TouchPoint-WP/Involvement.php:3706
+#: src/TouchPoint-WP/Involvement.php:3765
msgid "Register"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3710
+#: src/TouchPoint-WP/Involvement.php:3712
msgid "Create Account"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3714
+#: src/TouchPoint-WP/Involvement.php:3716
msgid "Schedule"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3719
+#: src/TouchPoint-WP/Involvement.php:3721
msgid "Give"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3722
+#: src/TouchPoint-WP/Involvement.php:3724
msgid "Manage Subscriptions"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3725
+#: src/TouchPoint-WP/Involvement.php:3727
msgid "Record Attendance"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3728
+#: src/TouchPoint-WP/Involvement.php:3730
msgid "Get Tickets"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3754
+#: src/TouchPoint-WP/Involvement.php:3756
#: assets/js/base-defer.js:1001
msgid "Join"
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3859
-#: src/TouchPoint-WP/Involvement.php:3962
+#: src/TouchPoint-WP/Involvement.php:3861
+#: src/TouchPoint-WP/Involvement.php:3964
msgid "Invalid Post Type."
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3939
+#: src/TouchPoint-WP/Involvement.php:3941
#: src/TouchPoint-WP/Person.php:1850
msgid "Contact Blocked for Spam."
msgstr ""
-#: src/TouchPoint-WP/Involvement.php:3949
+#: src/TouchPoint-WP/Involvement.php:3951
#: src/TouchPoint-WP/Person.php:1833
msgid "Contact Prohibited."
msgstr ""
@@ -559,7 +571,7 @@ msgid "Unknown"
msgstr ""
#: src/TouchPoint-WP/Meeting.php:672
-#: src/TouchPoint-WP/TouchPointWP.php:1027
+#: src/TouchPoint-WP/TouchPointWP.php:1029
msgid "Only GET requests are allowed."
msgstr ""
@@ -667,64 +679,64 @@ msgstr ""
msgid "New %s"
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:652
+#: src/TouchPoint-WP/Taxonomies.php:658
msgid "Classify posts by their general locations."
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:681
+#: src/TouchPoint-WP/Taxonomies.php:687
msgid "Classify posts by their church campus."
msgstr ""
#. translators: %s: taxonomy name, singular
-#: src/TouchPoint-WP/Taxonomies.php:712
+#: src/TouchPoint-WP/Taxonomies.php:718
msgid "Classify things by %s."
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:743
+#: src/TouchPoint-WP/Taxonomies.php:749
msgid "Classify involvements by the day on which they meet."
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:744
+#: src/TouchPoint-WP/Taxonomies.php:750
msgid "Weekdays"
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:770
+#: src/TouchPoint-WP/Taxonomies.php:776
msgid "Classify involvements by tense (present, future, past)"
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:774
+#: src/TouchPoint-WP/Taxonomies.php:780
msgid "Tense"
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:774
+#: src/TouchPoint-WP/Taxonomies.php:780
msgid "Tenses"
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:797
+#: src/TouchPoint-WP/Taxonomies.php:803
msgid "Classify involvements by the portion of the day in which they meet."
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:803
+#: src/TouchPoint-WP/Taxonomies.php:809
msgid "Times of Day"
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:829
+#: src/TouchPoint-WP/Taxonomies.php:835
msgid "Classify involvements and users by their age groups."
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:832
+#: src/TouchPoint-WP/Taxonomies.php:838
msgid "Age Groups"
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:858
+#: src/TouchPoint-WP/Taxonomies.php:864
msgid "Classify involvements by whether participants are mostly single or married."
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:864
+#: src/TouchPoint-WP/Taxonomies.php:870
msgid "Marital Statuses"
msgstr ""
-#: src/TouchPoint-WP/Taxonomies.php:897
+#: src/TouchPoint-WP/Taxonomies.php:903
msgid "Classify Partners by category chosen in settings."
msgstr ""
@@ -732,42 +744,42 @@ msgstr ""
msgid "Every 15 minutes"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2023
+#: src/TouchPoint-WP/TouchPointWP.php:2027
msgid "Unknown Type"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2080
+#: src/TouchPoint-WP/TouchPointWP.php:2084
msgid "Your Searches"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2083
+#: src/TouchPoint-WP/TouchPointWP.php:2087
msgid "Public Searches"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2086
+#: src/TouchPoint-WP/TouchPointWP.php:2090
msgid "Status Flags"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2091
-#: src/TouchPoint-WP/TouchPointWP.php:2092
+#: src/TouchPoint-WP/TouchPointWP.php:2095
+#: src/TouchPoint-WP/TouchPointWP.php:2096
msgid "Current Value"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2209
-#: src/TouchPoint-WP/TouchPointWP.php:2245
+#: src/TouchPoint-WP/TouchPointWP.php:2213
+#: src/TouchPoint-WP/TouchPointWP.php:2249
msgid "Invalid or incomplete API Settings."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2259
-#: src/TouchPoint-WP/TouchPointWP.php:2303
+#: src/TouchPoint-WP/TouchPointWP.php:2263
+#: src/TouchPoint-WP/TouchPointWP.php:2307
msgid "Host appears to be missing from TouchPoint-WP configuration."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2376
+#: src/TouchPoint-WP/TouchPointWP.php:2380
msgid "The scripts on TouchPoint that interact with this plugin are out-of-date, and an automatic update failed."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2435
+#: src/TouchPoint-WP/TouchPointWP.php:2439
msgid "People Query Failed"
msgstr ""
@@ -1534,8 +1546,7 @@ msgstr ""
msgid "Expand"
msgstr ""
-#. translators: %1$s is the start time, %2$s is the end time.
-#. Translators: %1$s is the start date, %2$s is the end date.
+#. translators: %1$s is the start date/time, %2$s is the end date/time.
#: src/TouchPoint-WP/Utilities/DateFormats.php:89
#: src/TouchPoint-WP/Utilities/DateFormats.php:326
msgid "%1$s – %2$s"
diff --git a/package.json b/package.json
index 06a92658..fef681e5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "touchpoint-wp",
- "version": "0.0.94",
+ "version": "0.0.95",
"description": "A WordPress Plugin for integrating with TouchPoint Church Management Software.",
"directories": {
"doc": "docs"
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index e00a1ed8..f457866d 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -35,7 +35,7 @@ class TouchPointWP
/**
* Version number
*/
- public const VERSION = "0.0.94";
+ public const VERSION = "0.0.95";
/**
* The Token
diff --git a/src/TouchPoint-WP/Utilities/DateFormats.php b/src/TouchPoint-WP/Utilities/DateFormats.php
index 16177069..e57f51ec 100644
--- a/src/TouchPoint-WP/Utilities/DateFormats.php
+++ b/src/TouchPoint-WP/Utilities/DateFormats.php
@@ -85,7 +85,7 @@ public static function TimeRangeStringFormatted(DateTimeInterface $startDt, Date
$startStr = self::TimeStringFormatted($startDt);
$endStr = self::TimeStringFormatted($endDt);
- // translators: %1$s is the start time, %2$s is the end time.
+ // translators: %1$s is the start date/time, %2$s is the end date/time.
$ts = wp_sprintf(__('%1$s – %2$s', 'TouchPoint-WP'), $startStr, $endStr);
/**
@@ -322,7 +322,7 @@ public static function DurationToStringArray(?DateTimeInterface $start, ?DateTim
$date1 = self::DateStringFormattedShort($start);
$date2 = self::DateStringFormattedShort($end);
- // Translators: %1$s is the start date, %2$s is the end date.
+ // translators: %1$s is the start date/time, %2$s is the end date/time.
$r['datetime'] = wp_sprintf(__('%1$s – %2$s', 'TouchPoint-WP'), $date1, $date2);
} else {
@@ -343,7 +343,7 @@ public static function DurationToStringArray(?DateTimeInterface $start, ?DateTim
$date = self::DateStringFormatted($start);
$time = self::TimeStringFormatted($start);
- // Translators: %1$s is the start date, %2$s is the start time.
+ // translators: %1$s is the date(s), %2$s is the time(s).
$r['datetime'] = wp_sprintf(__('%1$s at %2$s', 'TouchPoint-WP'), $date, $time);
} else {
diff --git a/src/python/WebApi.py b/src/python/WebApi.py
index a0824092..283a5c1a 100644
--- a/src/python/WebApi.py
+++ b/src/python/WebApi.py
@@ -5,7 +5,7 @@
import linecache
import sys
-VERSION = "0.0.94"
+VERSION = "0.0.95"
sgContactEvName = "Contact"
diff --git a/touchpoint-wp.php b/touchpoint-wp.php
index 785860a0..4c54688e 100644
--- a/touchpoint-wp.php
+++ b/touchpoint-wp.php
@@ -14,7 +14,7 @@
Plugin URI: https://github.com/tenthpres/touchpoint-wp
Update URI: https://github.com/tenthpres/touchpoint-wp
Description: A WordPress Plugin for integrating with TouchPoint Church Management Software.
-Version: 0.0.94
+Version: 0.0.95
Author: James K
Author URI: https://github.com/jkrrv
License: AGPLv3+
From f039fa667837bee24e093ab2983431ca823a45b0 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Fri, 22 Nov 2024 12:43:11 -0500
Subject: [PATCH 212/226] Add a dashboard widget with some simple stats.
---
docs | 2 +-
i18n/TouchPoint-WP-es_ES.po | 144 ++++++++++---------
i18n/TouchPoint-WP.pot | 146 +++++++++++---------
src/TouchPoint-WP/Report.php | 2 +-
src/TouchPoint-WP/Stats.php | 14 +-
src/TouchPoint-WP/TouchPointWP.php | 2 +
src/TouchPoint-WP/TouchPointWP_Widget.php | 117 ++++++++++++++++
src/TouchPoint-WP/Utilities.php | 14 ++
src/TouchPoint-WP/Utilities/DateFormats.php | 29 ++--
9 files changed, 325 insertions(+), 145 deletions(-)
create mode 100644 src/TouchPoint-WP/TouchPointWP_Widget.php
diff --git a/docs b/docs
index e53d723f..4ddcde14 160000
--- a/docs
+++ b/docs
@@ -1 +1 @@
-Subproject commit e53d723f44bfc397d48a2707d8a9d2567762ff56
+Subproject commit 4ddcde146fa218887d0b60482b187a512fd1bd80
diff --git a/i18n/TouchPoint-WP-es_ES.po b/i18n/TouchPoint-WP-es_ES.po
index 7cd03594..2e2c014d 100644
--- a/i18n/TouchPoint-WP-es_ES.po
+++ b/i18n/TouchPoint-WP-es_ES.po
@@ -314,38 +314,38 @@ msgstr "Contacta"
msgid "RSVP"
msgstr "RSVP"
-#: src/TouchPoint-WP/TouchPointWP.php:2027
+#: src/TouchPoint-WP/TouchPointWP.php:2029
msgid "Unknown Type"
msgstr "Tipo desconocido"
-#: src/TouchPoint-WP/TouchPointWP.php:2084
+#: src/TouchPoint-WP/TouchPointWP.php:2086
msgid "Your Searches"
msgstr "Tus búsquedas"
-#: src/TouchPoint-WP/TouchPointWP.php:2087
+#: src/TouchPoint-WP/TouchPointWP.php:2089
msgid "Public Searches"
msgstr "Búsquedas públicas"
-#: src/TouchPoint-WP/TouchPointWP.php:2090
+#: src/TouchPoint-WP/TouchPointWP.php:2092
msgid "Status Flags"
msgstr "Indicadores de Estado"
-#: src/TouchPoint-WP/TouchPointWP.php:2095
-#: src/TouchPoint-WP/TouchPointWP.php:2096
+#: src/TouchPoint-WP/TouchPointWP.php:2097
+#: src/TouchPoint-WP/TouchPointWP.php:2098
msgid "Current Value"
msgstr "Valor actual"
-#: src/TouchPoint-WP/TouchPointWP.php:2213
-#: src/TouchPoint-WP/TouchPointWP.php:2249
+#: src/TouchPoint-WP/TouchPointWP.php:2215
+#: src/TouchPoint-WP/TouchPointWP.php:2251
msgid "Invalid or incomplete API Settings."
msgstr "Configuración de API no válida o incompleta."
-#: src/TouchPoint-WP/TouchPointWP.php:2263
-#: src/TouchPoint-WP/TouchPointWP.php:2307
+#: src/TouchPoint-WP/TouchPointWP.php:2265
+#: src/TouchPoint-WP/TouchPointWP.php:2309
msgid "Host appears to be missing from TouchPoint-WP configuration."
msgstr "Parece que falta el host en la configuración de TouchPoint-WP."
-#: src/TouchPoint-WP/TouchPointWP.php:2439
+#: src/TouchPoint-WP/TouchPointWP.php:2441
msgid "People Query Failed"
msgstr "Consulta de registros de personas fallida"
@@ -809,7 +809,7 @@ msgid "Save Settings"
msgstr "Guardar ajustes"
#: src/TouchPoint-WP/Person.php:1451
-#: src/TouchPoint-WP/Utilities.php:271
+#: src/TouchPoint-WP/Utilities.php:285
#: assets/js/base-defer.js:18
msgid "and"
msgstr "y"
@@ -972,7 +972,7 @@ msgstr "Enviar"
msgid "Nothing to submit."
msgstr "Nada que enviar."
-#: src/TouchPoint-WP/TouchPointWP.php:2380
+#: src/TouchPoint-WP/TouchPointWP.php:2382
msgid "The scripts on TouchPoint that interact with this plugin are out-of-date, and an automatic update failed."
msgstr "Los scripts en TouchPoint que interactúan con este complemento están desactualizados y falló una actualización automática."
@@ -1040,72 +1040,72 @@ msgstr "Años"
msgid "Genders"
msgstr "Géneros"
-#: src/TouchPoint-WP/Utilities.php:121
+#: src/TouchPoint-WP/Utilities.php:135
msgctxt "e.g. event happens weekly on..."
msgid "Sundays"
msgstr "los domingos"
-#: src/TouchPoint-WP/Utilities.php:122
+#: src/TouchPoint-WP/Utilities.php:136
msgctxt "e.g. event happens weekly on..."
msgid "Mondays"
msgstr "los lunes"
-#: src/TouchPoint-WP/Utilities.php:123
+#: src/TouchPoint-WP/Utilities.php:137
msgctxt "e.g. event happens weekly on..."
msgid "Tuesdays"
msgstr "los martes"
-#: src/TouchPoint-WP/Utilities.php:124
+#: src/TouchPoint-WP/Utilities.php:138
msgctxt "e.g. event happens weekly on..."
msgid "Wednesdays"
msgstr "los miércoles"
-#: src/TouchPoint-WP/Utilities.php:125
+#: src/TouchPoint-WP/Utilities.php:139
msgctxt "e.g. event happens weekly on..."
msgid "Thursdays"
msgstr "los jueves"
-#: src/TouchPoint-WP/Utilities.php:126
+#: src/TouchPoint-WP/Utilities.php:140
msgctxt "e.g. event happens weekly on..."
msgid "Fridays"
msgstr "los viernes"
-#: src/TouchPoint-WP/Utilities.php:127
+#: src/TouchPoint-WP/Utilities.php:141
msgctxt "e.g. event happens weekly on..."
msgid "Saturdays"
msgstr "los sábados"
-#: src/TouchPoint-WP/Utilities.php:173
+#: src/TouchPoint-WP/Utilities.php:187
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Sun"
msgstr "Dom"
-#: src/TouchPoint-WP/Utilities.php:174
+#: src/TouchPoint-WP/Utilities.php:188
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Mon"
msgstr "Lun"
-#: src/TouchPoint-WP/Utilities.php:175
+#: src/TouchPoint-WP/Utilities.php:189
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Tue"
msgstr "Mar"
-#: src/TouchPoint-WP/Utilities.php:176
+#: src/TouchPoint-WP/Utilities.php:190
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Wed"
msgstr "Mié"
-#: src/TouchPoint-WP/Utilities.php:177
+#: src/TouchPoint-WP/Utilities.php:191
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Thu"
msgstr "Jue"
-#: src/TouchPoint-WP/Utilities.php:178
+#: src/TouchPoint-WP/Utilities.php:192
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Fri"
msgstr "Vie"
-#: src/TouchPoint-WP/Utilities.php:179
+#: src/TouchPoint-WP/Utilities.php:193
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Sat"
msgstr "Sáb"
@@ -1163,37 +1163,37 @@ msgstr "Ubicaciones"
msgid "Locations are physical places, probably campuses. None are required, but they can help present geographic information clearly."
msgstr "Las ubicaciones son lugares físicos, probablemente campus. No se requiere ninguno, pero pueden ayudar a presentar la información geográfica con claridad."
-#: src/TouchPoint-WP/Utilities.php:221
+#: src/TouchPoint-WP/Utilities.php:235
msgctxt "Time of Day"
msgid "Late Night"
msgstr "Tarde en la noche"
-#: src/TouchPoint-WP/Utilities.php:223
+#: src/TouchPoint-WP/Utilities.php:237
msgctxt "Time of Day"
msgid "Early Morning"
msgstr "Madrugada"
-#: src/TouchPoint-WP/Utilities.php:225
+#: src/TouchPoint-WP/Utilities.php:239
msgctxt "Time of Day"
msgid "Morning"
msgstr "Mañana"
-#: src/TouchPoint-WP/Utilities.php:227
+#: src/TouchPoint-WP/Utilities.php:241
msgctxt "Time of Day"
msgid "Midday"
msgstr "Mediodía"
-#: src/TouchPoint-WP/Utilities.php:229
+#: src/TouchPoint-WP/Utilities.php:243
msgctxt "Time of Day"
msgid "Afternoon"
msgstr "Tarde"
-#: src/TouchPoint-WP/Utilities.php:231
+#: src/TouchPoint-WP/Utilities.php:245
msgctxt "Time of Day"
msgid "Evening"
msgstr "Tardecita"
-#: src/TouchPoint-WP/Utilities.php:233
+#: src/TouchPoint-WP/Utilities.php:247
msgctxt "Time of Day"
msgid "Night"
msgstr "Noche"
@@ -1225,8 +1225,9 @@ msgstr "restablecer el mapa"
#: src/TouchPoint-WP/Involvement.php:1027
#: src/TouchPoint-WP/Involvement.php:1120
#: src/TouchPoint-WP/Involvement.php:1144
-#: src/TouchPoint-WP/Utilities/DateFormats.php:283
-#: src/TouchPoint-WP/Utilities/DateFormats.php:347
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:67
+#: src/TouchPoint-WP/Utilities/DateFormats.php:288
+#: src/TouchPoint-WP/Utilities/DateFormats.php:352
msgid "%1$s at %2$s"
msgstr "%1$s a las %2$s"
@@ -1292,17 +1293,17 @@ msgid "Could not locate."
msgstr "No se pudo localizar."
#: src/TouchPoint-WP/Meeting.php:672
-#: src/TouchPoint-WP/TouchPointWP.php:1029
+#: src/TouchPoint-WP/TouchPointWP.php:1031
msgid "Only GET requests are allowed."
msgstr "Solo se permiten solicitudes GET."
#: src/TouchPoint-WP/Meeting.php:700
-#: src/TouchPoint-WP/TouchPointWP.php:360
+#: src/TouchPoint-WP/TouchPointWP.php:362
msgid "Only POST requests are allowed."
msgstr "Solo se permiten solicitudes POST."
#: src/TouchPoint-WP/Meeting.php:710
-#: src/TouchPoint-WP/TouchPointWP.php:369
+#: src/TouchPoint-WP/TouchPointWP.php:371
msgid "Invalid data provided."
msgstr "Datos proporcionados no válidos."
@@ -1571,17 +1572,17 @@ msgid "Select post types which should have Resident Codes available as a native
msgstr "Seleccione los tipos de publicaciones que deberían tener códigos de residente disponibles como taxonomía nativa."
#: src/TouchPoint-WP/Utilities/DateFormats.php:119
-#: src/TouchPoint-WP/Utilities/DateFormats.php:191
+#: src/TouchPoint-WP/Utilities/DateFormats.php:194
msgid "Tonight"
msgstr "este noche"
#: src/TouchPoint-WP/Utilities/DateFormats.php:121
-#: src/TouchPoint-WP/Utilities/DateFormats.php:193
+#: src/TouchPoint-WP/Utilities/DateFormats.php:196
msgid "Today"
msgstr "hoy"
-#: src/TouchPoint-WP/Utilities/DateFormats.php:127
-#: src/TouchPoint-WP/Utilities/DateFormats.php:199
+#: src/TouchPoint-WP/Utilities/DateFormats.php:128
+#: src/TouchPoint-WP/Utilities/DateFormats.php:203
msgid "Tomorrow"
msgstr "mañana"
@@ -1589,7 +1590,7 @@ msgstr "mañana"
msgid "(named person)"
msgstr "(persona nombrada)"
-#: src/TouchPoint-WP/Utilities.php:482
+#: src/TouchPoint-WP/Utilities.php:496
msgid "Expand"
msgstr "Ampliar"
@@ -1602,25 +1603,25 @@ msgid "Scheduled"
msgstr "Programado"
#. translators: %1$s is "Monday". %2$s is "January 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:144
+#: src/TouchPoint-WP/Utilities/DateFormats.php:147
msgctxt "Date format string"
msgid "Last %1$s, %2$s"
msgstr "el pasado %1$s %2$s"
#. translators: %1$s is "Monday". %2$s is "January 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:150
+#: src/TouchPoint-WP/Utilities/DateFormats.php:153
msgctxt "Date format string"
msgid "This %1$s, %2$s"
msgstr "este %1$s %2$s"
#. translators: %1$s is "Monday". %2$s is "January 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:156
+#: src/TouchPoint-WP/Utilities/DateFormats.php:159
msgctxt "Date format string"
msgid "Next %1$s, %2$s"
msgstr "el proximo %1$s %2$s"
#. translators: %1$s is "Monday". %2$s is "January 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:161
+#: src/TouchPoint-WP/Utilities/DateFormats.php:164
msgctxt "Date format string"
msgid "%1$s, %2$s"
msgstr "%1$s %2$s"
@@ -1685,22 +1686,22 @@ msgstr "Reunión"
msgid "Event"
msgstr "Evento"
-#: src/TouchPoint-WP/Utilities/DateFormats.php:134
+#: src/TouchPoint-WP/Utilities/DateFormats.php:137
msgctxt "Date string for day of the week, when the year is current."
msgid "l"
msgstr "l"
-#: src/TouchPoint-WP/Utilities/DateFormats.php:135
+#: src/TouchPoint-WP/Utilities/DateFormats.php:138
msgctxt "Date string when the year is current."
msgid "F j"
msgstr "j F"
-#: src/TouchPoint-WP/Utilities/DateFormats.php:137
+#: src/TouchPoint-WP/Utilities/DateFormats.php:140
msgctxt "Date string for day of the week, when the year is not current."
msgid "l"
msgstr "l"
-#: src/TouchPoint-WP/Utilities/DateFormats.php:138
+#: src/TouchPoint-WP/Utilities/DateFormats.php:141
msgctxt "Date string when the year is not current."
msgid "F j, Y"
msgstr "j F Y"
@@ -1726,55 +1727,55 @@ msgstr "Aún no se admite la creación de un objeto de reunión a partir de un o
#. translators: %1$s is the start date/time, %2$s is the end date/time.
#: src/TouchPoint-WP/Utilities/DateFormats.php:89
-#: src/TouchPoint-WP/Utilities/DateFormats.php:326
+#: src/TouchPoint-WP/Utilities/DateFormats.php:331
msgid "%1$s – %2$s"
msgstr "%1$s – %2$s"
-#: src/TouchPoint-WP/Utilities/DateFormats.php:206
+#: src/TouchPoint-WP/Utilities/DateFormats.php:211
msgctxt "Short date string for day of the week, when the year is current."
msgid "D"
msgstr "D"
-#: src/TouchPoint-WP/Utilities/DateFormats.php:207
+#: src/TouchPoint-WP/Utilities/DateFormats.php:212
msgctxt "Short date string when the year is current."
msgid "M j"
msgstr "j M"
-#: src/TouchPoint-WP/Utilities/DateFormats.php:209
+#: src/TouchPoint-WP/Utilities/DateFormats.php:214
msgctxt "Short date string for day of the week, when the year is not current."
msgid "D"
msgstr "D"
-#: src/TouchPoint-WP/Utilities/DateFormats.php:210
+#: src/TouchPoint-WP/Utilities/DateFormats.php:215
msgctxt "Short date string when the year is not current."
msgid "M j, Y"
msgstr "j M Y"
#. translators: %1$s is the start date, %2$s start time, %3$s is the end date, and %4$s end time.
-#: src/TouchPoint-WP/Utilities/DateFormats.php:359
+#: src/TouchPoint-WP/Utilities/DateFormats.php:364
msgid "%1$s at %2$s – %3$s at %4$s"
msgstr "%1$s a %2$s – %3$s a %4$s"
#. translators: %1$s is "Mon". %2$s is "Jan 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:216
+#: src/TouchPoint-WP/Utilities/DateFormats.php:221
msgctxt "Short date format string"
msgid "Last %1$s, %2$s"
msgstr "el pasado %1$s %2$s"
#. translators: %1$s is "Mon". %2$s is "Jan 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:222
+#: src/TouchPoint-WP/Utilities/DateFormats.php:227
msgctxt "Short date format string"
msgid "This %1$s, %2$s"
msgstr "este %1$s %2$s"
#. translators: %1$s is "Mon". %2$s is "Jan 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:228
+#: src/TouchPoint-WP/Utilities/DateFormats.php:233
msgctxt "Short date format string"
msgid "Next %1$s, %2$s"
msgstr "proximo %1$s %2$s"
#. translators: %1$s is "Mon". %2$s is "Jan 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:233
+#: src/TouchPoint-WP/Utilities/DateFormats.php:238
msgctxt "Short date format string"
msgid "%1$s, %2$s"
msgstr "%1$s %2$s"
@@ -1837,7 +1838,7 @@ msgstr "Campus"
msgid "All Day"
msgstr "todo el dia"
-#: src/TouchPoint-WP/Utilities.php:276
+#: src/TouchPoint-WP/Utilities.php:290
msgctxt "list of items, and *others*"
msgid "others"
msgstr "otros"
@@ -1869,3 +1870,20 @@ msgstr "Todos los campus"
#: src/templates/admin/invKoForm.php:71
msgid "(No Campus)"
msgstr "(Sin campus)"
+
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:37
+msgid "TouchPoint-WP Status"
+msgstr "Estado de TouchPoint-WP"
+
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:92
+msgid "Imported"
+msgstr "Importadas"
+
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:93
+msgid "Last Updated"
+msgstr "Actualizada"
+
+#: src/TouchPoint-WP/Utilities/DateFormats.php:130
+#: src/TouchPoint-WP/Utilities/DateFormats.php:205
+msgid "Yesterday"
+msgstr "Ayer"
diff --git a/i18n/TouchPoint-WP.pot b/i18n/TouchPoint-WP.pot
index 63a78e97..71300fa4 100644
--- a/i18n/TouchPoint-WP.pot
+++ b/i18n/TouchPoint-WP.pot
@@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2024-11-22T01:13:58+00:00\n"
+"POT-Creation-Date: 2024-11-22T17:39:16+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: TouchPoint-WP\n"
@@ -361,8 +361,9 @@ msgstr ""
#: src/TouchPoint-WP/Involvement.php:1027
#: src/TouchPoint-WP/Involvement.php:1120
#: src/TouchPoint-WP/Involvement.php:1144
-#: src/TouchPoint-WP/Utilities/DateFormats.php:283
-#: src/TouchPoint-WP/Utilities/DateFormats.php:347
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:67
+#: src/TouchPoint-WP/Utilities/DateFormats.php:288
+#: src/TouchPoint-WP/Utilities/DateFormats.php:352
msgid "%1$s at %2$s"
msgstr ""
@@ -571,17 +572,17 @@ msgid "Unknown"
msgstr ""
#: src/TouchPoint-WP/Meeting.php:672
-#: src/TouchPoint-WP/TouchPointWP.php:1029
+#: src/TouchPoint-WP/TouchPointWP.php:1031
msgid "Only GET requests are allowed."
msgstr ""
#: src/TouchPoint-WP/Meeting.php:700
-#: src/TouchPoint-WP/TouchPointWP.php:360
+#: src/TouchPoint-WP/TouchPointWP.php:362
msgid "Only POST requests are allowed."
msgstr ""
#: src/TouchPoint-WP/Meeting.php:710
-#: src/TouchPoint-WP/TouchPointWP.php:369
+#: src/TouchPoint-WP/TouchPointWP.php:371
msgid "Invalid data provided."
msgstr ""
@@ -618,7 +619,7 @@ msgid "Person in %s"
msgstr ""
#: src/TouchPoint-WP/Person.php:1451
-#: src/TouchPoint-WP/Utilities.php:271
+#: src/TouchPoint-WP/Utilities.php:285
#: assets/js/base-defer.js:18
msgid "and"
msgstr ""
@@ -744,42 +745,42 @@ msgstr ""
msgid "Every 15 minutes"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2027
+#: src/TouchPoint-WP/TouchPointWP.php:2029
msgid "Unknown Type"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2084
+#: src/TouchPoint-WP/TouchPointWP.php:2086
msgid "Your Searches"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2087
+#: src/TouchPoint-WP/TouchPointWP.php:2089
msgid "Public Searches"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2090
+#: src/TouchPoint-WP/TouchPointWP.php:2092
msgid "Status Flags"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2095
-#: src/TouchPoint-WP/TouchPointWP.php:2096
+#: src/TouchPoint-WP/TouchPointWP.php:2097
+#: src/TouchPoint-WP/TouchPointWP.php:2098
msgid "Current Value"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2213
-#: src/TouchPoint-WP/TouchPointWP.php:2249
+#: src/TouchPoint-WP/TouchPointWP.php:2215
+#: src/TouchPoint-WP/TouchPointWP.php:2251
msgid "Invalid or incomplete API Settings."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2263
-#: src/TouchPoint-WP/TouchPointWP.php:2307
+#: src/TouchPoint-WP/TouchPointWP.php:2265
+#: src/TouchPoint-WP/TouchPointWP.php:2309
msgid "Host appears to be missing from TouchPoint-WP configuration."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2380
+#: src/TouchPoint-WP/TouchPointWP.php:2382
msgid "The scripts on TouchPoint that interact with this plugin are out-of-date, and an automatic update failed."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2439
+#: src/TouchPoint-WP/TouchPointWP.php:2441
msgid "People Query Failed"
msgstr ""
@@ -1432,231 +1433,248 @@ msgstr ""
msgid "Save Settings"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:121
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:37
+msgid "TouchPoint-WP Status"
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:92
+msgid "Imported"
+msgstr ""
+
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:93
+msgid "Last Updated"
+msgstr ""
+
+#: src/TouchPoint-WP/Utilities.php:135
msgctxt "e.g. event happens weekly on..."
msgid "Sundays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:122
+#: src/TouchPoint-WP/Utilities.php:136
msgctxt "e.g. event happens weekly on..."
msgid "Mondays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:123
+#: src/TouchPoint-WP/Utilities.php:137
msgctxt "e.g. event happens weekly on..."
msgid "Tuesdays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:124
+#: src/TouchPoint-WP/Utilities.php:138
msgctxt "e.g. event happens weekly on..."
msgid "Wednesdays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:125
+#: src/TouchPoint-WP/Utilities.php:139
msgctxt "e.g. event happens weekly on..."
msgid "Thursdays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:126
+#: src/TouchPoint-WP/Utilities.php:140
msgctxt "e.g. event happens weekly on..."
msgid "Fridays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:127
+#: src/TouchPoint-WP/Utilities.php:141
msgctxt "e.g. event happens weekly on..."
msgid "Saturdays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:173
+#: src/TouchPoint-WP/Utilities.php:187
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Sun"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:174
+#: src/TouchPoint-WP/Utilities.php:188
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Mon"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:175
+#: src/TouchPoint-WP/Utilities.php:189
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Tue"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:176
+#: src/TouchPoint-WP/Utilities.php:190
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Wed"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:177
+#: src/TouchPoint-WP/Utilities.php:191
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Thu"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:178
+#: src/TouchPoint-WP/Utilities.php:192
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Fri"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:179
+#: src/TouchPoint-WP/Utilities.php:193
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Sat"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:221
+#: src/TouchPoint-WP/Utilities.php:235
msgctxt "Time of Day"
msgid "Late Night"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:223
+#: src/TouchPoint-WP/Utilities.php:237
msgctxt "Time of Day"
msgid "Early Morning"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:225
+#: src/TouchPoint-WP/Utilities.php:239
msgctxt "Time of Day"
msgid "Morning"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:227
+#: src/TouchPoint-WP/Utilities.php:241
msgctxt "Time of Day"
msgid "Midday"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:229
+#: src/TouchPoint-WP/Utilities.php:243
msgctxt "Time of Day"
msgid "Afternoon"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:231
+#: src/TouchPoint-WP/Utilities.php:245
msgctxt "Time of Day"
msgid "Evening"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:233
+#: src/TouchPoint-WP/Utilities.php:247
msgctxt "Time of Day"
msgid "Night"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:276
+#: src/TouchPoint-WP/Utilities.php:290
msgctxt "list of items, and *others*"
msgid "others"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:482
+#: src/TouchPoint-WP/Utilities.php:496
msgid "Expand"
msgstr ""
#. translators: %1$s is the start date/time, %2$s is the end date/time.
#: src/TouchPoint-WP/Utilities/DateFormats.php:89
-#: src/TouchPoint-WP/Utilities/DateFormats.php:326
+#: src/TouchPoint-WP/Utilities/DateFormats.php:331
msgid "%1$s – %2$s"
msgstr ""
#: src/TouchPoint-WP/Utilities/DateFormats.php:119
-#: src/TouchPoint-WP/Utilities/DateFormats.php:191
+#: src/TouchPoint-WP/Utilities/DateFormats.php:194
msgid "Tonight"
msgstr ""
#: src/TouchPoint-WP/Utilities/DateFormats.php:121
-#: src/TouchPoint-WP/Utilities/DateFormats.php:193
+#: src/TouchPoint-WP/Utilities/DateFormats.php:196
msgid "Today"
msgstr ""
-#: src/TouchPoint-WP/Utilities/DateFormats.php:127
-#: src/TouchPoint-WP/Utilities/DateFormats.php:199
+#: src/TouchPoint-WP/Utilities/DateFormats.php:128
+#: src/TouchPoint-WP/Utilities/DateFormats.php:203
msgid "Tomorrow"
msgstr ""
-#: src/TouchPoint-WP/Utilities/DateFormats.php:134
+#: src/TouchPoint-WP/Utilities/DateFormats.php:130
+#: src/TouchPoint-WP/Utilities/DateFormats.php:205
+msgid "Yesterday"
+msgstr ""
+
+#: src/TouchPoint-WP/Utilities/DateFormats.php:137
msgctxt "Date string for day of the week, when the year is current."
msgid "l"
msgstr ""
-#: src/TouchPoint-WP/Utilities/DateFormats.php:135
+#: src/TouchPoint-WP/Utilities/DateFormats.php:138
msgctxt "Date string when the year is current."
msgid "F j"
msgstr ""
-#: src/TouchPoint-WP/Utilities/DateFormats.php:137
+#: src/TouchPoint-WP/Utilities/DateFormats.php:140
msgctxt "Date string for day of the week, when the year is not current."
msgid "l"
msgstr ""
-#: src/TouchPoint-WP/Utilities/DateFormats.php:138
+#: src/TouchPoint-WP/Utilities/DateFormats.php:141
msgctxt "Date string when the year is not current."
msgid "F j, Y"
msgstr ""
#. translators: %1$s is "Monday". %2$s is "January 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:144
+#: src/TouchPoint-WP/Utilities/DateFormats.php:147
msgctxt "Date format string"
msgid "Last %1$s, %2$s"
msgstr ""
#. translators: %1$s is "Monday". %2$s is "January 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:150
+#: src/TouchPoint-WP/Utilities/DateFormats.php:153
msgctxt "Date format string"
msgid "This %1$s, %2$s"
msgstr ""
#. translators: %1$s is "Monday". %2$s is "January 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:156
+#: src/TouchPoint-WP/Utilities/DateFormats.php:159
msgctxt "Date format string"
msgid "Next %1$s, %2$s"
msgstr ""
#. translators: %1$s is "Monday". %2$s is "January 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:161
+#: src/TouchPoint-WP/Utilities/DateFormats.php:164
msgctxt "Date format string"
msgid "%1$s, %2$s"
msgstr ""
-#: src/TouchPoint-WP/Utilities/DateFormats.php:206
+#: src/TouchPoint-WP/Utilities/DateFormats.php:211
msgctxt "Short date string for day of the week, when the year is current."
msgid "D"
msgstr ""
-#: src/TouchPoint-WP/Utilities/DateFormats.php:207
+#: src/TouchPoint-WP/Utilities/DateFormats.php:212
msgctxt "Short date string when the year is current."
msgid "M j"
msgstr ""
-#: src/TouchPoint-WP/Utilities/DateFormats.php:209
+#: src/TouchPoint-WP/Utilities/DateFormats.php:214
msgctxt "Short date string for day of the week, when the year is not current."
msgid "D"
msgstr ""
-#: src/TouchPoint-WP/Utilities/DateFormats.php:210
+#: src/TouchPoint-WP/Utilities/DateFormats.php:215
msgctxt "Short date string when the year is not current."
msgid "M j, Y"
msgstr ""
#. translators: %1$s is "Mon". %2$s is "Jan 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:216
+#: src/TouchPoint-WP/Utilities/DateFormats.php:221
msgctxt "Short date format string"
msgid "Last %1$s, %2$s"
msgstr ""
#. translators: %1$s is "Mon". %2$s is "Jan 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:222
+#: src/TouchPoint-WP/Utilities/DateFormats.php:227
msgctxt "Short date format string"
msgid "This %1$s, %2$s"
msgstr ""
#. translators: %1$s is "Mon". %2$s is "Jan 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:228
+#: src/TouchPoint-WP/Utilities/DateFormats.php:233
msgctxt "Short date format string"
msgid "Next %1$s, %2$s"
msgstr ""
#. translators: %1$s is "Mon". %2$s is "Jan 1".
-#: src/TouchPoint-WP/Utilities/DateFormats.php:233
+#: src/TouchPoint-WP/Utilities/DateFormats.php:238
msgctxt "Short date format string"
msgid "%1$s, %2$s"
msgstr ""
#. translators: %1$s is the start date, %2$s start time, %3$s is the end date, and %4$s end time.
-#: src/TouchPoint-WP/Utilities/DateFormats.php:359
+#: src/TouchPoint-WP/Utilities/DateFormats.php:364
msgid "%1$s at %2$s – %3$s at %4$s"
msgstr ""
diff --git a/src/TouchPoint-WP/Report.php b/src/TouchPoint-WP/Report.php
index ce34ec3c..e130c0d3 100644
--- a/src/TouchPoint-WP/Report.php
+++ b/src/TouchPoint-WP/Report.php
@@ -144,7 +144,7 @@ public static function load(): bool
/// Cron ///
////////////
- // Setup cron for updating People daily.
+ // Setup cron for updating Reports daily.
add_action(self::CRON_HOOK, [self::class, 'updateCron']);
if ( ! wp_next_scheduled(self::CRON_HOOK)) {
// Runs every 15 minutes, starting now.
diff --git a/src/TouchPoint-WP/Stats.php b/src/TouchPoint-WP/Stats.php
index 24a9cbb9..ba857834 100644
--- a/src/TouchPoint-WP/Stats.php
+++ b/src/TouchPoint-WP/Stats.php
@@ -236,10 +236,16 @@ public function __get(string $name)
/**
* Assemble the information that's submitted.
*
+ * @param bool $updateQueried
+ *
* @return array
*/
- public function getStatsForSubmission(): array
+ public function getStatsForSubmission(bool $updateQueried = false): array
{
+ if ($updateQueried) {
+ $this->updateQueriedStats();
+ }
+
$data = $this->jsonSerialize();
$sets = TouchPointWP::instance()->settings;
@@ -321,9 +327,9 @@ protected function updateQueriedStats(): void
global $wpdb;
$this->involvementPosts = $wpdb->get_var("SELECT COUNT(DISTINCT meta_value) as c FROM $wpdb->postmeta WHERE meta_key = 'tp_invId'") ?? -1;
- $this->meetings = $wpdb->get_var("SELECT COUNT(DISTINCT meta_value) as c FROM $wpdb->postmeta WHERE meta_key = 'tp_mtgId'") ?? -1;
- $this->people = $wpdb->get_var("SELECT COUNT(DISTINCT meta_value) as c FROM $wpdb->usermeta WHERE meta_key = 'tp_peopleId';") ?? -1;
- $this->partnerPosts = $wpdb->get_var("SELECT COUNT(*) as c FROM $wpdb->posts WHERE post_type = 'tp_partner'") ?? -1;
+ $this->meetings = $wpdb->get_var("SELECT COUNT(DISTINCT meta_value) as c FROM $wpdb->postmeta WHERE meta_key = 'tp_mtgId'") ?? -1;
+ $this->people = $wpdb->get_var("SELECT COUNT(DISTINCT meta_value) as c FROM $wpdb->usermeta WHERE meta_key = 'tp_peopleId';") ?? -1;
+ $this->partnerPosts = $wpdb->get_var("SELECT COUNT(*) as c FROM $wpdb->posts WHERE post_type = 'tp_partner'") ?? -1;
$this->_dirty = true;
}
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index f457866d..fa914b67 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -298,8 +298,10 @@ public function admin(): TouchPointWP_AdminAPI
if ($this->admin === null) {
if ( ! TOUCHPOINT_COMPOSER_ENABLED) {
require_once 'TouchPointWP_AdminAPI.php';
+ require_once 'TouchPointWP_Widget.php';
}
$this->admin = new TouchPointWP_AdminAPI();
+ TouchPointWP_Widget::init();
}
return $this->admin;
diff --git a/src/TouchPoint-WP/TouchPointWP_Widget.php b/src/TouchPoint-WP/TouchPointWP_Widget.php
new file mode 100644
index 00000000..43e89a0c
--- /dev/null
+++ b/src/TouchPoint-WP/TouchPointWP_Widget.php
@@ -0,0 +1,117 @@
+getStatsForSubmission(true);
+ $settings = TouchPointWP::instance()->settings;
+
+ global $wpdb;
+ $rpt = Report::POST_TYPE;
+ $reportData = $wpdb->get_row("SELECT MAX(post_modified) as ts, COUNT(*) as cnt FROM $wpdb->posts WHERE post_type = '$rpt'");
+
+ echo '';
+ echo '
';
+
+ echo " ";
+
+ echo "" . __("Imported", "TouchPoint-WP") . " ";
+ echo "" . __("Last Updated", "TouchPoint-WP") . " ";
+
+ echo 'People ' . $stats->people . ' ' . self::timestampToFormated($settings->person_cron_last_run) . " ";
+
+ if ($settings->enable_involvements === "on") {
+ echo 'Involvements ' . $stats->involvementPosts . ' ' . self::timestampToFormated($settings->inv_cron_last_run) . " ";
+ }
+
+ if ($settings->enable_meeting_cal === "on") {
+ echo 'Meetings ' . $stats->meetings . ' ' . self::timestampToFormated($settings->inv_cron_last_run) . " ";
+ }
+
+ if ($settings->enable_global === "on") {
+ echo 'Partners ' . $stats->partnerPosts . ' ' . self::timestampToFormated($settings->global_cron_last_run) . " ";
+ }
+
+ echo 'Reports ' . $reportData->cnt . ' ' . self::timestampToFormated($reportData->ts) . " ";
+
+ echo "
";
+
+ echo '
Version ' . TouchPointWP::VERSION . "
";
+
+ echo '
';
+ }
+}
\ No newline at end of file
diff --git a/src/TouchPoint-WP/Utilities.php b/src/TouchPoint-WP/Utilities.php
index 6a0ead78..78ef94f4 100644
--- a/src/TouchPoint-WP/Utilities.php
+++ b/src/TouchPoint-WP/Utilities.php
@@ -89,6 +89,19 @@ public static function dateTimeNowPlus1D(): DateTimeImmutable
return self::$_dateTimeNowPlus1D;
}
+
+ /**
+ * @return DateTimeImmutable
+ */
+ public static function dateTimeNowMinus1D(): DateTimeImmutable
+ {
+ if (self::$_dateTimeNowMinus1D === null) {
+ $aDay = new DateInterval('P-1D');
+ self::$_dateTimeNowMinus1D = self::dateTimeNow()->add($aDay);
+ }
+
+ return self::$_dateTimeNowMinus1D;
+ }
/**
* @return DateTimeZone
@@ -106,6 +119,7 @@ public static function utcTimeZone(): DateTimeZone
private static ?DateTimeImmutable $_dateTimeTodayAtMidnight = null;
private static ?DateTimeImmutable $_dateTimeNowPlus1Y = null;
private static ?DateTimeImmutable $_dateTimeNowPlus1D = null;
+ private static ?DateTimeImmutable $_dateTimeNowMinus1D = null;
private static ?DateTimeZone $_utcTimeZone = null;
/**
diff --git a/src/TouchPoint-WP/Utilities/DateFormats.php b/src/TouchPoint-WP/Utilities/DateFormats.php
index e57f51ec..25cf8ea6 100644
--- a/src/TouchPoint-WP/Utilities/DateFormats.php
+++ b/src/TouchPoint-WP/Utilities/DateFormats.php
@@ -121,10 +121,13 @@ public static function DateStringFormatted(DateTimeInterface $dt): string
$r = __("Today", "TouchPoint-WP");
}
} else {
- // Tomorrow
+ // Tomorrow & Yesterday
$tomorrow = Utilities::dateTimeNowPlus1D();
+ $yesterday = Utilities::dateTimeNowMinus1D();
if ($tomorrow->format("Ymd") === $dt->format("Ymd")) {
$r = __("Tomorrow", "TouchPoint-WP");
+ } elseif ($yesterday->format("Ymd") === $dt->format("Ymd")) {
+ $r = __("Yesterday", "TouchPoint-WP");
} else {
$ts = DateFormats::timestampWithoutOffset($dt);
$nowTs = DateFormats::timestampWithoutOffset($now);
@@ -142,16 +145,16 @@ public static function DateStringFormatted(DateTimeInterface $dt): string
if ($ts < $nowTs && $ts - $nowTs > -7 * 86400) {
// translators: %1$s is "Monday". %2$s is "January 1".
$r = sprintf(_x('Last %1$s, %2$s', "Date format string", 'TouchPoint-WP'), $day, $date);
- }
+
// This week
- else if ($ts > $nowTs && $ts - $nowTs < 7 * 86400) {
+ } else if ($ts > $nowTs && $ts - $nowTs < 7 * 86400) {
// translators: %1$s is "Monday". %2$s is "January 1".
$r = sprintf(_x('This %1$s, %2$s', "Date format string", 'TouchPoint-WP'), $day, $date);
- }
+
// Next week
- else if ($ts > $nowTs && $ts - $nowTs < 14 * 86400) {
+ } else if ($ts > $nowTs && $ts - $nowTs < 14 * 86400) {
// translators: %1$s is "Monday". %2$s is "January 1".
$r = sprintf(_x('Next %1$s, %2$s', "Date format string", 'TouchPoint-WP'), $day, $date);
@@ -193,16 +196,18 @@ public static function DateStringFormattedShort(DateTimeInterface $dt): string
$r = __("Today", "TouchPoint-WP");
}
} else {
- // Tomorrow
+ // Tomorrow & Yesterday
$tomorrow = Utilities::dateTimeNowPlus1D();
+ $yesterday = Utilities::dateTimeNowMinus1D();
if ($tomorrow->format("Ymd") === $dt->format("Ymd")) {
$r = __("Tomorrow", "TouchPoint-WP");
+ } elseif ($yesterday->format("Ymd") === $dt->format("Ymd")) {
+ $r = __("Yesterday", "TouchPoint-WP");
} else {
$ts = DateFormats::timestampWithoutOffset($dt);
$nowTs = DateFormats::timestampWithoutOffset($now);
-
- if ($tomorrow->format("Y") === $dt->format("Y")) { // Same Year
+ if ($now->format("Y") === $dt->format("Y")) { // Same Year
$day = wp_date(_x('D', "Short date string for day of the week, when the year is current.", "TouchPoint-WP"), $ts);
$date = wp_date(_x('M j', "Short date string when the year is current.", "TouchPoint-WP"), $ts);
} else {
@@ -214,16 +219,16 @@ public static function DateStringFormattedShort(DateTimeInterface $dt): string
if ($ts < $nowTs && $ts - $nowTs > -7 * 86400) {
// translators: %1$s is "Mon". %2$s is "Jan 1".
$r = sprintf(_x('Last %1$s, %2$s', "Short date format string", 'TouchPoint-WP'), $day, $date);
- }
+
// This week
- else if ($ts > $nowTs && $ts - $nowTs < 7 * 86400) {
+ } else if ($ts > $nowTs && $ts - $nowTs < 7 * 86400) {
// translators: %1$s is "Mon". %2$s is "Jan 1".
$r = sprintf(_x('This %1$s, %2$s', "Short date format string", 'TouchPoint-WP'), $day, $date);
- }
+
// Next week
- else if ($ts > $nowTs && $ts - $nowTs < 14 * 86400) {
+ } else if ($ts > $nowTs && $ts - $nowTs < 14 * 86400) {
// translators: %1$s is "Mon". %2$s is "Jan 1".
$r = sprintf(_x('Next %1$s, %2$s', "Short date format string", 'TouchPoint-WP'), $day, $date);
From b94429bc4363507fbaf0baaba34eef041ad2a551 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Fri, 22 Nov 2024 13:06:01 -0500
Subject: [PATCH 213/226] Adding reports to submitted stats
---
src/TouchPoint-WP/Stats.php | 3 +++
src/TouchPoint-WP/TouchPointWP.php | 1 +
2 files changed, 4 insertions(+)
diff --git a/src/TouchPoint-WP/Stats.php b/src/TouchPoint-WP/Stats.php
index ba857834..ff9f9d1c 100644
--- a/src/TouchPoint-WP/Stats.php
+++ b/src/TouchPoint-WP/Stats.php
@@ -24,6 +24,7 @@
* @property int $involvementJoins
* @property int $involvementContacts
* @property int $involvementPosts
+ * @property int $reportPosts
* @property int $meetings
* @property int $rsvps
* @property int $people
@@ -42,6 +43,7 @@ class Stats implements api, \JsonSerializable, updatesViaCron
protected int $involvementJoins = 0;
protected int $involvementContacts = 0;
protected int $involvementPosts = 0; // updated by query
+ protected int $reportPosts = 0; // updated by query
protected int $meetings = 0; // updated by query
protected int $rsvps = 0;
protected int $people = 0; // updated by query
@@ -327,6 +329,7 @@ protected function updateQueriedStats(): void
global $wpdb;
$this->involvementPosts = $wpdb->get_var("SELECT COUNT(DISTINCT meta_value) as c FROM $wpdb->postmeta WHERE meta_key = 'tp_invId'") ?? -1;
+ $this->reportPosts = $wpdb->get_var("SELECT COUNT(*) as c FROM $wpdb->posts WHERE post_type = 'tp_report'") ?? -1;
$this->meetings = $wpdb->get_var("SELECT COUNT(DISTINCT meta_value) as c FROM $wpdb->postmeta WHERE meta_key = 'tp_mtgId'") ?? -1;
$this->people = $wpdb->get_var("SELECT COUNT(DISTINCT meta_value) as c FROM $wpdb->usermeta WHERE meta_key = 'tp_peopleId';") ?? -1;
$this->partnerPosts = $wpdb->get_var("SELECT COUNT(*) as c FROM $wpdb->posts WHERE post_type = 'tp_partner'") ?? -1;
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index fa914b67..c89c99b7 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -682,6 +682,7 @@ protected function createTables(): void
involvementJoins int(10) DEFAULT 0,
involvementContacts int(10) DEFAULT 0,
involvementPosts int(10) DEFAULT 0,
+ reportPosts int(10) DEFAULT 0,
meetings int(10) DEFAULT 0,
rsvps int(10) DEFAULT 0,
people int(10) DEFAULT 0,
From b78a81e6ebce9e197ce3952d2dc23c4c8b6a65a3 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Fri, 22 Nov 2024 13:08:51 -0500
Subject: [PATCH 214/226] Updating several settings
---
i18n/TouchPoint-WP-es_ES.po | 384 ++++++++++----------
i18n/TouchPoint-WP.pot | 378 +++++++++----------
src/TouchPoint-WP/TouchPointWP_Settings.php | 22 +-
3 files changed, 370 insertions(+), 414 deletions(-)
diff --git a/i18n/TouchPoint-WP-es_ES.po b/i18n/TouchPoint-WP-es_ES.po
index 2e2c014d..abb41fe6 100644
--- a/i18n/TouchPoint-WP-es_ES.po
+++ b/i18n/TouchPoint-WP-es_ES.po
@@ -55,7 +55,7 @@ msgid "Slug"
msgstr "Slug"
#: src/templates/admin/invKoForm.php:48
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:992
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:977
msgid "Divisions to Import"
msgstr "Divisiones a Importar"
@@ -314,497 +314,497 @@ msgstr "Contacta"
msgid "RSVP"
msgstr "RSVP"
-#: src/TouchPoint-WP/TouchPointWP.php:2029
+#: src/TouchPoint-WP/TouchPointWP.php:2030
msgid "Unknown Type"
msgstr "Tipo desconocido"
-#: src/TouchPoint-WP/TouchPointWP.php:2086
+#: src/TouchPoint-WP/TouchPointWP.php:2087
msgid "Your Searches"
msgstr "Tus búsquedas"
-#: src/TouchPoint-WP/TouchPointWP.php:2089
+#: src/TouchPoint-WP/TouchPointWP.php:2090
msgid "Public Searches"
msgstr "Búsquedas públicas"
-#: src/TouchPoint-WP/TouchPointWP.php:2092
+#: src/TouchPoint-WP/TouchPointWP.php:2093
msgid "Status Flags"
msgstr "Indicadores de Estado"
-#: src/TouchPoint-WP/TouchPointWP.php:2097
#: src/TouchPoint-WP/TouchPointWP.php:2098
+#: src/TouchPoint-WP/TouchPointWP.php:2099
msgid "Current Value"
msgstr "Valor actual"
-#: src/TouchPoint-WP/TouchPointWP.php:2215
-#: src/TouchPoint-WP/TouchPointWP.php:2251
+#: src/TouchPoint-WP/TouchPointWP.php:2216
+#: src/TouchPoint-WP/TouchPointWP.php:2252
msgid "Invalid or incomplete API Settings."
msgstr "Configuración de API no válida o incompleta."
-#: src/TouchPoint-WP/TouchPointWP.php:2265
-#: src/TouchPoint-WP/TouchPointWP.php:2309
+#: src/TouchPoint-WP/TouchPointWP.php:2266
+#: src/TouchPoint-WP/TouchPointWP.php:2310
msgid "Host appears to be missing from TouchPoint-WP configuration."
msgstr "Parece que falta el host en la configuración de TouchPoint-WP."
-#: src/TouchPoint-WP/TouchPointWP.php:2441
+#: src/TouchPoint-WP/TouchPointWP.php:2442
msgid "People Query Failed"
msgstr "Consulta de registros de personas fallida"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:258
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:257
msgid "Basic Settings"
msgstr "Ajustes básicos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:259
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:258
msgid "Connect to TouchPoint and choose which features you wish to use."
msgstr "Conéctese a TouchPoint y elija qué funciones desea usar."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:263
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:262
msgid "Enable Authentication"
msgstr "Habilitar autenticación"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:264
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:263
msgid "Allow TouchPoint users to sign into this website with TouchPoint."
msgstr "Permita que los usuarios de TouchPoint inicien sesión en este sitio web con TouchPoint."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:275
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:274
msgid "Enable RSVP Tool"
msgstr "Habilitar la herramienta RSVP"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:276
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:275
msgid "Add a crazy-simple RSVP button to WordPress event pages."
msgstr "Agregue un botón RSVP muy simple a las páginas de eventos de WordPress."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:283
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:282
msgid "Enable Involvements"
msgstr "Habilitar Participaciones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:284
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:283
msgid "Load Involvements from TouchPoint for involvement listings and entries native in your website."
msgstr "Cargue participaciones desde TouchPoint para obtener listas de participación y entradas nativas en su sitio web."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:305
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:304
msgid "Enable Public People Lists"
msgstr "Habilitar listas de personas públicas"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:306
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:305
msgid "Import public people listings from TouchPoint (e.g. staff or elders)"
msgstr "Importe listados públicos de personas desde TouchPoint (por ejemplo, personal o ancianos)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:316
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:315
msgid "Enable Global Partner Listings"
msgstr "Habilitar listados de Socios Globales"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:317
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:316
msgid "Import ministry partners from TouchPoint to list publicly."
msgstr "Importe socios ministeriales de TouchPoint para incluirlos en una lista pública."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:338
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:337
msgid "Display Name"
msgstr "Nombre para mostrar"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:339
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:338
msgid "What your church calls your TouchPoint database."
msgstr "Lo que su iglesia llama su base de datos TouchPoint."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:349
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:348
msgid "TouchPoint Host Name"
msgstr "Nombre de host del TouchPoint"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:350
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:349
msgid "The domain for your TouchPoint database, without the https or any slashes."
msgstr "El dominio de su base de datos TouchPoint, sin https ni barras."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:362
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:361
msgid "Custom Mobile App Deeplink Host Name"
msgstr "Nombre de host de enlace profundo de aplicación móvil personalizada"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:374
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:373
msgid "TouchPoint API Username"
msgstr "Nombre de usuario de la API de TouchPoint"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:386
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:385
msgid "TouchPoint API User Password"
msgstr "Contraseña de usuario de la API de TouchPoint"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:387
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:386
msgid "The password of a user account in TouchPoint with API permissions."
msgstr "La contraseña de una cuenta de usuario en TouchPoint con permisos de API."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:399
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:398
msgid "TouchPoint API Script Name"
msgstr "Nombre de la secuencia de comandos de la API de TouchPoint"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:400
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:399
msgid "The name of the Python script loaded into TouchPoint. Don't change this unless you know what you're doing."
msgstr "El nombre de la secuencia de comandos de Python cargada en TouchPoint. No cambies esto a menos que sepas lo que estás haciendo."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:411
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:410
msgid "Google Maps Javascript API Key"
msgstr "Clave de la API de Javascript de Google Maps"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:412
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:411
msgid "Required for embedding maps."
msgstr "Necesario para incrustar mapas."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:423
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:422
msgid "Google Maps Geocoding API Key"
msgstr "Clave API de codificación geográfica de Google Maps"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:424
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:423
msgid "Optional. Allows for reverse geocoding of user locations."
msgstr "Opcional. Permite la geocodificación inversa de las ubicaciones de los usuarios."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:464
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:469
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:463
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:468
msgid "Generate Scripts"
msgstr "Generar secuencias de comandos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:468
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:467
msgid "Upload the package to {tpName} here"
msgstr "Sube el paquete a {tpName} aquí"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:485
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:484
msgid "People"
msgstr "Gente"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:486
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:485
msgid "Manage how people are synchronized between TouchPoint and WordPress."
msgstr "Administre cómo se sincronizan las personas entre TouchPoint y WordPress."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:490
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:489
msgid "Contact Keywords"
msgstr "Palabras clave de contacto"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:491
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:490
msgid "These keywords will be used when someone clicks the \"Contact\" button on a Person's listing or profile."
msgstr "Estas palabras clave se utilizarán cuando alguien haga clic en el botón \"Contactar\" en la lista o el perfil de una Persona."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:502
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:501
msgid "Extra Value for WordPress User ID"
msgstr "Valor Adicional para la ID de usuario de WordPress"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:503
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:502
msgid "The name of the extra value to use for the WordPress User ID. If you are using multiple WordPress instances with one TouchPoint database, you will need these values to be unique between WordPress instances. In most cases, the default is fine."
msgstr "El nombre del valor adicional que se usará para el ID de usuario de WordPress. Si está utilizando varias instancias de WordPress con una base de datos de TouchPoint, necesitará que estos valores sean únicos entre las instancias de WordPress. En la mayoría de los casos, el valor predeterminado está bien."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:513
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:512
msgid "Extra Value: Biography"
msgstr "Valor Adicional: Biografía"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:514
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:513
msgid "Import a Bio from a Person Extra Value field. Can be an HTML or Text Extra Value. This will overwrite any values set by WordPress. Leave blank to not import."
msgstr "Importe una biografía desde un campo de Valor Adicional de Persona. Puede ser un Valor Adicional HTML o de texto. Esto sobrescribirá cualquier valor establecido por WordPress. Dejar en blanco para no importar."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:524
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:762
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:523
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:761
msgid "Extra Values to Import"
msgstr "Valor Adicional para importar"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:525
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:524
msgid "Import People Extra Value fields as User Meta data."
msgstr "Importe campos de valor extra de personas como metadatos de usuario."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:541
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:540
msgid "Authentication"
msgstr "Autenticación"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:542
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:541
msgid "Allow users to log into WordPress using TouchPoint."
msgstr "Permita que los usuarios inicien sesión en WordPress usando TouchPoint."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:546
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:545
msgid "Make TouchPoint the default authentication method."
msgstr "Haga que TouchPoint sea el método de autenticación predeterminado."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:556
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:555
msgid "Enable Auto-Provisioning"
msgstr "Habilitar el aprovisionamiento automático"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:557
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:556
msgid "Automatically create WordPress users, if needed, to match authenticated TouchPoint users."
msgstr "Cree automáticamente usuarios de WordPress, si es necesario, para que coincidan con los usuarios autenticados de TouchPoint."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:566
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:565
msgid "Change 'Edit Profile' links"
msgstr "Cambiar los enlaces 'Editar perfil'"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:567
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:566
msgid "\"Edit Profile\" links will take the user to their TouchPoint profile, instead of their WordPress profile."
msgstr "Los enlaces \"Editar perfil\" llevarán al usuario a su perfil de TouchPoint, en lugar de a su perfil de WordPress."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:576
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:575
msgid "Enable full logout"
msgstr "Habilitar cierre de sesión completo"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:577
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:576
msgid "Logout of TouchPoint when logging out of WordPress."
msgstr "Cierre sesión en TouchPoint al cerrar sesión en WordPress."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:583
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:582
msgid "Prevent Subscriber Admin Bar"
msgstr "Prevenir la barra de administración de suscriptores"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:584
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:583
msgid "By enabling this option, users who can't edit anything won't see the Admin bar."
msgstr "Al habilitar esta opción, los usuarios que no pueden editar nada no verán la barra de administración."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:598
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:597
msgid "Involvements"
msgstr "Involucramientos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:599
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:598
msgid "Import Involvements from TouchPoint to list them on your website, for Small Groups, Classes, and more. Select the division(s) that immediately correspond to the type of Involvement you want to list. For example, if you want a Small Group list and have a Small Group Division, only select the Small Group Division. If you want Involvements to be filterable by additional Divisions, select those Divisions on the Divisions tab, not here."
msgstr "Importe participaciones desde TouchPoint para enumerarlas en su sitio web, para grupos pequeños, clases y más. Seleccione la(s) división(es) que corresponda(n) inmediatamente al tipo de participación que desea enumerar. Por ejemplo, si desea una lista de grupos pequeños y tiene una división de grupos pequeños, solo seleccione la división de grupos pequeños. Si desea que las participaciones se puedan filtrar por divisiones adicionales, seleccione esas divisiones en la pestaña Divisiones, no aquí."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:604
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:603
msgid "Involvement Post Types"
msgstr "Tipos de publicaciones de Involucramientos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:634
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:633
msgid "Global Partners"
msgstr "Misioneros"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:635
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:634
msgid "Manage how global partners are imported from TouchPoint for listing on WordPress. Partners are grouped by family, and content is provided through Family Extra Values. This works for both People and Business records."
msgstr "Administre cómo se importan los socios globales desde TouchPoint para incluirlos en WordPress. Los socios se agrupan por familia y el contenido se proporciona a través de Valor Extra Familiar. Esto funciona tanto para registros de personas como de empresas."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:639
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:638
msgid "Global Partner Name (Plural)"
msgstr "Nombre de los misioneros (plural)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:640
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:639
msgid "What you call Global Partners at your church"
msgstr "Lo que llamas los Misioneros en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:650
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:649
msgid "Global Partner Name (Singular)"
msgstr "Nombre de un misionero (singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:651
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:650
msgid "What you call a Global Partner at your church"
msgstr "Lo que llamas un Misionero en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:661
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:660
msgid "Global Partner Name for Secure Places (Plural)"
msgstr "Nombre de los misioneros para lugares seguros (plural)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:662
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:661
msgid "What you call Secure Global Partners at your church"
msgstr "Lo que llamas un Misionero seguro en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:672
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:671
msgid "Global Partner Name for Secure Places (Singular)"
msgstr "Nombre de un misionero para lugares seguros (singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:673
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:672
msgid "What you call a Secure Global Partner at your church"
msgstr "Lo que llamas los Misioneros seguros en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:683
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:682
msgid "Global Partner Slug"
msgstr "Slug de Socio Global"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:684
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:683
msgid "The root path for Global Partner posts"
msgstr "La ruta raíz para las publicaciones de Socios Globales"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:696
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:695
msgid "Saved Search"
msgstr "Búsqueda Guardada"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:697
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:696
msgid "Anyone who is included in this saved search will be included in the listing."
msgstr "Cualquiera que esté incluido en esta búsqueda guardada se incluirá en la lista."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:707
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:706
msgid "Extra Value: Description"
msgstr "Valor Adicional: Descripción"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:708
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:707
msgid "Import a description from a Family Extra Value field. Can be an HTML or Text Extra Value. This becomes the body of the Global Partner post."
msgstr "Importe una descripción de un campo de Valor Extra Familiar. Puede ser un valor adicional HTML o de texto. Esto se convierte en el cuerpo de la publicación del socio global."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:718
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:717
msgid "Extra Value: Summary"
msgstr "Valor Adicional: Resumen"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:719
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:718
msgid "Optional. Import a short description from a Family Extra Value field. Can be an HTML or Text Extra Value. If not provided, the full bio will be truncated."
msgstr "Opcional. Importe una breve descripción de un campo de Valor Extra Familiar. Puede ser un Valor Adicional HTML o de texto. Si no se proporciona, la biografía completa se truncará."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:729
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:728
msgid "Latitude Override"
msgstr "Anulación de latitud"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:730
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:729
msgid "Designate a text Family Extra Value that will contain a latitude that overrides any locations on the partner's profile for the partner map. Both latitude and longitude must be provided for an override to take place."
msgstr "Designe un Valor Familiar Adicional de texto que contenga una latitud que anule cualquier ubicación en el perfil del socio para el mapa de socios. Tanto la latitud como la longitud deben proporcionarse para que se produzca una anulación."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:740
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:739
msgid "Longitude Override"
msgstr "Anulación de longitud"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:741
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:740
msgid "Designate a text Family Extra Value that will contain a longitude that overrides any locations on the partner's profile for the partner map. Both latitude and longitude must be provided for an override to take place."
msgstr "Designe un Valor Familiar Adicional de texto que contenga una longitud que anule cualquier ubicación en el perfil del socio para el mapa de socios. Tanto la latitud como la longitud deben proporcionarse para que se produzca una anulación."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:751
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:750
msgid "Public Location"
msgstr "Ubicación Pública"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:752
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:751
msgid "Designate a text Family Extra Value that will contain the partner's location, as you want listed publicly. For partners who have DecoupleLocation enabled, this field will be associated with the map point, not the list entry."
msgstr "Designe un Valor Adicional Familiar de texto que contendrá la ubicación del socio, como desea que se enumere públicamente. Para los socios que tienen DecoupleLocation habilitado, este campo se asociará con el punto del mapa, no con la entrada de la lista."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:763
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:762
msgid "Import Family Extra Value fields as Meta data on the partner's post"
msgstr "Importe campos de Valor Adicional Familiar como Metadatos en la publicación del socio"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:774
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:773
msgid "Primary Taxonomy"
msgstr "Taxonomía Primaria"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:775
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:774
msgid "Import a Family Extra Value as the primary means by which partners are organized."
msgstr "Importe un Valor Adicional Familiar como el medio principal por el cual se organizan los socios."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:818
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:817
msgid "Events for Custom Mobile App"
msgstr "Eventos para la aplicación móvil personalizada"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:823
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:822
msgid "Preview"
msgstr "Preestrena"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:838
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:837
msgid "Use Standardizing Stylesheet"
msgstr "Usar hoja de estilo de estandarización"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:839
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:838
msgid "Inserts some basic CSS into the events feed to clean up display"
msgstr "Inserta algo de CSS básico en el feed de eventos para limpiar la pantalla"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:950
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:935
msgid "Divisions"
msgstr "Divisiones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:951
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:936
msgid "Import Divisions from TouchPoint to your website as a taxonomy. These are used to classify users and involvements."
msgstr "Importe Divisiones desde TouchPoint a su sitio web como una taxonomía. Estos se utilizan para clasificar a los usuarios y las participaciones."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:955
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:940
msgid "Division Name (Plural)"
msgstr "Nombre de la División (plural)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:956
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:941
msgid "What you call Divisions at your church"
msgstr "Lo que llamas Divisiones en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:967
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:952
msgid "Division Name (Singular)"
msgstr "Nombre de la División (Singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:968
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:953
msgid "What you call a Division at your church"
msgstr "Lo que llamas una división en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:979
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:964
msgid "Division Slug"
msgstr "Slug de División"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:980
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:965
msgid "The root path for the Division Taxonomy"
msgstr "La ruta raíz para la Taxonomía de División"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:993
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:978
msgid "These Divisions will be imported for the taxonomy"
msgstr "Estas Divisiones se importarán para la taxonomía"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1044
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1029
msgid "Campuses"
msgstr "Campus"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1045
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1030
msgid "Import Campuses from TouchPoint to your website as a taxonomy. These are used to classify users and involvements."
msgstr "Importe Campus desde TouchPoint a su sitio web como una taxonomía. Estos se utilizan para clasificar a los usuarios y las participaciones."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1052
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1037
msgid "Campus Name (Plural)"
msgstr "Nombre del Campus (Plural)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1053
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1038
msgid "What you call Campuses at your church"
msgstr "Lo que llamas Campus en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1064
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1049
msgid "Campus Name (Singular)"
msgstr "Nombre del Campus (Singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1065
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1050
msgid "What you call a Campus at your church"
msgstr "Lo que llamas un Campus en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1076
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1061
msgid "Campus Slug"
msgstr "Slug de Campus"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1077
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1062
msgid "The root path for the Campus Taxonomy"
msgstr "La ruta raíz para la Taxonomía del Campus"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1093
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1078
msgid "Resident Codes"
msgstr "Códigos de Residentes"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1094
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1079
msgid "Import Resident Codes from TouchPoint to your website as a taxonomy. These are used to classify users and involvements that have locations."
msgstr "Importe Códigos de Residentes desde TouchPoint a su sitio web como una taxonomía. Estos se utilizan para clasificar los usuarios y las participaciones que tienen ubicaciones."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1098
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1083
msgid "Resident Code Name (Plural)"
msgstr "Nombre de Código de Tesidente (Plural)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1099
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1084
msgid "What you call Resident Codes at your church"
msgstr "Lo que llamas Códigos de Residente en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1110
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1095
msgid "Resident Code Name (Singular)"
msgstr "Nombre de Código de Residente (singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1111
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1096
msgid "What you call a Resident Code at your church"
msgstr "Lo que llamas un Código de Residencia en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1122
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1107
msgid "Resident Code Slug"
msgstr "Slug de Código Residente"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1123
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1108
msgid "The root path for the Resident Code Taxonomy"
msgstr "La ruta raíz para la Taxonomía del Código de Residente"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1299
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1284
msgid "password saved"
msgstr "contraseña guardada"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1353
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1354
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1338
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1339
msgid "TouchPoint-WP"
msgstr "TouchPoint-WP"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1402
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1387
msgid "Settings"
msgstr "Ajustes"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1639
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1627
msgid "Script Update Failed"
msgstr "Actualización de secuencia de comandos fallida"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1761
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1749
msgid "TouchPoint-WP Settings"
msgstr "Configuración de TouchPoint-WP"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1812
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1800
msgid "Save Settings"
msgstr "Guardar ajustes"
@@ -972,7 +972,7 @@ msgstr "Enviar"
msgid "Nothing to submit."
msgstr "Nada que enviar."
-#: src/TouchPoint-WP/TouchPointWP.php:2382
+#: src/TouchPoint-WP/TouchPointWP.php:2383
msgid "The scripts on TouchPoint that interact with this plugin are out-of-date, and an automatic update failed."
msgstr "Los scripts en TouchPoint que interactúan con este complemento están desactualizados y falló una actualización automática."
@@ -1154,12 +1154,12 @@ msgstr "Añade una ubicación"
msgid "The Campus"
msgstr "El campus"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1019
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1025
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1004
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1010
msgid "Locations"
msgstr "Ubicaciones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1020
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1005
msgid "Locations are physical places, probably campuses. None are required, but they can help present geographic information clearly."
msgstr "Las ubicaciones son lugares físicos, probablemente campus. No se requiere ninguno, pero pueden ayudar a presentar la información geográfica con claridad."
@@ -1268,7 +1268,7 @@ msgctxt "miles. Unit is appended to a number. %2.1f is the number, so %2.1fmi l
msgid "%2.1fmi"
msgstr "%2.1fmi"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:375
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:374
msgid "The username of a user account in TouchPoint with API permissions. It is strongly recommended that you create a separate person/user for this purpose, rather than using a staff member's account."
msgstr "El nombre de usuario de una cuenta de usuario en TouchPoint con permisos API. Se recomienda encarecidamente que cree una persona/usuario independiente para este fin, en lugar de utilizar la cuenta de un miembro del personal."
@@ -1293,7 +1293,7 @@ msgid "Could not locate."
msgstr "No se pudo localizar."
#: src/TouchPoint-WP/Meeting.php:672
-#: src/TouchPoint-WP/TouchPointWP.php:1031
+#: src/TouchPoint-WP/TouchPointWP.php:1032
msgid "Only GET requests are allowed."
msgstr "Solo se permiten solicitudes GET."
@@ -1312,7 +1312,7 @@ msgstr "Datos proporcionados no válidos."
msgid "Invalid Post Type."
msgstr "Tipo de publicación no válida."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:327
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:326
msgid "Enable Campuses"
msgstr "Habilitar Campus"
@@ -1377,7 +1377,7 @@ msgstr "Estados Civiles"
msgid "Classify Partners by category chosen in settings."
msgstr "Clasifique a los ministeriales por categoría elegida en la configuración."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:328
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:327
msgid "Import campuses as a taxonomy. (You probably want to do this if you're multi-campus.)"
msgstr "Importar campus como taxonomía. (Probablemente quieras hacer esto si tienes varios campus)."
@@ -1445,11 +1445,11 @@ msgctxt "list of people, and *others*"
msgid "others"
msgstr "otros"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:851
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:850
msgid "Meeting Calendars"
msgstr "Calendarios de Reuniones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:852
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:851
msgid "Import Meetings from TouchPoint to a calendar on your website."
msgstr "Importe reuniones desde TouchPoint a un calendario en su sitio web."
@@ -1457,44 +1457,28 @@ msgstr "Importe reuniones desde TouchPoint a un calendario en su sitio web."
msgid "Import All Meetings to Calendar"
msgstr "Importe reuniones a los calendarios"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:880
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:879
msgid "Meetings Slug"
msgstr "Slug de reuniones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:881
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:880
msgid "The root path for Meetings"
msgstr "La ruta raíz para las reuniones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:932
-msgid "Meeting Deletion Handling"
-msgstr "Manejo de eliminación de reuniones"
-
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:933
-msgid "When a Meeting is deleted in TouchPoint that has already been imported to WordPress, how should that be handled?"
-msgstr "Cuando se elimina una reunión en TouchPoint que ya se ha importado a WordPress, ¿cómo se debe manejar?"
-
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:939
-msgid "Always delete from WordPress"
-msgstr "Eliminar siempre de WordPress"
-
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:940
-msgid "Mark the occurrence as cancelled"
-msgstr "Marcar la ocurrencia como cancelada"
-
#: src/TouchPoint-WP/Involvement.php:3951
#: src/TouchPoint-WP/Person.php:1833
msgid "Contact Prohibited."
msgstr "Contacto prohibido."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:547
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:546
msgid "By checking this box, the TouchPoint login page will become the default. To prevent the redirect and reach the standard WordPress login page, add 'tp_no_redirect' as a URL parameter."
msgstr "Al marcar esta casilla, la página de inicio de sesión de TouchPoint se convertirá en la predeterminada. Para evitar la redirección y llegar a la página de inicio de sesión estándar de WordPress, agregue 'tp_no_redirect' como parámetro de URL."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:363
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:362
msgid "The domain for your mobile app deeplinks, without the https or any slashes. If you aren't using the custom mobile app, leave this blank."
msgstr "El dominio de los enlaces profundos de su aplicación móvil, sin https ni barras diagonales. Si no está utilizando la aplicación móvil personalizada, déjelo en blanco."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:467
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:466
msgid "Once your settings on this page are set and saved, use this tool to generate the scripts needed for TouchPoint in a convenient installation package."
msgstr "Una vez que haya configurado y guardado la configuración en esta página, utilice esta herramienta para generar los scripts necesarios para TouchPoint en un paquete de instalación conveniente."
@@ -1526,48 +1510,40 @@ msgctxt "What Meetings should be called, singular."
msgid "Event"
msgstr "Evento"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:294
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:293
msgid "Enable Meeting Calendar"
msgstr "Habilitar calendario de reuniones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:295
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:294
msgid "Load Meetings from TouchPoint for a calendar, native in your website."
msgstr "Cargue reuniones desde TouchPoint para un calendario nativo en su sitio web."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:893
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:892
msgid "Days of Future"
msgstr "Días del futuro"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:894
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:893
msgid "Meetings more than this many days in the future will not be imported."
msgstr "No se importarán reuniones que superen estos días en el futuro."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:906
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:905
msgid "Archive After Days"
msgstr "Archivo después de días"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:907
-msgid "Meetings more than this many days in the past will be moved to the Events Archive. Once this date passes, meeting information will no longer update."
-msgstr "Las reuniones que hayan transcurrido más de esta cantidad de días pasados se trasladarán al Archivo de eventos. Una vez que pase esta fecha, la información de la reunión ya no se actualizará."
-
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:919
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:918
msgid "Days of History"
msgstr "Días de la Historia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:920
-msgid "Meetings will be kept for the public calendar until the event is this many days in the past."
-msgstr "Las reuniones se mantendrán para el calendario público hasta que hayan transcurrido tantos días desde el evento."
-
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1004
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1135
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:989
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1120
msgid "Post Types"
msgstr "Tipos de publicaciones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1005
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:990
msgid "Select post types which should have Divisions available as a native taxonomy."
msgstr "Seleccione los tipos de publicaciones que deberían tener Divisiones disponibles como taxonomía nativa."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1136
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1121
msgid "Select post types which should have Resident Codes available as a native taxonomy."
msgstr "Seleccione los tipos de publicaciones que deberían tener códigos de residente disponibles como taxonomía nativa."
@@ -1650,39 +1626,39 @@ msgstr "Reunión en %s"
msgid "Person in %s"
msgstr "Persona en %s"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:856
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:855
msgid "Meeting Name (Plural)"
msgstr "Nombre de las reuniones (singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:857
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:856
msgid "What you call Meetings at your church"
msgstr "Lo que llamas Reuniones en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:862
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:864
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:861
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:863
msgid "Meetings"
msgstr "Reuniones"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:862
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:864
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:861
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:863
msgid "Events"
msgstr "Eventos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:868
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:867
msgid "Meeting Name (Singular)"
msgstr "Nombre de la reunión (singular)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:869
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:868
msgid "What you call a Meeting at your church"
msgstr "Cómo se llama una Reunión en tu iglesia"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:874
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:876
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:873
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:875
msgid "Meeting"
msgstr "Reunión"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:874
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:876
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:873
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:875
msgid "Event"
msgstr "Evento"
@@ -1789,31 +1765,31 @@ msgstr "No hay %s publicados para este mes."
msgid "Radius (miles)"
msgstr "Radio (millas)"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:792
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:791
msgid "Events Calendar plugin by Modern Tribe"
msgstr "Complemento de calendario de eventos de Modern Tribe"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:796
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:795
msgid "TouchPoint Meetings"
msgstr "reuniones de TouchPoint"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:802
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:801
msgid "App 2.0 Calendar"
msgstr "Calendario de la app 2.0"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:807
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:806
msgid "Events Provider"
msgstr "Proveedor de eventos"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:808
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:807
msgid "The source of events for version 2.0 of the Custom Mobile App."
msgstr "El origen de los eventos para la versión 2.0 de la aplicación móvil personalizada."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:821
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:820
msgid "To use your Events Calendar events in the Custom mobile app, set the Provider to Wordpress Plugin - Modern Tribe (regardless of which provider you're using above) and use this url:"
msgstr "Para usar sus eventos del Calendario de eventos en la aplicación móvil personalizada, configure el Proveedor en Wordpress Plugin - Modern Tribe (independientemente del proveedor que esté utilizando anteriormente) y use esta URL:"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:803
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:802
msgid "Integrate Custom Mobile app version 2.0 with The Events Calendar from Modern Tribe."
msgstr "Integre la versión 2.0 de la aplicación móvil personalizada con el calendario de eventos de Modern Tribe."
@@ -1843,19 +1819,19 @@ msgctxt "list of items, and *others*"
msgid "others"
msgstr "otros"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:434
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:433
msgid "ipapi.co API Key"
msgstr "Clave API de ipapi.co"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:435
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:434
msgid "Optional. Allows for geolocation of user IP addresses. This generally will work without a key, but may be rate limited."
msgstr "Opcional. Permite la geolocalización de las direcciones IP de los usuarios. Por lo general, esto funcionará sin una clave, pero puede tener una frecuencia limitada."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:445
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:444
msgid "Allow the TouchPoint-WP developers to publicly list your site/church as using TouchPoint-WP"
msgstr "Permitir que los desarrolladores de TouchPoint-WP incluyan públicamente su sitio/iglesia como usuarios de TouchPoint-WP"
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:446
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:445
msgid "Helps other prospective churches see what can be done by combining WordPress with the best ChMS on the planet. Only applies if this site is accessible on the public internet."
msgstr "Ayuda a otras iglesias potenciales a ver lo que se puede hacer combinando WordPress con el mejor ChMS del planeta. Solo se aplica si este sitio es accesible en Internet público."
@@ -1887,3 +1863,11 @@ msgstr "Actualizada"
#: src/TouchPoint-WP/Utilities/DateFormats.php:205
msgid "Yesterday"
msgstr "Ayer"
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:906
+msgid "Meetings more than this many days in the past will no longer update from TouchPoint, allowing you to keep some historical event information on the calendar for reference, even if you reuse and update the information in the Involvement."
+msgstr "Las reuniones con más de esta cantidad de días en el pasado ya no se actualizarán desde TouchPoint, lo que le permitirá conservar información histórica de eventos en el calendario para referencia, incluso si reutiliza y actualiza la información en Participación."
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:919
+msgid "Meetings will be kept on the calendar until the event is this many days in the past. Once an event is older than this, it'll be deleted."
+msgstr "Las reuniones se mantendrán en el calendario hasta que el evento tenga esta cantidad de días en el pasado. Una vez que un evento tenga más de esta cantidad de días, se eliminará."
diff --git a/i18n/TouchPoint-WP.pot b/i18n/TouchPoint-WP.pot
index 71300fa4..977622c1 100644
--- a/i18n/TouchPoint-WP.pot
+++ b/i18n/TouchPoint-WP.pot
@@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2024-11-22T17:39:16+00:00\n"
+"POT-Creation-Date: 2024-11-22T18:07:49+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: TouchPoint-WP\n"
@@ -58,7 +58,7 @@ msgid "Slug"
msgstr ""
#: src/templates/admin/invKoForm.php:48
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:992
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:977
msgid "Divisions to Import"
msgstr ""
@@ -572,7 +572,7 @@ msgid "Unknown"
msgstr ""
#: src/TouchPoint-WP/Meeting.php:672
-#: src/TouchPoint-WP/TouchPointWP.php:1031
+#: src/TouchPoint-WP/TouchPointWP.php:1032
msgid "Only GET requests are allowed."
msgstr ""
@@ -745,691 +745,675 @@ msgstr ""
msgid "Every 15 minutes"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2029
+#: src/TouchPoint-WP/TouchPointWP.php:2030
msgid "Unknown Type"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2086
+#: src/TouchPoint-WP/TouchPointWP.php:2087
msgid "Your Searches"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2089
+#: src/TouchPoint-WP/TouchPointWP.php:2090
msgid "Public Searches"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2092
+#: src/TouchPoint-WP/TouchPointWP.php:2093
msgid "Status Flags"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2097
#: src/TouchPoint-WP/TouchPointWP.php:2098
+#: src/TouchPoint-WP/TouchPointWP.php:2099
msgid "Current Value"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2215
-#: src/TouchPoint-WP/TouchPointWP.php:2251
+#: src/TouchPoint-WP/TouchPointWP.php:2216
+#: src/TouchPoint-WP/TouchPointWP.php:2252
msgid "Invalid or incomplete API Settings."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2265
-#: src/TouchPoint-WP/TouchPointWP.php:2309
+#: src/TouchPoint-WP/TouchPointWP.php:2266
+#: src/TouchPoint-WP/TouchPointWP.php:2310
msgid "Host appears to be missing from TouchPoint-WP configuration."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2382
+#: src/TouchPoint-WP/TouchPointWP.php:2383
msgid "The scripts on TouchPoint that interact with this plugin are out-of-date, and an automatic update failed."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2441
+#: src/TouchPoint-WP/TouchPointWP.php:2442
msgid "People Query Failed"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:258
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:257
msgid "Basic Settings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:259
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:258
msgid "Connect to TouchPoint and choose which features you wish to use."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:263
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:262
msgid "Enable Authentication"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:264
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:263
msgid "Allow TouchPoint users to sign into this website with TouchPoint."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:275
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:274
msgid "Enable RSVP Tool"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:276
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:275
msgid "Add a crazy-simple RSVP button to WordPress event pages."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:283
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:282
msgid "Enable Involvements"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:284
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:283
msgid "Load Involvements from TouchPoint for involvement listings and entries native in your website."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:294
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:293
msgid "Enable Meeting Calendar"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:295
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:294
msgid "Load Meetings from TouchPoint for a calendar, native in your website."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:305
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:304
msgid "Enable Public People Lists"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:306
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:305
msgid "Import public people listings from TouchPoint (e.g. staff or elders)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:316
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:315
msgid "Enable Global Partner Listings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:317
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:316
msgid "Import ministry partners from TouchPoint to list publicly."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:327
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:326
msgid "Enable Campuses"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:328
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:327
msgid "Import campuses as a taxonomy. (You probably want to do this if you're multi-campus.)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:338
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:337
msgid "Display Name"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:339
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:338
msgid "What your church calls your TouchPoint database."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:349
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:348
msgid "TouchPoint Host Name"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:350
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:349
msgid "The domain for your TouchPoint database, without the https or any slashes."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:362
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:361
msgid "Custom Mobile App Deeplink Host Name"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:363
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:362
msgid "The domain for your mobile app deeplinks, without the https or any slashes. If you aren't using the custom mobile app, leave this blank."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:374
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:373
msgid "TouchPoint API Username"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:375
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:374
msgid "The username of a user account in TouchPoint with API permissions. It is strongly recommended that you create a separate person/user for this purpose, rather than using a staff member's account."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:386
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:385
msgid "TouchPoint API User Password"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:387
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:386
msgid "The password of a user account in TouchPoint with API permissions."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:399
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:398
msgid "TouchPoint API Script Name"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:400
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:399
msgid "The name of the Python script loaded into TouchPoint. Don't change this unless you know what you're doing."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:411
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:410
msgid "Google Maps Javascript API Key"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:412
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:411
msgid "Required for embedding maps."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:423
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:422
msgid "Google Maps Geocoding API Key"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:424
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:423
msgid "Optional. Allows for reverse geocoding of user locations."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:434
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:433
msgid "ipapi.co API Key"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:435
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:434
msgid "Optional. Allows for geolocation of user IP addresses. This generally will work without a key, but may be rate limited."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:445
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:444
msgid "Allow the TouchPoint-WP developers to publicly list your site/church as using TouchPoint-WP"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:446
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:445
msgid "Helps other prospective churches see what can be done by combining WordPress with the best ChMS on the planet. Only applies if this site is accessible on the public internet."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:464
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:469
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:463
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:468
msgid "Generate Scripts"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:467
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:466
msgid "Once your settings on this page are set and saved, use this tool to generate the scripts needed for TouchPoint in a convenient installation package."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:468
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:467
msgid "Upload the package to {tpName} here"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:485
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:484
msgid "People"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:486
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:485
msgid "Manage how people are synchronized between TouchPoint and WordPress."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:490
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:489
msgid "Contact Keywords"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:491
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:490
msgid "These keywords will be used when someone clicks the \"Contact\" button on a Person's listing or profile."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:502
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:501
msgid "Extra Value for WordPress User ID"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:503
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:502
msgid "The name of the extra value to use for the WordPress User ID. If you are using multiple WordPress instances with one TouchPoint database, you will need these values to be unique between WordPress instances. In most cases, the default is fine."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:513
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:512
msgid "Extra Value: Biography"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:514
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:513
msgid "Import a Bio from a Person Extra Value field. Can be an HTML or Text Extra Value. This will overwrite any values set by WordPress. Leave blank to not import."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:524
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:762
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:523
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:761
msgid "Extra Values to Import"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:525
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:524
msgid "Import People Extra Value fields as User Meta data."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:541
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:540
msgid "Authentication"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:542
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:541
msgid "Allow users to log into WordPress using TouchPoint."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:546
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:545
msgid "Make TouchPoint the default authentication method."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:547
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:546
msgid "By checking this box, the TouchPoint login page will become the default. To prevent the redirect and reach the standard WordPress login page, add 'tp_no_redirect' as a URL parameter."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:556
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:555
msgid "Enable Auto-Provisioning"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:557
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:556
msgid "Automatically create WordPress users, if needed, to match authenticated TouchPoint users."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:566
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:565
msgid "Change 'Edit Profile' links"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:567
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:566
msgid "\"Edit Profile\" links will take the user to their TouchPoint profile, instead of their WordPress profile."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:576
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:575
msgid "Enable full logout"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:577
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:576
msgid "Logout of TouchPoint when logging out of WordPress."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:583
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:582
msgid "Prevent Subscriber Admin Bar"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:584
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:583
msgid "By enabling this option, users who can't edit anything won't see the Admin bar."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:598
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:597
msgid "Involvements"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:599
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:598
msgid "Import Involvements from TouchPoint to list them on your website, for Small Groups, Classes, and more. Select the division(s) that immediately correspond to the type of Involvement you want to list. For example, if you want a Small Group list and have a Small Group Division, only select the Small Group Division. If you want Involvements to be filterable by additional Divisions, select those Divisions on the Divisions tab, not here."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:604
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:603
msgid "Involvement Post Types"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:634
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:633
msgid "Global Partners"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:635
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:634
msgid "Manage how global partners are imported from TouchPoint for listing on WordPress. Partners are grouped by family, and content is provided through Family Extra Values. This works for both People and Business records."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:639
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:638
msgid "Global Partner Name (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:640
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:639
msgid "What you call Global Partners at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:650
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:649
msgid "Global Partner Name (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:651
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:650
msgid "What you call a Global Partner at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:661
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:660
msgid "Global Partner Name for Secure Places (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:662
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:661
msgid "What you call Secure Global Partners at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:672
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:671
msgid "Global Partner Name for Secure Places (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:673
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:672
msgid "What you call a Secure Global Partner at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:683
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:682
msgid "Global Partner Slug"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:684
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:683
msgid "The root path for Global Partner posts"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:696
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:695
msgid "Saved Search"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:697
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:696
msgid "Anyone who is included in this saved search will be included in the listing."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:707
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:706
msgid "Extra Value: Description"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:708
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:707
msgid "Import a description from a Family Extra Value field. Can be an HTML or Text Extra Value. This becomes the body of the Global Partner post."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:718
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:717
msgid "Extra Value: Summary"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:719
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:718
msgid "Optional. Import a short description from a Family Extra Value field. Can be an HTML or Text Extra Value. If not provided, the full bio will be truncated."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:729
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:728
msgid "Latitude Override"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:730
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:729
msgid "Designate a text Family Extra Value that will contain a latitude that overrides any locations on the partner's profile for the partner map. Both latitude and longitude must be provided for an override to take place."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:740
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:739
msgid "Longitude Override"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:741
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:740
msgid "Designate a text Family Extra Value that will contain a longitude that overrides any locations on the partner's profile for the partner map. Both latitude and longitude must be provided for an override to take place."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:751
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:750
msgid "Public Location"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:752
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:751
msgid "Designate a text Family Extra Value that will contain the partner's location, as you want listed publicly. For partners who have DecoupleLocation enabled, this field will be associated with the map point, not the list entry."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:763
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:762
msgid "Import Family Extra Value fields as Meta data on the partner's post"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:774
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:773
msgid "Primary Taxonomy"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:775
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:774
msgid "Import a Family Extra Value as the primary means by which partners are organized."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:792
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:791
msgid "Events Calendar plugin by Modern Tribe"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:796
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:795
msgid "TouchPoint Meetings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:802
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:801
msgid "App 2.0 Calendar"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:803
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:802
msgid "Integrate Custom Mobile app version 2.0 with The Events Calendar from Modern Tribe."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:807
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:806
msgid "Events Provider"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:808
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:807
msgid "The source of events for version 2.0 of the Custom Mobile App."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:818
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:817
msgid "Events for Custom Mobile App"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:821
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:820
msgid "To use your Events Calendar events in the Custom mobile app, set the Provider to Wordpress Plugin - Modern Tribe (regardless of which provider you're using above) and use this url:"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:823
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:822
msgid "Preview"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:838
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:837
msgid "Use Standardizing Stylesheet"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:839
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:838
msgid "Inserts some basic CSS into the events feed to clean up display"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:851
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:850
msgid "Meeting Calendars"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:852
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:851
msgid "Import Meetings from TouchPoint to a calendar on your website."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:856
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:855
msgid "Meeting Name (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:857
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:856
msgid "What you call Meetings at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:862
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:864
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:861
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:863
msgid "Meetings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:862
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:864
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:861
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:863
msgid "Events"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:868
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:867
msgid "Meeting Name (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:869
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:868
msgid "What you call a Meeting at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:874
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:876
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:873
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:875
msgid "Meeting"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:874
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:876
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:873
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:875
msgid "Event"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:880
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:879
msgid "Meetings Slug"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:881
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:880
msgid "The root path for Meetings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:893
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:892
msgid "Days of Future"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:894
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:893
msgid "Meetings more than this many days in the future will not be imported."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:906
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:905
msgid "Archive After Days"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:907
-msgid "Meetings more than this many days in the past will be moved to the Events Archive. Once this date passes, meeting information will no longer update."
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:906
+msgid "Meetings more than this many days in the past will no longer update from TouchPoint, allowing you to keep some historical event information on the calendar for reference, even if you reuse and update the information in the Involvement."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:919
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:918
msgid "Days of History"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:920
-msgid "Meetings will be kept for the public calendar until the event is this many days in the past."
-msgstr ""
-
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:932
-msgid "Meeting Deletion Handling"
-msgstr ""
-
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:933
-msgid "When a Meeting is deleted in TouchPoint that has already been imported to WordPress, how should that be handled?"
-msgstr ""
-
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:939
-msgid "Always delete from WordPress"
-msgstr ""
-
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:940
-msgid "Mark the occurrence as cancelled"
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:919
+msgid "Meetings will be kept on the calendar until the event is this many days in the past. Once an event is older than this, it'll be deleted."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:950
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:935
msgid "Divisions"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:951
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:936
msgid "Import Divisions from TouchPoint to your website as a taxonomy. These are used to classify users and involvements."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:955
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:940
msgid "Division Name (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:956
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:941
msgid "What you call Divisions at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:967
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:952
msgid "Division Name (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:968
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:953
msgid "What you call a Division at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:979
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:964
msgid "Division Slug"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:980
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:965
msgid "The root path for the Division Taxonomy"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:993
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:978
msgid "These Divisions will be imported for the taxonomy"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1004
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1135
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:989
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1120
msgid "Post Types"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1005
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:990
msgid "Select post types which should have Divisions available as a native taxonomy."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1019
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1025
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1004
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1010
msgid "Locations"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1020
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1005
msgid "Locations are physical places, probably campuses. None are required, but they can help present geographic information clearly."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1044
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1029
msgid "Campuses"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1045
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1030
msgid "Import Campuses from TouchPoint to your website as a taxonomy. These are used to classify users and involvements."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1052
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1037
msgid "Campus Name (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1053
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1038
msgid "What you call Campuses at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1064
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1049
msgid "Campus Name (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1065
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1050
msgid "What you call a Campus at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1076
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1061
msgid "Campus Slug"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1077
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1062
msgid "The root path for the Campus Taxonomy"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1093
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1078
msgid "Resident Codes"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1094
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1079
msgid "Import Resident Codes from TouchPoint to your website as a taxonomy. These are used to classify users and involvements that have locations."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1098
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1083
msgid "Resident Code Name (Plural)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1099
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1084
msgid "What you call Resident Codes at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1110
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1095
msgid "Resident Code Name (Singular)"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1111
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1096
msgid "What you call a Resident Code at your church"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1122
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1107
msgid "Resident Code Slug"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1123
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1108
msgid "The root path for the Resident Code Taxonomy"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1136
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1121
msgid "Select post types which should have Resident Codes available as a native taxonomy."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1299
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1284
msgid "password saved"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1353
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1354
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1338
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1339
msgid "TouchPoint-WP"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1402
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1387
msgid "Settings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1639
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1627
msgid "Script Update Failed"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1761
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1749
msgid "TouchPoint-WP Settings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:1812
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:1800
msgid "Save Settings"
msgstr ""
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 54ea88e1..71162a74 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -78,7 +78,6 @@
* @property-read int mc_future_days Number of days into the future to import.
* @property-read int mc_archive_days Number of days to wait to move something to history.
* @property-read int|string mc_hist_days Number of days of history to keep. (Can be '' if module isn't enabled.)
- * @property-read string mc_deletion_method Determines how meetings should be handled in WordPress if they're deleted in TouchPoint
*
* @property-read string rc_name_plural What resident codes should be called, plural (e.g. "Resident Codes" or "Zones")
* @property-read string rc_name_singular What a resident code should be called, singular (e.g. "Resident Code" or "Zone")
@@ -905,7 +904,7 @@ private function settingsFields(bool|string $includeDetail = false): array
'id' => 'mc_archive_days',
'label' => __('Archive After Days', 'TouchPoint-WP'),
'description' => __(
- 'Meetings more than this many days in the past will be moved to the Events Archive. Once this date passes, meeting information will no longer update.',
+ 'Meetings more than this many days in the past will no longer update from TouchPoint, allowing you to keep some historical event information on the calendar for reference, even if you reuse and update the information in the Involvement.',
'TouchPoint-WP'
),
'type' => 'number',
@@ -918,7 +917,7 @@ private function settingsFields(bool|string $includeDetail = false): array
'id' => 'mc_hist_days',
'label' => __('Days of History', 'TouchPoint-WP'),
'description' => __(
- 'Meetings will be kept for the public calendar until the event is this many days in the past.',
+ "Meetings will be kept on the calendar until the event is this many days in the past. Once an event is older than this, it'll be deleted.",
'TouchPoint-WP'
),
'type' => 'number',
@@ -927,20 +926,6 @@ private function settingsFields(bool|string $includeDetail = false): array
'max' => 1825,
'min' => 0
],
- [
- 'id' => 'mc_deletion_method',
- 'label' => __('Meeting Deletion Handling', 'TouchPoint-WP'),
- 'description' => __(
- 'When a Meeting is deleted in TouchPoint that has already been imported to WordPress, how should that be handled?',
- 'TouchPoint-WP'
- ),
- 'type' => 'select',
- 'options' => [
- 'delete' => __('Always delete from WordPress', 'TouchPoint-WP'),
- 'cancel' => __('Mark the occurrence as cancelled', 'TouchPoint-WP'),
- ],
- 'default' => 'delete',
- ],
],
];
}
@@ -1617,6 +1602,9 @@ public function migrate(): void
$years = TouchPointWP::TTL_IP_GEO;
$wpdb->query("DELETE FROM $tableName WHERE `updatedDT` < NOW() - INTERVAL $years YEAR OR `data` LIKE 'Too many rapid requests.%';");
+ // 0.0.95 - Remove never-really-used option for deletion handling
+ delete_option('tp_mc_deletion_method');
+
// Update version string
$this->set('version', TouchPointWP::VERSION);
}
From ca1b07b4d24b19f9a25032e215c9deb300aeedb7 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Fri, 22 Nov 2024 14:25:37 -0500
Subject: [PATCH 215/226] Timezone-related bug
---
src/TouchPoint-WP/TouchPointWP_Widget.php | 6 ++++--
src/TouchPoint-WP/Utilities.php | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/TouchPoint-WP/TouchPointWP_Widget.php b/src/TouchPoint-WP/TouchPointWP_Widget.php
index 43e89a0c..759292c8 100644
--- a/src/TouchPoint-WP/TouchPointWP_Widget.php
+++ b/src/TouchPoint-WP/TouchPointWP_Widget.php
@@ -50,17 +50,19 @@ protected static function timestampToFormated(mixed $timestamp): string
{
if (!is_numeric($timestamp)) {
try {
- $timestamp = new \DateTime($timestamp);
+ $timestamp = new \DateTime($timestamp, wp_timezone());
} catch (\Exception $e) {
return 'Never';
}
} else {
try {
- $timestamp = new \DateTime('@' . $timestamp);
+ $timestamp = new \DateTime('@' . $timestamp, Utilities::utcTimeZone());
+
} catch (\Exception $e) {
return 'Never';
}
}
+ $timestamp->setTimezone(wp_timezone());
return wp_sprintf(
// translators: %1$s is the date(s), %2$s is the time(s).
diff --git a/src/TouchPoint-WP/Utilities.php b/src/TouchPoint-WP/Utilities.php
index 78ef94f4..a05b41b6 100644
--- a/src/TouchPoint-WP/Utilities.php
+++ b/src/TouchPoint-WP/Utilities.php
@@ -96,7 +96,8 @@ public static function dateTimeNowPlus1D(): DateTimeImmutable
public static function dateTimeNowMinus1D(): DateTimeImmutable
{
if (self::$_dateTimeNowMinus1D === null) {
- $aDay = new DateInterval('P-1D');
+ $aDay = new DateInterval('P1D');
+ $aDay->invert = 1;
self::$_dateTimeNowMinus1D = self::dateTimeNow()->add($aDay);
}
From 9668b2fa2294e23c13b0d62404f0dc1e718dfb72 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Sun, 24 Nov 2024 11:31:33 -0500
Subject: [PATCH 216/226] Replace references with imports
---
src/TouchPoint-WP/TouchPointWP_Widget.php | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/TouchPoint-WP/TouchPointWP_Widget.php b/src/TouchPoint-WP/TouchPointWP_Widget.php
index 759292c8..a7b419ce 100644
--- a/src/TouchPoint-WP/TouchPointWP_Widget.php
+++ b/src/TouchPoint-WP/TouchPointWP_Widget.php
@@ -5,6 +5,8 @@
namespace tp\TouchPointWP;
+use DateTime;
+use Exception;
use tp\TouchPointWP\Utilities\DateFormats;
if ( ! defined('ABSPATH')) {
@@ -50,15 +52,15 @@ protected static function timestampToFormated(mixed $timestamp): string
{
if (!is_numeric($timestamp)) {
try {
- $timestamp = new \DateTime($timestamp, wp_timezone());
- } catch (\Exception $e) {
+ $timestamp = new DateTime($timestamp, wp_timezone());
+ } catch (Exception) {
return 'Never';
}
} else {
try {
- $timestamp = new \DateTime('@' . $timestamp, Utilities::utcTimeZone());
+ $timestamp = new DateTime('@' . $timestamp, Utilities::utcTimeZone());
- } catch (\Exception $e) {
+ } catch (Exception) {
return 'Never';
}
}
From 313d29e677f8940a6d35568aa43c04b333a7f0cc Mon Sep 17 00:00:00 2001
From: "James K."
Date: Sun, 24 Nov 2024 18:01:37 -0500
Subject: [PATCH 217/226] Allowing SVG reports to have background colors.
Closes #212
---
docs | 2 +-
src/TouchPoint-WP/Report.php | 24 +++++++---
src/TouchPoint-WP/Utilities/Database.php | 45 +++++++++++++++++++
.../Utilities/ImageConversions.php | 15 ++++++-
4 files changed, 76 insertions(+), 10 deletions(-)
create mode 100644 src/TouchPoint-WP/Utilities/Database.php
diff --git a/docs b/docs
index 4ddcde14..d99ffbf9 160000
--- a/docs
+++ b/docs
@@ -1 +1 @@
-Subproject commit 4ddcde146fa218887d0b60482b187a512fd1bd80
+Subproject commit d99ffbf9acd0da60003f3ee043afbb887b871554
diff --git a/src/TouchPoint-WP/Report.php b/src/TouchPoint-WP/Report.php
index e130c0d3..d3a9f284 100644
--- a/src/TouchPoint-WP/Report.php
+++ b/src/TouchPoint-WP/Report.php
@@ -9,6 +9,7 @@
use DateTime;
use Exception;
use JsonSerializable;
+use tp\TouchPointWP\Utilities\Database;
use tp\TouchPointWP\Utilities\Http;
use tp\TouchPointWP\Utilities\ImageConversions;
use WP_Error;
@@ -255,13 +256,24 @@ public static function api(array $uri): bool
break;
case "svg.png":
- $cached = get_post_meta($r->getPost()->ID, self::META_PREFIX . "svg_png", true);
+ $bgColor = $_GET['bg'] ?? null;
+
+ if ($bgColor !== null) {
+ $bgColor = strtolower($bgColor);
+ if (preg_match('/^[0-9a-f]{6}$/', $bgColor)) {
+ $bgColor = "#" . $bgColor;
+ }
+ }
+
+ $bgColorStr = ($bgColor === null) ? "" : "_$bgColor";
+
+ $cached = get_post_meta($r->getPost()->ID, self::META_PREFIX . "svg_png" . $bgColorStr, true);
if ($cached !== '') {
$content = base64_decode($cached);
} else {
try {
- $content = ImageConversions::svgToPng($content);
- update_post_meta($r->getPost()->ID, self::META_PREFIX . "svg_png", base64_encode($content));
+ $content = ImageConversions::svgToPng($content, $bgColor);
+ update_post_meta($r->getPost()->ID, self::META_PREFIX . "svg_png" . $bgColorStr, base64_encode($content));
} catch (TouchPointWP_Exception $e) {
http_response_code(Http::SERVICE_UNAVAILABLE);
echo $e->getMessage();
@@ -497,10 +509,8 @@ protected function submitUpdate()
return null;
}
- // Clear the cached PNG if it exists.
- if (get_post_meta($this->post->ID, self::META_PREFIX . "svg_png", true) !== '') {
- update_post_meta($this->post->ID, self::META_PREFIX . "svg_png", '');
- }
+ // Clear the cached PNGs if they exist.
+ Database::deletePostMetaByPrefix($this->post->ID, self::META_PREFIX . "svg_png");
return wp_update_post($this->post);
}
diff --git a/src/TouchPoint-WP/Utilities/Database.php b/src/TouchPoint-WP/Utilities/Database.php
new file mode 100644
index 00000000..e1851d4c
--- /dev/null
+++ b/src/TouchPoint-WP/Utilities/Database.php
@@ -0,0 +1,45 @@
+get_col(
+ $wpdb->prepare(
+ "SELECT meta_key FROM $wpdb->postmeta WHERE post_id = %d AND meta_key LIKE %s",
+ $postId,
+ $wpdb->esc_like($prefix) . '%'
+ )
+ );
+
+ // Loop through each meta key and delete it
+ $success = true;
+ foreach ($meta_keys as $meta_key) {
+ $success *= delete_post_meta($postId, $meta_key);
+ }
+ return $success;
+ }
+}
\ No newline at end of file
diff --git a/src/TouchPoint-WP/Utilities/ImageConversions.php b/src/TouchPoint-WP/Utilities/ImageConversions.php
index 637b5d54..49c2c491 100644
--- a/src/TouchPoint-WP/Utilities/ImageConversions.php
+++ b/src/TouchPoint-WP/Utilities/ImageConversions.php
@@ -17,7 +17,7 @@ abstract class ImageConversions
* @throws \ImagickException
* @throws TouchPointWP_Exception
*/
- public static function svgToPng($svgContent): string
+ public static function svgToPng($svgContent, ?string $backgroundColor = null): string
{
$svg = new DOMDocument();
$svg->loadXML($svgContent);
@@ -36,7 +36,18 @@ public static function svgToPng($svgContent): string
$im = new \Imagick();
$im->setResolution(300, 300);
- $im->setBackgroundColor(new \ImagickPixel('transparent'));
+
+ if (!empty($backgroundColor)) {
+ try {
+ $pxColor = new \ImagickPixel($backgroundColor);
+ $im->setBackgroundColor($pxColor);
+ } catch (\ImagickPixelException) {
+ $im->setBackgroundColor(new \ImagickPixel('transparent'));
+ }
+ } else {
+ $im->setBackgroundColor(new \ImagickPixel('transparent'));
+ }
+
$im->readImageBlob($svg->saveXML());
$im->setImageAlphaChannel(\Imagick::ALPHACHANNEL_ACTIVATE);
From f9e994ae8d5d730224f60e3f3febb8409a72ba4c Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 28 Nov 2024 14:02:32 -0500
Subject: [PATCH 218/226] Provide a non-empty response to this API endpoint.
---
src/TouchPoint-WP/Stats.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/Stats.php b/src/TouchPoint-WP/Stats.php
index ff9f9d1c..914f1fc5 100644
--- a/src/TouchPoint-WP/Stats.php
+++ b/src/TouchPoint-WP/Stats.php
@@ -284,6 +284,7 @@ protected function submitStats(): void
'timeout' => 10,
'blocking' => false,
]);
+ echo "ok";
}
/**
@@ -435,7 +436,7 @@ public static function handleSubmission(): bool
return false;
}
- echo $r;
+ echo $r;
return true;
}
}
\ No newline at end of file
From 3a230bd216b155d556e08ee6cd435ad31f08c217 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 28 Nov 2024 14:15:57 -0500
Subject: [PATCH 219/226] Add site logo in reported stats, add a filter to
prevent or adjust reporting, and update docs/i18n.
---
docs | 2 +-
i18n/TouchPoint-WP-es_ES.po | 102 ++++++++++----------
i18n/TouchPoint-WP.pot | 92 +++++++++---------
src/TouchPoint-WP/Stats.php | 21 +++-
src/TouchPoint-WP/TouchPointWP.php | 1 +
src/TouchPoint-WP/TouchPointWP_Settings.php | 4 +-
6 files changed, 121 insertions(+), 101 deletions(-)
diff --git a/docs b/docs
index d99ffbf9..2b93d032 160000
--- a/docs
+++ b/docs
@@ -1 +1 @@
-Subproject commit d99ffbf9acd0da60003f3ee043afbb887b871554
+Subproject commit 2b93d032d2306cca5631e7f30f9665825b8eafb8
diff --git a/i18n/TouchPoint-WP-es_ES.po b/i18n/TouchPoint-WP-es_ES.po
index abb41fe6..9a201c6e 100644
--- a/i18n/TouchPoint-WP-es_ES.po
+++ b/i18n/TouchPoint-WP-es_ES.po
@@ -314,38 +314,38 @@ msgstr "Contacta"
msgid "RSVP"
msgstr "RSVP"
-#: src/TouchPoint-WP/TouchPointWP.php:2030
+#: src/TouchPoint-WP/TouchPointWP.php:2031
msgid "Unknown Type"
msgstr "Tipo desconocido"
-#: src/TouchPoint-WP/TouchPointWP.php:2087
+#: src/TouchPoint-WP/TouchPointWP.php:2088
msgid "Your Searches"
msgstr "Tus búsquedas"
-#: src/TouchPoint-WP/TouchPointWP.php:2090
+#: src/TouchPoint-WP/TouchPointWP.php:2091
msgid "Public Searches"
msgstr "Búsquedas públicas"
-#: src/TouchPoint-WP/TouchPointWP.php:2093
+#: src/TouchPoint-WP/TouchPointWP.php:2094
msgid "Status Flags"
msgstr "Indicadores de Estado"
-#: src/TouchPoint-WP/TouchPointWP.php:2098
#: src/TouchPoint-WP/TouchPointWP.php:2099
+#: src/TouchPoint-WP/TouchPointWP.php:2100
msgid "Current Value"
msgstr "Valor actual"
-#: src/TouchPoint-WP/TouchPointWP.php:2216
-#: src/TouchPoint-WP/TouchPointWP.php:2252
+#: src/TouchPoint-WP/TouchPointWP.php:2217
+#: src/TouchPoint-WP/TouchPointWP.php:2253
msgid "Invalid or incomplete API Settings."
msgstr "Configuración de API no válida o incompleta."
-#: src/TouchPoint-WP/TouchPointWP.php:2266
-#: src/TouchPoint-WP/TouchPointWP.php:2310
+#: src/TouchPoint-WP/TouchPointWP.php:2267
+#: src/TouchPoint-WP/TouchPointWP.php:2311
msgid "Host appears to be missing from TouchPoint-WP configuration."
msgstr "Parece que falta el host en la configuración de TouchPoint-WP."
-#: src/TouchPoint-WP/TouchPointWP.php:2442
+#: src/TouchPoint-WP/TouchPointWP.php:2443
msgid "People Query Failed"
msgstr "Consulta de registros de personas fallida"
@@ -809,7 +809,7 @@ msgid "Save Settings"
msgstr "Guardar ajustes"
#: src/TouchPoint-WP/Person.php:1451
-#: src/TouchPoint-WP/Utilities.php:285
+#: src/TouchPoint-WP/Utilities.php:286
#: assets/js/base-defer.js:18
msgid "and"
msgstr "y"
@@ -972,7 +972,7 @@ msgstr "Enviar"
msgid "Nothing to submit."
msgstr "Nada que enviar."
-#: src/TouchPoint-WP/TouchPointWP.php:2383
+#: src/TouchPoint-WP/TouchPointWP.php:2384
msgid "The scripts on TouchPoint that interact with this plugin are out-of-date, and an automatic update failed."
msgstr "Los scripts en TouchPoint que interactúan con este complemento están desactualizados y falló una actualización automática."
@@ -1040,72 +1040,72 @@ msgstr "Años"
msgid "Genders"
msgstr "Géneros"
-#: src/TouchPoint-WP/Utilities.php:135
+#: src/TouchPoint-WP/Utilities.php:136
msgctxt "e.g. event happens weekly on..."
msgid "Sundays"
msgstr "los domingos"
-#: src/TouchPoint-WP/Utilities.php:136
+#: src/TouchPoint-WP/Utilities.php:137
msgctxt "e.g. event happens weekly on..."
msgid "Mondays"
msgstr "los lunes"
-#: src/TouchPoint-WP/Utilities.php:137
+#: src/TouchPoint-WP/Utilities.php:138
msgctxt "e.g. event happens weekly on..."
msgid "Tuesdays"
msgstr "los martes"
-#: src/TouchPoint-WP/Utilities.php:138
+#: src/TouchPoint-WP/Utilities.php:139
msgctxt "e.g. event happens weekly on..."
msgid "Wednesdays"
msgstr "los miércoles"
-#: src/TouchPoint-WP/Utilities.php:139
+#: src/TouchPoint-WP/Utilities.php:140
msgctxt "e.g. event happens weekly on..."
msgid "Thursdays"
msgstr "los jueves"
-#: src/TouchPoint-WP/Utilities.php:140
+#: src/TouchPoint-WP/Utilities.php:141
msgctxt "e.g. event happens weekly on..."
msgid "Fridays"
msgstr "los viernes"
-#: src/TouchPoint-WP/Utilities.php:141
+#: src/TouchPoint-WP/Utilities.php:142
msgctxt "e.g. event happens weekly on..."
msgid "Saturdays"
msgstr "los sábados"
-#: src/TouchPoint-WP/Utilities.php:187
+#: src/TouchPoint-WP/Utilities.php:188
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Sun"
msgstr "Dom"
-#: src/TouchPoint-WP/Utilities.php:188
+#: src/TouchPoint-WP/Utilities.php:189
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Mon"
msgstr "Lun"
-#: src/TouchPoint-WP/Utilities.php:189
+#: src/TouchPoint-WP/Utilities.php:190
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Tue"
msgstr "Mar"
-#: src/TouchPoint-WP/Utilities.php:190
+#: src/TouchPoint-WP/Utilities.php:191
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Wed"
msgstr "Mié"
-#: src/TouchPoint-WP/Utilities.php:191
+#: src/TouchPoint-WP/Utilities.php:192
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Thu"
msgstr "Jue"
-#: src/TouchPoint-WP/Utilities.php:192
+#: src/TouchPoint-WP/Utilities.php:193
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Fri"
msgstr "Vie"
-#: src/TouchPoint-WP/Utilities.php:193
+#: src/TouchPoint-WP/Utilities.php:194
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Sat"
msgstr "Sáb"
@@ -1163,37 +1163,37 @@ msgstr "Ubicaciones"
msgid "Locations are physical places, probably campuses. None are required, but they can help present geographic information clearly."
msgstr "Las ubicaciones son lugares físicos, probablemente campus. No se requiere ninguno, pero pueden ayudar a presentar la información geográfica con claridad."
-#: src/TouchPoint-WP/Utilities.php:235
+#: src/TouchPoint-WP/Utilities.php:236
msgctxt "Time of Day"
msgid "Late Night"
msgstr "Tarde en la noche"
-#: src/TouchPoint-WP/Utilities.php:237
+#: src/TouchPoint-WP/Utilities.php:238
msgctxt "Time of Day"
msgid "Early Morning"
msgstr "Madrugada"
-#: src/TouchPoint-WP/Utilities.php:239
+#: src/TouchPoint-WP/Utilities.php:240
msgctxt "Time of Day"
msgid "Morning"
msgstr "Mañana"
-#: src/TouchPoint-WP/Utilities.php:241
+#: src/TouchPoint-WP/Utilities.php:242
msgctxt "Time of Day"
msgid "Midday"
msgstr "Mediodía"
-#: src/TouchPoint-WP/Utilities.php:243
+#: src/TouchPoint-WP/Utilities.php:244
msgctxt "Time of Day"
msgid "Afternoon"
msgstr "Tarde"
-#: src/TouchPoint-WP/Utilities.php:245
+#: src/TouchPoint-WP/Utilities.php:246
msgctxt "Time of Day"
msgid "Evening"
msgstr "Tardecita"
-#: src/TouchPoint-WP/Utilities.php:247
+#: src/TouchPoint-WP/Utilities.php:248
msgctxt "Time of Day"
msgid "Night"
msgstr "Noche"
@@ -1225,7 +1225,7 @@ msgstr "restablecer el mapa"
#: src/TouchPoint-WP/Involvement.php:1027
#: src/TouchPoint-WP/Involvement.php:1120
#: src/TouchPoint-WP/Involvement.php:1144
-#: src/TouchPoint-WP/TouchPointWP_Widget.php:67
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:71
#: src/TouchPoint-WP/Utilities/DateFormats.php:288
#: src/TouchPoint-WP/Utilities/DateFormats.php:352
msgid "%1$s at %2$s"
@@ -1293,7 +1293,7 @@ msgid "Could not locate."
msgstr "No se pudo localizar."
#: src/TouchPoint-WP/Meeting.php:672
-#: src/TouchPoint-WP/TouchPointWP.php:1032
+#: src/TouchPoint-WP/TouchPointWP.php:1033
msgid "Only GET requests are allowed."
msgstr "Solo se permiten solicitudes GET."
@@ -1411,16 +1411,16 @@ msgstr "Agregar Nuevo %s"
msgid "New %s"
msgstr "Nuevo %s"
-#: src/TouchPoint-WP/Report.php:176
+#: src/TouchPoint-WP/Report.php:177
msgid "TouchPoint Reports"
msgstr "Informes de TouchPoint"
-#: src/TouchPoint-WP/Report.php:177
+#: src/TouchPoint-WP/Report.php:178
msgid "TouchPoint Report"
msgstr "Informe de TouchPoint"
#. translators: Last updated date/time for a report. %1$s is the date. %2$s is the time.
-#: src/TouchPoint-WP/Report.php:405
+#: src/TouchPoint-WP/Report.php:417
msgid "Updated on %1$s at %2$s"
msgstr "Actualizada %1$s %2$s"
@@ -1566,7 +1566,7 @@ msgstr "mañana"
msgid "(named person)"
msgstr "(persona nombrada)"
-#: src/TouchPoint-WP/Utilities.php:496
+#: src/TouchPoint-WP/Utilities.php:497
msgid "Expand"
msgstr "Ampliar"
@@ -1814,7 +1814,7 @@ msgstr "Campus"
msgid "All Day"
msgstr "todo el dia"
-#: src/TouchPoint-WP/Utilities.php:290
+#: src/TouchPoint-WP/Utilities.php:291
msgctxt "list of items, and *others*"
msgid "others"
msgstr "otros"
@@ -1827,14 +1827,6 @@ msgstr "Clave API de ipapi.co"
msgid "Optional. Allows for geolocation of user IP addresses. This generally will work without a key, but may be rate limited."
msgstr "Opcional. Permite la geolocalización de las direcciones IP de los usuarios. Por lo general, esto funcionará sin una clave, pero puede tener una frecuencia limitada."
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:444
-msgid "Allow the TouchPoint-WP developers to publicly list your site/church as using TouchPoint-WP"
-msgstr "Permitir que los desarrolladores de TouchPoint-WP incluyan públicamente su sitio/iglesia como usuarios de TouchPoint-WP"
-
-#: src/TouchPoint-WP/TouchPointWP_Settings.php:445
-msgid "Helps other prospective churches see what can be done by combining WordPress with the best ChMS on the planet. Only applies if this site is accessible on the public internet."
-msgstr "Ayuda a otras iglesias potenciales a ver lo que se puede hacer combinando WordPress con el mejor ChMS del planeta. Solo se aplica si este sitio es accesible en Internet público."
-
#: src/templates/admin/invKoForm.php:60
msgid "Import Campuses"
msgstr "Importar Campus"
@@ -1847,15 +1839,15 @@ msgstr "Todos los campus"
msgid "(No Campus)"
msgstr "(Sin campus)"
-#: src/TouchPoint-WP/TouchPointWP_Widget.php:37
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:39
msgid "TouchPoint-WP Status"
msgstr "Estado de TouchPoint-WP"
-#: src/TouchPoint-WP/TouchPointWP_Widget.php:92
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:96
msgid "Imported"
msgstr "Importadas"
-#: src/TouchPoint-WP/TouchPointWP_Widget.php:93
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:97
msgid "Last Updated"
msgstr "Actualizada"
@@ -1871,3 +1863,11 @@ msgstr "Las reuniones con más de esta cantidad de días en el pasado ya no se a
#: src/TouchPoint-WP/TouchPointWP_Settings.php:919
msgid "Meetings will be kept on the calendar until the event is this many days in the past. Once an event is older than this, it'll be deleted."
msgstr "Las reuniones se mantendrán en el calendario hasta que el evento tenga esta cantidad de días en el pasado. Una vez que un evento tenga más de esta cantidad de días, se eliminará."
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:444
+msgid "List Site in Directory"
+msgstr "Listar sitio en directorio"
+
+#: src/TouchPoint-WP/TouchPointWP_Settings.php:445
+msgid "Allow the TouchPoint-WP developers to publicly list your site/church as using TouchPoint-WP. Helps other prospective churches see what can be done by combining WordPress with the best ChMS on the planet. Only applies if this site is accessible on the public internet."
+msgstr "Permita que los desarrolladores de TouchPoint-WP incluyan públicamente su sitio o iglesia como sitios que usan TouchPoint-WP. Esto ayuda a otras iglesias potenciales a ver lo que se puede hacer al combinar WordPress con el mejor ChMS del planeta. Solo se aplica si este sitio es accesible en Internet público."
diff --git a/i18n/TouchPoint-WP.pot b/i18n/TouchPoint-WP.pot
index 977622c1..92ee09b7 100644
--- a/i18n/TouchPoint-WP.pot
+++ b/i18n/TouchPoint-WP.pot
@@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2024-11-22T18:07:49+00:00\n"
+"POT-Creation-Date: 2024-11-28T19:12:52+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: TouchPoint-WP\n"
@@ -361,7 +361,7 @@ msgstr ""
#: src/TouchPoint-WP/Involvement.php:1027
#: src/TouchPoint-WP/Involvement.php:1120
#: src/TouchPoint-WP/Involvement.php:1144
-#: src/TouchPoint-WP/TouchPointWP_Widget.php:67
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:71
#: src/TouchPoint-WP/Utilities/DateFormats.php:288
#: src/TouchPoint-WP/Utilities/DateFormats.php:352
msgid "%1$s at %2$s"
@@ -572,7 +572,7 @@ msgid "Unknown"
msgstr ""
#: src/TouchPoint-WP/Meeting.php:672
-#: src/TouchPoint-WP/TouchPointWP.php:1032
+#: src/TouchPoint-WP/TouchPointWP.php:1033
msgid "Only GET requests are allowed."
msgstr ""
@@ -619,7 +619,7 @@ msgid "Person in %s"
msgstr ""
#: src/TouchPoint-WP/Person.php:1451
-#: src/TouchPoint-WP/Utilities.php:285
+#: src/TouchPoint-WP/Utilities.php:286
#: assets/js/base-defer.js:18
msgid "and"
msgstr ""
@@ -637,16 +637,16 @@ msgstr ""
msgid "You may need to sign in."
msgstr ""
-#: src/TouchPoint-WP/Report.php:176
+#: src/TouchPoint-WP/Report.php:177
msgid "TouchPoint Reports"
msgstr ""
-#: src/TouchPoint-WP/Report.php:177
+#: src/TouchPoint-WP/Report.php:178
msgid "TouchPoint Report"
msgstr ""
#. translators: Last updated date/time for a report. %1$s is the date. %2$s is the time.
-#: src/TouchPoint-WP/Report.php:405
+#: src/TouchPoint-WP/Report.php:417
msgid "Updated on %1$s at %2$s"
msgstr ""
@@ -745,42 +745,42 @@ msgstr ""
msgid "Every 15 minutes"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2030
+#: src/TouchPoint-WP/TouchPointWP.php:2031
msgid "Unknown Type"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2087
+#: src/TouchPoint-WP/TouchPointWP.php:2088
msgid "Your Searches"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2090
+#: src/TouchPoint-WP/TouchPointWP.php:2091
msgid "Public Searches"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2093
+#: src/TouchPoint-WP/TouchPointWP.php:2094
msgid "Status Flags"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2098
#: src/TouchPoint-WP/TouchPointWP.php:2099
+#: src/TouchPoint-WP/TouchPointWP.php:2100
msgid "Current Value"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2216
-#: src/TouchPoint-WP/TouchPointWP.php:2252
+#: src/TouchPoint-WP/TouchPointWP.php:2217
+#: src/TouchPoint-WP/TouchPointWP.php:2253
msgid "Invalid or incomplete API Settings."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2266
-#: src/TouchPoint-WP/TouchPointWP.php:2310
+#: src/TouchPoint-WP/TouchPointWP.php:2267
+#: src/TouchPoint-WP/TouchPointWP.php:2311
msgid "Host appears to be missing from TouchPoint-WP configuration."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2383
+#: src/TouchPoint-WP/TouchPointWP.php:2384
msgid "The scripts on TouchPoint that interact with this plugin are out-of-date, and an automatic update failed."
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP.php:2442
+#: src/TouchPoint-WP/TouchPointWP.php:2443
msgid "People Query Failed"
msgstr ""
@@ -921,11 +921,11 @@ msgid "Optional. Allows for geolocation of user IP addresses. This generally wi
msgstr ""
#: src/TouchPoint-WP/TouchPointWP_Settings.php:444
-msgid "Allow the TouchPoint-WP developers to publicly list your site/church as using TouchPoint-WP"
+msgid "List Site in Directory"
msgstr ""
#: src/TouchPoint-WP/TouchPointWP_Settings.php:445
-msgid "Helps other prospective churches see what can be done by combining WordPress with the best ChMS on the planet. Only applies if this site is accessible on the public internet."
+msgid "Allow the TouchPoint-WP developers to publicly list your site/church as using TouchPoint-WP. Helps other prospective churches see what can be done by combining WordPress with the best ChMS on the planet. Only applies if this site is accessible on the public internet."
msgstr ""
#: src/TouchPoint-WP/TouchPointWP_Settings.php:463
@@ -1417,129 +1417,129 @@ msgstr ""
msgid "Save Settings"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Widget.php:37
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:39
msgid "TouchPoint-WP Status"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Widget.php:92
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:96
msgid "Imported"
msgstr ""
-#: src/TouchPoint-WP/TouchPointWP_Widget.php:93
+#: src/TouchPoint-WP/TouchPointWP_Widget.php:97
msgid "Last Updated"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:135
+#: src/TouchPoint-WP/Utilities.php:136
msgctxt "e.g. event happens weekly on..."
msgid "Sundays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:136
+#: src/TouchPoint-WP/Utilities.php:137
msgctxt "e.g. event happens weekly on..."
msgid "Mondays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:137
+#: src/TouchPoint-WP/Utilities.php:138
msgctxt "e.g. event happens weekly on..."
msgid "Tuesdays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:138
+#: src/TouchPoint-WP/Utilities.php:139
msgctxt "e.g. event happens weekly on..."
msgid "Wednesdays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:139
+#: src/TouchPoint-WP/Utilities.php:140
msgctxt "e.g. event happens weekly on..."
msgid "Thursdays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:140
+#: src/TouchPoint-WP/Utilities.php:141
msgctxt "e.g. event happens weekly on..."
msgid "Fridays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:141
+#: src/TouchPoint-WP/Utilities.php:142
msgctxt "e.g. event happens weekly on..."
msgid "Saturdays"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:187
+#: src/TouchPoint-WP/Utilities.php:188
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Sun"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:188
+#: src/TouchPoint-WP/Utilities.php:189
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Mon"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:189
+#: src/TouchPoint-WP/Utilities.php:190
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Tue"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:190
+#: src/TouchPoint-WP/Utilities.php:191
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Wed"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:191
+#: src/TouchPoint-WP/Utilities.php:192
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Thu"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:192
+#: src/TouchPoint-WP/Utilities.php:193
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Fri"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:193
+#: src/TouchPoint-WP/Utilities.php:194
msgctxt "e.g. \"Event happens weekly on...\" or \"This ...\""
msgid "Sat"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:235
+#: src/TouchPoint-WP/Utilities.php:236
msgctxt "Time of Day"
msgid "Late Night"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:237
+#: src/TouchPoint-WP/Utilities.php:238
msgctxt "Time of Day"
msgid "Early Morning"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:239
+#: src/TouchPoint-WP/Utilities.php:240
msgctxt "Time of Day"
msgid "Morning"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:241
+#: src/TouchPoint-WP/Utilities.php:242
msgctxt "Time of Day"
msgid "Midday"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:243
+#: src/TouchPoint-WP/Utilities.php:244
msgctxt "Time of Day"
msgid "Afternoon"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:245
+#: src/TouchPoint-WP/Utilities.php:246
msgctxt "Time of Day"
msgid "Evening"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:247
+#: src/TouchPoint-WP/Utilities.php:248
msgctxt "Time of Day"
msgid "Night"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:290
+#: src/TouchPoint-WP/Utilities.php:291
msgctxt "list of items, and *others*"
msgid "others"
msgstr ""
-#: src/TouchPoint-WP/Utilities.php:496
+#: src/TouchPoint-WP/Utilities.php:497
msgid "Expand"
msgstr ""
diff --git a/src/TouchPoint-WP/Stats.php b/src/TouchPoint-WP/Stats.php
index 914f1fc5..28d38f0e 100644
--- a/src/TouchPoint-WP/Stats.php
+++ b/src/TouchPoint-WP/Stats.php
@@ -261,6 +261,7 @@ public function getStatsForSubmission(bool $updateQueried = false): array
$data['wpTimezone'] = get_option('timezone_string');
$data['adminEmail'] = get_option('admin_email');
$data['siteName'] = get_bloginfo('name');
+ $data['siteLogoUrl'] = esc_url( wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' )[0] );
$data['listPublicly'] = 1 * ($sets->enable_public_listing === 'on');
$data['installId'] = $this->installId;
$data['privateKey'] = $this->privateKey;
@@ -279,7 +280,25 @@ protected function submitStats(): void
$data = $this->getStatsForSubmission();
- wp_remote_post(self::SUBMISSION_ENDPOINT, [
+ /**
+ * This plugin is designed to be used by other churches, but to help troubleshoot and understand usage, some
+ * basic statistics are sent back to Tenth. This filter allows you to change the endpoint to which the data is
+ * sent, which may be necessary if you have a proxy system setup. It also allows you to disable the sending of
+ * all information back to Tenth by setting the value to an empty string.
+ *
+ * The URL must use https.
+ *
+ * @since 0.0.96 Added
+ *
+ * @param string $endpoint The endpoint value to use.
+ */
+ $endpoint = (string)apply_filters('tp_stats_endpoint', self::SUBMISSION_ENDPOINT);
+
+ if ( ! str_starts_with($endpoint, 'https://')) {
+ return;
+ }
+
+ wp_remote_post($endpoint, [
'body' => ['data' => $data],
'timeout' => 10,
'blocking' => false,
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index c89c99b7..3f114957 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -672,6 +672,7 @@ protected function createTables(): void
wpTimezone varchar(50) NOT NULL,
adminEmail varchar(255) NOT NULL,
siteName varchar(255) NOT NULL,
+ siteLogo varchar(512) NOT NULL,
createdDT datetime DEFAULT NOW(),
updatedDT datetime DEFAULT NOW() ON UPDATE NOW(),
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index 71162a74..c203c7ac 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -441,9 +441,9 @@ private function settingsFields(bool|string $includeDetail = false): array
],
[
'id' => 'enable_public_listing',
- 'label' => __('Allow the TouchPoint-WP developers to publicly list your site/church as using TouchPoint-WP', 'TouchPoint-WP'),
+ 'label' => __('List Site in Directory', 'TouchPoint-WP'),
'description' => __(
- "Helps other prospective churches see what can be done by combining WordPress with the best ChMS on the planet. Only applies if this site is accessible on the public internet.",
+ "Allow the TouchPoint-WP developers to publicly list your site/church as using TouchPoint-WP. Helps other prospective churches see what can be done by combining WordPress with the best ChMS on the planet. Only applies if this site is accessible on the public internet.",
'TouchPoint-WP'
),
'type' => 'checkbox',
From e4e0010eb0b8fc608642acd9c5c0ebd638c0cdfa Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 28 Nov 2024 14:32:49 -0500
Subject: [PATCH 220/226] Hook documentation improvements
---
docs | 2 +-
src/TouchPoint-WP/Involvement.php | 9 +++++++--
src/TouchPoint-WP/Partner.php | 17 ++++++++++++++---
src/TouchPoint-WP/Report.php | 6 ++++--
src/TouchPoint-WP/Stats.php | 4 +++-
src/TouchPoint-WP/TouchPointWP.php | 10 ++++++++--
src/TouchPoint-WP/TouchPointWP_Settings.php | 2 ++
src/TouchPoint-WP/Utilities.php | 17 ++++++++++-------
src/TouchPoint-WP/Utilities/DateFormats.php | 2 +-
9 files changed, 50 insertions(+), 19 deletions(-)
diff --git a/docs b/docs
index 2b93d032..01f959fa 160000
--- a/docs
+++ b/docs
@@ -1 +1 @@
-Subproject commit 2b93d032d2306cca5631e7f30f9665825b8eafb8
+Subproject commit 01f959faa7b2ef2c2307d6aef36454a2be2466b1
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index 7d1b242c..119d3c2d 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -436,6 +436,9 @@ public final static function updateFromTouchPoint(bool $verbose = false): int
*/
public static function templateFilter(string $template): string
{
+ $className = self::class;
+ $useTemplates = true;
+
/**
* Determines whether the plugin's default templates should be used. Theme developers can return false in this
* filter to prevent the default templates from applying, especially if they conflict with the theme.
@@ -447,7 +450,7 @@ public static function templateFilter(string $template): string
* @param bool $value The value to return. True will allow the default templates to be applied.
* @param string $className The name of the class calling for the template.
*/
- if (!!apply_filters('tp_use_default_templates', true, self::class)) {
+ if (!!apply_filters('tp_use_default_templates', $useTemplates, $className)) {
$postTypesToFilter = Involvement_PostTypeSettings::getPostTypes();
$templateFilesToOverwrite = self::TEMPLATES_TO_OVERWRITE;
@@ -3891,6 +3894,8 @@ private static function ajaxInvJoin(): void
*/
protected static function allowContact(string $invType): bool
{
+ $allowed = true;
+
/**
* Determines whether contact of any kind is allowed. This is meant to prevent abuse in contact forms by
* removing the ability to contact people and thereby hiding the forms.
@@ -3899,7 +3904,7 @@ protected static function allowContact(string $invType): bool
*
* @param bool $allowed True if contact is allowed.
*/
- $allowed = !!apply_filters('tp_allow_contact', true);
+ $allowed = !!apply_filters('tp_allow_contact', $allowed);
/**
* Determines whether contact is allowed for any Involvements. This is called *after* tp_allow_contact, and
diff --git a/src/TouchPoint-WP/Partner.php b/src/TouchPoint-WP/Partner.php
index 943d86c9..275c4851 100644
--- a/src/TouchPoint-WP/Partner.php
+++ b/src/TouchPoint-WP/Partner.php
@@ -563,18 +563,24 @@ public static function updateFromTouchPoint(bool $verbose = false)
*/
public static function templateFilter(string $template): string
{
+ $className = self::class;
+ $useTemplates = true;
+
/**
* Determines whether the plugin's default templates should be used. Theme developers can return false in this
* filter to prevent the default templates from applying, especially if they conflict with the theme.
*
* Default is true.
*
- * @since 0.0.6 Added
+ * TODO merge with the same filter in Involvement
*
* @param bool $value The value to return. True will allow the default templates to be applied.
* @param string $className The name of the class calling for the template.
+ *
+ *@since 0.0.6 Added
+ *
*/
- if (!!apply_filters('tp_use_default_templates', true, self::class)) {
+ if (!!apply_filters('tp_use_default_templates', $useTemplates, $className)) {
$postTypesToFilter = self::POST_TYPE;
$templateFilesToOverwrite = self::TEMPLATES_TO_OVERWRITE;
@@ -685,6 +691,9 @@ public static function listShortcode($params = [], string $content = ""): string
}
$params = array_change_key_case($params, CASE_LOWER);
+ $useCss = true;
+ $className = self::class;
+
// set some defaults
/** @noinspection SpellCheckingInspection */
$params = shortcode_atts(
@@ -697,10 +706,12 @@ public static function listShortcode($params = [], string $content = ""): string
*
* @since 0.0.15 Added
*
+ * TODO merge with the same filter in Involvement
+ *
* @param bool $useCss Whether or not to include the default CSS. True = include
* @param string $className The name of the current calling class.
*/
- 'includecss' => apply_filters('tp_use_css', true, self::class),
+ 'includecss' => apply_filters('tp_use_css', $useCss, $className),
'itemclass' => self::$itemClass,
],
$params,
diff --git a/src/TouchPoint-WP/Report.php b/src/TouchPoint-WP/Report.php
index d3a9f284..af3ac4a5 100644
--- a/src/TouchPoint-WP/Report.php
+++ b/src/TouchPoint-WP/Report.php
@@ -394,13 +394,15 @@ public static function reportShortcode($params = [], string $content = ""): stri
// Add Figure elt with a unique ID
$idAttr = "id=\"" . wp_unique_id('tp-report-') . "\"";
+ $class = self::$classDefault;
+
/**
* Filter the class name to be used for the displaying the report.
*
- * @param string $className The class name to be used.
+ * @param string $class The class name to be used.
* @param Report $report The report being displayed.
*/
- $class = apply_filters("tp_rpt_figure_class", self::$classDefault, $report);
+ $class = apply_filters("tp_rpt_figure_class", $class, $report);
$permalink = esc_attr(get_post_permalink($report->getPost()));
diff --git a/src/TouchPoint-WP/Stats.php b/src/TouchPoint-WP/Stats.php
index 28d38f0e..76d476af 100644
--- a/src/TouchPoint-WP/Stats.php
+++ b/src/TouchPoint-WP/Stats.php
@@ -280,6 +280,8 @@ protected function submitStats(): void
$data = $this->getStatsForSubmission();
+ $endpoint = self::SUBMISSION_ENDPOINT;
+
/**
* This plugin is designed to be used by other churches, but to help troubleshoot and understand usage, some
* basic statistics are sent back to Tenth. This filter allows you to change the endpoint to which the data is
@@ -292,7 +294,7 @@ protected function submitStats(): void
*
* @param string $endpoint The endpoint value to use.
*/
- $endpoint = (string)apply_filters('tp_stats_endpoint', self::SUBMISSION_ENDPOINT);
+ $endpoint = (string)apply_filters('tp_stats_endpoint', $endpoint);
if ( ! str_starts_with($endpoint, 'https://')) {
return;
diff --git a/src/TouchPoint-WP/TouchPointWP.php b/src/TouchPoint-WP/TouchPointWP.php
index 3f114957..70eef512 100644
--- a/src/TouchPoint-WP/TouchPointWP.php
+++ b/src/TouchPoint-WP/TouchPointWP.php
@@ -978,12 +978,15 @@ public static function requireScript(string $name = null): void
public static function requireStyle(string $name = null): void
{
$filename = strtolower($name);
+
+ $includeStyle = true;
+
/**
* Filter to determine if a given stylesheet (which comes with TouchPoint-WP) should be included.
*
* @params bool $include Whether to include the stylesheet.
*/
- if ( ! apply_filters("tp_include_style_$filename", true)) {
+ if ( ! apply_filters("tp_include_style_$filename", $includeStyle)) {
return;
}
@@ -2541,12 +2544,15 @@ public static function enqueuePartialsStyle(): void
*/
public static function enqueueActionsStyle(string $action): void
{
+ $includeActionsStyle = true;
+
/**
* Filter to determine if the stylesheet that adjusts SWAL and other action-related items should be included.
*
* @params bool $include Whether to include the styles. Default true = include.
+ * @params string $action The action that is being performed.
*/
- $includeActionsStyle = !!apply_filters("tp_include_actions_style", true, $action);
+ $includeActionsStyle = !!apply_filters("tp_include_actions_style", $includeActionsStyle, $action);
if ($includeActionsStyle) {
wp_enqueue_style(
TouchPointWP::SHORTCODE_PREFIX . 'actions-style',
diff --git a/src/TouchPoint-WP/TouchPointWP_Settings.php b/src/TouchPoint-WP/TouchPointWP_Settings.php
index c203c7ac..42a427c5 100644
--- a/src/TouchPoint-WP/TouchPointWP_Settings.php
+++ b/src/TouchPoint-WP/TouchPointWP_Settings.php
@@ -1260,6 +1260,8 @@ private function settingsFields(bool|string $includeDetail = false): array
* Adjust the settings array before it's returned.
*
* @since 0.0.90 Added
+ *
+ * @params array $this->settings The settings array.
*/
$this->settings = apply_filters('tp_settings_fields', $this->settings);
diff --git a/src/TouchPoint-WP/Utilities.php b/src/TouchPoint-WP/Utilities.php
index a05b41b6..037fa398 100644
--- a/src/TouchPoint-WP/Utilities.php
+++ b/src/TouchPoint-WP/Utilities.php
@@ -357,18 +357,20 @@ public static function getPostContentWithShortcode($shortcode): array
*/
public static function getColorFor(string $itemName, string $setName): string
{
+ $current = null;
+
/**
* Allows for a custom color function to assign a color for a given value.
*
* @since 0.0.90 Added
*
- * @param mixed $current The current value. Null is provided to the function because the color hasn't otherwise been determined yet.
+ * @param ?string $current The current value. Null is provided to the function because the color hasn't otherwise been determined yet.
* @param string $itemName The name of the current item.
* @param string $setName The name of the set to which the item belongs.
*
- * @return string|null The color in hex, starting with '#'. Null to defer to the default color assignment.
+ * @return ?string The color in hex, starting with '#'. Null to defer to the default color assignment.
*/
- $r = apply_filters('tp_custom_color_function', null, $itemName, $setName);
+ $r = apply_filters('tp_custom_color_function', $current, $itemName, $setName);
if ($r !== null)
return $r;
@@ -386,6 +388,7 @@ public static function getColorFor(string $itemName, string $setName): string
self::$colorAssignments[$setName][] = $itemName;
}
+ $array = [];
/**
* Allows for a custom color set to be used for color assignment to match branding. This filter should return an
* array of colors in hex format, starting with '#'. The colors will be assigned in order, but it is not
@@ -394,10 +397,10 @@ public static function getColorFor(string $itemName, string $setName): string
*
* @since 0.0.90 Added
*
- * @param string[] $array The array of colors in hex format, starting with '#'.
+ * @param string[] $array The array of colors in hex format strings, starting with '#'.
* @param string $setName The name of the set for which the colors are needed.
*/
- $colorSet = apply_filters('tp_custom_color_set', [], $setName);
+ $colorSet = apply_filters('tp_custom_color_set', $array, $setName);
if (count($colorSet) > 0) {
return $colorSet[$idx % count($colorSet)];
@@ -678,7 +681,7 @@ public static function standardizeHtml(?string $html, ?string $context = null):
* @return string The standardized HTML.
*/
$html = apply_filters('tp_pre_standardize_html', $html, $context);
-
+ $maxHeader = 2;
/**
* The maximum header level to allow in an HTML string. Default is 2.
@@ -690,7 +693,7 @@ public static function standardizeHtml(?string $html, ?string $context = null):
*
* @return int The maximum header level to allow in the HTML.
*/
- $maxHeader = intval(apply_filters('tp_standardize_h_tags_max_h', 2, $context));
+ $maxHeader = intval(apply_filters('tp_standardize_h_tags_max_h', $maxHeader, $context));
$allowedTags = [
'p', 'br', 'a', 'em', 'strong', 'b', 'i', 'u', 'hr', 'ul', 'ol', 'li',
diff --git a/src/TouchPoint-WP/Utilities/DateFormats.php b/src/TouchPoint-WP/Utilities/DateFormats.php
index 25cf8ea6..5de1ea25 100644
--- a/src/TouchPoint-WP/Utilities/DateFormats.php
+++ b/src/TouchPoint-WP/Utilities/DateFormats.php
@@ -98,7 +98,7 @@ public static function TimeRangeStringFormatted(DateTimeInterface $startDt, Date
* @param string $startStr The start string, with default formatting.
* @param string $endStr The end string, with default formatting
* @param DateTimeInterface $startDt The DateTimeInterface object for the start.
- * @param DateTimeInterface $endDt The DateTimeInterface object for the $end.
+ * @param DateTimeInterface $endDt The DateTimeInterface object for the end.
*/
return apply_filters('tp_adjust_time_range_string', $ts, $startStr, $endStr, $startDt, $endDt);
}
From 1bee5368c5b6afe0cbb8a65124bdddf9070ce930 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Sun, 1 Dec 2024 08:06:24 -0500
Subject: [PATCH 221/226] Correcting issue with Report sync.
---
src/TouchPoint-WP/Report.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/TouchPoint-WP/Report.php b/src/TouchPoint-WP/Report.php
index af3ac4a5..c2a43118 100644
--- a/src/TouchPoint-WP/Report.php
+++ b/src/TouchPoint-WP/Report.php
@@ -26,6 +26,7 @@
require_once "storedAsPost.php";
require_once "Utilities/ImageConversions.php";
require_once "Utilities/Http.php";
+ require_once "Utilities/Database.php";
}
/**
From 04b90186de75eb35d0fa41910fd8f26a55ecf5be Mon Sep 17 00:00:00 2001
From: "James K."
Date: Sun, 1 Dec 2024 17:43:05 -0500
Subject: [PATCH 222/226] Syntactic items in Report.php
---
src/TouchPoint-WP/Report.php | 32 ++++++++++++++++++++++----------
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/src/TouchPoint-WP/Report.php b/src/TouchPoint-WP/Report.php
index c2a43118..013973be 100644
--- a/src/TouchPoint-WP/Report.php
+++ b/src/TouchPoint-WP/Report.php
@@ -240,12 +240,18 @@ public static function api(array $uri): bool
case "py":
TouchPointWP::doCacheHeaders(TouchPointWP::CACHE_NONE);
- $r = Report::fromParams([
- 'type' => 'python',
- 'name' => $filename,
- 'p1' => $_GET['p1'] ?? ''
- ]);
- $content = $r->content();
+ try {
+ $r = Report::fromParams([
+ 'type' => 'python',
+ 'name' => $filename,
+ 'p1' => $_GET['p1'] ?? ''
+ ]);
+ $content = $r->content();
+ } catch (TouchPointWP_Exception) {
+ http_response_code(Http::SERVER_ERROR);
+ exit;
+ }
+
if ($content === self::DEFAULT_CONTENT) {
http_response_code(Http::NOT_FOUND);
exit;
@@ -300,11 +306,16 @@ public static function api(array $uri): bool
case "sql":
TouchPointWP::doCacheHeaders(TouchPointWP::CACHE_NONE);
header("Cache-Control: max-age=3600, must-revalidate, public");
+ try {
$r = Report::fromParams([
'type' => 'sql',
'name' => $filename,
'p1' => $_GET['p1'] ?? ''
]);
+ } catch (TouchPointWP_Exception) {
+ http_response_code(Http::SERVER_ERROR);
+ exit;
+ }
$content = $r->content();
if ($content === self::DEFAULT_CONTENT) {
http_response_code(Http::NOT_FOUND);
@@ -353,8 +364,9 @@ protected function title(): string
*
* @return string
*/
- public static function reportShortcode($params = [], string $content = ""): string
+ public static function reportShortcode(mixed $params = [], string $content = ""): string
{
+ /** @noinspection PhpRedundantOptionalArgumentInspection */
$params = array_change_key_case($params, CASE_LOWER);
$params = shortcode_atts(
@@ -506,7 +518,7 @@ public function getPost(bool $create = false): ?WP_Post
*
* @return int|WP_Error|null
*/
- protected function submitUpdate()
+ protected function submitUpdate(): int|null|WP_Error
{
if ( ! $this->getPost()) {
return null;
@@ -597,7 +609,7 @@ public static function updateFromTouchPoint(bool $forceEvenIfNotDue = false): in
foreach ($updates as $u) {
try {
$report = self::fromParams($u);
- } catch (TouchPointWP_Exception $e) {
+ } catch (TouchPointWP_Exception) {
continue;
}
@@ -726,7 +738,7 @@ public static function updateCron(): void
if ( ! $forked) {
self::updateFromTouchPoint();
}
- } catch (Exception $ex) {
+ } catch (Exception) {
}
}
From 53829c189ee162b6a6a1a7e77ae1d98288c0a002 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Mon, 2 Dec 2024 13:33:25 -0500
Subject: [PATCH 223/226] Making ids clearer
---
src/TouchPoint-WP/Involvement.php | 2 +-
src/TouchPoint-WP/Meeting.php | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index 119d3c2d..eca5de62 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -754,7 +754,7 @@ protected static function scheduleStrings(int $invId, $inv = null): ?array
* This is separated out to a static method to prevent involvement from being instantiated (with those database
* hits) when the content is cached. (10x faster or more)
*
- * @param int $objId
+ * @param int $objId Involvement Id.
* @param ?Involvement $obj
*
* @return ?string
diff --git a/src/TouchPoint-WP/Meeting.php b/src/TouchPoint-WP/Meeting.php
index df97ecf5..9b9052b2 100644
--- a/src/TouchPoint-WP/Meeting.php
+++ b/src/TouchPoint-WP/Meeting.php
@@ -183,6 +183,16 @@ protected function __construct(object $object)
$this->registerConstruction();
}
+ /**
+ * Get the Meeting ID.
+ *
+ * @return int
+ */
+ public function mtgId(): int
+ {
+ return $this->mtgId;
+ }
+
/**
* Create a Meeting object from a Meeting ID. Only Meetings that are already imported as Posts are currently
From 30d2f0ab812ef86c743799507358ad999eba5a90 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Tue, 3 Dec 2024 14:56:55 -0500
Subject: [PATCH 224/226] Dealing with bug in stats logo submission.
---
src/TouchPoint-WP/Stats.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/TouchPoint-WP/Stats.php b/src/TouchPoint-WP/Stats.php
index 76d476af..b00d5934 100644
--- a/src/TouchPoint-WP/Stats.php
+++ b/src/TouchPoint-WP/Stats.php
@@ -261,7 +261,12 @@ public function getStatsForSubmission(bool $updateQueried = false): array
$data['wpTimezone'] = get_option('timezone_string');
$data['adminEmail'] = get_option('admin_email');
$data['siteName'] = get_bloginfo('name');
- $data['siteLogoUrl'] = esc_url( wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' )[0] );
+ $data['siteLogoUrl'] = get_theme_mod('custom_logo');
+ if ($data['siteLogoUrl']) {
+ $data['siteLogoUrl'] = esc_url(wp_get_attachment_image_src($data['siteLogoUrl'], 'full')[0]);
+ } else {
+ $data['siteLogoUrl'] = '';
+ }
$data['listPublicly'] = 1 * ($sets->enable_public_listing === 'on');
$data['installId'] = $this->installId;
$data['privateKey'] = $this->privateKey;
From 70c6c17ea748e3c9f5212eaa5a907e4d42b94fe5 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Thu, 19 Dec 2024 22:39:39 -0500
Subject: [PATCH 225/226] Fixes issue calculating calendar range. Closes #215.
Possibly related to #207.
---
src/TouchPoint-WP/CalendarGrid.php | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/TouchPoint-WP/CalendarGrid.php b/src/TouchPoint-WP/CalendarGrid.php
index ff2aabac..e551f3df 100644
--- a/src/TouchPoint-WP/CalendarGrid.php
+++ b/src/TouchPoint-WP/CalendarGrid.php
@@ -74,7 +74,9 @@ public function __construct(WP_Query $q, int $month = null, int $year = null)
$d = new DateTime('now', $tz);
$d = new DateTime($d->format('Y-m-01 00:00:00'), $tz);
} else {
- $d = new DateTime("$year-$month-01", $tz);
+ $d = new DateTime(null, $tz);
+ $d->setDate($year, $month, 1);
+ $d->setTime(0, 0);
}
} catch (Exception $e) {
$this->html = "";
@@ -88,6 +90,12 @@ public function __construct(WP_Query $q, int $month = null, int $year = null)
// Get the day of the week for the first day of the month (0 = Sunday, 1 = Monday, ..., 6 = Saturday)
$offsetDays = intval($d->format('w')); // w: Numeric representation of the day of the week
+
+ // Extra days at the end of the month
+ $daysInMonth = intval($d->format('t'));
+ $daysToShow = 7 * ceil(($daysInMonth + $offsetDays) / 7);
+
+ // Set start of range to be before the offset
try {
$d->modify("-$offsetDays days");
} catch (Exception) { // Exception is not feasible.
@@ -95,10 +103,6 @@ public function __construct(WP_Query $q, int $month = null, int $year = null)
$d->setTimezone($tz);
$r = "";
- // Extra days at the end of the month
- $daysInMonth = intval($d->format('t'));
- $daysToShow = ((42 - $daysInMonth - $offsetDays) % 7) + $daysInMonth;
-
// Create a table to display the calendar
$r .= '';
foreach (Utilities::getDaysOfWeekShort() as $dayStr) {
From 6f3a4c6046b32df99f94f0e499fbb8b1d8d8db99 Mon Sep 17 00:00:00 2001
From: "James K."
Date: Tue, 21 Jan 2025 17:30:58 -0500
Subject: [PATCH 226/226] Resolve an issue where involvements aren't
instantiated in JS for maps
---
src/TouchPoint-WP/Involvement.php | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/TouchPoint-WP/Involvement.php b/src/TouchPoint-WP/Involvement.php
index eca5de62..3ab60c86 100644
--- a/src/TouchPoint-WP/Involvement.php
+++ b/src/TouchPoint-WP/Involvement.php
@@ -2419,6 +2419,12 @@ public static function mapShortcode($params = [], string $content = ""): string
if ($params['all']) {
self::requireAllObjectsInJs();
self::$_hasArchiveMap = true;
+ } else {
+ // enqueue this object for js instantiation
+ $post = get_post();
+ if ($post) {
+ self::fromPost($post)?->enqueueForJsInstantiation();
+ }
}
$script = file_get_contents(TouchPointWP::$dir . "/src/js-partials/involvement-map-inline.js");