Compare commits
6 commits
main
...
status_pag
Author | SHA1 | Date | |
---|---|---|---|
b329177fc6 | |||
52401380b2 | |||
10ea2f17d1 | |||
fdfdf6c0b2 | |||
127df329b6 | |||
dee2bf6b3e |
24
.distignore
|
@ -1,24 +0,0 @@
|
|||
.distignore
|
||||
.git
|
||||
.gitignore
|
||||
.wordpress-org
|
||||
.wp-env.json
|
||||
bin
|
||||
CHANGELOG.md
|
||||
CODE_OF_CONDUCT.md
|
||||
composer.json
|
||||
composer.lock
|
||||
docker-compose.yml
|
||||
Dockerfile
|
||||
docs
|
||||
FEDERATION.md
|
||||
Gruntfile.js
|
||||
node_modules
|
||||
package.json
|
||||
package-lock.json
|
||||
phpcs.xml
|
||||
phpunit.xml
|
||||
README.md
|
||||
src
|
||||
tests
|
||||
vendor
|
|
@ -21,8 +21,7 @@ jobs:
|
|||
MYSQL_ROOT_PASSWORD: root
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
|
||||
wordpress-version: ['6.7']
|
||||
php-version: ['8.1', '8.2', '8.3']
|
||||
name: PHPUnit – PHP ${{ matrix.php-version }}
|
||||
env:
|
||||
extensions: mysql
|
||||
|
@ -38,7 +37,7 @@ jobs:
|
|||
path: |
|
||||
${{ env.WP_CORE_DIR }}
|
||||
${{ env.WP_TESTS_DIR }}
|
||||
key: cache-wordpress-67-2
|
||||
key: cache-wordpress-9
|
||||
|
||||
- name: Cache Composer
|
||||
id: cache-composer-phpunit
|
||||
|
@ -46,7 +45,7 @@ jobs:
|
|||
with:
|
||||
path: |
|
||||
./vendor/
|
||||
key: cache-composer-phpunit-2
|
||||
key: cache-composer-phpunit-1
|
||||
|
||||
- name: Setup PHP
|
||||
uses: https://github.com/shivammathur/setup-php@v2
|
||||
|
@ -69,11 +68,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 ${{ matrix.wordpress-version }} false false false false
|
||||
run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 6.6 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 ${{ matrix.wordpress-version }} false true true true
|
||||
run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 6.6 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
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
on:
|
||||
push:
|
||||
tags: 'v*'
|
||||
|
||||
jobs:
|
||||
upload-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- uses: https://code.forgejo.org/actions/forgejo-release@v2
|
||||
with:
|
||||
direction: upload
|
||||
url: https://code.event-federation.eu
|
||||
release-notes: ${{ TAG }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
23
.gitattributes
vendored
|
@ -1,23 +0,0 @@
|
|||
.distignore export-ignore
|
||||
.forgejo export-ignore
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
.wp-env.json export-ignore
|
||||
bin export-ignore
|
||||
CODE_OF_CONDUCT.md export-ignore
|
||||
composer.json export-ignore
|
||||
composer.lock export-ignore
|
||||
docker-compose.yml export-ignore
|
||||
Dockerfile export-ignore
|
||||
docs export-ignore
|
||||
FEDERATION.md export-ignore
|
||||
Gruntfile.js export-ignore
|
||||
node_modules export-ignore
|
||||
package.json export-ignore
|
||||
package-lock.json export-ignore
|
||||
phpcs.xml export-ignore
|
||||
phpunit.xml export-ignore
|
||||
README.md export-ignore
|
||||
src export-ignore
|
||||
tests export-ignore
|
||||
vendor export-ignore
|
1
.gitignore
vendored
|
@ -2,4 +2,3 @@ vendor/
|
|||
composer.lock
|
||||
.phpunit.result.cache
|
||||
node_modules/
|
||||
package-lock.json
|
||||
|
|
Before Width: | Height: | Size: 324 KiB |
Before Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 392 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 125 KiB |
20
CHANGELOG.md
|
@ -5,24 +5,8 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed that transformer hook function might also return `null`.
|
||||
|
||||
## [0.2.1] - 2024-11-16
|
||||
## [0.1.0] - 2024-10-20
|
||||
|
||||
### Added
|
||||
|
||||
* Initial release on WordPress.org
|
||||
|
||||
### Fixed
|
||||
|
||||
* Applied some WordPress best practices
|
||||
|
||||
## [0.2.0] - 2024-10-20
|
||||
|
||||
### Added
|
||||
|
||||
* Initial submission to WordPress.org
|
||||
* Initial version tag.
|
||||
|
|
|
@ -1,126 +0,0 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
||||
identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall
|
||||
community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official email address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement via email to
|
||||
simon@fdpl.io. All complaints will be reviewed and investigated fairly
|
||||
and as soon as personal time and energy of community leaders permits.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of
|
||||
actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or permanent
|
||||
ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the
|
||||
community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
|
||||
version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at
|
||||
[https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
|
59
Gruntfile.js
|
@ -1,59 +0,0 @@
|
|||
module.exports = function (grunt) {
|
||||
// Project configuration.
|
||||
grunt.initConfig(
|
||||
{
|
||||
checktextdomain: {
|
||||
options:{
|
||||
text_domain: 'activitypub-event-bridge',
|
||||
keywords: [
|
||||
'__:1,2d',
|
||||
'_e:1,2d',
|
||||
'_x:1,2c,3d',
|
||||
'esc_html__:1,2d',
|
||||
'esc_html_e:1,2d',
|
||||
'esc_html_x:1,2c,3d',
|
||||
'esc_attr__:1,2d',
|
||||
'esc_attr_e:1,2d',
|
||||
'esc_attr_x:1,2c,3d',
|
||||
'_ex:1,2c,3d',
|
||||
'_n:1,2,4d',
|
||||
'_nx:1,2,4c,5d',
|
||||
'_n_noop:1,2,3d',
|
||||
'_nx_noop:1,2,3c,4d'
|
||||
]
|
||||
},
|
||||
files: {
|
||||
src: [
|
||||
'**/*.php', // Include all files
|
||||
'!sass/**', // Exclude sass/
|
||||
'!node_modules/**', // Exclude node_modules/
|
||||
'!tests/**', // Exclude tests/
|
||||
'!vendor/**', // Exclude vendor/
|
||||
'!build/**', // Exclude build/
|
||||
'!static/**', // Exclude static resources
|
||||
],
|
||||
expand: true
|
||||
}
|
||||
},
|
||||
|
||||
wp_readme_to_markdown: {
|
||||
target: {
|
||||
files: {
|
||||
'README.md': 'readme.txt'
|
||||
},
|
||||
},
|
||||
options: {
|
||||
pre_convert: function ( readme ) {
|
||||
return readme.replace( /\*\*Note\*\*:/g, "> [!NOTE]\n>" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
|
||||
grunt.loadNpmTasks( 'grunt-checktextdomain' );
|
||||
|
||||
// Default task(s).
|
||||
grunt.registerTask( 'default', ['wp_readme_to_markdown', 'checktextdomain'] );
|
||||
};
|
85
README.md
|
@ -1,48 +1,50 @@
|
|||
# ActivityPub Event Bridge #
|
||||
**Contributors:** [andremenrath](https://profiles.wordpress.org/andremenrath/)
|
||||
**Tags:** events, fediverse, activitypub, calendar
|
||||
**Requires at least:** 6.5
|
||||
**Tested up to:** 6.7
|
||||
**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
|
||||
# ActivityPub Event Bridge
|
||||
|
||||
Contributors: andremenrath
|
||||
Tags: events, fediverse, activitypub, calendar
|
||||
Requires at least: 6.5
|
||||
Tested up to: 6.6
|
||||
Stable tag: 0.1.0
|
||||
Requires PHP: 8.1
|
||||
License: AGPL-3.0-or-later
|
||||
License URI: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
Integrating popular event plugins with the ActivityPub plugin.
|
||||
|
||||
![Federate your Events, Expand your Reach!](.wordpress-org/banner-1544x500.jpg)
|
||||
![](.wordpress-org/banner-1544x500.jpg)
|
||||
|
||||
## Description ##
|
||||
## Description
|
||||
|
||||
Make your events more discoverable, expand your reach effortlessly while being independent of other (commercial) platforms, and be a part of the growing decentralized web (the Fediverse).
|
||||
With the ActivityPub Event Bridge Plugin for WordPress, your events can be automatically followed, aggregated and displayed across decentralized platforms like [Mastodon](https://joinmastodon.org) or [Gancio](https://gancio.org), without any extra work.
|
||||
With the ActivityPub Event Bridge plugin for WordPress, your events can be automatically followed, aggregated and displayed across decentralized platforms like [Mastodon](https://joinmastodon.org) or [Gancio](https://gancio.org), without any extra work.
|
||||
Forget the hassle of managing multiple social media accounts just to keep your audience informed.
|
||||
|
||||
This plugin is not an event managing plugin but an add-on to popular event plugins. It extends their functionality to fully support the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/).
|
||||
With the ActivityPub plugin people can follow your website directly and engage with your events just as they would on social media: liking, boosting and even commenting if you enable it.
|
||||
You retain full ownership of your content. By integrating into your existing setup, it ensures no extra work is needed while enhancing your events' visibility across the web.
|
||||
|
||||
### How It Works ###
|
||||
### How It Works
|
||||
|
||||
With the ActivityPub Event Bridge WordPress plugin, sharing your events is effortless and automatic!
|
||||
Once you create an event on your WordPress site, it is seamlessly shared across the decentralized web using the ActivityPub protocol.
|
||||
|
||||
<p align="center">
|
||||
<img src="./.wordpress-org/event-activitypub-publishing.gif" alt="Logo" width="300"/>
|
||||
<img src="./.wordpress-org/event-activitypub-publishing.gif" alt="Logo" width="250" />
|
||||
</p>
|
||||
|
||||
Your events can be automatically delivered to platforms that fully support events, such as [Mobilizon](https://joinmobilizon.org/), [Gancio](https://gancio.org), [Friendica](https://friendi.ca), [Hubzilla](https://hubzilla.org), and [Pleroma](https://pleroma.social/).
|
||||
These platforms create public event calendars by pulling in events from various sources, including your website. Any updates you make to your events are synced across these platforms—so you only need to manage your events on your own site, with no extra work required.
|
||||
|
||||
<p align="center">
|
||||
<img src="./.wordpress-org/decentralized-event-calenders.gif" alt="Logo" width="250"/>
|
||||
<img src="./.wordpress-org/decentralized-event-calenders.gif" alt="Logo" width="250" />
|
||||
</p>
|
||||
|
||||
Even platforms that don't yet fully support events, like [Mastodon](https://joinmastodon.org), will still receive a detailed, well-composed summary of your event.
|
||||
The Event Federation plugin ensures that users from those platforms are provided with all important information about an event.
|
||||
|
||||
### Features for Your WordPress Events and the Fediverse ###
|
||||
### Features for Your WordPress Events and the Fediverse
|
||||
|
||||
**ActivityPub-Enabled Event Sharing:** Your WordPress events are now compatible with the Fediverse, using the ActivityStreams format. This means your events can be easily discovered and followed by users on platforms like Mastodon and other ActivityPub-compatible services.
|
||||
**ActivityPub-Enabled Event Sharing:** Your WordPress events are not part of the Fediverse and
|
||||
|
||||
**Automatic Event Summaries:** When your event is shared on the Fediverse, platforms like Mastodon that don't fully support events will display a brief HTML summary of key details — such as the event's title, start time, and location. This ensures that even if someone can't view the full event on their platform, they still get the important info at a glance, with a link to your WordPress event page.
|
||||
|
||||
|
@ -50,11 +52,11 @@ The Event Federation plugin ensures that users from those platforms are provided
|
|||
|
||||
**Event Reminders for Your Followers:** Often, events are planned well in advance. To keep your followers informed right in time, you can set up reminders that are supposed to trigger the events showing up in their timelines right before the event starts. At the moment this reminder is implemented as a self-boost of your original event post. While this feature may behave differently across various platforms, we are working on a more robust solution that will let you schedule dedicated reminder notes that appear in all followers' timelines.
|
||||
|
||||
## Installation ##
|
||||
## Installation
|
||||
|
||||
This plugin depends on the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/). Additionally, you need to use one of the supported event Plugins.
|
||||
This plugin depends on the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/). Additionally, you need to use one of the supported event plugins. See below.
|
||||
|
||||
### Supported Event Plugins ###
|
||||
### Supported Event plugins
|
||||
|
||||
* [The Events Calendar](https://de.wordpress.org/plugins/the-events-calendar/)
|
||||
* [VS Event List](https://de.wordpress.org/plugins/very-simple-event-list/)
|
||||
|
@ -62,54 +64,43 @@ This plugin depends on the [ActivityPub plugin](https://wordpress.org/plugins/ac
|
|||
* [WP Event Manager](https://de.wordpress.org/plugins/wp-event-manager/)
|
||||
* [Eventin](https://de.wordpress.org/plugins/wp-event-solution/)
|
||||
* [Modern Events Calendar Lite](https://webnus.net/modern-events-calendar/)
|
||||
* [GatherPress](https://gatherpress.org/)
|
||||
|
||||
## Configuration ##
|
||||
|
||||
If you're new to the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/), it’s recommended to spend a few minutes reading through its documentation to familiarize yourself with its setup and functionality.
|
||||
## Configuration
|
||||
|
||||
## Frequently Asked Questions ##
|
||||
If you’re new to the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/), it’s recommended to spend a few minutes reading through its documentation to familiarize yourself with its setup and functionality.
|
||||
|
||||
### Do I need to install another event plugin to use the Event Federation Plugin? ###
|
||||
## Frequently Asked Questions
|
||||
|
||||
### 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? ###
|
||||
### 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.
|
||||
|
||||
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.
|
||||
|
||||
### How much extra work is required to maintain my events across the decentralized Web? ###
|
||||
### How much extra work is required to maintain my events across the decentralized Web?
|
||||
|
||||
None! Once the plugin is set up, your events are automatically sent to all connected platforms or account that follow you (your Website). Any updates you make to your events are synced without additional effort.
|
||||
|
||||
### Can I still use social media to promote my events? ###
|
||||
### Can I still use social media to promote my events?
|
||||
|
||||
Yes, you can still use traditional social media if you wish. However, this plugin helps reduce reliance on commercial platforms by connecting your events to the decentralized Fediverse.
|
||||
|
||||
### Will this plugin work if I don't use the ActivityPub plugin? ###
|
||||
### Will this plugin work if I don't use the ActivityPub plugin?
|
||||
|
||||
No, the Event Federation Plugin depends on the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/) to deliver your events across decentralized platforms, so it's essential to have it installed and configured.
|
||||
No, the Event Federation plugin depends on the ActivityPub plugin to deliver your events across decentralized platforms, so it's essential to have it installed and configured.
|
||||
|
||||
### My event plugin is not supported, what can I do? ###
|
||||
### My event plugin is not supported, what can I do?
|
||||
|
||||
If you know about coding have a look at the documentation of how to add your plugin or open an [issue](https://code.event-federation.eu/Event-Federation/wordpress-activitypub-event-bridge/issues), if we can spare some free hours we might add it.
|
||||
|
||||
### What if I experience problems? ###
|
||||
### What if I experience problems?
|
||||
|
||||
We're always interested in your feedback. Feel free to reach out to us via [E-Mail](https://event-federation.eu/contact/) or create an [issue](https://code.event-federation.eu/Event-Federation/wordpress-activitypub-event-bridge/issues).
|
||||
|
||||
## Changelog ##
|
||||
## Changelog
|
||||
|
||||
## Unreleased
|
||||
### [0.1.0] 2024-10-01
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed that transformer hook function might also return `null`.
|
||||
|
||||
### [0.2.1] 2024-11-16 ###
|
||||
|
||||
* Initial release on https://wordpress.org/
|
||||
|
||||
### [0.2.0] 2024-10-29 ###
|
||||
|
||||
* Initial submission to https://wordpress.org/
|
||||
* Initial alpha release on WordPress.org
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
* Plugin Name: ActivityPub Event Bridge
|
||||
* Description: Integrating popular event plugins with the ActivityPub plugin.
|
||||
* Plugin URI: https://event-federation.eu/
|
||||
* Version: 0.2.1
|
||||
* Version: 0.1.0
|
||||
* Author: André Menrath
|
||||
* Author URI: https://graz.social/@linos
|
||||
* Text Domain: activitypub-event-bridge
|
||||
* License: AGPL-3.0-or-later
|
||||
* License URI: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
* Requires PHP: 7.4
|
||||
* License URI: https://www.gnu.org/licenses/agpl-3.0.de.html
|
||||
* Requires PHP: 8.1
|
||||
*
|
||||
* Requires at least ActivityPub plugin with version >= 3.2.2. ActivityPub plugin tested up to: 4.2.0.
|
||||
* Requires at least ActivityPub plugin with version >= 3.2.2. ActivityPub plugin tested up to: 3.2.2.
|
||||
*
|
||||
* @package ActivityPub_Event_Bridge
|
||||
* @license AGPL-3.0-or-later
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
.settings_page_activitypub-event-bridge #wpcontent {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-page .box {
|
||||
border: 1px solid #c3c4c7;
|
||||
background-color: #fff;
|
||||
|
@ -10,7 +6,8 @@
|
|||
}
|
||||
|
||||
.activitypub-event-bridge-settings-page .box ul.activitypub-event-bridge-list {
|
||||
margin-left: 0.6em;
|
||||
list-style-type: disc;
|
||||
margin-left: 1.4rem;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-page .box pre {
|
||||
|
@ -65,115 +62,9 @@
|
|||
}
|
||||
|
||||
.activitypub-event-bridge-settings .box h3 {
|
||||
font-size: 1.15em;
|
||||
margin-bottom: 0em;
|
||||
font-size: 1.1rem!important;
|
||||
}
|
||||
|
||||
#activitypub_event_bridge_initially_activated {
|
||||
display: hidden;
|
||||
}
|
||||
|
||||
/* Accordions for admin pages */
|
||||
.activitypub-event-bridge-settings-accordion {
|
||||
border: 1px solid #c3c4c7;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-accordion-heading {
|
||||
margin: 0;
|
||||
border-top: 1px solid #c3c4c7;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
font-weight: 600;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-accordion-heading:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-accordion-panel {
|
||||
margin: 0;
|
||||
padding: 1em 1.5em;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-accordion-trigger {
|
||||
background: #fff;
|
||||
border: 0;
|
||||
color: #2c3338;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
padding: 1em 3.5em 1em 1.5em;
|
||||
min-height: 46px;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-accordion-trigger {
|
||||
color: #2c3338;
|
||||
cursor: pointer;
|
||||
font-weight: 400;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-accordion-trigger .title {
|
||||
pointer-events: none;
|
||||
font-weight: 600;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-accordion-trigger .icon,
|
||||
.activitypub-event-bridge-settings-accordion-viewed .icon {
|
||||
border: solid #50575e medium;
|
||||
border-width: 0 2px 2px 0;
|
||||
height: .5rem;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
right: 1.5em;
|
||||
top: 50%;
|
||||
transform: translateY(-70%) rotate(45deg);
|
||||
width: .5rem;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-accordion-trigger[aria-expanded="true"] .icon {
|
||||
transform: translateY(-30%) rotate(-135deg);
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-accordion-trigger:active,
|
||||
.activitypub-event-bridge-settings-accordion-trigger:hover {
|
||||
background: #f6f7f7;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-accordion-trigger:focus {
|
||||
color: #1d2327;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
outline-offset: -1px;
|
||||
outline: 2px solid #2271b1;
|
||||
background-color: #f6f7f7;
|
||||
}
|
||||
|
||||
.activitypub-event-bridge-settings-inline-icon {
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
vertical-align: middle;
|
||||
margin: 0 0.3em;
|
||||
}
|
||||
|
||||
code.activitypub-event-bridge-settings-example-url {
|
||||
display: block;
|
||||
background: rgb(28, 29, 33);
|
||||
padding: 8px;
|
||||
margin: 10px 0px 10px 0;
|
||||
border-radius: 7px;
|
||||
color: #d5d5d6;
|
||||
overflow-x: auto;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
|
|
@ -1,288 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="130"
|
||||
height="130"
|
||||
viewBox="0 0 34.395832 34.395832"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
sodipodi:docname="ActivityPub-logo-symbol.svg">
|
||||
<title
|
||||
id="title4590">ActivityPub logo</title>
|
||||
<defs
|
||||
id="defs2">
|
||||
<linearGradient
|
||||
id="AP-4-0"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#5e5e5e;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5660" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5640"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5638" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5634"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5632" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5628"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5626" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="AP-3-7"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#c678c5;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5498" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="AP-2-3"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#6d6d6d;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5230" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="AP1-5"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#f1007e;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5212" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#AP-3-7"
|
||||
id="linearGradient5749"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="3319.292"
|
||||
y1="-1291.2802"
|
||||
x2="3344.3645"
|
||||
y2="-1291.2802" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#AP1-5"
|
||||
id="linearGradient7297-7"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="3241.6836"
|
||||
y1="-1355.4329"
|
||||
x2="3254.9529"
|
||||
y2="-1355.4329" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#AP-2-3"
|
||||
id="linearGradient7303-7"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="3225.7603"
|
||||
y1="-1355.4329"
|
||||
x2="3239.0295"
|
||||
y2="-1355.4329" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#AP1-5"
|
||||
id="linearGradient8308"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="3241.6836"
|
||||
y1="-1355.4329"
|
||||
x2="3254.9529"
|
||||
y2="-1355.4329" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#AP1-5"
|
||||
id="linearGradient8310"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="3241.6836"
|
||||
y1="-1355.4329"
|
||||
x2="3254.9529"
|
||||
y2="-1355.4329" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#AP1-5"
|
||||
id="linearGradient8312"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="3241.6836"
|
||||
y1="-1355.4329"
|
||||
x2="3254.9529"
|
||||
y2="-1355.4329" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#AP-2-3"
|
||||
id="linearGradient8314"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="3225.7603"
|
||||
y1="-1355.4329"
|
||||
x2="3239.0295"
|
||||
y2="-1355.4329"
|
||||
gradientTransform="matrix(3.7000834,0,0,3.7000834,-11935.582,4544.6634)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#AP-2-3"
|
||||
id="linearGradient5188"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.42732603,0,0,0.42732603,-1363.3009,454.91899)"
|
||||
x1="3269.126"
|
||||
y1="-1354.6217"
|
||||
x2="3322.1943"
|
||||
y2="-1354.6217" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="0.14509804"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.70710678"
|
||||
inkscape:cx="-195.34129"
|
||||
inkscape:cy="-120.65903"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:snap-global="true"
|
||||
showguides="false"
|
||||
inkscape:guide-bbox="true"
|
||||
showborder="true"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:showpageshadow="false"
|
||||
borderlayer="false"
|
||||
units="px">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4572"
|
||||
enabled="false"
|
||||
originx="7.1437514"
|
||||
originy="-404.28382" />
|
||||
<inkscape:grid
|
||||
type="axonomgrid"
|
||||
id="grid4574"
|
||||
units="mm"
|
||||
empspacing="12"
|
||||
originx="7.1437514"
|
||||
originy="-404.28382"
|
||||
enabled="false" />
|
||||
<sodipodi:guide
|
||||
position="3278.981,1256.5057"
|
||||
orientation="0,1"
|
||||
id="guide5059"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="3278.981,1238.2495"
|
||||
orientation="0,1"
|
||||
id="guide5061"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>ActivityPub logo</dc:title>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:date>2017-04-15</dc:date>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Robert Martinez</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>ActivityPub</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
style="opacity:1"
|
||||
transform="translate(7.1437516,141.67967)">
|
||||
<path
|
||||
style="fill:#000000;stroke-width:0.26458335"
|
||||
d=""
|
||||
id="path5497"
|
||||
inkscape:connector-curvature="0" />
|
||||
<g
|
||||
id="g5197"
|
||||
transform="translate(-4.2352716,0.01824528)">
|
||||
<g
|
||||
id="g5132-90"
|
||||
style="fill:url(#linearGradient7297-7);fill-opacity:1"
|
||||
transform="matrix(0.9789804,0,0,0.9789804,-3157.9561,1202.4422)">
|
||||
<g
|
||||
transform="matrix(0.2553682,0,0,0.2553682,2615.9213,-1125.3113)"
|
||||
id="g5080-78"
|
||||
style="fill:url(#linearGradient8312);fill-opacity:1">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5404-0-0"
|
||||
d="m 2450.431,-937.13662 51.9615,30 v 12 l -51.9615,30 v -12 l 41.5693,-24 -41.5692,-24 z"
|
||||
style="fill:url(#linearGradient8308);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
style="fill:url(#linearGradient8310);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 2450.431,-913.13662 20.7847,12 -20.7847,12 z"
|
||||
id="path5406-6-3"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g5127-1"
|
||||
style="fill:url(#linearGradient7303-7);fill-opacity:1"
|
||||
transform="matrix(0.9789804,0,0,0.9789804,-3157.9561,1202.4422)">
|
||||
<path
|
||||
id="path5467-2-0"
|
||||
transform="matrix(0.27026418,0,0,0.27026418,3225.7603,-1228.2597)"
|
||||
d="M 49.097656,-504.56641 0,-476.2207 v 11.33789 l 39.277344,-22.67578 v 45.35351 l 9.820312,5.66992 z m -19.638672,34.01563 -19.6406246,11.33789 19.6406246,11.33789 z"
|
||||
style="fill:url(#linearGradient8314);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.25000042px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 8.8 KiB |
|
@ -1,17 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="196.52mm" height="196.52mm" viewBox="0 0 196.52 196.52">
|
||||
<path fill="#a730b8" d="M47.9242 72.7966a18.2278 18.2278 0 0 1-7.7959 7.7597l42.7984 42.9653 10.3182-5.2291zm56.4524 56.6704-10.3182 5.2291 21.686 21.7708a18.2278 18.2278 0 0 1 7.7975-7.7608z"/>
|
||||
<path fill="#5496be" d="M129.6645 102.0765l1.7865 11.4272 27.4149-13.8942a18.2278 18.2278 0 0 1-4.9719-9.8124zm-14.0658 7.1282-57.2891 29.0339a18.2278 18.2278 0 0 1 4.9728 9.8133l54.1027-27.4194z"/>
|
||||
<path fill="#ce3d1a" d="M69.5312 91.6539l8.1618 8.1933 29.269-57.1387a18.2278 18.2278 0 0 1-9.787-5.0219zm-7.1897 14.0363-14.0022 27.3353a18.2278 18.2278 0 0 1 9.786 5.0214l12.3775-24.1639z"/>
|
||||
<path fill="#d0188f" d="M39.8906 80.6763a18.2278 18.2278 0 0 1-10.8655 1.7198l8.1762 52.2981a18.2278 18.2278 0 0 1 10.8645-1.7198z"/>
|
||||
<path fill="#5b36e9" d="M63.3259 148.3109a18.2278 18.2278 0 0 1-1.7322 10.8629l52.2893 8.3907a18.2278 18.2278 0 0 1 1.7322-10.8629z"/>
|
||||
<path fill="#30b873" d="M134.9148 146.9182a18.2278 18.2278 0 0 1 9.788 5.0224l24.1345-47.117a18.2278 18.2278 0 0 1-9.7875-5.0229z"/>
|
||||
<path fill="#ebe305" d="M126.1329 33.1603a18.2278 18.2278 0 0 1-7.7975 7.7608l37.3765 37.5207a18.2278 18.2278 0 0 1 7.7969-7.7608z"/>
|
||||
<path fill="#f47601" d="M44.7704 51.6279a18.2278 18.2278 0 0 1 4.9723 9.8123l47.2478-23.9453a18.2278 18.2278 0 0 1-4.9718-9.8113z"/>
|
||||
<path fill="#57c115" d="M118.2491 40.9645a18.2278 18.2278 0 0 1-10.8511 1.8123l4.1853 26.8 11.42 1.8324zm-4.2333 44.1927 9.8955 63.3631a18.2278 18.2278 0 0 1 10.88-1.6278l-9.355-59.9035z"/>
|
||||
<path fill="#dbb210" d="M49.7763 61.6412a18.2278 18.2278 0 0 1-1.694 10.8686l26.8206 4.3077 5.2715-10.2945zm45.9677 7.382-5.272 10.2955 63.3713 10.1777a18.2278 18.2278 0 0 1 1.7606-10.8593z"/>
|
||||
<path fill="#ffca00" d="M93.4385 23.8419a1 1 0 1 0 33.0924 1.8025 1 1 0 1 0-33.0924-1.8025"/>
|
||||
<path fill="#64ff00" d="M155.314 85.957a1 1 0 1 0 33.0923 1.8025 1 1 0 1 0-33.0923-1.8025"/>
|
||||
<path fill="#00a3ff" d="M115.3466 163.9824a1 1 0 1 0 33.0923 1.8025 1 1 0 1 0-33.0923-1.8025"/>
|
||||
<path fill="#9500ff" d="M28.7698 150.0898a1 1 0 1 0 33.0923 1.8025 1 1 0 1 0-33.0923-1.8025"/>
|
||||
<path fill="#ff0000" d="M15.2298 63.4781a1 1 0 1 0 33.0923 1.8025 1 1 0 1 0-33.0923-1.8025"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.2 KiB |
|
@ -1,10 +0,0 @@
|
|||
<svg width="75" height="79" viewBox="0 0 75 79" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M73.8393 17.4898C72.6973 9.00165 65.2994 2.31235 56.5296 1.01614C55.05 0.797115 49.4441 0 36.4582 0H36.3612C23.3717 0 20.585 0.797115 19.1054 1.01614C10.5798 2.27644 2.79399 8.28712 0.904997 16.8758C-0.00358524 21.1056 -0.100549 25.7949 0.0682394 30.0965C0.308852 36.2651 0.355538 42.423 0.91577 48.5665C1.30307 52.6474 1.97872 56.6957 2.93763 60.6812C4.73325 68.042 12.0019 74.1676 19.1233 76.6666C26.7478 79.2728 34.9474 79.7055 42.8039 77.9162C43.6682 77.7151 44.5217 77.4817 45.3645 77.216C47.275 76.6092 49.5123 75.9305 51.1571 74.7385C51.1797 74.7217 51.1982 74.7001 51.2112 74.6753C51.2243 74.6504 51.2316 74.6229 51.2325 74.5948V68.6416C51.2321 68.6154 51.2259 68.5896 51.2142 68.5661C51.2025 68.5426 51.1858 68.522 51.1651 68.5058C51.1444 68.4896 51.1204 68.4783 51.0948 68.4726C51.0692 68.4669 51.0426 68.467 51.0171 68.4729C45.9835 69.675 40.8254 70.2777 35.6502 70.2682C26.7439 70.2682 24.3486 66.042 23.6626 64.2826C23.1113 62.762 22.7612 61.1759 22.6212 59.5646C22.6197 59.5375 22.6247 59.5105 22.6357 59.4857C22.6466 59.4609 22.6633 59.4391 22.6843 59.422C22.7053 59.4048 22.73 59.3929 22.7565 59.3871C22.783 59.3813 22.8104 59.3818 22.8367 59.3886C27.7864 60.5826 32.8604 61.1853 37.9522 61.1839C39.1768 61.1839 40.3978 61.1839 41.6224 61.1516C46.7435 61.008 52.1411 60.7459 57.1796 59.7621C57.3053 59.7369 57.431 59.7154 57.5387 59.6831C65.4861 58.157 73.0493 53.3672 73.8178 41.2381C73.8465 40.7606 73.9184 36.2364 73.9184 35.7409C73.9219 34.0569 74.4606 23.7949 73.8393 17.4898Z" fill="url(#paint0_linear_549_34)"/>
|
||||
<path d="M61.2484 27.0263V48.114H52.8916V27.6475C52.8916 23.3388 51.096 21.1413 47.4437 21.1413C43.4287 21.1413 41.4177 23.7409 41.4177 28.8755V40.0782H33.1111V28.8755C33.1111 23.7409 31.0965 21.1413 27.0815 21.1413C23.4507 21.1413 21.6371 23.3388 21.6371 27.6475V48.114H13.2839V27.0263C13.2839 22.7176 14.384 19.2946 16.5843 16.7572C18.8539 14.2258 21.8311 12.926 25.5264 12.926C29.8036 12.926 33.0357 14.5705 35.1905 17.8559L37.2698 21.346L39.3527 17.8559C41.5074 14.5705 44.7395 12.926 49.0095 12.926C52.7013 12.926 55.6784 14.2258 57.9553 16.7572C60.1531 19.2922 61.2508 22.7152 61.2484 27.0263Z" fill="white"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_549_34" x1="37.0692" y1="0" x2="37.0692" y2="79" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#6364FF"/>
|
||||
<stop offset="1" stop-color="#563ACC"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 14 KiB |
|
@ -1,14 +0,0 @@
|
|||
jQuery( function( $ ) {
|
||||
// Accordion handling in various areas.
|
||||
$( '.activitypub-event-bridge-settings-accordion' ).on( 'click', '.activitypub-event-bridge-settings-accordion-trigger', function() {
|
||||
var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) );
|
||||
|
||||
if ( isExpanded ) {
|
||||
$( this ).attr( 'aria-expanded', 'false' );
|
||||
$( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', true );
|
||||
} else {
|
||||
$( this ).attr( 'aria-expanded', 'true' );
|
||||
$( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', false );
|
||||
}
|
||||
} );
|
||||
} );
|
|
@ -208,15 +208,9 @@ install_wp_plugin() {
|
|||
fi
|
||||
|
||||
# Get the latest tag.
|
||||
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
|
||||
PLUGIN_VERSION=$2
|
||||
fi
|
||||
|
||||
if [ -n "$PLUGIN_VERSION" ]; then
|
||||
PLUGIN_FILE="$PLUGIN_NAME.$PLUGIN_VERSION.zip"
|
||||
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"
|
||||
else
|
||||
PLUGIN_FILE="$PLUGIN_NAME.zip"
|
||||
fi
|
||||
|
@ -254,12 +248,12 @@ 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 "6.8.1"
|
||||
install_wp_plugin the-events-calendar
|
||||
install_wp_plugin very-simple-event-list
|
||||
install_wp_plugin gatherpress
|
||||
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"
|
||||
install_wp_plugin events-manager
|
||||
install_wp_plugin wp-event-manager
|
||||
install_wp_plugin wp-event-solution
|
||||
# Mec is not installable via wordpress.org, we use our own mirror.
|
||||
install_wp_plugin_mec
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"description": "The ActivityPub Event Bridge help for event custom post types to federate properly.",
|
||||
"type": "wordpress-plugin",
|
||||
"require": {
|
||||
"php": ">=7.4.0",
|
||||
"php": ">=8.1.0",
|
||||
"composer/installers": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@ -58,7 +58,7 @@
|
|||
],
|
||||
"test-debug": [
|
||||
"@prepare-test",
|
||||
"@test-gatherpress"
|
||||
"@test-modern-events-calendar-lite"
|
||||
],
|
||||
"test-vs-event-list": "phpunit --filter=vs_event_list",
|
||||
"test-the-events-calendar": "phpunit --filter=the_events_calendar",
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
version: '3'
|
||||
|
||||
# This files purpose is to run the PHPunit tests locally.
|
||||
# Prerequisites:
|
||||
# Run "composer install" to generate a composer.lock file and install PHP dev dependencies.
|
||||
#
|
||||
# Install docker and docker compose and than just run:
|
||||
# docker compose up
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ In the pipeline we want to run each event plugins integration tests in a single
|
|||
To activate/load your plugin add it to the switch statement within the function `_manually_load_plugin()` within `tests/bootstrap.php`.
|
||||
|
||||
```php
|
||||
switch ( $activitypub_event_bridge_integration_filter ) {
|
||||
switch ( $activitypub_event_extension_integration_filter ) {
|
||||
...
|
||||
case 'my_event_plugin':
|
||||
$plugin_file = 'my-event-plugin/my-event-plugin.php';
|
||||
|
|
16
improvements.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
Make use of:
|
||||
|
||||
https://docs.theeventscalendar.com/reference/classes/tribe__events__api/get_event_terms/
|
||||
|
||||
for getting all tags/terms for an event!
|
||||
|
||||
```
|
||||
public static function get_event_terms( $event_id, array $args = array() ) {
|
||||
$terms = array();
|
||||
foreach ( get_post_taxonomies( $event_id ) as $taxonomy ) {
|
||||
$tax_terms = wp_get_object_terms( $event_id, $taxonomy, $args );
|
||||
$terms[ $taxonomy ] = $tax_terms;
|
||||
}
|
||||
return $terms;
|
||||
}
|
||||
```
|
|
@ -267,9 +267,9 @@ abstract class Event extends Post {
|
|||
add_filter( 'activitypub_object_content_template', array( self::class, 'remove_ap_permalink_from_template' ), 2, 2 );
|
||||
$excerpt = $this->retrieve_excerpt();
|
||||
// BeforeFirstRelease: decide whether this should be a admin setting.
|
||||
$fallback_to_content = false;
|
||||
$fallback_to_content = true;
|
||||
if ( is_null( $excerpt ) && $fallback_to_content ) {
|
||||
$excerpt = $this->get_content();
|
||||
$excerpt = parent::get_content();
|
||||
}
|
||||
remove_filter( 'activitypub_object_content_template', array( self::class, 'remove_ap_permalink_from_template' ) );
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ final class GatherPress extends Event {
|
|||
*/
|
||||
public static function filter_gatherpress_blocks( $block_content, $block ) {
|
||||
// Check if the block name starts with 'gatherpress'.
|
||||
if ( isset( $block['blockName'] ) && 0 === strpos( $block['blockName'], 'gatherpress/' ) ) {
|
||||
if ( strpos( $block['blockName'], 'gatherpress/' ) === 0 ) {
|
||||
return ''; // Skip rendering this block.
|
||||
}
|
||||
|
||||
|
|
|
@ -54,14 +54,6 @@ final class Modern_Events_Calendar_Lite extends Event {
|
|||
$this->mec_event = new MEC_Event( $wp_object );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the content without the plugins rendered shortcodes.
|
||||
*/
|
||||
public function get_content(): string {
|
||||
$content = wpautop( $this->wp_object->post_content );
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the end time from the event object.
|
||||
*/
|
||||
|
|
|
@ -121,9 +121,9 @@ final class The_Events_Calendar extends Event {
|
|||
/**
|
||||
* Get the event location.
|
||||
*
|
||||
* @return ?Place The place/venue if one is set.
|
||||
* @return Place|array The place/venue if one is set.
|
||||
*/
|
||||
public function get_location(): ?Place {
|
||||
public function get_location(): Place|null {
|
||||
// Get short handle for the venues.
|
||||
$venues = $this->tribe_event->venues;
|
||||
|
||||
|
@ -173,7 +173,7 @@ final class The_Events_Calendar extends Event {
|
|||
} else {
|
||||
$location->set_address( $venue->post_title );
|
||||
}
|
||||
$location->set_id( $venue->ID );
|
||||
$location->set_id( $venue->permalink );
|
||||
$location->set_name( $venue->post_title );
|
||||
|
||||
return $location;
|
||||
|
|
|
@ -98,24 +98,6 @@ class General_Admin_Notices {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning to fix status issues first.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_admin_notice_status_not_ok(): string {
|
||||
return sprintf(
|
||||
/* translators: 1: An URL to the list of supported event plugins. */
|
||||
_x(
|
||||
'The Plugin <i>ActivityPub Event Bridge</i> is of no use, because you do not have installed and activated a supported Event Plugin.
|
||||
<br> For a list of supported Event Plugins see <a href="%1$s">here</a>.',
|
||||
'admin notice',
|
||||
'activitypub-event-bridge'
|
||||
),
|
||||
esc_html( self::ACTIVITYPUB_EVENT_BRIDGE_SUPPORTED_EVENT_PLUGINS_URL )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning if the plugin is Active and the ActivityPub plugin is not.
|
||||
*
|
||||
|
|
|
@ -47,7 +47,7 @@ class Health_Check {
|
|||
*/
|
||||
public static function test_event_transformation() {
|
||||
$result = array(
|
||||
'label' => \__( 'Transformation of Events to a valid ActivityStreams representation.', 'activitypub-event-bridge' ),
|
||||
'label' => \__( 'Transformation of Events to a valid ActivityStreams representation.', 'activitypub' ),
|
||||
'status' => 'good',
|
||||
'badge' => array(
|
||||
'label' => \__( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ),
|
||||
|
@ -107,16 +107,12 @@ class Health_Check {
|
|||
/**
|
||||
* Retrieves the most recently published event posts of a certain event post type.
|
||||
*
|
||||
* @param ?string $event_post_type The post type of the events.
|
||||
* @param ?int $number_of_posts The maximum number of events to return.
|
||||
* @param string $event_post_type The post type of the events.
|
||||
* @param int $number_of_posts The maximum number of events to return.
|
||||
*
|
||||
* @return WP_Post[]|false Array of event posts, or false if none are found.
|
||||
*/
|
||||
public static function get_most_recent_event_posts( $event_post_type = null, $number_of_posts = 5 ) {
|
||||
if ( ! $event_post_type ) {
|
||||
$event_post_type = Setup::get_instance()->get_active_event_plugins()[0]->get_post_type();
|
||||
}
|
||||
|
||||
public static function get_most_recent_event_posts( $event_post_type, $number_of_posts = 5 ) {
|
||||
$args = array(
|
||||
'numberposts' => $number_of_posts,
|
||||
'category' => 0,
|
||||
|
@ -172,7 +168,7 @@ class Health_Check {
|
|||
'label' => __( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ),
|
||||
'fields' => array(
|
||||
'plugin_version' => array(
|
||||
'label' => __( 'Plugin Version', 'activitypub-event-bridge' ),
|
||||
'label' => __( 'Plugin Version', 'activitypub' ),
|
||||
'value' => ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_VERSION,
|
||||
'private' => true,
|
||||
),
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* General settings class.
|
||||
*
|
||||
* This file contains the General class definition, which handles the "General" settings
|
||||
* page for the Activitypub Event Bridge Plugin, providing options for configuring various general settings.
|
||||
* page for the ActivityPub Event Extension Plugin, providing options for configuring various general settings.
|
||||
*
|
||||
* @package ActivityPub_Event_Bridge
|
||||
* @since 1.0.0
|
||||
|
@ -18,9 +18,9 @@ use ActivityPub_Event_Bridge\Plugins\Event_Plugin;
|
|||
use ActivityPub_Event_Bridge\Setup;
|
||||
|
||||
/**
|
||||
* Class responsible for the Activitypub Event Bridge related Settings.
|
||||
* Class responsible for the ActivityPub Event Extension related Settings.
|
||||
*
|
||||
* Class which handles the "General" settings page for the Activitypub Event Bridge Plugin,
|
||||
* Class which handles the "General" settings page for the ActivityPub Event Extension Plugin,
|
||||
* providing options for configuring various general settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
@ -36,11 +36,11 @@ class Settings_Page {
|
|||
*/
|
||||
public static function admin_menu(): void {
|
||||
\add_options_page(
|
||||
'Activitypub Event Bridge',
|
||||
__( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ),
|
||||
'Activitypub Event Extension',
|
||||
__( 'ActivityPub Events', 'activitypub-event-bridge' ),
|
||||
'manage_options',
|
||||
self::SETTINGS_SLUG,
|
||||
array( self::STATIC, 'settings_page' ),
|
||||
array( self::STATIC, 'settings_page' )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* General settings class.
|
||||
*
|
||||
* This file contains the General class definition, which handles the "General" settings
|
||||
* page for the Activitypub Event Bridge Plugin, providing options for configuring various general settings.
|
||||
* page for the ActivityPub Event Extension Plugin, providing options for configuring various general settings.
|
||||
*
|
||||
* @package ActivityPub_Event_Bridge
|
||||
* @since 1.0.0
|
||||
|
@ -44,7 +44,7 @@ class Settings {
|
|||
'activitypub_event_bridge_default_event_category',
|
||||
array(
|
||||
'type' => 'string',
|
||||
'description' => \__( 'Define your own custom post template', 'activitypub-event-bridge' ),
|
||||
'description' => \__( 'Define your own custom post template', 'activitypub' ),
|
||||
'show_in_rest' => true,
|
||||
'default' => self::DEFAULT_EVENT_CATEGORY,
|
||||
'sanitize_callback' => array( self::class, 'sanitize_mapped_event_category' ),
|
||||
|
@ -56,7 +56,7 @@ class Settings {
|
|||
'activitypub_event_bridge_event_category_mappings',
|
||||
array(
|
||||
'type' => 'array',
|
||||
'description' => \__( 'Define your own custom post template', 'activitypub-event-bridge' ),
|
||||
'description' => \__( 'Define your own custom post template', 'activitypub' ),
|
||||
'default' => array(),
|
||||
'sanitize_callback' => array( self::class, 'sanitize_event_category_mappings' ),
|
||||
)
|
||||
|
@ -67,7 +67,7 @@ class Settings {
|
|||
'activitypub_event_bridge_initially_activated',
|
||||
array(
|
||||
'type' => 'boolean',
|
||||
'description' => \__( 'Whether the plugin just got activated for the first time.', 'activitypub-event-bridge' ),
|
||||
'description' => \__( 'Whether the plugin just got activated for the first time.', 'activitypub' ),
|
||||
'default' => 1,
|
||||
)
|
||||
);
|
||||
|
|
|
@ -208,16 +208,6 @@ class Setup {
|
|||
array(),
|
||||
ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_VERSION
|
||||
);
|
||||
wp_enqueue_script(
|
||||
'activitypub-event-bridge-admin-script',
|
||||
plugins_url(
|
||||
'assets/js/activitypub-event-bridge-admin.js',
|
||||
ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE
|
||||
),
|
||||
array( 'jquery' ),
|
||||
ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_VERSION,
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -252,7 +242,7 @@ class Setup {
|
|||
*
|
||||
* @return \Activitypub\Transformer\Base|null
|
||||
*/
|
||||
public function register_activitypub_event_transformer( $transformer, $wp_object, $object_class ): ?\Activitypub\Transformer\Base {
|
||||
public function register_activitypub_event_transformer( $transformer, $wp_object, $object_class ): \Activitypub\Transformer\Base|null {
|
||||
// If the current WordPress object is not a post (e.g., a WP_Comment), don't change the transformer.
|
||||
if ( 'WP_Post' !== $object_class ) {
|
||||
return $transformer;
|
||||
|
|
|
@ -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 'mec-events';
|
||||
return apply_filters( 'mec_post_type_name', 'mec-events' ); // phpcs:ignore
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
29
package.json
|
@ -1,29 +0,0 @@
|
|||
|
||||
{
|
||||
"name": "activitypub-event-bridge",
|
||||
"version": "0.1.0",
|
||||
"author": {
|
||||
"name": "André Menrath",
|
||||
"web": "https://graz.social/@linos"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "wp-scripts start",
|
||||
"build": "wp-scripts build",
|
||||
"readme": "grunt wp_readme_to_markdown",
|
||||
"env-start": "wp-env start && wp-env run cli wp rewrite structure '/%year%/%monthnum%/%postname%/'",
|
||||
"env-stop": "wp-env stop"
|
||||
},
|
||||
"license": "AGPL-3.0",
|
||||
"bugs": {
|
||||
"url": "https://code.event-federation.eu/Event-Federation/wordpress-activitypub-event-bridge/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@wordpress/env": "^10.10.0",
|
||||
"@wordpress/scripts": "^30.0.2",
|
||||
"classnames": "^2.3.2",
|
||||
"grunt": "^1.1.0",
|
||||
"grunt-checktextdomain": "^1.0.1",
|
||||
"grunt-wp-i18n": "^1.0.3",
|
||||
"grunt-wp-readme-to-markdown": "^2.0.1"
|
||||
}
|
||||
}
|
|
@ -29,9 +29,6 @@
|
|||
<!-- Exclude minified Javascript files. -->
|
||||
<exclude-pattern>*.min.js</exclude-pattern>
|
||||
|
||||
<!-- Exclude the Grundfile.js. -->
|
||||
<exclude-pattern>Gruntfile.js</exclude-pattern>
|
||||
|
||||
<!-- Strip the filepaths down to the relevant bit. -->
|
||||
<arg name="basepath" value="."/>
|
||||
|
||||
|
|
23
readme.txt
|
@ -2,9 +2,9 @@
|
|||
Contributors: andremenrath
|
||||
Tags: events, fediverse, activitypub, calendar
|
||||
Requires at least: 6.5
|
||||
Tested up to: 6.7
|
||||
Stable tag: 0.2.1
|
||||
Requires PHP: 7.4
|
||||
Tested up to: 6.6
|
||||
Stable tag: 0.1.0
|
||||
Requires PHP: 8.1
|
||||
License: AGPL-3.0-or-later
|
||||
License URI: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
Integrating popular event plugins with the ActivityPub plugin.
|
||||
|
@ -31,8 +31,6 @@ These platforms create public event calendars by pulling in events from various
|
|||
|
||||
![](./.wordpress-org/decentralized-event-calenders.gif)
|
||||
|
||||
Even platforms that don't yet fully support events, like [Mastodon](https://joinmastodon.org), will still receive a detailed, well-composed summary of your event.
|
||||
The Event Federation plugin ensures that users from those platforms are provided with all important information about an event.
|
||||
|
||||
= Features for Your WordPress Events and the Fediverse =
|
||||
|
||||
|
@ -56,21 +54,20 @@ This plugin depends on the [ActivityPub plugin](https://wordpress.org/plugins/ac
|
|||
* [WP Event Manager](https://de.wordpress.org/plugins/wp-event-manager/)
|
||||
* [Eventin](https://de.wordpress.org/plugins/wp-event-solution/)
|
||||
* [Modern Events Calendar Lite](https://webnus.net/modern-events-calendar/)
|
||||
* [GatherPress](https://gatherpress.org/)
|
||||
|
||||
== Configuration ==
|
||||
|
||||
If you're new to the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/), it’s recommended to spend a few minutes reading through its documentation to familiarize yourself with its setup and functionality.
|
||||
If you’re new to the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/), it’s recommended to spend a few minutes reading through its documentation to familiarize yourself with its setup and functionality.
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
= 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/).
|
||||
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.
|
||||
|
||||
= 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.
|
||||
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.
|
||||
|
||||
= How much extra work is required to maintain my events across the decentralized Web? =
|
||||
|
||||
|
@ -94,10 +91,6 @@ We're always interested in your feedback. Feel free to reach out to us via [E-Ma
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= [0.2.1] 2024-11-16 =
|
||||
= [0.1.0] 2024-09-01 =
|
||||
|
||||
* Initial release on https://wordpress.org/
|
||||
|
||||
= [0.2.0] 2024-10-29 =
|
||||
|
||||
* Initial submission to https://wordpress.org/
|
||||
* Initial alpha release on WordPress.org
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
* @package ActivityPub_Event_Bridge
|
||||
*/
|
||||
|
||||
// Exit if accessed directly.
|
||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||
|
||||
/* @var array $args Template arguments. */
|
||||
$args = wp_parse_args(
|
||||
$args,
|
||||
|
|
|
@ -20,17 +20,7 @@ use ActivityPub_Event_Bridge\Admin\Health_Check;
|
|||
)
|
||||
);
|
||||
|
||||
$active_event_plugins = Setup::get_instance()->get_active_event_plugins();
|
||||
$activitypub_event_bridge_status_ok = true;
|
||||
$example_event_post = Health_Check::get_most_recent_event_posts();
|
||||
|
||||
if ( empty( $example_event_post ) ) {
|
||||
$example_event_post = 'https://yoursite.com/events/event-name';
|
||||
$example_event_post_is_dummy = true;
|
||||
} else {
|
||||
$example_event_post = \get_permalink( $example_event_post[0] );
|
||||
$example_event_post_is_dummy = false;
|
||||
}
|
||||
$active_event_plugins = Setup::get_instance()->get_active_event_plugins();
|
||||
|
||||
global $wp_filesystem;
|
||||
WP_Filesystem();
|
||||
|
@ -41,64 +31,21 @@ WP_Filesystem();
|
|||
<div class="box">
|
||||
<h2><?php \esc_html_e( 'Status', 'activitypub-event-bridge' ); ?></h2>
|
||||
<p><?php \esc_html_e( 'The ActivityPub Event Bridge detected the following (activated) event plugins:', 'activitypub-event-bridge' ); ?></p>
|
||||
<ul class="activitypub-event-bridge-list">
|
||||
<?php foreach ( $active_event_plugins as $active_event_plugin ) { ?>
|
||||
<h3><?php echo esc_html( $active_event_plugin->get_plugin_name() ); ?>:</h3>
|
||||
<ul class="activitypub-event-bridge-list">
|
||||
<li>
|
||||
<?php
|
||||
if ( in_array( $active_event_plugin::get_post_type(), get_option( 'activitypub_support_post_types', array() ), true ) ) {
|
||||
echo '✅ ';
|
||||
$status_message_post_type_enabled = sprintf(
|
||||
/* translators: 1: the name of the event plugin a admin notice is shown. 2: The name of the ActivityPub plugin. */
|
||||
_x(
|
||||
'The ActivityPub support for the event post type of the plugin <i>%2$s</i> is enabled in the <a href="%3$s">%1$s settings</a>.',
|
||||
'admin notice',
|
||||
'activitypub-event-bridge'
|
||||
),
|
||||
esc_html( get_plugin_data( ACTIVITYPUB_PLUGIN_FILE )['Name'] ),
|
||||
esc_html( $active_event_plugin->get_plugin_name() ),
|
||||
admin_url( 'options-general.php?page=activitypub&tab=settings' )
|
||||
);
|
||||
} else {
|
||||
$activitypub_event_bridge_status_ok = false;
|
||||
echo '❌ ';
|
||||
$status_message_post_type_enabled = sprintf(
|
||||
/* translators: 1: the name of the event plugin a admin notice is shown. 2: The name of the ActivityPub plugin. */
|
||||
_x(
|
||||
'The post type for events of the plugin <i>%2$s</i> is <b>not enabled</b> in the <a href="%3$s">%1$s settings</a>.',
|
||||
'admin notice',
|
||||
'activitypub-event-bridge'
|
||||
),
|
||||
esc_html( get_plugin_data( ACTIVITYPUB_PLUGIN_FILE )['Name'] ),
|
||||
esc_html( $active_event_plugin->get_plugin_name() ),
|
||||
admin_url( 'options-general.php?page=activitypub&tab=settings' )
|
||||
);
|
||||
}
|
||||
$allowed_html = array(
|
||||
'a' => array(
|
||||
'href' => true,
|
||||
'title' => true,
|
||||
),
|
||||
'b' => array(),
|
||||
'i' => array(),
|
||||
);
|
||||
echo \wp_kses( $status_message_post_type_enabled, $allowed_html );
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<strong><?php echo esc_html( $active_event_plugin->get_plugin_name() ); ?>:</strong>
|
||||
<br>
|
||||
<?php
|
||||
if ( Health_Check::test_if_event_transformer_is_used( $active_event_plugin ) ) {
|
||||
echo '✅ ';
|
||||
esc_html_e( 'The ActivityPub Event Bridge successfully registered to the ActivityPub plugin.', 'activitypub-event-bridge' );
|
||||
echo 'The ActivityPub Event Bridge successfully registered to the ActivityPub plugin.';
|
||||
} else {
|
||||
$activitypub_event_bridge_status_ok = false;
|
||||
echo '❌ ';
|
||||
esc_html_e( 'The ActivityPub Event Bridge could not register to the ActivityPub plugin.', 'activitypub-event-bridge' );
|
||||
echo 'The ActivityPub Event Bridge could not register to the ActivityPub plugin.';
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php if ( get_option( 'activitypub_event_bridge_initially_activated', true ) ) : ?>
|
||||
|
@ -110,118 +57,6 @@ WP_Filesystem();
|
|||
|
||||
<?php else : ?>
|
||||
|
||||
<div class="box">
|
||||
<h2><?php \esc_html_e( 'How to Check if It\'s Working', 'activitypub-event-bridge' ); ?></h2>
|
||||
<?php
|
||||
if ( ! $activitypub_event_bridge_status_ok ) {
|
||||
echo '<div class="notice-warning"><p>' . \esc_html__( 'Please fix the status issues above first.', 'activitypub-event-bridge' ) . '</p></div>';
|
||||
}
|
||||
?>
|
||||
<p><?php esc_html_e( 'Most of the magic happens behind the scenes, but here is how you can verify that your events are ready to be discovered:', 'activitypub-event-bridge' ); ?></p>
|
||||
<div class="activitypub-event-bridge-settings-accordion">
|
||||
<h4 class="activitypub-event-bridge-settings-accordion-heading">
|
||||
<button aria-expanded="false" class="activitypub-event-bridge-settings-accordion-trigger" aria-controls="activitypub-event-bridge-help-accordion-mastodon" type="button">
|
||||
<span class="title">
|
||||
1.
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/mastodon.svg', ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE ) ); ?>" alt="Mastodon Icon" class="activitypub-event-bridge-settings-inline-icon">
|
||||
<?php \esc_html_e( 'Using Your Mastodon Account', 'activitypub-event-bridge' ); ?>
|
||||
</span>
|
||||
<span class="icon"></span>
|
||||
</button>
|
||||
</h4>
|
||||
<div id="activitypub-event-bridge-help-accordion-mastodon" class="activitypub-event-bridge-settings-accordion-panel" hidden="hidden">
|
||||
<ol class="activitypub-event-bridge-settings-numbered-list">
|
||||
<li><?php \esc_html_e( 'Log into your Mastodon account.', 'activitypub-event-bridge' ); ?></li>
|
||||
<li>
|
||||
<?php \esc_html_e( 'In the search bar, type or copy the full URL of one of your event pages. For example:', 'activitypub-event-bridge' ); ?>
|
||||
<code class="activitypub-event-bridge-settings-example-url"><?php echo \esc_url( $example_event_post ); ?></code>
|
||||
</li>
|
||||
<li><?php \esc_html_e( 'If everything is set up correctly, you\'ll see a post representing your event. It should include the event\'s image, title, and a brief description.', 'activitypub-event-bridge' ); ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="activitypub-event-bridge-settings-accordion-heading">
|
||||
<button aria-expanded="false" class="activitypub-event-bridge-settings-accordion-trigger" aria-controls="activitypub-event-bridge-help-accordion-mobilizon" type="button">
|
||||
<span class="title">
|
||||
2.
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/mobilizon.svg', ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE ) ); ?>" alt="Mastodon Icon" class="activitypub-event-bridge-settings-inline-icon">
|
||||
<?php \esc_html_e( 'Using Your Mobilizon Account', 'activitypub-event-bridge' ); ?>
|
||||
</span>
|
||||
<span class="icon"></span>
|
||||
</button>
|
||||
</h4>
|
||||
<div id="activitypub-event-bridge-help-accordion-mobilizon" class="activitypub-event-bridge-settings-accordion-panel" hidden="hidden">
|
||||
<ol class="activitypub-event-bridge-settings-numbered-list">
|
||||
<li><?php \esc_html_e( 'Log into your Mobilizon account.', 'activitypub-event-bridge' ); ?></li>
|
||||
<li>
|
||||
<?php \esc_html_e( 'In the search bar, type or copy the full URL of one of your event pages. For example:', 'activitypub-event-bridge' ); ?>
|
||||
<code class="activitypub-event-bridge-settings-example-url"><?php echo \esc_url( $example_event_post ); ?></code>
|
||||
</li>
|
||||
<li><?php \esc_html_e( 'If everything is set up correctly, you\'ll see a full representation of your WordPress event. This will include the event\'s banner image, title, complete description, start and end times, categories, tags, and whether it\'s an online event.', 'activitypub-event-bridge' ); ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="activitypub-event-bridge-settings-accordion-heading">
|
||||
<button aria-expanded="false" class="activitypub-event-bridge-settings-accordion-trigger" aria-controls="activitypub-event-bridge-help-accordion-fediverse" type="button">
|
||||
<span class="title">
|
||||
3.
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/fediverse.svg', ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE ) ); ?>" alt="Mastodon Icon" class="activitypub-event-bridge-settings-inline-icon">
|
||||
<?php \esc_html_e( 'Using Any Other Fediverse Application', 'activitypub-event-bridge' ); ?>
|
||||
</span>
|
||||
<span class="icon"></span>
|
||||
</button>
|
||||
</h4>
|
||||
<div id="activitypub-event-bridge-help-accordion-fediverse" class="activitypub-event-bridge-settings-accordion-panel" hidden="hidden">
|
||||
<p><?php \esc_html_e( 'Of course any other application in the Fediverse should work as well. Most applications support importing external content via searching for the contents full URL.', 'activitypub-event-bridge' ); ?></p>
|
||||
<ol class="activitypub-event-bridge-settings-numbered-list">
|
||||
<li><?php \esc_html_e( 'Log into your account on any Fediverse app.', 'activitypub-event-bridge' ); ?></li>
|
||||
<li>
|
||||
<?php \esc_html_e( 'In the search bar, type or copy the full URL of one of your event pages. For example:', 'activitypub-event-bridge' ); ?>
|
||||
<code class="activitypub-event-bridge-settings-example-url"><?php echo \esc_url( $example_event_post ); ?></code>
|
||||
</li>
|
||||
<li><?php \esc_html_e( 'If the application which your are using natively supports ActivityPub events, you should see a representation of your WordPress event. If your application is supports receiving ActivityPub events you will get a post which summarizes the event. Keep in mind that some apps may not support events at all.', 'activitypub-event-bridge' ); ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="activitypub-event-bridge-settings-accordion-heading">
|
||||
<button aria-expanded="false" class="activitypub-event-bridge-settings-accordion-trigger" aria-controls="activitypub-event-bridge-help-accordion-advanced" type="button">
|
||||
<span class="title">
|
||||
4.
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/activitypub.svg', ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE ) ); ?>" alt="Mastodon Icon" class="activitypub-event-bridge-settings-inline-icon">
|
||||
<?php \esc_html_e( 'Advanced: Verifying the ActivityStreams JSON', 'activitypub-event-bridge' ); ?></span>
|
||||
<span class="icon"></span>
|
||||
</button>
|
||||
</h4>
|
||||
<div id="activitypub-event-bridge-help-accordion-advanced" class="activitypub-event-bridge-settings-accordion-panel" hidden="hidden">
|
||||
<p>
|
||||
<?php
|
||||
// Assume $event_url contains the dynamic URL, and '?activitypub' is appended to it.
|
||||
$activitypub_url = esc_url( $example_event_post . '?activitypub' );
|
||||
|
||||
// Prepare the activitypub part wrapped in a <code> element.
|
||||
$activitypub_query = '<nobr><code>' . esc_html( '?activitypub' ) . '</code></nobr>';
|
||||
|
||||
$activitypub_url_html = '<a href="' . esc_url( $activitypub_url ) . '" target="_blank">' . esc_html( $activitypub_url ) . '</a>';
|
||||
|
||||
// Translator comment to explain the placeholder.
|
||||
/* translators: %1$s is the <code>?activitypub</code> string, and %2$s is the full URL of an example event */
|
||||
$raw_string = sprintf( __( 'For more technical users, you can inspect how your event is converted into an ActivityPub object. Simply append %1$s to the end of any single event pages URL to view the raw ActivityStreams JSON data (e.g., %2$s).', 'activitypub-event-bridge' ), $activitypub_query, $activitypub_url_html );
|
||||
|
||||
// Allowed HTML tags in the string (only <code> and <a>).
|
||||
$allowed_html = array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'target' => array(),
|
||||
),
|
||||
'nobr' => array(),
|
||||
'code' => array(),
|
||||
);
|
||||
|
||||
// Output the formatted string with the allowed HTML elements.
|
||||
echo wp_kses( $raw_string, $allowed_html );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<h2><?php \esc_html_e( 'Changelog', 'activitypub-event-bridge' ); ?></h2>
|
||||
<pre>
|
||||
|
|
|
@ -35,10 +35,10 @@ function _manually_load_plugin() {
|
|||
require_once $plugin_dir . 'activitypub/activitypub.php';
|
||||
|
||||
// Capture the --filter argument.
|
||||
$activitypub_event_bridge_integration_filter = null;
|
||||
$activitypub_event_extension_integration_filter = null;
|
||||
foreach ( $_SERVER['argv'] as $arg ) {
|
||||
if ( strpos( $arg, '--filter=' ) === 0 ) {
|
||||
$activitypub_event_bridge_integration_filter = substr( $arg, strlen( '--filter=' ) );
|
||||
$activitypub_event_extension_integration_filter = substr( $arg, strlen( '--filter=' ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ function _manually_load_plugin() {
|
|||
|
||||
$plugin_file = null;
|
||||
// See if we want to run integration tests for a specific event-plugin.
|
||||
switch ( $activitypub_event_bridge_integration_filter ) {
|
||||
switch ( $activitypub_event_extension_integration_filter ) {
|
||||
case 'the_events_calendar':
|
||||
$plugin_file = 'the-events-calendar/the-events-calendar.php';
|
||||
break;
|
||||
|
@ -84,14 +84,14 @@ function _manually_load_plugin() {
|
|||
}
|
||||
|
||||
// Hot fix that allows using Events Manager within unit tests, because the em_init() is later not run as admin.
|
||||
if ( 'events_manager' === $activitypub_event_bridge_integration_filter ) {
|
||||
if ( 'events_manager' === $activitypub_event_extension_integration_filter ) {
|
||||
require_once $plugin_dir . 'events-manager/em-install.php';
|
||||
em_create_events_table();
|
||||
em_create_events_meta_table();
|
||||
em_create_locations_table();
|
||||
}
|
||||
|
||||
if ( 'modern_events_calendar_lite' === $activitypub_event_bridge_integration_filter ) {
|
||||
if ( 'modern_events_calendar_lite' === $activitypub_event_extension_integration_filter ) {
|
||||
require_once $plugin_dir . 'modern-events-calendar-lite/app/libraries/factory.php';
|
||||
$mec_factory = new MEC_factory();
|
||||
$mec_factory->install();
|
||||
|
|