Skip to content

Commit 2ed8da7

Browse files
authored
Merge pull request #172 from TenthPres/next
Maintenance Release
2 parents 8fccb2d + b9e63cc commit 2ed8da7

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "A WordPress Plugin for integrating with TouchPoint Church Management Software.",
44
"license": "AGPL-3.0-or-later",
55
"type": "wordpress-plugin",
6-
"version": "0.0.36",
6+
"version": "0.0.37",
77
"keywords": [
88
"wordpress",
99
"wp",

i18n/TouchPoint-WP.pot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Copyright (C) 2023 James K
1+
# Copyright (C) 2024 James K
22
# This file is distributed under the AGPLv3+.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: TouchPoint WP 0.0.36\n"
5+
"Project-Id-Version: TouchPoint WP 0.0.37\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/TouchPoint-WP\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <LL@li.org>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2023-10-22T18:00:47+00:00\n"
12+
"POT-Creation-Date: 2024-02-07T14:00:10+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.8.1\n"
1515
"X-Domain: TouchPoint-WP\n"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "touchpoint-wp",
3-
"version": "0.0.36",
3+
"version": "0.0.37",
44
"description": "A WordPress Plugin for integrating with TouchPoint Church Management Software.",
55
"directories": {
66
"doc": "docs"

src/TouchPoint-WP/Involvement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ private static function computeCommonOccurrences(array $meetings = [], array $sc
605605
{
606606
try {
607607
$siteTz = wp_timezone();
608-
$now = new DateTimeImmutable(null, $siteTz);
608+
$now = new DateTimeImmutable("now", $siteTz);
609609
} catch (Exception $e) {
610610
return null;
611611
}
@@ -2116,7 +2116,7 @@ final protected static function updateInvolvementPostsForType(
21162116
$postsToKeep = [];
21172117

21182118
try {
2119-
$now = new DateTimeImmutable(null, $siteTz);
2119+
$now = new DateTimeImmutable("now", $siteTz);
21202120
$aYear = new DateInterval('P1Y');
21212121
$nowPlus1Y = $now->add($aYear);
21222122
unset($aYear);

src/TouchPoint-WP/Partner.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ public static function updateFromTouchPoint(bool $verbose = false)
405405
wp_set_post_terms($post->ID, $category, TouchPointWP::TAX_GP_CATEGORY, false);
406406
}
407407

408-
// Title & Slug
409-
if ($post->post_title != $title) { // only update if there's a change. Otherwise, urls increment.
408+
// Title & Slug -- slugs should only be updated if there's a reason, like a title change. Otherwise, they increment.
409+
if ($post->post_title != $title || str_contains($post->post_name, "__trashed")) {
410410
$post->post_title = $title;
411411
$post->post_name = ''; // Slug will regenerate;
412412
}

src/TouchPoint-WP/Report.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,11 +599,11 @@ public static function updateCron(): void
599599
/**
600600
* Handle which data should be converted to JSON. Used for posting to the API.
601601
*
602-
* @return mixed data which can be serialized by json_encode
602+
* @return object data which can be serialized by json_encode
603603
*/
604-
public function jsonSerialize()
604+
public function jsonSerialize(): object
605605
{
606-
return [
606+
return (object)[
607607
'name' => $this->name,
608608
'type' => $this->type,
609609
'p1' => $this->p1

src/TouchPoint-WP/TouchPointWP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TouchPointWP
3333
/**
3434
* Version number
3535
*/
36-
public const VERSION = "0.0.36";
36+
public const VERSION = "0.0.37";
3737

3838
/**
3939
* The Token

src/python/WebApi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import linecache
66
import sys
77

8-
VERSION = "0.0.36"
8+
VERSION = "0.0.37"
99

1010
sgContactEvName = "Contact"
1111

src/templates/involvement-single.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,24 @@
5656
</article>
5757

5858
<?php if ($settings->hierarchical) {
59-
$children = get_children([
59+
$single_children = get_children([
6060
'post_parent' => $inv->post_id,
6161
'orderby' => 'title',
6262
'order' => 'ASC',
6363
'post_type' => $postType
6464
]);
65-
if (count($children) > 0) {
65+
if (count($single_children) > 0) {
6666
echo "<div class='involvement-list child-involvements'>";
6767
}
68-
foreach ($children as $post) {
68+
foreach ($single_children as $post) {
6969
/** @var WP_Post $post */
7070
$loadedPart = get_template_part('list-item', 'involvement-list-item');
7171
if ($loadedPart === false) {
7272
TouchPointWP::enqueuePartialsStyle();
7373
require TouchPointWP::$dir . "/src/templates/parts/involvement-list-item.php";
7474
}
7575
}
76-
if (count($children) > 0) {
76+
if (count($single_children) > 0) {
7777
echo "</div>";
7878
}
7979
} ?>

touchpoint-wp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Plugin URI: https://github.com/tenthpres/touchpoint-wp
1515
Update URI: https://github.com/tenthpres/touchpoint-wp
1616
Description: A WordPress Plugin for integrating with TouchPoint Church Management Software.
17-
Version: 0.0.36
17+
Version: 0.0.37
1818
Author: James K
1919
Author URI: https://github.com/jkrrv
2020
License: AGPLv3+

0 commit comments

Comments
 (0)