From 455c2d092435fdd6025748f068d1b5ecd2cddb2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 17:03:17 +0100 Subject: [PATCH 01/11] add missing exit if template is accessed directly --- templates/admin-header.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/admin-header.php b/templates/admin-header.php index efc02bc..4ee283b 100644 --- a/templates/admin-header.php +++ b/templates/admin-header.php @@ -5,6 +5,9 @@ * @package ActivityPub_Event_Bridge */ +// Exit if accessed directly. +defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore + /* @var array $args Template arguments. */ $args = wp_parse_args( $args, -- 2.39.5 From c81ed626ad9c6432f6225010357c849bab490377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 17:03:31 +0100 Subject: [PATCH 02/11] fix post_type for mec --- includes/plugins/class-modern-events-calendar-lite.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/plugins/class-modern-events-calendar-lite.php b/includes/plugins/class-modern-events-calendar-lite.php index 796634d..45f060f 100644 --- a/includes/plugins/class-modern-events-calendar-lite.php +++ b/includes/plugins/class-modern-events-calendar-lite.php @@ -38,7 +38,7 @@ final class Modern_Events_Calendar_Lite extends Event_plugin { */ public static function get_post_type(): string { // See MEC_feature_events->get_main_post_type(). - return apply_filters( 'mec_post_type_name', 'mec-events' ); // phpcs:ignore + return 'mec-events'; } /** -- 2.39.5 From 5334f61c4a6aeaf5e27272bbaeadbb63962ffb91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 17:03:42 +0100 Subject: [PATCH 03/11] format readmes --- README.md | 1 + readme.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 2a8553d..089b191 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ If you're new to the [ActivityPub plugin](https://wordpress.org/plugins/activity ### Do I need to install another event plugin to use the Event Federation Plugin? ### Yes, this plugin works as an add-on and requires both the ActivityPub plugin and a supported event plugin such as The Events Calendar, VS Event List, or Events Manager to manage your events. It just fills the missing gap between event plugins and the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/). + ### What platforms can follow my events? ### Your events can be followed on platforms that support ActivityPub like [Mobilizon](https://joinmobilizon.org/), [Gancio](https://gancio.org), [Friendica](https://friendi.ca), [Hubzilla](https://hubzilla.org), and [Pleroma](https://pleroma.social/). Even other applications like [Mastodon](https://joinmastodon.org), which don't fully support events yet, will display all important information about the events. diff --git a/readme.txt b/readme.txt index df031ea..4dfb0b5 100644 --- a/readme.txt +++ b/readme.txt @@ -67,6 +67,7 @@ If you're new to the [ActivityPub plugin](https://wordpress.org/plugins/activity = Do I need to install another event plugin to use the Event Federation Plugin? = Yes, this plugin works as an add-on and requires both the ActivityPub plugin and a supported event plugin such as The Events Calendar, VS Event List, or Events Manager to manage your events. It just fills the missing gap between event plugins and the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/). + = What platforms can follow my events? = Your events can be followed on platforms that support ActivityPub like [Mobilizon](https://joinmobilizon.org/), [Gancio](https://gancio.org), [Friendica](https://friendi.ca), [Hubzilla](https://hubzilla.org), and [Pleroma](https://pleroma.social/). Even other applications like [Mastodon](https://joinmastodon.org), which don't fully support events yet, will display all important information about the events. -- 2.39.5 From aa05948fec1003e4d41f193c547d8e214f35ae26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 17:14:19 +0100 Subject: [PATCH 04/11] bump for wordpress 6.7 and ActivityPub plugin 4.2.0 --- .forgejo/workflows/phpunit.yml | 2 +- README.md | 2 +- activitypub-event-bridge.php | 4 ++-- readme.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/phpunit.yml b/.forgejo/workflows/phpunit.yml index 3e6d9f7..05f59a6 100644 --- a/.forgejo/workflows/phpunit.yml +++ b/.forgejo/workflows/phpunit.yml @@ -37,7 +37,7 @@ jobs: path: | ${{ env.WP_CORE_DIR }} ${{ env.WP_TESTS_DIR }} - key: cache-wordpress-9 + key: cache-wordpress-67-1 - name: Cache Composer id: cache-composer-phpunit diff --git a/README.md b/README.md index 089b191..0a30dba 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Contributors:** [andremenrath](https://profiles.wordpress.org/andremenrath/) **Tags:** events, fediverse, activitypub, calendar **Requires at least:** 6.5 -**Tested up to:** 6.6 +**Tested up to:** 6.7 **Stable tag:** 0.2.0 **Requires PHP:** 7.4 **License:** AGPL-3.0-or-later diff --git a/activitypub-event-bridge.php b/activitypub-event-bridge.php index 4278457..961af39 100644 --- a/activitypub-event-bridge.php +++ b/activitypub-event-bridge.php @@ -3,7 +3,7 @@ * Plugin Name: ActivityPub Event Bridge * Description: Integrating popular event plugins with the ActivityPub plugin. * Plugin URI: https://event-federation.eu/ - * Version: 0.2.0 + * Version: 0.2.1 * Author: André Menrath * Author URI: https://graz.social/@linos * Text Domain: activitypub-event-bridge @@ -11,7 +11,7 @@ * License URI: https://www.gnu.org/licenses/agpl-3.0.html * Requires PHP: 7.4 * - * Requires at least ActivityPub plugin with version >= 3.2.2. ActivityPub plugin tested up to: 4.0.1. + * Requires at least ActivityPub plugin with version >= 3.2.2. ActivityPub plugin tested up to: 4.2.0. * * @package ActivityPub_Event_Bridge * @license AGPL-3.0-or-later diff --git a/readme.txt b/readme.txt index 4dfb0b5..8e4910d 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: andremenrath Tags: events, fediverse, activitypub, calendar Requires at least: 6.5 -Tested up to: 6.6 +Tested up to: 6.7 Stable tag: 0.2.0 Requires PHP: 7.4 License: AGPL-3.0-or-later -- 2.39.5 From 7b92f7178ab9b27156a275e7c750235b201a6a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 18:13:20 +0100 Subject: [PATCH 05/11] test with wordpress 6.7 --- .forgejo/workflows/phpunit.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/phpunit.yml b/.forgejo/workflows/phpunit.yml index 05f59a6..aaa2537 100644 --- a/.forgejo/workflows/phpunit.yml +++ b/.forgejo/workflows/phpunit.yml @@ -22,6 +22,7 @@ jobs: strategy: matrix: php-version: ['7.4', '8.0', '8.1', '8.2', '8.3'] + wordpress-version: ['6.7'] name: PHPUnit – PHP ${{ matrix.php-version }} env: extensions: mysql @@ -68,11 +69,11 @@ jobs: - name: Setup Test Environment if: steps.cache-wordpress.outputs.cache-hit != 'true' - run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 6.6 false false false false + run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 ${{ matrix.wordpress-version }} false false false false - name: Initialize WordPress test database if: steps.cache-wordpress.outputs.cache-hit != 'false' - run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 6.6 false true true true + run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 ${{ matrix.wordpress-version }} false true true true - name: Run Integration tests for The Events Calendar run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=the_events_calendar -- 2.39.5 From 1cff2aac6519dbc962c3c0353310ed53b841504c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 18:13:43 +0100 Subject: [PATCH 06/11] new ci cache --- .forgejo/workflows/phpunit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/phpunit.yml b/.forgejo/workflows/phpunit.yml index aaa2537..f8e08ac 100644 --- a/.forgejo/workflows/phpunit.yml +++ b/.forgejo/workflows/phpunit.yml @@ -38,7 +38,7 @@ jobs: path: | ${{ env.WP_CORE_DIR }} ${{ env.WP_TESTS_DIR }} - key: cache-wordpress-67-1 + key: cache-wordpress-67-2 - name: Cache Composer id: cache-composer-phpunit -- 2.39.5 From d3bb53c1bc95dbd3704064d45eaaae212f91e25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 18:40:33 +0100 Subject: [PATCH 07/11] ci plugin install add support for installing a specific version --- bin/install-wp-tests.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index f0bf333..ca2da76 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -208,9 +208,15 @@ install_wp_plugin() { fi # Get the latest tag. - LATEST_TAG=$(svn log https://plugins.svn.wordpress.org/$PLUGIN_NAME/tags --limit 1 | awk 'NR == 4 { print $4 }') - if [ -n "$LATEST_TAG" ]; then - PLUGIN_FILE="$PLUGIN_NAME.$LATEST_TAG.zip" + if [ -z "$2" ] + LATEST_TAG=$(svn log https://plugins.svn.wordpress.org/$PLUGIN_NAME/tags --limit 1 | awk 'NR == 4 { print $4 }') + PLUGIN_VERSION=$LATEST_TAG + else + PLUGIN_VERSION=$2 + fi + + if [ -n "$PLUGIN_VERSION" ]; then + PLUGIN_FILE="$PLUGIN_NAME.$PLUGIN_VERSION.zip" else PLUGIN_FILE="$PLUGIN_NAME.zip" fi @@ -248,7 +254,7 @@ install_wp_plugins() { # Install the one and only ActivityPub plugin (greetings @pfefferle). install_wp_plugin activitypub # Install (not-activate) all supported event plugins. - install_wp_plugin the-events-calendar + install_wp_plugin the-events-calendar "6.8.1" install_wp_plugin very-simple-event-list install_wp_plugin gatherpress install_wp_plugin events-manager -- 2.39.5 From c20fb92543cbe03105030039b8c353b012e10045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 18:45:38 +0100 Subject: [PATCH 08/11] fix ci bin script --- bin/install-wp-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index ca2da76..0fd5624 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -208,7 +208,7 @@ install_wp_plugin() { fi # Get the latest tag. - if [ -z "$2" ] + if [ -z "$2" ]; then LATEST_TAG=$(svn log https://plugins.svn.wordpress.org/$PLUGIN_NAME/tags --limit 1 | awk 'NR == 4 { print $4 }') PLUGIN_VERSION=$LATEST_TAG else -- 2.39.5 From 7d2ab488fd1b8012cd7c712bd97fc37be2cd8f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 19:24:19 +0100 Subject: [PATCH 09/11] ci: add specific versions for some plugins --- bin/install-wp-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index 0fd5624..6930648 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -258,8 +258,8 @@ install_wp_plugins() { install_wp_plugin very-simple-event-list install_wp_plugin gatherpress install_wp_plugin events-manager - install_wp_plugin wp-event-manager - install_wp_plugin wp-event-solution + install_wp_plugin wp-event-manager "6.6.3" + install_wp_plugin wp-event-solution "4.0.14" # Mec is not installable via wordpress.org, we use our own mirror. install_wp_plugin_mec } -- 2.39.5 From 6bcf1e092b1ed6c0f0e46358fb565a97602dab1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 19:24:58 +0100 Subject: [PATCH 10/11] ci: add versions for some plugins --- bin/install-wp-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index 6930648..3cc440f 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -257,8 +257,8 @@ install_wp_plugins() { install_wp_plugin the-events-calendar "6.8.1" install_wp_plugin very-simple-event-list install_wp_plugin gatherpress - install_wp_plugin events-manager - install_wp_plugin wp-event-manager "6.6.3" + install_wp_plugin events-manager "6.6.3" + install_wp_plugin wp-event-manager "3.1.45.1" install_wp_plugin wp-event-solution "4.0.14" # Mec is not installable via wordpress.org, we use our own mirror. install_wp_plugin_mec -- 2.39.5 From f69f756719af1b2d27f1e378bfaf048328b5e70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 16 Nov 2024 19:36:25 +0100 Subject: [PATCH 11/11] bump version to 0.2.1 --- README.md | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0a30dba..c546212 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **Tags:** events, fediverse, activitypub, calendar **Requires at least:** 6.5 **Tested up to:** 6.7 -**Stable tag:** 0.2.0 +**Stable tag:** 0.2.1 **Requires PHP:** 7.4 **License:** AGPL-3.0-or-later **License URI:** https://www.gnu.org/licenses/agpl-3.0.html diff --git a/readme.txt b/readme.txt index 8e4910d..caedf64 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: andremenrath Tags: events, fediverse, activitypub, calendar Requires at least: 6.5 Tested up to: 6.7 -Stable tag: 0.2.0 +Stable tag: 0.2.1 Requires PHP: 7.4 License: AGPL-3.0-or-later License URI: https://www.gnu.org/licenses/agpl-3.0.html -- 2.39.5