Rename to 'Event Bridge for ActivityPub'
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Successful in 54s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Failing after 57s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.4 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Has been cancelled
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Successful in 54s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Failing after 57s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.4 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Has been cancelled
However: Nobody owns 'ActivityPub' as a product name! I am just tired of discussing with the Wordress plugin team about how to interpret their rules.
This commit is contained in:
parent
cacfb2a730
commit
593d79b4c7
53 changed files with 418 additions and 418 deletions
|
@ -76,46 +76,46 @@ jobs:
|
||||||
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 ${{ matrix.wordpress-version }} false true true true
|
||||||
|
|
||||||
- name: Run Integration tests for The Events Calendar
|
- name: Run Integration tests for The Events Calendar
|
||||||
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=the_events_calendar
|
run: cd /workspace/Event-Federation/wordpress-event-bridge-for-activitypub/ && ./vendor/bin/phpunit --filter=the_events_calendar
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: ${{ matrix.php-version }}
|
PHP_VERSION: ${{ matrix.php-version }}
|
||||||
|
|
||||||
- name: Run Integration tests for VS Event List
|
- name: Run Integration tests for VS Event List
|
||||||
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=vs_event_list
|
run: cd /workspace/Event-Federation/wordpress-event-bridge-for-activitypub/ && ./vendor/bin/phpunit --filter=vs_event_list
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: ${{ matrix.php-version }}
|
PHP_VERSION: ${{ matrix.php-version }}
|
||||||
|
|
||||||
- name: Run Integration tests for GatherPress
|
- name: Run Integration tests for GatherPress
|
||||||
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=gatherpress
|
run: cd /workspace/Event-Federation/wordpress-event-bridge-for-activitypub/ && ./vendor/bin/phpunit --filter=gatherpress
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: ${{ matrix.php-version }}
|
PHP_VERSION: ${{ matrix.php-version }}
|
||||||
|
|
||||||
- name: Run Integration tests for Events Manager
|
- name: Run Integration tests for Events Manager
|
||||||
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=events_manager
|
run: cd /workspace/Event-Federation/wordpress-event-bridge-for-activitypub/ && ./vendor/bin/phpunit --filter=events_manager
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: ${{ matrix.php-version }}
|
PHP_VERSION: ${{ matrix.php-version }}
|
||||||
|
|
||||||
- name: Run Integration tests for WP Event Manager
|
- name: Run Integration tests for WP Event Manager
|
||||||
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=wp_event_manager
|
run: cd /workspace/Event-Federation/wordpress-event-bridge-for-activitypub/ && ./vendor/bin/phpunit --filter=wp_event_manager
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: ${{ matrix.php-version }}
|
PHP_VERSION: ${{ matrix.php-version }}
|
||||||
|
|
||||||
- name: Run Integration tests for Eventin (WP Event Solution)
|
- name: Run Integration tests for Eventin (WP Event Solution)
|
||||||
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=eventin
|
run: cd /workspace/Event-Federation/wordpress-event-bridge-for-activitypub/ && ./vendor/bin/phpunit --filter=eventin
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: ${{ matrix.php-version }}
|
PHP_VERSION: ${{ matrix.php-version }}
|
||||||
|
|
||||||
- name: Run Integration tests for Modern Events Calendar Lite
|
- name: Run Integration tests for Modern Events Calendar Lite
|
||||||
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=modern_events_calendar_lite
|
run: cd /workspace/Event-Federation/wordpress-event-bridge-for-activitypub/ && ./vendor/bin/phpunit --filter=modern_events_calendar_lite
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: ${{ matrix.php-version }}
|
PHP_VERSION: ${{ matrix.php-version }}
|
||||||
|
|
||||||
- name: Run Integration tests for EventPrime
|
- name: Run Integration tests for EventPrime
|
||||||
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=eventprime
|
run: cd /workspace/Event-Federation/wordpress-event-bridge-for-activitypub/ && ./vendor/bin/phpunit --filter=eventprime
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: ${{ matrix.php-version }}
|
PHP_VERSION: ${{ matrix.php-version }}
|
||||||
|
|
||||||
- name: Run Integration tests for Event Organiser
|
- name: Run Integration tests for Event Organiser
|
||||||
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=event_organiser
|
run: cd /workspace/Event-Federation/wordpress-event-bridge-for-activitypub/ && ./vendor/bin/phpunit --filter=event_organiser
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: ${{ matrix.php-version }}
|
PHP_VERSION: ${{ matrix.php-version }}
|
||||||
|
|
|
@ -4,7 +4,7 @@ module.exports = function (grunt) {
|
||||||
{
|
{
|
||||||
checktextdomain: {
|
checktextdomain: {
|
||||||
options:{
|
options:{
|
||||||
text_domain: 'activitypub-event-bridge',
|
text_domain: 'event-bridge-for-activitypub',
|
||||||
keywords: [
|
keywords: [
|
||||||
'__:1,2d',
|
'__:1,2d',
|
||||||
'_e:1,2d',
|
'_e:1,2d',
|
||||||
|
|
10
README.md
10
README.md
|
@ -1,4 +1,4 @@
|
||||||
# ActivityPub Event Bridge #
|
# Event Bridge for ActivityPub #
|
||||||
**Contributors:** [andremenrath](https://profiles.wordpress.org/andremenrath/)
|
**Contributors:** [andremenrath](https://profiles.wordpress.org/andremenrath/)
|
||||||
**Tags:** events, fediverse, activitypub, calendar
|
**Tags:** events, fediverse, activitypub, calendar
|
||||||
**Requires at least:** 6.5
|
**Requires at least:** 6.5
|
||||||
|
@ -14,7 +14,7 @@ Integrating popular event plugins with the ActivityPub plugin.
|
||||||
## 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).
|
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 Event Bridge for ActivityPub 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.
|
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/).
|
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/).
|
||||||
|
@ -23,7 +23,7 @@ You retain full ownership of your content. By integrating into your existing set
|
||||||
|
|
||||||
### How It Works ###
|
### How It Works ###
|
||||||
|
|
||||||
With the ActivityPub Event Bridge WordPress plugin, sharing your events is effortless and automatic!
|
With the Event Bridge for ActivityPub 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.
|
Once you create an event on your WordPress site, it is seamlessly shared across the decentralized web using the ActivityPub protocol.
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
@ -94,11 +94,11 @@ No, the Event Federation Plugin depends on the [ActivityPub plugin](https://word
|
||||||
|
|
||||||
### 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.
|
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-event-bridge-for-activitypub/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).
|
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-event-bridge-for-activitypub/issues).
|
||||||
|
|
||||||
## Changelog ##
|
## Changelog ##
|
||||||
|
|
||||||
|
|
|
@ -1,36 +1,36 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Plugin Name: ActivityPub Event Bridge
|
* Plugin Name: Event Bridge for ActivityPub
|
||||||
* Description: Integrating popular event plugins with the ActivityPub plugin.
|
* Description: Integrating popular event plugins with the ActivityPub plugin.
|
||||||
* Plugin URI: https://event-federation.eu/
|
* Plugin URI: https://event-federation.eu/
|
||||||
* Version: 0.2.1
|
* Version: 0.2.1
|
||||||
* Author: André Menrath
|
* Author: André Menrath
|
||||||
* Author URI: https://graz.social/@linos
|
* Author URI: https://graz.social/@linos
|
||||||
* Text Domain: activitypub-event-bridge
|
* Text Domain: event-bridge-for-activitypub
|
||||||
* License: AGPL-3.0-or-later
|
* License: AGPL-3.0-or-later
|
||||||
* License URI: https://www.gnu.org/licenses/agpl-3.0.html
|
* License URI: https://www.gnu.org/licenses/agpl-3.0.html
|
||||||
* Requires PHP: 7.4
|
* Requires PHP: 7.4
|
||||||
*
|
*
|
||||||
* 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: 4.2.0.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
define( 'ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
define( 'EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||||
define( 'ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
define( 'EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
||||||
define( 'ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE', plugin_dir_path( __FILE__ ) . '/' . basename( __FILE__ ) );
|
define( 'EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE', plugin_dir_path( __FILE__ ) . '/' . basename( __FILE__ ) );
|
||||||
define( 'ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
define( 'EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||||
define( 'ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_VERSION', current( get_file_data( __FILE__, array( 'Version' ), 'plugin' ) ) );
|
define( 'EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_VERSION', current( get_file_data( __FILE__, array( 'Version' ), 'plugin' ) ) );
|
||||||
define( 'ACTIVITYPUB_EVENT_BRIDGE_DOMAIN', 'activitypub-event-bridge' );
|
define( 'EVENT_BRIDGE_FOR_ACTIVITYPUB_DOMAIN', 'event-bridge-for-activitypub' );
|
||||||
define( 'ACTIVITYPUB_EVENT_BRIDGE_ACTIVITYPUB_PLUGIN_MIN_VERSION', '3.2.2' );
|
define( 'EVENT_BRIDGE_FOR_ACTIVITYPUB_ACTIVITYPUB_PLUGIN_MIN_VERSION', '3.2.2' );
|
||||||
|
|
||||||
// Include and register the autoloader class for automatic loading of plugin classes.
|
// Include and register the autoloader class for automatic loading of plugin classes.
|
||||||
require_once ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . '/includes/class-autoloader.php';
|
require_once EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_DIR . '/includes/class-autoloader.php';
|
||||||
ActivityPub_Event_Bridge\Autoloader::register();
|
Event_Bridge_For_ActivityPub\Autoloader::register();
|
||||||
|
|
||||||
// Initialize the plugin.
|
// Initialize the plugin.
|
||||||
ActivityPub_Event_Bridge\Setup::get_instance();
|
Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
.settings_page_activitypub-event-bridge #wpcontent {
|
.settings_page_event-bridge-for-activitypub #wpcontent {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-page .box {
|
.event-bridge-for-activitypub-settings-page .box {
|
||||||
border: 1px solid #c3c4c7;
|
border: 1px solid #c3c4c7;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 1em 1.5em;
|
padding: 1em 1.5em;
|
||||||
margin-bottom: 1.5em;
|
margin-bottom: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-page .box ul.activitypub-event-bridge-list {
|
.event-bridge-for-activitypub-settings-page .box ul.event-bridge-for-activitypub-list {
|
||||||
margin-left: 0.6em;
|
margin-left: 0.6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-page .box pre {
|
.event-bridge-for-activitypub-settings-page .box pre {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
@ -22,19 +22,19 @@
|
||||||
background-color: #f7f7f7;
|
background-color: #f7f7f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings {
|
.event-bridge-for-activitypub-settings {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-header {
|
.event-bridge-for-activitypub-settings-header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 0 1rem;
|
margin: 0 0 1rem;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-bottom: 1px solid #dcdcde;
|
border-bottom: 1px solid #dcdcde;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-title-section {
|
.event-bridge-for-activitypub-settings-title-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-tabs-wrapper {
|
.event-bridge-for-activitypub-settings-tabs-wrapper {
|
||||||
display: -ms-inline-grid;
|
display: -ms-inline-grid;
|
||||||
-ms-grid-columns: auto auto auto auto;
|
-ms-grid-columns: auto auto auto auto;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
@ -50,12 +50,12 @@
|
||||||
grid-template-columns: auto auto auto auto;
|
grid-template-columns: auto auto auto auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-tab.active {
|
.event-bridge-for-activitypub-settings-tab.active {
|
||||||
box-shadow: inset 0 -3px #3582c4;
|
box-shadow: inset 0 -3px #3582c4;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-tab {
|
.event-bridge-for-activitypub-settings-tab {
|
||||||
display: block;
|
display: block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
@ -64,21 +64,21 @@
|
||||||
transition: box-shadow .5s ease-in-out;
|
transition: box-shadow .5s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings .box h3 {
|
.event-bridge-for-activitypub-settings .box h3 {
|
||||||
font-size: 1.15em;
|
font-size: 1.15em;
|
||||||
margin-bottom: 0em;
|
margin-bottom: 0em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#activitypub_event_bridge_initially_activated {
|
#event_bridge_for_activitypub_initially_activated {
|
||||||
display: hidden;
|
display: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Accordions for admin pages */
|
/* Accordions for admin pages */
|
||||||
.activitypub-event-bridge-settings-accordion {
|
.event-bridge-for-activitypub-settings-accordion {
|
||||||
border: 1px solid #c3c4c7;
|
border: 1px solid #c3c4c7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-accordion-heading {
|
.event-bridge-for-activitypub-settings-accordion-heading {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-top: 1px solid #c3c4c7;
|
border-top: 1px solid #c3c4c7;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
|
@ -87,17 +87,17 @@
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-accordion-heading:first-child {
|
.event-bridge-for-activitypub-settings-accordion-heading:first-child {
|
||||||
border-top: none;
|
border-top: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-accordion-panel {
|
.event-bridge-for-activitypub-settings-accordion-panel {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 1em 1.5em;
|
padding: 1em 1.5em;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-accordion-trigger {
|
.event-bridge-for-activitypub-settings-accordion-trigger {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 0;
|
border: 0;
|
||||||
color: #2c3338;
|
color: #2c3338;
|
||||||
|
@ -116,21 +116,21 @@
|
||||||
user-select: auto;
|
user-select: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-accordion-trigger {
|
.event-bridge-for-activitypub-settings-accordion-trigger {
|
||||||
color: #2c3338;
|
color: #2c3338;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-accordion-trigger .title {
|
.event-bridge-for-activitypub-settings-accordion-trigger .title {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-accordion-trigger .icon,
|
.event-bridge-for-activitypub-settings-accordion-trigger .icon,
|
||||||
.activitypub-event-bridge-settings-accordion-viewed .icon {
|
.event-bridge-for-activitypub-settings-accordion-viewed .icon {
|
||||||
border: solid #50575e medium;
|
border: solid #50575e medium;
|
||||||
border-width: 0 2px 2px 0;
|
border-width: 0 2px 2px 0;
|
||||||
height: .5rem;
|
height: .5rem;
|
||||||
|
@ -142,16 +142,16 @@
|
||||||
width: .5rem;
|
width: .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-accordion-trigger[aria-expanded="true"] .icon {
|
.event-bridge-for-activitypub-settings-accordion-trigger[aria-expanded="true"] .icon {
|
||||||
transform: translateY(-30%) rotate(-135deg);
|
transform: translateY(-30%) rotate(-135deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-accordion-trigger:active,
|
.event-bridge-for-activitypub-settings-accordion-trigger:active,
|
||||||
.activitypub-event-bridge-settings-accordion-trigger:hover {
|
.event-bridge-for-activitypub-settings-accordion-trigger:hover {
|
||||||
background: #f6f7f7;
|
background: #f6f7f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-accordion-trigger:focus {
|
.event-bridge-for-activitypub-settings-accordion-trigger:focus {
|
||||||
color: #1d2327;
|
color: #1d2327;
|
||||||
border: none;
|
border: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
@ -160,14 +160,14 @@
|
||||||
background-color: #f6f7f7;
|
background-color: #f6f7f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activitypub-event-bridge-settings-inline-icon {
|
.event-bridge-for-activitypub-settings-inline-icon {
|
||||||
width: 1.5em;
|
width: 1.5em;
|
||||||
height: 1.5em;
|
height: 1.5em;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 0 0.3em;
|
margin: 0 0.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
code.activitypub-event-bridge-settings-example-url {
|
code.event-bridge-for-activitypub-settings-example-url {
|
||||||
display: block;
|
display: block;
|
||||||
background: rgb(28, 29, 33);
|
background: rgb(28, 29, 33);
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
jQuery( function( $ ) {
|
jQuery( function( $ ) {
|
||||||
// Accordion handling in various areas.
|
// Accordion handling in various areas.
|
||||||
$( '.activitypub-event-bridge-settings-accordion' ).on( 'click', '.activitypub-event-bridge-settings-accordion-trigger', function() {
|
$( '.event-bridge-for-activitypub-settings-accordion' ).on( 'click', '.event-bridge-for-activitypub-settings-accordion-trigger', function() {
|
||||||
var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) );
|
var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) );
|
||||||
|
|
||||||
if ( isExpanded ) {
|
if ( isExpanded ) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "menrath/wordpress-activitypub-event-bridge",
|
"name": "menrath/wordpress-event-bridge-for-activitypub",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "The ActivityPub Event Bridge help for event custom post types to federate properly.",
|
"description": "The Event Bridge for ActivityPub help for event custom post types to federate properly.",
|
||||||
"type": "wordpress-plugin",
|
"type": "wordpress-plugin",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.4.0",
|
"php": ">=7.4.0",
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"extra": {
|
"extra": {
|
||||||
"installer-name": "activitypub-event-bridge"
|
"installer-name": "event-bridge-for-activitypub"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": [
|
"lint": [
|
||||||
|
|
|
@ -16,7 +16,7 @@ version: '3'
|
||||||
# "request": "launch",
|
# "request": "launch",
|
||||||
# "port": 9003,
|
# "port": 9003,
|
||||||
# "pathMappings": {
|
# "pathMappings": {
|
||||||
# "/app/": "${workspaceRoot}/wp-content/plugins/activitypub-event-bridge/",
|
# "/app/": "${workspaceRoot}/wp-content/plugins/event-bridge-for-activitypub/",
|
||||||
# "/tmp/wordpress/": "${workspaceRoot}/"
|
# "/tmp/wordpress/": "${workspaceRoot}/"
|
||||||
# },
|
# },
|
||||||
# },
|
# },
|
||||||
|
|
|
@ -13,7 +13,7 @@ To make the WordPress ActivityPub plugin use a custom transformer simply add a f
|
||||||
First you need to add some basic information about your event plugin. Just create a new file in `./includes/plugins/my-event-plugin.php`. Implement at least all abstract functions of the `Event_Plugin` class.
|
First you need to add some basic information about your event plugin. Just create a new file in `./includes/plugins/my-event-plugin.php`. Implement at least all abstract functions of the `Event_Plugin` class.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
@ -28,16 +28,16 @@ First you need to add some basic information about your event plugin. Just creat
|
||||||
final class My_Event_Plugin extends Event_Plugin {
|
final class My_Event_Plugin extends Event_Plugin {
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you need to tell the ActivityPub Event Bridge about that class by adding it to the `EVENT_PLUGIN_CLASSES` constant in the `includes/setup.php` file:
|
Then you need to tell the Event Bridge for ActivityPub about that class by adding it to the `EVENT_PLUGIN_CLASSES` constant in the `includes/setup.php` file:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
private const EVENT_PLUGIN_CLASSES = array(
|
private const EVENT_PLUGIN_CLASSES = array(
|
||||||
...
|
...
|
||||||
'\ActivityPub_Event_Bridge\Plugins\My_Event_Plugin',
|
'\Event_Bridge_For_ActivityPub\Integrations\My_Event_Plugin',
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
The ActivityPub Event Bridge then takes care of applying the transformer, so you can jump right into implementing it.
|
The Event Bridge for ActivityPub then takes care of applying the transformer, so you can jump right into implementing it.
|
||||||
|
|
||||||
## Writing an event transformer class
|
## Writing an event transformer class
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ If you are writing a transformer for your event post type we recommend to start
|
||||||
So create a new file at `./includes/activitypub/transformer/my-event-plugin.php`.
|
So create a new file at `./includes/activitypub/transformer/my-event-plugin.php`.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event as Event_Transformer;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event as Event_Transformer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ActivityPub Transformer for My Event Plugin' event post type.
|
* ActivityPub Transformer for My Event Plugin' event post type.
|
||||||
|
@ -142,7 +142,7 @@ Implement a check whether your event plugin is active in the `set_up` function.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
||||||
$aec = \ActivityPub_Event_Bridge\Setup::get_instance();
|
$aec = \Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
$aec->activate_activitypub_support_for_active_event_plugins();
|
$aec->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
|
||||||
// Delete all posts afterwards.
|
// Delete all posts afterwards.
|
||||||
|
@ -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`.
|
To activate/load your plugin add it to the switch statement within the function `_manually_load_plugin()` within `tests/bootstrap.php`.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
switch ( $activitypub_event_bridge_integration_filter ) {
|
switch ( $event_bridge_for_activitypub_integration_filter ) {
|
||||||
...
|
...
|
||||||
case 'my_event_plugin':
|
case 'my_event_plugin':
|
||||||
$plugin_file = 'my-event-plugin/my-event-plugin.php';
|
$plugin_file = 'my-event-plugin/my-event-plugin.php';
|
||||||
|
@ -213,7 +213,7 @@ If you are using Visual Studio Code or VSCodium you can step-debug within the te
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"port": 9003,
|
"port": 9003,
|
||||||
"pathMappings": {
|
"pathMappings": {
|
||||||
"/app/": "${workspaceRoot}/wp-content/plugins/activitypub-event-bridge/",
|
"/app/": "${workspaceRoot}/wp-content/plugins/event-bridge-for-activitypub/",
|
||||||
"/tmp/wordpress/": "${workspaceRoot}/"
|
"/tmp/wordpress/": "${workspaceRoot}/"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
/**
|
/**
|
||||||
* ActivityPub Transformer for the plugin Event Organiser.
|
* ActivityPub Transformer for the plugin Event Organiser.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use Activitypub\Activity\Extended_Object\Place;
|
use Activitypub\Activity\Extended_Object\Place;
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ActivityPub Transformer for Event Organiser.
|
* ActivityPub Transformer for Event Organiser.
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
/**
|
/**
|
||||||
* Replace the default ActivityPub Transformer
|
* Replace the default ActivityPub Transformer
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
@ -118,7 +118,7 @@ abstract class Event extends Post {
|
||||||
if ( is_null( $this->wp_taxonomy ) ) {
|
if ( is_null( $this->wp_taxonomy ) ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$current_category_mapping = \get_option( 'activitypub_event_bridge_event_category_mappings', array() );
|
$current_category_mapping = \get_option( 'event_bridge_for_activitypub_event_category_mappings', array() );
|
||||||
$terms = \get_the_terms( $this->wp_object, $this->wp_taxonomy );
|
$terms = \get_the_terms( $this->wp_object, $this->wp_taxonomy );
|
||||||
|
|
||||||
// Check if the event has a category set and if that category has a specific mapping return that one.
|
// Check if the event has a category set and if that category has a specific mapping return that one.
|
||||||
|
@ -126,7 +126,7 @@ abstract class Event extends Post {
|
||||||
return sanitize_text_field( $current_category_mapping[ $terms[0]->slug ] );
|
return sanitize_text_field( $current_category_mapping[ $terms[0]->slug ] );
|
||||||
} else {
|
} else {
|
||||||
// Return the default event category.
|
// Return the default event category.
|
||||||
return sanitize_text_field( \get_option( 'activitypub_event_bridge_default_event_category', 'MEETING' ) );
|
return sanitize_text_field( \get_option( 'event_bridge_for_activitypub_default_event_category', 'MEETING' ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,10 +235,10 @@ abstract class Event extends Post {
|
||||||
$categories = array();
|
$categories = array();
|
||||||
|
|
||||||
// Add the federated category string.
|
// Add the federated category string.
|
||||||
require_once ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . '/includes/event-categories.php';
|
require_once EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_DIR . '/includes/event-categories.php';
|
||||||
$federated_category = $this->get_category();
|
$federated_category = $this->get_category();
|
||||||
if ( array_key_exists( $federated_category, ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES ) ) {
|
if ( array_key_exists( $federated_category, EVENT_BRIDGE_FOR_ACTIVITYPUB_EVENT_CATEGORIES ) ) {
|
||||||
$categories[] = ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES[ $federated_category ];
|
$categories[] = EVENT_BRIDGE_FOR_ACTIVITYPUB_EVENT_CATEGORIES[ $federated_category ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add all category terms.
|
// Add all category terms.
|
||||||
|
@ -280,19 +280,19 @@ abstract class Event extends Post {
|
||||||
|
|
||||||
$formatted_items = array();
|
$formatted_items = array();
|
||||||
if ( ! empty( $category ) ) {
|
if ( ! empty( $category ) ) {
|
||||||
$formatted_items[] = '🏷️ ' . __( 'Category', 'activitypub-event-bridge' ) . ': ' . $category;
|
$formatted_items[] = '🏷️ ' . __( 'Category', 'event-bridge-for-activitypub' ) . ': ' . $category;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $start_time ) ) {
|
if ( ! empty( $start_time ) ) {
|
||||||
$formatted_items[] = '🗓️ ' . __( 'Start', 'activitypub-event-bridge' ) . ': ' . $start_time;
|
$formatted_items[] = '🗓️ ' . __( 'Start', 'event-bridge-for-activitypub' ) . ': ' . $start_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $end_time ) ) {
|
if ( ! empty( $end_time ) ) {
|
||||||
$formatted_items[] = '⏳ ' . __( 'End', 'activitypub-event-bridge' ) . ': ' . $end_time;
|
$formatted_items[] = '⏳ ' . __( 'End', 'event-bridge-for-activitypub' ) . ': ' . $end_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $address ) ) {
|
if ( ! empty( $address ) ) {
|
||||||
$formatted_items[] = '📍 ' . __( 'Address', 'activitypub-event-bridge' ) . ': ' . $address;
|
$formatted_items[] = '📍 ' . __( 'Address', 'event-bridge-for-activitypub' ) . ': ' . $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compose the summary based on the number of meta items.
|
// Compose the summary based on the number of meta items.
|
||||||
|
|
|
@ -4,17 +4,17 @@
|
||||||
*
|
*
|
||||||
* @link https://support.themewinter.com/docs/plugins/docs-category/eventin/
|
* @link https://support.themewinter.com/docs/plugins/docs-category/eventin/
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use Activitypub\Activity\Extended_Object\Place;
|
use Activitypub\Activity\Extended_Object\Place;
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
use DateTimeZone;
|
use DateTimeZone;
|
||||||
use Etn\Core\Event\Event_Model;
|
use Etn\Core\Event\Event_Model;
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
/**
|
/**
|
||||||
* ActivityPub Transformer for the plugin EventPrime.
|
* ActivityPub Transformer for the plugin EventPrime.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use Activitypub\Activity\Extended_Object\Place;
|
use Activitypub\Activity\Extended_Object\Place;
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ActivityPub Transformer for VS Event
|
* ActivityPub Transformer for VS Event
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
/**
|
/**
|
||||||
* ActivityPub Transformer for the plugin Very Simple Event List.
|
* ActivityPub Transformer for the plugin Very Simple Event List.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use Activitypub\Activity\Extended_Object\Place;
|
use Activitypub\Activity\Extended_Object\Place;
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event as Event_Transformer;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event as Event_Transformer;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
use DateTimeZone;
|
use DateTimeZone;
|
||||||
use EM_Event;
|
use EM_Event;
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
/**
|
/**
|
||||||
* ActivityPub Transformer for the GatherPress event plugin.
|
* ActivityPub Transformer for the GatherPress event plugin.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use Activitypub\Activity\Extended_Object\Event as Event_Object;
|
use Activitypub\Activity\Extended_Object\Event as Event_Object;
|
||||||
use Activitypub\Activity\Extended_Object\Place;
|
use Activitypub\Activity\Extended_Object\Place;
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event;
|
||||||
use GatherPress\Core\Event as GatherPress_Event;
|
use GatherPress\Core\Event as GatherPress_Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
/**
|
/**
|
||||||
* ActivityPub Tribe Transformer
|
* ActivityPub Tribe Transformer
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use Activitypub\Activity\Extended_Object\Place;
|
use Activitypub\Activity\Extended_Object\Place;
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event;
|
||||||
|
|
||||||
use MEC;
|
use MEC;
|
||||||
use MEC\Events\Event as MEC_Event;
|
use MEC\Events\Event as MEC_Event;
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
/**
|
/**
|
||||||
* ActivityPub Tribe Transformer
|
* ActivityPub Tribe Transformer
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use Activitypub\Activity\Extended_Object\Place;
|
use Activitypub\Activity\Extended_Object\Place;
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event;
|
||||||
use WP_Post;
|
use WP_Post;
|
||||||
|
|
||||||
use function Activitypub\esc_hashtag;
|
use function Activitypub\esc_hashtag;
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
/**
|
/**
|
||||||
* ActivityPub Transformer for the plugin Very Simple Event List.
|
* ActivityPub Transformer for the plugin Very Simple Event List.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use Activitypub\Activity\Extended_Object\Place;
|
use Activitypub\Activity\Extended_Object\Place;
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event as Event_Transformer;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event as Event_Transformer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ActivityPub Transformer for VS Event.
|
* ActivityPub Transformer for VS Event.
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
/**
|
/**
|
||||||
* ActivityPub Transformer for the plugin Very Simple Event List.
|
* ActivityPub Transformer for the plugin Very Simple Event List.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Activitypub\Transformer;
|
namespace Event_Bridge_For_ActivityPub\Activitypub\Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use Activitypub\Activity\Extended_Object\Place;
|
use Activitypub\Activity\Extended_Object\Place;
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event as Event_Transformer;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event as Event_Transformer;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -101,7 +101,7 @@ final class WP_Event_Manager extends Event_Transformer {
|
||||||
if ( str_starts_with( $event_link_url, 'http' ) ) {
|
if ( str_starts_with( $event_link_url, 'http' ) ) {
|
||||||
return array(
|
return array(
|
||||||
'type' => 'Link',
|
'type' => 'Link',
|
||||||
'name' => \esc_html__( 'Video URL', 'activitypub-event-bridge' ),
|
'name' => \esc_html__( 'Video URL', 'event-bridge-for-activitypub' ),
|
||||||
'href' => \esc_url( $event_link_url ),
|
'href' => \esc_url( $event_link_url ),
|
||||||
'mediaType' => 'text/html',
|
'mediaType' => 'text/html',
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,17 +4,17 @@
|
||||||
*
|
*
|
||||||
* Notices for guiding to proper configuration of ActivityPub with event plugins.
|
* Notices for guiding to proper configuration of ActivityPub with event plugins.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Admin;
|
namespace Event_Bridge_For_ActivityPub\Admin;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use ActivityPub_Event_Bridge\Plugins\Event_Plugin;
|
use Event_Bridge_For_ActivityPub\Integrations\Event_Plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class responsible for Event Plugin related admin notices.
|
* Class responsible for Event Plugin related admin notices.
|
||||||
|
@ -76,7 +76,7 @@ class Event_Plugin_Admin_Notices {
|
||||||
_x(
|
_x(
|
||||||
'You have installed the <i>%1$s</i> plugin, but the event post type of the plugin <i>%2$s</i> is <b>not enabled</b> in the <a href="%3$s">%1$s settings</a>.',
|
'You have installed the <i>%1$s</i> plugin, but the event post type of the plugin <i>%2$s</i> is <b>not enabled</b> in the <a href="%3$s">%1$s settings</a>.',
|
||||||
'admin notice',
|
'admin notice',
|
||||||
'activitypub-event-bridge'
|
'event-bridge-for-activitypub'
|
||||||
),
|
),
|
||||||
esc_html( $activitypub_plugin_data['Name'] ),
|
esc_html( $activitypub_plugin_data['Name'] ),
|
||||||
esc_html( $event_plugin_data['Name'] ),
|
esc_html( $event_plugin_data['Name'] ),
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
*
|
*
|
||||||
* Notices for guiding to proper configuration of this plugin.
|
* Notices for guiding to proper configuration of this plugin.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Admin;
|
namespace Event_Bridge_For_ActivityPub\Admin;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
@ -29,7 +29,7 @@ class General_Admin_Notices {
|
||||||
*/
|
*/
|
||||||
const ACTIVITYPUB_PLUGIN_URL = 'https://wordpress.org/plugins/activitypub';
|
const ACTIVITYPUB_PLUGIN_URL = 'https://wordpress.org/plugins/activitypub';
|
||||||
|
|
||||||
const ACTIVITYPUB_EVENT_BRIDGE_SUPPORTED_EVENT_PLUGINS_URL = 'https://code.event-federation.eu/Event-Federation/wordpress-activitypub-event-bridge#events-plugin-that-will-be-supported-at-first';
|
const EVENT_BRIDGE_FOR_ACTIVITYPUB_SUPPORTED_EVENT_PLUGINS_URL = 'https://code.event-federation.eu/Event-Federation/wordpress-event-bridge-for-activitypub#events-plugin-that-will-be-supported-at-first';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allowed HTML for admin notices.
|
* Allowed HTML for admin notices.
|
||||||
|
@ -54,9 +54,9 @@ class General_Admin_Notices {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
/* translators: 1: An URL that points to the ActivityPub plugin. */
|
/* translators: 1: An URL that points to the ActivityPub plugin. */
|
||||||
_x(
|
_x(
|
||||||
'For the ActivityPub Event Bridge to work, you will need to install and activate the <a href="%1$s">ActivityPub</a> plugin.',
|
'For the Event Bridge for ActivityPub to work, you will need to install and activate the <a href="%1$s">ActivityPub</a> plugin.',
|
||||||
'admin notice',
|
'admin notice',
|
||||||
'activitypub-event-bridge'
|
'event-bridge-for-activitypub'
|
||||||
),
|
),
|
||||||
esc_html( self::ACTIVITYPUB_PLUGIN_URL )
|
esc_html( self::ACTIVITYPUB_PLUGIN_URL )
|
||||||
);
|
);
|
||||||
|
@ -71,12 +71,12 @@ class General_Admin_Notices {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
/* translators: 1: The name of the ActivityPub plugin. 2: The minimum required version number of the ActivityPub plugin. */
|
/* translators: 1: The name of the ActivityPub plugin. 2: The minimum required version number of the ActivityPub plugin. */
|
||||||
_x(
|
_x(
|
||||||
'Please upgrade your <a href="%1$s">ActivityPub</a> plugin. At least version %2$s is required for the ActivityPub Event Bridge to work.',
|
'Please upgrade your <a href="%1$s">ActivityPub</a> plugin. At least version %2$s is required for the Event Bridge for ActivityPub to work.',
|
||||||
'admin notice',
|
'admin notice',
|
||||||
'activitypub-event-bridge'
|
'event-bridge-for-activitypub'
|
||||||
),
|
),
|
||||||
esc_html( self::ACTIVITYPUB_PLUGIN_URL ),
|
esc_html( self::ACTIVITYPUB_PLUGIN_URL ),
|
||||||
esc_html( ACTIVITYPUB_EVENT_BRIDGE_ACTIVITYPUB_PLUGIN_MIN_VERSION )
|
esc_html( EVENT_BRIDGE_FOR_ACTIVITYPUB_ACTIVITYPUB_PLUGIN_MIN_VERSION )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,12 +89,12 @@ class General_Admin_Notices {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
/* translators: 1: An URL to the list of supported event plugins. */
|
/* translators: 1: An URL to the list of supported event plugins. */
|
||||||
_x(
|
_x(
|
||||||
'The Plugin <i>ActivityPub Event Bridge</i> is of no use, because you do not have installed and activated a supported Event Plugin.
|
'The Plugin <i>Event Bridge for ActivityPub</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>.',
|
<br> For a list of supported Event Plugins see <a href="%1$s">here</a>.',
|
||||||
'admin notice',
|
'admin notice',
|
||||||
'activitypub-event-bridge'
|
'event-bridge-for-activitypub'
|
||||||
),
|
),
|
||||||
esc_html( self::ACTIVITYPUB_EVENT_BRIDGE_SUPPORTED_EVENT_PLUGINS_URL )
|
esc_html( self::EVENT_BRIDGE_FOR_ACTIVITYPUB_SUPPORTED_EVENT_PLUGINS_URL )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,12 +107,12 @@ class General_Admin_Notices {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
/* translators: 1: An URL to the list of supported event plugins. */
|
/* translators: 1: An URL to the list of supported event plugins. */
|
||||||
_x(
|
_x(
|
||||||
'The Plugin <i>ActivityPub Event Bridge</i> is of no use, because you do not have installed and activated a supported Event Plugin.
|
'The Plugin <i>Event Bridge for ActivityPub</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>.',
|
<br> For a list of supported Event Plugins see <a href="%1$s">here</a>.',
|
||||||
'admin notice',
|
'admin notice',
|
||||||
'activitypub-event-bridge'
|
'event-bridge-for-activitypub'
|
||||||
),
|
),
|
||||||
esc_html( self::ACTIVITYPUB_EVENT_BRIDGE_SUPPORTED_EVENT_PLUGINS_URL )
|
esc_html( self::EVENT_BRIDGE_FOR_ACTIVITYPUB_SUPPORTED_EVENT_PLUGINS_URL )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
* @package Activitypub_Event_Bridge
|
* @package Activitypub_Event_Bridge
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Admin;
|
namespace Event_Bridge_For_ActivityPub\Admin;
|
||||||
|
|
||||||
use Activitypub\Transformer\Factory as Transformer_Factory;
|
use Activitypub\Transformer\Factory as Transformer_Factory;
|
||||||
use ActivityPub_Event_Bridge\Plugins\Event_Plugin;
|
use Event_Bridge_For_ActivityPub\Integrations\Event_Plugin;
|
||||||
use ActivityPub_Event_Bridge\Setup;
|
use Event_Bridge_For_ActivityPub\Setup;
|
||||||
use WP_Query;
|
use WP_Query;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,8 +32,8 @@ class Health_Check {
|
||||||
* @return array The filtered test array.
|
* @return array The filtered test array.
|
||||||
*/
|
*/
|
||||||
public static function add_tests( $tests ) {
|
public static function add_tests( $tests ) {
|
||||||
$tests['direct']['activitypub_event_bridge_test'] = array(
|
$tests['direct']['event_bridge_for_activitypub_test'] = array(
|
||||||
'label' => __( 'ActivityPub Event Transformer Test', 'activitypub-event-bridge' ),
|
'label' => __( 'ActivityPub Event Transformer Test', 'event-bridge-for-activitypub' ),
|
||||||
'test' => array( self::class, 'test_event_transformation' ),
|
'test' => array( self::class, 'test_event_transformation' ),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -47,15 +47,15 @@ class Health_Check {
|
||||||
*/
|
*/
|
||||||
public static function test_event_transformation() {
|
public static function test_event_transformation() {
|
||||||
$result = array(
|
$result = array(
|
||||||
'label' => \__( 'Transformation of Events to a valid ActivityStreams representation.', 'activitypub-event-bridge' ),
|
'label' => \__( 'Transformation of Events to a valid ActivityStreams representation.', 'event-bridge-for-activitypub' ),
|
||||||
'status' => 'good',
|
'status' => 'good',
|
||||||
'badge' => array(
|
'badge' => array(
|
||||||
'label' => \__( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ),
|
'label' => \__( 'Event Bridge for ActivityPub', 'event-bridge-for-activitypub' ),
|
||||||
'color' => 'green',
|
'color' => 'green',
|
||||||
),
|
),
|
||||||
'description' => \sprintf(
|
'description' => \sprintf(
|
||||||
'<p>%s</p>',
|
'<p>%s</p>',
|
||||||
\__( 'The transformation of your most recent events was successful.', 'activitypub-event-bridge' )
|
\__( 'The transformation of your most recent events was successful.', 'event-bridge-for-activitypub' )
|
||||||
),
|
),
|
||||||
'actions' => '',
|
'actions' => '',
|
||||||
'test' => 'test_event_transformation',
|
'test' => 'test_event_transformation',
|
||||||
|
@ -68,7 +68,7 @@ class Health_Check {
|
||||||
}
|
}
|
||||||
|
|
||||||
$result['status'] = 'critical';
|
$result['status'] = 'critical';
|
||||||
$result['label'] = \__( 'One or more of your most recent events failed to transform to ActivityPub', 'activitypub-event-bridge' );
|
$result['label'] = \__( 'One or more of your most recent events failed to transform to ActivityPub', 'event-bridge-for-activitypub' );
|
||||||
$result['badge']['color'] = 'red';
|
$result['badge']['color'] = 'red';
|
||||||
$result['description'] = \sprintf(
|
$result['description'] = \sprintf(
|
||||||
'<p>%s</p>',
|
'<p>%s</p>',
|
||||||
|
@ -168,12 +168,12 @@ class Health_Check {
|
||||||
* @return array The extended information.
|
* @return array The extended information.
|
||||||
*/
|
*/
|
||||||
public static function add_debug_information( $info ) {
|
public static function add_debug_information( $info ) {
|
||||||
$info['activitypub_event_bridge'] = array(
|
$info['event_bridge_for_activitypub'] = array(
|
||||||
'label' => __( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ),
|
'label' => __( 'Event Bridge for ActivityPub', 'event-bridge-for-activitypub' ),
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'plugin_version' => array(
|
'plugin_version' => array(
|
||||||
'label' => __( 'Plugin Version', 'activitypub-event-bridge' ),
|
'label' => __( 'Plugin Version', 'event-bridge-for-activitypub' ),
|
||||||
'value' => ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_VERSION,
|
'value' => EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_VERSION,
|
||||||
'private' => true,
|
'private' => true,
|
||||||
),
|
),
|
||||||
'active_event_plugins' => self::get_info_about_active_event_plugins(),
|
'active_event_plugins' => self::get_info_about_active_event_plugins(),
|
||||||
|
|
|
@ -3,32 +3,32 @@
|
||||||
* General settings class.
|
* General settings class.
|
||||||
*
|
*
|
||||||
* This file contains the General class definition, which handles the "General" settings
|
* 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 Event Bridge for ActivityPub Plugin, providing options for configuring various general settings.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Admin;
|
namespace Event_Bridge_For_ActivityPub\Admin;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use ActivityPub_Event_Bridge\Plugins\Event_Plugin;
|
use Event_Bridge_For_ActivityPub\Integrations\Event_Plugin;
|
||||||
use ActivityPub_Event_Bridge\Setup;
|
use Event_Bridge_For_ActivityPub\Setup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class responsible for the Activitypub Event Bridge related Settings.
|
* Class responsible for the Event Bridge for ActivityPub related Settings.
|
||||||
*
|
*
|
||||||
* Class which handles the "General" settings page for the Activitypub Event Bridge Plugin,
|
* Class which handles the "General" settings page for the Event Bridge for ActivityPub Plugin,
|
||||||
* providing options for configuring various general settings.
|
* providing options for configuring various general settings.
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Settings_Page {
|
class Settings_Page {
|
||||||
const STATIC = 'ActivityPub_Event_Bridge\Admin\Settings_Page';
|
const STATIC = 'Event_Bridge_For_ActivityPub\Admin\Settings_Page';
|
||||||
|
|
||||||
const SETTINGS_SLUG = 'activitypub-event-bridge';
|
const SETTINGS_SLUG = 'event-bridge-for-activitypub';
|
||||||
/**
|
/**
|
||||||
* Warning if the plugin is Active and the ActivityPub plugin is not.
|
* Warning if the plugin is Active and the ActivityPub plugin is not.
|
||||||
*
|
*
|
||||||
|
@ -36,8 +36,8 @@ class Settings_Page {
|
||||||
*/
|
*/
|
||||||
public static function admin_menu(): void {
|
public static function admin_menu(): void {
|
||||||
\add_options_page(
|
\add_options_page(
|
||||||
'Activitypub Event Bridge',
|
'Event Bridge for ActivityPub',
|
||||||
__( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ),
|
__( 'Event Bridge for ActivityPub', 'event-bridge-for-activitypub' ),
|
||||||
'manage_options',
|
'manage_options',
|
||||||
self::SETTINGS_SLUG,
|
self::SETTINGS_SLUG,
|
||||||
array( self::STATIC, 'settings_page' ),
|
array( self::STATIC, 'settings_page' ),
|
||||||
|
@ -114,7 +114,7 @@ class Settings_Page {
|
||||||
'event_terms' => $event_terms,
|
'event_terms' => $event_terms,
|
||||||
);
|
);
|
||||||
|
|
||||||
\load_template( ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . 'templates/settings.php', true, $args );
|
\load_template( EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_DIR . 'templates/settings.php', true, $args );
|
||||||
break;
|
break;
|
||||||
case 'welcome':
|
case 'welcome':
|
||||||
default:
|
default:
|
||||||
|
@ -122,7 +122,7 @@ class Settings_Page {
|
||||||
add_thickbox();
|
add_thickbox();
|
||||||
wp_enqueue_script( 'updates' );
|
wp_enqueue_script( 'updates' );
|
||||||
|
|
||||||
\load_template( ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . 'templates/welcome.php', true );
|
\load_template( EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_DIR . 'templates/welcome.php', true );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Class responsible for autoloading ActivityPub Event Bridge class files.
|
* Class responsible for autoloading Event Bridge for ActivityPub class files.
|
||||||
*
|
*
|
||||||
* The Autoloader class is responsible for automatically loading class files as needed
|
* The Autoloader class is responsible for automatically loading class files as needed
|
||||||
* to ensure a clean and organized codebase. It maps class names to their corresponding
|
* to ensure a clean and organized codebase. It maps class names to their corresponding
|
||||||
* file locations within the GatherPress plugin.
|
* file locations within the GatherPress plugin.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge;
|
namespace Event_Bridge_For_ActivityPub;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
@ -34,8 +34,8 @@ class Autoloader {
|
||||||
public static function register(): void {
|
public static function register(): void {
|
||||||
spl_autoload_register(
|
spl_autoload_register(
|
||||||
function ( $full_class ) {
|
function ( $full_class ) {
|
||||||
$base_dir = ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . '/includes/';
|
$base_dir = EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_DIR . '/includes/';
|
||||||
$base = 'ActivityPub_Event_Bridge\\';
|
$base = 'Event_Bridge_For_ActivityPub\\';
|
||||||
|
|
||||||
if ( strncmp( $full_class, $base, strlen( $base ) ) === 0 ) {
|
if ( strncmp( $full_class, $base, strlen( $base ) ) === 0 ) {
|
||||||
$maybe_uppercase = str_replace( $base, '', $full_class );
|
$maybe_uppercase = str_replace( $base, '', $full_class );
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
* General settings class.
|
* General settings class.
|
||||||
*
|
*
|
||||||
* This file contains the General class definition, which handles the "General" settings
|
* 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 Event Bridge for ActivityPub Plugin, providing options for configuring various general settings.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge;
|
namespace Event_Bridge_For_ActivityPub;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
@ -24,7 +24,7 @@ use Activitypub\Activity\Extended_Object\Event;
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Settings {
|
class Settings {
|
||||||
const SETTINGS_SLUG = 'activitypub-event-bridge';
|
const SETTINGS_SLUG = 'event-bridge-for-activitypub';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default ActivityPub event category.
|
* The default ActivityPub event category.
|
||||||
|
@ -34,17 +34,17 @@ class Settings {
|
||||||
const DEFAULT_EVENT_CATEGORY = 'MEETING';
|
const DEFAULT_EVENT_CATEGORY = 'MEETING';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the settings for the ActivityPub Event Bridge plugin.
|
* Register the settings for the Event Bridge for ActivityPub plugin.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function register_settings(): void {
|
public static function register_settings(): void {
|
||||||
\register_setting(
|
\register_setting(
|
||||||
'activitypub-event-bridge',
|
'event-bridge-for-activitypub',
|
||||||
'activitypub_event_bridge_default_event_category',
|
'event_bridge_for_activitypub_default_event_category',
|
||||||
array(
|
array(
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'description' => \__( 'Define your own custom post template', 'activitypub-event-bridge' ),
|
'description' => \__( 'Define your own custom post template', 'event-bridge-for-activitypub' ),
|
||||||
'show_in_rest' => true,
|
'show_in_rest' => true,
|
||||||
'default' => self::DEFAULT_EVENT_CATEGORY,
|
'default' => self::DEFAULT_EVENT_CATEGORY,
|
||||||
'sanitize_callback' => array( self::class, 'sanitize_mapped_event_category' ),
|
'sanitize_callback' => array( self::class, 'sanitize_mapped_event_category' ),
|
||||||
|
@ -52,22 +52,22 @@ class Settings {
|
||||||
);
|
);
|
||||||
|
|
||||||
\register_setting(
|
\register_setting(
|
||||||
'activitypub-event-bridge',
|
'event-bridge-for-activitypub',
|
||||||
'activitypub_event_bridge_event_category_mappings',
|
'event_bridge_for_activitypub_event_category_mappings',
|
||||||
array(
|
array(
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'description' => \__( 'Define your own custom post template', 'activitypub-event-bridge' ),
|
'description' => \__( 'Define your own custom post template', 'event-bridge-for-activitypub' ),
|
||||||
'default' => array(),
|
'default' => array(),
|
||||||
'sanitize_callback' => array( self::class, 'sanitize_event_category_mappings' ),
|
'sanitize_callback' => array( self::class, 'sanitize_event_category_mappings' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
\register_setting(
|
\register_setting(
|
||||||
'activitypub-event-bridge',
|
'event-bridge-for-activitypub',
|
||||||
'activitypub_event_bridge_initially_activated',
|
'event_bridge_for_activitypub_initially_activated',
|
||||||
array(
|
array(
|
||||||
'type' => 'boolean',
|
'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.', 'event-bridge-for-activitypub' ),
|
||||||
'default' => 1,
|
'default' => 1,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Class responsible for initializing ActivityPub Event Bridge.
|
* Class responsible for initializing Event Bridge for ActivityPub.
|
||||||
*
|
*
|
||||||
* The setup class provides function for checking if this plugin should be activated.
|
* The setup class provides function for checking if this plugin should be activated.
|
||||||
* It detects supported event plugins and provides all setup hooks and filters.
|
* It detects supported event plugins and provides all setup hooks and filters.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge;
|
namespace Event_Bridge_For_ActivityPub;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use ActivityPub_Event_Bridge\Admin\Event_Plugin_Admin_Notices;
|
use Event_Bridge_For_ActivityPub\Admin\Event_Plugin_Admin_Notices;
|
||||||
use ActivityPub_Event_Bridge\Admin\General_Admin_Notices;
|
use Event_Bridge_For_ActivityPub\Admin\General_Admin_Notices;
|
||||||
use ActivityPub_Event_Bridge\Admin\Health_Check;
|
use Event_Bridge_For_ActivityPub\Admin\Health_Check;
|
||||||
use ActivityPub_Event_Bridge\Admin\Settings_Page;
|
use Event_Bridge_For_ActivityPub\Admin\Settings_Page;
|
||||||
use ActivityPub_Event_Bridge\Plugins\Event_Plugin;
|
use Event_Bridge_For_ActivityPub\Integrations\Event_Plugin;
|
||||||
|
|
||||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Setup.
|
* Class Setup.
|
||||||
*
|
*
|
||||||
* This class is responsible for initializing ActivityPub Event Bridge.
|
* This class is responsible for initializing Event Bridge for ActivityPub.
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
@ -64,7 +64,7 @@ class Setup {
|
||||||
is_plugin_active( 'activitypub/activitypub.php' );
|
is_plugin_active( 'activitypub/activitypub.php' );
|
||||||
// BeforeFirstRelease: decide whether we want to do anything at all when ActivityPub plugin is note active.
|
// BeforeFirstRelease: decide whether we want to do anything at all when ActivityPub plugin is note active.
|
||||||
// if ( ! $this->activitypub_plugin_is_active ) {
|
// if ( ! $this->activitypub_plugin_is_active ) {
|
||||||
// deactivate_plugins( ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE );
|
// deactivate_plugins( EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE );
|
||||||
// return;
|
// return;
|
||||||
// }.
|
// }.
|
||||||
$this->active_event_plugins = self::detect_active_event_plugins();
|
$this->active_event_plugins = self::detect_active_event_plugins();
|
||||||
|
@ -125,15 +125,15 @@ class Setup {
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private const EVENT_PLUGIN_CLASSES = array(
|
private const EVENT_PLUGIN_CLASSES = array(
|
||||||
'\ActivityPub_Event_Bridge\Plugins\Events_Manager',
|
'\Event_Bridge_For_ActivityPub\Integrations\Events_Manager',
|
||||||
'\ActivityPub_Event_Bridge\Plugins\GatherPress',
|
'\Event_Bridge_For_ActivityPub\Integrations\GatherPress',
|
||||||
'\ActivityPub_Event_Bridge\Plugins\The_Events_Calendar',
|
'\Event_Bridge_For_ActivityPub\Integrations\The_Events_Calendar',
|
||||||
'\ActivityPub_Event_Bridge\Plugins\VS_Event_List',
|
'\Event_Bridge_For_ActivityPub\Integrations\VS_Event_List',
|
||||||
'\ActivityPub_Event_Bridge\Plugins\WP_Event_Manager',
|
'\Event_Bridge_For_ActivityPub\Integrations\WP_Event_Manager',
|
||||||
'\ActivityPub_Event_Bridge\Plugins\Eventin',
|
'\Event_Bridge_For_ActivityPub\Integrations\Eventin',
|
||||||
'\ActivityPub_Event_Bridge\Plugins\Modern_Events_Calendar_Lite',
|
'\Event_Bridge_For_ActivityPub\Integrations\Modern_Events_Calendar_Lite',
|
||||||
'\ActivityPub_Event_Bridge\Plugins\EventPrime',
|
'\Event_Bridge_For_ActivityPub\Integrations\EventPrime',
|
||||||
'\ActivityPub_Event_Bridge\Plugins\Event_Organiser',
|
'\Event_Bridge_For_ActivityPub\Integrations\Event_Organiser',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,14 +166,14 @@ class Setup {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function setup_hooks(): void {
|
protected function setup_hooks(): void {
|
||||||
register_activation_hook( ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE, array( $this, 'activate' ) );
|
register_activation_hook( EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE, array( $this, 'activate' ) );
|
||||||
|
|
||||||
add_action( 'admin_init', array( $this, 'do_admin_notices' ) );
|
add_action( 'admin_init', array( $this, 'do_admin_notices' ) );
|
||||||
add_action( 'admin_init', array( Settings::class, 'register_settings' ) );
|
add_action( 'admin_init', array( Settings::class, 'register_settings' ) );
|
||||||
add_action( 'admin_enqueue_scripts', array( self::class, 'enqueue_styles' ) );
|
add_action( 'admin_enqueue_scripts', array( self::class, 'enqueue_styles' ) );
|
||||||
add_action( 'admin_menu', array( Settings_Page::class, 'admin_menu' ) );
|
add_action( 'admin_menu', array( Settings_Page::class, 'admin_menu' ) );
|
||||||
add_filter(
|
add_filter(
|
||||||
'plugin_action_links_' . ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_BASENAME,
|
'plugin_action_links_' . EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_BASENAME,
|
||||||
array( Settings_Page::class, 'settings_link' )
|
array( Settings_Page::class, 'settings_link' )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ class Setup {
|
||||||
add_action( 'init', array( Health_Check::class, 'init' ) );
|
add_action( 'init', array( Health_Check::class, 'init' ) );
|
||||||
|
|
||||||
// Check if the minimum required version of the ActivityPub plugin is installed.
|
// Check if the minimum required version of the ActivityPub plugin is installed.
|
||||||
if ( ! version_compare( $this->activitypub_plugin_version, ACTIVITYPUB_EVENT_BRIDGE_ACTIVITYPUB_PLUGIN_MIN_VERSION ) ) {
|
if ( ! version_compare( $this->activitypub_plugin_version, EVENT_BRIDGE_FOR_ACTIVITYPUB_ACTIVITYPUB_PLUGIN_MIN_VERSION ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,24 +200,24 @@ class Setup {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function enqueue_styles( $hook_suffix ): void {
|
public static function enqueue_styles( $hook_suffix ): void {
|
||||||
if ( false !== strpos( $hook_suffix, 'activitypub-event-bridge' ) ) {
|
if ( false !== strpos( $hook_suffix, 'event-bridge-for-activitypub' ) ) {
|
||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
'activitypub-event-bridge-admin-styles',
|
'event-bridge-for-activitypub-admin-styles',
|
||||||
plugins_url(
|
plugins_url(
|
||||||
'assets/css/activitypub-event-bridge-admin.css',
|
'assets/css/event-bridge-for-activitypub-admin.css',
|
||||||
ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE
|
EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE
|
||||||
),
|
),
|
||||||
array(),
|
array(),
|
||||||
ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_VERSION
|
EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_VERSION
|
||||||
);
|
);
|
||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'activitypub-event-bridge-admin-script',
|
'event-bridge-for-activitypub-admin-script',
|
||||||
plugins_url(
|
plugins_url(
|
||||||
'assets/js/activitypub-event-bridge-admin.js',
|
'assets/js/event-bridge-for-activitypub-admin.js',
|
||||||
ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE
|
EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE
|
||||||
),
|
),
|
||||||
array( 'jquery' ),
|
array( 'jquery' ),
|
||||||
ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_VERSION,
|
EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_VERSION,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -233,15 +233,15 @@ class Setup {
|
||||||
// Check if any general admin notices are needed and add actions to insert the needed admin notices.
|
// Check if any general admin notices are needed and add actions to insert the needed admin notices.
|
||||||
if ( ! $this->activitypub_plugin_is_active ) {
|
if ( ! $this->activitypub_plugin_is_active ) {
|
||||||
// The ActivityPub plugin is not active.
|
// The ActivityPub plugin is not active.
|
||||||
add_action( 'admin_notices', array( 'ActivityPub_Event_Bridge\Admin\General_Admin_Notices', 'activitypub_plugin_not_enabled' ), 10, 1 );
|
add_action( 'admin_notices', array( 'Event_Bridge_For_ActivityPub\Admin\General_Admin_Notices', 'activitypub_plugin_not_enabled' ), 10, 1 );
|
||||||
}
|
}
|
||||||
if ( ! version_compare( $this->activitypub_plugin_version, ACTIVITYPUB_EVENT_BRIDGE_ACTIVITYPUB_PLUGIN_MIN_VERSION ) ) {
|
if ( ! version_compare( $this->activitypub_plugin_version, EVENT_BRIDGE_FOR_ACTIVITYPUB_ACTIVITYPUB_PLUGIN_MIN_VERSION ) ) {
|
||||||
// The ActivityPub plugin is too old.
|
// The ActivityPub plugin is too old.
|
||||||
add_action( 'admin_notices', array( 'ActivityPub_Event_Bridge\Admin\General_Admin_Notices', 'activitypub_plugin_version_too_old' ), 10, 1 );
|
add_action( 'admin_notices', array( 'Event_Bridge_For_ActivityPub\Admin\General_Admin_Notices', 'activitypub_plugin_version_too_old' ), 10, 1 );
|
||||||
}
|
}
|
||||||
if ( empty( $this->active_event_plugins ) ) {
|
if ( empty( $this->active_event_plugins ) ) {
|
||||||
// No supported Event Plugin is active.
|
// No supported Event Plugin is active.
|
||||||
add_action( 'admin_notices', array( 'ActivityPub_Event_Bridge\Admin\General_Admin_Notices', 'no_supported_event_plugin_active' ), 10, 1 );
|
add_action( 'admin_notices', array( 'Event_Bridge_For_ActivityPub\Admin\General_Admin_Notices', 'no_supported_event_plugin_active' ), 10, 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,9 +294,9 @@ class Setup {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activates the ActivityPub Event Bridge plugin.
|
* Activates the Event Bridge for ActivityPub plugin.
|
||||||
*
|
*
|
||||||
* This method handles the activation of the ActivityPub Event Bridge plugin.
|
* This method handles the activation of the Event Bridge for ActivityPub plugin.
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @see register_activation_hook()
|
* @see register_activation_hook()
|
||||||
|
@ -305,7 +305,7 @@ class Setup {
|
||||||
public function activate(): void {
|
public function activate(): void {
|
||||||
// Don't allow plugin activation, when the ActivityPub plugin is not activated yet.
|
// Don't allow plugin activation, when the ActivityPub plugin is not activated yet.
|
||||||
if ( ! $this->activitypub_plugin_is_active ) {
|
if ( ! $this->activitypub_plugin_is_active ) {
|
||||||
deactivate_plugins( plugin_basename( ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE ) );
|
deactivate_plugins( plugin_basename( EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE ) );
|
||||||
$notice = General_Admin_Notices::get_admin_notice_activitypub_plugin_not_enabled();
|
$notice = General_Admin_Notices::get_admin_notice_activitypub_plugin_not_enabled();
|
||||||
wp_die(
|
wp_die(
|
||||||
wp_kses( $notice, General_Admin_Notices::ALLOWED_HTML ),
|
wp_kses( $notice, General_Admin_Notices::ALLOWED_HTML ),
|
||||||
|
@ -315,7 +315,7 @@ class Setup {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $this->active_event_plugins ) ) {
|
if ( empty( $this->active_event_plugins ) ) {
|
||||||
deactivate_plugins( plugin_basename( ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_FILE ) );
|
deactivate_plugins( plugin_basename( EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE ) );
|
||||||
$notice = General_Admin_Notices::get_admin_notice_no_supported_event_plugin_active();
|
$notice = General_Admin_Notices::get_admin_notice_no_supported_event_plugin_active();
|
||||||
wp_die(
|
wp_die(
|
||||||
wp_kses( $notice, General_Admin_Notices::ALLOWED_HTML ),
|
wp_kses( $notice, General_Admin_Notices::ALLOWED_HTML ),
|
||||||
|
|
|
@ -2,46 +2,46 @@
|
||||||
/**
|
/**
|
||||||
* File responsible for defining the event category strings.
|
* File responsible for defining the event category strings.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge;
|
namespace Event_Bridge_For_ActivityPub;
|
||||||
|
|
||||||
define(
|
define(
|
||||||
'ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES',
|
'EVENT_BRIDGE_FOR_ACTIVITYPUB_EVENT_CATEGORIES',
|
||||||
array(
|
array(
|
||||||
'ARTS' => __( 'Arts', 'activitypub-event-bridge' ),
|
'ARTS' => __( 'Arts', 'event-bridge-for-activitypub' ),
|
||||||
'BOOK_CLUBS' => __( 'Book clubs', 'activitypub-event-bridge' ),
|
'BOOK_CLUBS' => __( 'Book clubs', 'event-bridge-for-activitypub' ),
|
||||||
'BUSINESS' => __( 'Business', 'activitypub-event-bridge' ),
|
'BUSINESS' => __( 'Business', 'event-bridge-for-activitypub' ),
|
||||||
'CAUSES' => __( 'Causes', 'activitypub-event-bridge' ),
|
'CAUSES' => __( 'Causes', 'event-bridge-for-activitypub' ),
|
||||||
'COMEDY' => __( 'Comedy', 'activitypub-event-bridge' ),
|
'COMEDY' => __( 'Comedy', 'event-bridge-for-activitypub' ),
|
||||||
'CRAFTS' => __( 'Crafts', 'activitypub-event-bridge' ),
|
'CRAFTS' => __( 'Crafts', 'event-bridge-for-activitypub' ),
|
||||||
'FOOD_DRINK' => __( 'Food & Drink', 'activitypub-event-bridge' ),
|
'FOOD_DRINK' => __( 'Food & Drink', 'event-bridge-for-activitypub' ),
|
||||||
'HEALTH' => __( 'Health', 'activitypub-event-bridge' ),
|
'HEALTH' => __( 'Health', 'event-bridge-for-activitypub' ),
|
||||||
'MUSIC' => __( 'Music', 'activitypub-event-bridge' ),
|
'MUSIC' => __( 'Music', 'event-bridge-for-activitypub' ),
|
||||||
'AUTO_BOAT_AIR' => __( 'Auto, boat and air', 'activitypub-event-bridge' ),
|
'AUTO_BOAT_AIR' => __( 'Auto, boat and air', 'event-bridge-for-activitypub' ),
|
||||||
'COMMUNITY' => __( 'Community', 'activitypub-event-bridge' ),
|
'COMMUNITY' => __( 'Community', 'event-bridge-for-activitypub' ),
|
||||||
'FAMILY_EDUCATION' => __( 'Family & Education', 'activitypub-event-bridge' ),
|
'FAMILY_EDUCATION' => __( 'Family & Education', 'event-bridge-for-activitypub' ),
|
||||||
'FASHION_BEAUTY' => __( 'Fashion & Beauty', 'activitypub-event-bridge' ),
|
'FASHION_BEAUTY' => __( 'Fashion & Beauty', 'event-bridge-for-activitypub' ),
|
||||||
'FILM_MEDIA' => __( 'Film & Media', 'activitypub-event-bridge' ),
|
'FILM_MEDIA' => __( 'Film & Media', 'event-bridge-for-activitypub' ),
|
||||||
'GAMES' => __( 'Games', 'activitypub-event-bridge' ),
|
'GAMES' => __( 'Games', 'event-bridge-for-activitypub' ),
|
||||||
'LANGUAGE_CULTURE' => __( 'Language & Culture', 'activitypub-event-bridge' ),
|
'LANGUAGE_CULTURE' => __( 'Language & Culture', 'event-bridge-for-activitypub' ),
|
||||||
'LEARNING' => __( 'Learning', 'activitypub-event-bridge' ),
|
'LEARNING' => __( 'Learning', 'event-bridge-for-activitypub' ),
|
||||||
'LGBTQ' => __( 'LGBTQ', 'activitypub-event-bridge' ),
|
'LGBTQ' => __( 'LGBTQ', 'event-bridge-for-activitypub' ),
|
||||||
'MOVEMENTS_POLITICS' => __( 'Movements and politics', 'activitypub-event-bridge' ),
|
'MOVEMENTS_POLITICS' => __( 'Movements and politics', 'event-bridge-for-activitypub' ),
|
||||||
'NETWORKING' => __( 'Networking', 'activitypub-event-bridge' ),
|
'NETWORKING' => __( 'Networking', 'event-bridge-for-activitypub' ),
|
||||||
'PARTY' => __( 'Party', 'activitypub-event-bridge' ),
|
'PARTY' => __( 'Party', 'event-bridge-for-activitypub' ),
|
||||||
'PERFORMING_VISUAL_ARTS' => __( 'Performing & Visual Arts', 'activitypub-event-bridge' ),
|
'PERFORMING_VISUAL_ARTS' => __( 'Performing & Visual Arts', 'event-bridge-for-activitypub' ),
|
||||||
'PETS' => __( 'Pets', 'activitypub-event-bridge' ),
|
'PETS' => __( 'Pets', 'event-bridge-for-activitypub' ),
|
||||||
'PHOTOGRAPHY' => __( 'Photography', 'activitypub-event-bridge' ),
|
'PHOTOGRAPHY' => __( 'Photography', 'event-bridge-for-activitypub' ),
|
||||||
'OUTDOORS_ADVENTURE' => __( 'Outdoors & Adventure', 'activitypub-event-bridge' ),
|
'OUTDOORS_ADVENTURE' => __( 'Outdoors & Adventure', 'event-bridge-for-activitypub' ),
|
||||||
'SPIRITUALITY_RELIGION_BELIEFS' => __( 'Spirituality, Religion & Beliefs', 'activitypub-event-bridge' ),
|
'SPIRITUALITY_RELIGION_BELIEFS' => __( 'Spirituality, Religion & Beliefs', 'event-bridge-for-activitypub' ),
|
||||||
'SCIENCE_TECH' => __( 'Science & Tech', 'activitypub-event-bridge' ),
|
'SCIENCE_TECH' => __( 'Science & Tech', 'event-bridge-for-activitypub' ),
|
||||||
'SPORTS' => __( 'Sports', 'activitypub-event-bridge' ),
|
'SPORTS' => __( 'Sports', 'event-bridge-for-activitypub' ),
|
||||||
'THEATRE' => __( 'Theatre', 'activitypub-event-bridge' ),
|
'THEATRE' => __( 'Theatre', 'event-bridge-for-activitypub' ),
|
||||||
'MEETING' => __( 'Meeting', 'activitypub-event-bridge' ), // Default value in federation.
|
'MEETING' => __( 'Meeting', 'event-bridge-for-activitypub' ), // Default value in federation.
|
||||||
'DEFAULT' => __( 'Default', 'activitypub-event-bridge' ), // Internal default for overrides.
|
'DEFAULT' => __( 'Default', 'event-bridge-for-activitypub' ), // Internal default for overrides.
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
* Defines all the necessary meta information for the Event Organiser plugin.
|
* Defines all the necessary meta information for the Event Organiser plugin.
|
||||||
*
|
*
|
||||||
* @link https://wordpress.org/plugins/event-organiser/
|
* @link https://wordpress.org/plugins/event-organiser/
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
|
@ -4,13 +4,13 @@
|
||||||
*
|
*
|
||||||
* Basic information that each supported event needs for this plugin to work.
|
* Basic information that each supported event needs for this plugin to work.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
use ActivityPub_Event_Bridge\Activitypub\Transformer\Event as Event_Transformer;
|
use Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event as Event_Transformer;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
|
@ -5,11 +5,11 @@
|
||||||
* Defines all the necessary meta information for the events calendar.
|
* Defines all the necessary meta information for the events calendar.
|
||||||
*
|
*
|
||||||
* @link https://wordpress.org/plugins/the-events-calendar/
|
* @link https://wordpress.org/plugins/the-events-calendar/
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
|
@ -3,11 +3,11 @@
|
||||||
* EventPrime – Events Calendar, Bookings and Tickets
|
* EventPrime – Events Calendar, Bookings and Tickets
|
||||||
*
|
*
|
||||||
* @link https://wordpress.org/plugins/eventprime-event-calendar-management/
|
* @link https://wordpress.org/plugins/eventprime-event-calendar-management/
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
use Activitypub\Signature;
|
use Activitypub\Signature;
|
||||||
use Eventprime_Basic_Functions;
|
use Eventprime_Basic_Functions;
|
|
@ -5,11 +5,11 @@
|
||||||
* Defines all the necessary meta information for the Events Manager WordPress Plugin.
|
* Defines all the necessary meta information for the Events Manager WordPress Plugin.
|
||||||
*
|
*
|
||||||
* @link https://wordpress.org/plugins/events-manager/
|
* @link https://wordpress.org/plugins/events-manager/
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
|
@ -5,11 +5,11 @@
|
||||||
* Defines all the necessary meta information for the GatherPress plugin.
|
* Defines all the necessary meta information for the GatherPress plugin.
|
||||||
*
|
*
|
||||||
* @link https://wordpress.org/plugins/gatherpress/
|
* @link https://wordpress.org/plugins/gatherpress/
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
|
@ -5,11 +5,11 @@
|
||||||
* Defines all the necessary meta information for the Modern Events Calendar (Lite).
|
* Defines all the necessary meta information for the Modern Events Calendar (Lite).
|
||||||
*
|
*
|
||||||
* @link https://webnus.net/modern-events-calendar/
|
* @link https://webnus.net/modern-events-calendar/
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
|
@ -5,11 +5,11 @@
|
||||||
* Defines all the necessary meta information for the events calendar.
|
* Defines all the necessary meta information for the events calendar.
|
||||||
*
|
*
|
||||||
* @link https://wordpress.org/plugins/the-events-calendar/
|
* @link https://wordpress.org/plugins/the-events-calendar/
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
|
@ -6,13 +6,13 @@
|
||||||
* "Very Simple Events List".
|
* "Very Simple Events List".
|
||||||
*
|
*
|
||||||
* @link https://de.wordpress.org/plugins/very-simple-event-list/
|
* @link https://de.wordpress.org/plugins/very-simple-event-list/
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
use ActivityPub_Event_Bridge\Event_Plugins;
|
use Event_Bridge_For_ActivityPub\Event_Plugins;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
|
@ -6,13 +6,13 @@
|
||||||
* "WP Event Manager"
|
* "WP Event Manager"
|
||||||
*
|
*
|
||||||
* @link https://de.wordpress.org/plugins/wp-event-manager
|
* @link https://de.wordpress.org/plugins/wp-event-manager
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ActivityPub_Event_Bridge\Plugins;
|
namespace Event_Bridge_For_ActivityPub\Integrations;
|
||||||
|
|
||||||
use ActivityPub_Event_Bridge\Plugins\Event_Plugin;
|
use Event_Bridge_For_ActivityPub\Integrations\Event_Plugin;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "activitypub-event-bridge",
|
"name": "event-bridge-for-activitypub",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "André Menrath",
|
"name": "André Menrath",
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
},
|
},
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://code.event-federation.eu/Event-Federation/wordpress-activitypub-event-bridge/issues"
|
"url": "https://code.event-federation.eu/Event-Federation/wordpress-event-bridge-for-activitypub/issues"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@wordpress/env": "^10.10.0",
|
"@wordpress/env": "^10.10.0",
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
<rule ref="WordPress.WP.I18n">
|
<rule ref="WordPress.WP.I18n">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="text_domain" type="array">
|
<property name="text_domain" type="array">
|
||||||
<element value="activitypub-event-bridge"/>
|
<element value="event-bridge-for-activitypub"/>
|
||||||
<element value="activitypub"/>
|
<element value="activitypub"/>
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
|
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="prefixes" type="array">
|
<property name="prefixes" type="array">
|
||||||
<element value="ACTIVITYPUB_EVENT_BRIDGE"/>
|
<element value="EVENT_BRIDGE_FOR_ACTIVITYPUB"/>
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
10
readme.txt
10
readme.txt
|
@ -1,4 +1,4 @@
|
||||||
=== ActivityPub Event Bridge ===
|
=== Event Bridge for ActivityPub ===
|
||||||
Contributors: andremenrath
|
Contributors: andremenrath
|
||||||
Tags: events, fediverse, activitypub, calendar
|
Tags: events, fediverse, activitypub, calendar
|
||||||
Requires at least: 6.5
|
Requires at least: 6.5
|
||||||
|
@ -12,7 +12,7 @@ Integrating popular event plugins with the ActivityPub plugin.
|
||||||
== 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).
|
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 Event Bridge for ActivityPub 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.
|
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/).
|
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/).
|
||||||
|
@ -21,7 +21,7 @@ You retain full ownership of your content. By integrating into your existing set
|
||||||
|
|
||||||
= How It Works =
|
= How It Works =
|
||||||
|
|
||||||
With the ActivityPub Event Bridge WordPress plugin, sharing your events is effortless and automatic!
|
With the Event Bridge for ActivityPub 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.
|
Once you create an event on your WordPress site, it is seamlessly shared across the decentralized web using the ActivityPub protocol.
|
||||||
|
|
||||||
![](./.wordpress-org/event-activitypub-publishing.gif)
|
![](./.wordpress-org/event-activitypub-publishing.gif)
|
||||||
|
@ -88,11 +88,11 @@ No, the Event Federation Plugin depends on the [ActivityPub plugin](https://word
|
||||||
|
|
||||||
= 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.
|
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-event-bridge-for-activitypub/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).
|
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-event-bridge-for-activitypub/issues).
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Template for the header and navigation of the admin pages.
|
* Template for the header and navigation of the admin pages.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
|
@ -18,18 +18,18 @@ $args = wp_parse_args(
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="activitypub-event-bridge-settings-header">
|
<div class="event-bridge-for-activitypub-settings-header">
|
||||||
<div class="activitypub-event-bridge-settings-title-section">
|
<div class="event-bridge-for-activitypub-settings-title-section">
|
||||||
<h1><?php \esc_html_e( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ); ?></h1>
|
<h1><?php \esc_html_e( 'Event Bridge for ActivityPub', 'event-bridge-for-activitypub' ); ?></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav class="activitypub-event-bridge-settings-tabs-wrapper" aria-label="<?php \esc_attr_e( 'Secondary menu', 'activitypub-event-bridge' ); ?>">
|
<nav class="event-bridge-for-activitypub-settings-tabs-wrapper" aria-label="<?php \esc_attr_e( 'Secondary menu', 'event-bridge-for-activitypub' ); ?>">
|
||||||
<a href="<?php echo \esc_url( admin_url( 'options-general.php?page=activitypub-event-bridge' ) ); ?>" class="activitypub-event-bridge-settings-tab <?php echo \esc_attr( $args['welcome'] ); ?>">
|
<a href="<?php echo \esc_url( admin_url( 'options-general.php?page=event-bridge-for-activitypub' ) ); ?>" class="event-bridge-for-activitypub-settings-tab <?php echo \esc_attr( $args['welcome'] ); ?>">
|
||||||
<?php \esc_html_e( 'Welcome', 'activitypub-event-bridge' ); ?>
|
<?php \esc_html_e( 'Welcome', 'event-bridge-for-activitypub' ); ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="<?php echo \esc_url( admin_url( 'options-general.php?page=activitypub-event-bridge&tab=settings' ) ); ?>" class="activitypub-event-bridge-settings-tab <?php echo \esc_attr( $args['settings'] ); ?>">
|
<a href="<?php echo \esc_url( admin_url( 'options-general.php?page=event-bridge-for-activitypub&tab=settings' ) ); ?>" class="event-bridge-for-activitypub-settings-tab <?php echo \esc_attr( $args['settings'] ); ?>">
|
||||||
<?php \esc_html_e( 'Settings', 'activitypub-event-bridge' ); ?>
|
<?php \esc_html_e( 'Settings', 'event-bridge-for-activitypub' ); ?>
|
||||||
</a>
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Template for ActivityPub Event Bridge settings page.
|
* Template for Event Bridge for ActivityPub settings page.
|
||||||
*
|
*
|
||||||
* This template is used to display and manage settings for the ActivityPub Event Bridge plugin.
|
* This template is used to display and manage settings for the Event Bridge for ActivityPub plugin.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*
|
*
|
||||||
* @param array $args An array of arguments for the settings page.
|
* @param array $args An array of arguments for the settings page.
|
||||||
|
@ -33,26 +33,26 @@ if ( ! current_user_can( 'manage_options' ) ) {
|
||||||
|
|
||||||
$event_terms = $args['event_terms'];
|
$event_terms = $args['event_terms'];
|
||||||
|
|
||||||
require_once ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . '/includes/event-categories.php';
|
require_once EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_DIR . '/includes/event-categories.php';
|
||||||
|
|
||||||
$selected_default_event_category = \get_option( 'activitypub_event_bridge_default_event_category', 'MEETING' );
|
$selected_default_event_category = \get_option( 'event_bridge_for_activitypub_default_event_category', 'MEETING' );
|
||||||
$current_category_mapping = \get_option( 'activitypub_event_bridge_event_category_mappings', array() );
|
$current_category_mapping = \get_option( 'event_bridge_for_activitypub_event_category_mappings', array() );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="activitypub-event-bridge-settings activitypub-event-bridge-settings-page hide-if-no-js">
|
<div class="event-bridge-for-activitypub-settings event-bridge-for-activitypub-settings-page hide-if-no-js">
|
||||||
<form method="post" action="options.php">
|
<form method="post" action="options.php">
|
||||||
<?php \settings_fields( 'activitypub-event-bridge' ); ?>
|
<?php \settings_fields( 'event-bridge-for-activitypub' ); ?>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<h2> <?php esc_html_e( 'ActivityPub Event Category', 'activitypub-event-bridge' ); ?> </h2>
|
<h2> <?php esc_html_e( 'ActivityPub Event Category', 'event-bridge-for-activitypub' ); ?> </h2>
|
||||||
<p> <?php esc_html_e( 'To help visitors find events more easily, the community created a set of basic event categories. Please select the category that best matches the majority of the events you organize.', 'activitypub-event-bridge' ); ?> </p>
|
<p> <?php esc_html_e( 'To help visitors find events more easily, the community created a set of basic event categories. Please select the category that best matches the majority of the events you organize.', 'event-bridge-for-activitypub' ); ?> </p>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"> <?php esc_html_e( 'Default Category', 'activitypub-event-bridge' ); ?> </th>
|
<th scope="row"> <?php esc_html_e( 'Default Category', 'event-bridge-for-activitypub' ); ?> </th>
|
||||||
<td>
|
<td>
|
||||||
<select id="activitypub_event_bridge_default_event_category" name="activitypub_event_bridge_default_event_category">';
|
<select id="event_bridge_for_activitypub_default_event_category" name="event_bridge_for_activitypub_default_event_category">';
|
||||||
<?php
|
<?php
|
||||||
foreach ( ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES as $value => $label ) {
|
foreach ( EVENT_BRIDGE_FOR_ACTIVITYPUB_EVENT_CATEGORIES as $value => $label ) {
|
||||||
echo '<option value="' . esc_attr( $value ) . '" ' . selected( $selected_default_event_category, $value, false ) . '>' . esc_html( $label ) . '</option>';
|
echo '<option value="' . esc_attr( $value ) . '" ' . selected( $selected_default_event_category, $value, false ) . '>' . esc_html( $label ) . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -62,14 +62,14 @@ $current_category_mapping = \get_option( 'activitypub_event_bridge_event_
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php if ( ! empty( $event_terms ) ) : ?>
|
<?php if ( ! empty( $event_terms ) ) : ?>
|
||||||
<h3> <?php esc_html_e( 'Advanced Event Category Settings', 'activitypub-event-bridge' ); ?> </h3>
|
<h3> <?php esc_html_e( 'Advanced Event Category Settings', 'event-bridge-for-activitypub' ); ?> </h3>
|
||||||
<p> <?php esc_html_e( 'Take more control by adjusting how your event categories are mapped to the basic category set used in ActivityPub. This option lets you override the default selection above, ensuring more accurate categorization and better visibility for your events.', 'activitypub-event-bridge' ); ?> </p>
|
<p> <?php esc_html_e( 'Take more control by adjusting how your event categories are mapped to the basic category set used in ActivityPub. This option lets you override the default selection above, ensuring more accurate categorization and better visibility for your events.', 'event-bridge-for-activitypub' ); ?> </p>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<?php foreach ( $event_terms as $event_term ) { ?>
|
<?php foreach ( $event_terms as $event_term ) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"> <?php echo esc_html( $event_term->name ); ?> </th>
|
<th scope="row"> <?php echo esc_html( $event_term->name ); ?> </th>
|
||||||
<td>
|
<td>
|
||||||
<select name="activitypub_event_bridge_event_category_mappings[<?php echo esc_attr( $event_term->slug ); ?>]">
|
<select name="event_bridge_for_activitypub_event_category_mappings[<?php echo esc_attr( $event_term->slug ); ?>]">
|
||||||
<?php
|
<?php
|
||||||
$current_mapping_is_set = false;
|
$current_mapping_is_set = false;
|
||||||
if ( ! empty( $current_category_mapping ) ) {
|
if ( ! empty( $current_category_mapping ) ) {
|
||||||
|
@ -81,13 +81,13 @@ $current_category_mapping = \get_option( 'activitypub_event_bridge_event_
|
||||||
$mapping = 'DEFAULT';
|
$mapping = 'DEFAULT';
|
||||||
}
|
}
|
||||||
if ( 'DEFAULT' === $mapping ) {
|
if ( 'DEFAULT' === $mapping ) {
|
||||||
echo '<option value="' . esc_attr( $mapping ) . '"> -- ' . esc_html( ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES[ $mapping ] ) . ' -- </option>';
|
echo '<option value="' . esc_attr( $mapping ) . '"> -- ' . esc_html( EVENT_BRIDGE_FOR_ACTIVITYPUB_EVENT_CATEGORIES[ $mapping ] ) . ' -- </option>';
|
||||||
} else {
|
} else {
|
||||||
echo '<option value="' . esc_attr( $mapping ) . '">' . esc_html( ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES[ $mapping ] ) . '</option>';
|
echo '<option value="' . esc_attr( $mapping ) . '">' . esc_html( EVENT_BRIDGE_FOR_ACTIVITYPUB_EVENT_CATEGORIES[ $mapping ] ) . '</option>';
|
||||||
}
|
}
|
||||||
echo '<option value="DEFAULT" ' . selected( $selected_default_event_category, 'DEFAULT', false ) . '> -- ' . esc_html__( 'Default', 'activitypub-event-bridge' ) . ' -- </option>';
|
echo '<option value="DEFAULT" ' . selected( $selected_default_event_category, 'DEFAULT', false ) . '> -- ' . esc_html__( 'Default', 'event-bridge-for-activitypub' ) . ' -- </option>';
|
||||||
foreach ( Event::DEFAULT_EVENT_CATEGORIES as $event_category ) {
|
foreach ( Event::DEFAULT_EVENT_CATEGORIES as $event_category ) {
|
||||||
echo '<option value="' . esc_attr( $event_category ) . '" ' . selected( $mappings[ $event_term->slug ] ?? '', $event_category, false ) . '>' . esc_html( ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES[ $event_category ] ) . '</option>';
|
echo '<option value="' . esc_attr( $event_category ) . '" ' . selected( $mappings[ $event_term->slug ] ?? '', $event_category, false ) . '>' . esc_html( EVENT_BRIDGE_FOR_ACTIVITYPUB_EVENT_CATEGORIES[ $event_category ] ) . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
@ -99,7 +99,7 @@ $current_category_mapping = \get_option( 'activitypub_event_bridge_event_
|
||||||
</div>
|
</div>
|
||||||
<!-- This disables the setup wizard. -->
|
<!-- This disables the setup wizard. -->
|
||||||
<div class="hidden">
|
<div class="hidden">
|
||||||
<input type="checkbox" id="activitypub_event_bridge_initially_activated" name="activitypub_event_bridge_initially_activated"/>
|
<input type="checkbox" id="event_bridge_for_activitypub_initially_activated" name="event_bridge_for_activitypub_initially_activated"/>
|
||||||
</div>
|
</div>
|
||||||
<?php \submit_button(); ?>
|
<?php \submit_button(); ?>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Status page for the ActivityPub Event Bridge.
|
* Status page for the Event Bridge for ActivityPub.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
|
|
||||||
use ActivityPub_Event_Bridge\Setup;
|
use Event_Bridge_For_ActivityPub\Setup;
|
||||||
use ActivityPub_Event_Bridge\Admin\Settings_Page;
|
use Event_Bridge_For_ActivityPub\Admin\Settings_Page;
|
||||||
use ActivityPub_Event_Bridge\Admin\Health_Check;
|
use Event_Bridge_For_ActivityPub\Admin\Health_Check;
|
||||||
|
|
||||||
\load_template(
|
\load_template(
|
||||||
__DIR__ . '/admin-header.php',
|
__DIR__ . '/admin-header.php',
|
||||||
|
@ -21,7 +21,7 @@ use ActivityPub_Event_Bridge\Admin\Health_Check;
|
||||||
);
|
);
|
||||||
|
|
||||||
$active_event_plugins = Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = Setup::get_instance()->get_active_event_plugins();
|
||||||
$activitypub_event_bridge_status_ok = true;
|
$event_bridge_for_activitypub_status_ok = true;
|
||||||
$example_event_post = Health_Check::get_most_recent_event_posts();
|
$example_event_post = Health_Check::get_most_recent_event_posts();
|
||||||
|
|
||||||
if ( empty( $example_event_post ) ) {
|
if ( empty( $example_event_post ) ) {
|
||||||
|
@ -37,13 +37,13 @@ WP_Filesystem();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="activitypub-event-bridge-settings activitypub-event-bridge-settings-page hide-if-no-js">
|
<div class="event-bridge-for-activitypub-settings event-bridge-for-activitypub-settings-page hide-if-no-js">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<h2><?php \esc_html_e( 'Status', 'activitypub-event-bridge' ); ?></h2>
|
<h2><?php \esc_html_e( 'Status', 'event-bridge-for-activitypub' ); ?></h2>
|
||||||
<p><?php \esc_html_e( 'The ActivityPub Event Bridge detected the following (activated) event plugins:', 'activitypub-event-bridge' ); ?></p>
|
<p><?php \esc_html_e( 'The Event Bridge for ActivityPub detected the following (activated) event plugins:', 'event-bridge-for-activitypub' ); ?></p>
|
||||||
<?php foreach ( $active_event_plugins as $active_event_plugin ) { ?>
|
<?php foreach ( $active_event_plugins as $active_event_plugin ) { ?>
|
||||||
<h3><?php echo esc_html( $active_event_plugin->get_plugin_name() ); ?>:</h3>
|
<h3><?php echo esc_html( $active_event_plugin->get_plugin_name() ); ?>:</h3>
|
||||||
<ul class="activitypub-event-bridge-list">
|
<ul class="event-bridge-for-activitypub-list">
|
||||||
<li>
|
<li>
|
||||||
<?php
|
<?php
|
||||||
if ( in_array( $active_event_plugin::get_post_type(), get_option( 'activitypub_support_post_types', array() ), true ) ) {
|
if ( in_array( $active_event_plugin::get_post_type(), get_option( 'activitypub_support_post_types', array() ), true ) ) {
|
||||||
|
@ -53,21 +53,21 @@ WP_Filesystem();
|
||||||
_x(
|
_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>.',
|
'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',
|
'admin notice',
|
||||||
'activitypub-event-bridge'
|
'event-bridge-for-activitypub'
|
||||||
),
|
),
|
||||||
esc_html( get_plugin_data( ACTIVITYPUB_PLUGIN_FILE )['Name'] ),
|
esc_html( get_plugin_data( ACTIVITYPUB_PLUGIN_FILE )['Name'] ),
|
||||||
esc_html( $active_event_plugin->get_plugin_name() ),
|
esc_html( $active_event_plugin->get_plugin_name() ),
|
||||||
admin_url( 'options-general.php?page=activitypub&tab=settings' )
|
admin_url( 'options-general.php?page=activitypub&tab=settings' )
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$activitypub_event_bridge_status_ok = false;
|
$event_bridge_for_activitypub_status_ok = false;
|
||||||
echo '❌ ';
|
echo '❌ ';
|
||||||
$status_message_post_type_enabled = sprintf(
|
$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. */
|
/* translators: 1: the name of the event plugin a admin notice is shown. 2: The name of the ActivityPub plugin. */
|
||||||
_x(
|
_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>.',
|
'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',
|
'admin notice',
|
||||||
'activitypub-event-bridge'
|
'event-bridge-for-activitypub'
|
||||||
),
|
),
|
||||||
esc_html( get_plugin_data( ACTIVITYPUB_PLUGIN_FILE )['Name'] ),
|
esc_html( get_plugin_data( ACTIVITYPUB_PLUGIN_FILE )['Name'] ),
|
||||||
esc_html( $active_event_plugin->get_plugin_name() ),
|
esc_html( $active_event_plugin->get_plugin_name() ),
|
||||||
|
@ -89,11 +89,11 @@ WP_Filesystem();
|
||||||
<?php
|
<?php
|
||||||
if ( Health_Check::test_if_event_transformer_is_used( $active_event_plugin ) ) {
|
if ( Health_Check::test_if_event_transformer_is_used( $active_event_plugin ) ) {
|
||||||
echo '✅ ';
|
echo '✅ ';
|
||||||
esc_html_e( 'The ActivityPub Event Bridge successfully registered to the ActivityPub plugin.', 'activitypub-event-bridge' );
|
esc_html_e( 'The Event Bridge for ActivityPub successfully registered to the ActivityPub plugin.', 'event-bridge-for-activitypub' );
|
||||||
} else {
|
} else {
|
||||||
$activitypub_event_bridge_status_ok = false;
|
$event_bridge_for_activitypub_status_ok = false;
|
||||||
echo '❌ ';
|
echo '❌ ';
|
||||||
esc_html_e( 'The ActivityPub Event Bridge could not register to the ActivityPub plugin.', 'activitypub-event-bridge' );
|
esc_html_e( 'The Event Bridge for ActivityPub could not register to the ActivityPub plugin.', 'event-bridge-for-activitypub' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</li>
|
</li>
|
||||||
|
@ -101,95 +101,95 @@ WP_Filesystem();
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ( get_option( 'activitypub_event_bridge_initially_activated', true ) ) : ?>
|
<?php if ( get_option( 'event_bridge_for_activitypub_initially_activated', true ) ) : ?>
|
||||||
<a href="<?php echo esc_url( admin_url( 'options-general.php?page=' . Settings_Page::SETTINGS_SLUG ) . '&tab=settings' ); ?>" role="button">
|
<a href="<?php echo esc_url( admin_url( 'options-general.php?page=' . Settings_Page::SETTINGS_SLUG ) . '&tab=settings' ); ?>" role="button">
|
||||||
<button class="button button-primary">
|
<button class="button button-primary">
|
||||||
<strong>→</strong> <?php \esc_html_e( 'Continue your setup', 'activitypub-event-bridge' ); ?>
|
<strong>→</strong> <?php \esc_html_e( 'Continue your setup', 'event-bridge-for-activitypub' ); ?>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<h2><?php \esc_html_e( 'How to Check if It\'s Working', 'activitypub-event-bridge' ); ?></h2>
|
<h2><?php \esc_html_e( 'How to Check if It\'s Working', 'event-bridge-for-activitypub' ); ?></h2>
|
||||||
<?php
|
<?php
|
||||||
if ( ! $activitypub_event_bridge_status_ok ) {
|
if ( ! $event_bridge_for_activitypub_status_ok ) {
|
||||||
echo '<div class="notice-warning"><p>' . \esc_html__( 'Please fix the status issues above first.', 'activitypub-event-bridge' ) . '</p></div>';
|
echo '<div class="notice-warning"><p>' . \esc_html__( 'Please fix the status issues above first.', 'event-bridge-for-activitypub' ) . '</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>
|
<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:', 'event-bridge-for-activitypub' ); ?></p>
|
||||||
<div class="activitypub-event-bridge-settings-accordion">
|
<div class="event-bridge-for-activitypub-settings-accordion">
|
||||||
<h4 class="activitypub-event-bridge-settings-accordion-heading">
|
<h4 class="event-bridge-for-activitypub-settings-accordion-heading">
|
||||||
<button aria-expanded="false" class="activitypub-event-bridge-settings-accordion-trigger" aria-controls="activitypub-event-bridge-help-accordion-mastodon" type="button">
|
<button aria-expanded="false" class="event-bridge-for-activitypub-settings-accordion-trigger" aria-controls="event-bridge-for-activitypub-help-accordion-mastodon" type="button">
|
||||||
<span class="title">
|
<span class="title">
|
||||||
1.
|
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">
|
<img src="<?php echo esc_url( plugins_url( '/assets/img/mastodon.svg', EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE ) ); ?>" alt="Mastodon Icon" class="event-bridge-for-activitypub-settings-inline-icon">
|
||||||
<?php \esc_html_e( 'Using Your Mastodon Account', 'activitypub-event-bridge' ); ?>
|
<?php \esc_html_e( 'Using Your Mastodon Account', 'event-bridge-for-activitypub' ); ?>
|
||||||
</span>
|
</span>
|
||||||
<span class="icon"></span>
|
<span class="icon"></span>
|
||||||
</button>
|
</button>
|
||||||
</h4>
|
</h4>
|
||||||
<div id="activitypub-event-bridge-help-accordion-mastodon" class="activitypub-event-bridge-settings-accordion-panel" hidden="hidden">
|
<div id="event-bridge-for-activitypub-help-accordion-mastodon" class="event-bridge-for-activitypub-settings-accordion-panel" hidden="hidden">
|
||||||
<ol class="activitypub-event-bridge-settings-numbered-list">
|
<ol class="event-bridge-for-activitypub-settings-numbered-list">
|
||||||
<li><?php \esc_html_e( 'Log into your Mastodon account.', 'activitypub-event-bridge' ); ?></li>
|
<li><?php \esc_html_e( 'Log into your Mastodon account.', 'event-bridge-for-activitypub' ); ?></li>
|
||||||
<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' ); ?>
|
<?php \esc_html_e( 'In the search bar, type or copy the full URL of one of your event pages. For example:', 'event-bridge-for-activitypub' ); ?>
|
||||||
<code class="activitypub-event-bridge-settings-example-url"><?php echo \esc_url( $example_event_post ); ?></code>
|
<code class="event-bridge-for-activitypub-settings-example-url"><?php echo \esc_url( $example_event_post ); ?></code>
|
||||||
</li>
|
</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>
|
<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.', 'event-bridge-for-activitypub' ); ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="activitypub-event-bridge-settings-accordion-heading">
|
<h4 class="event-bridge-for-activitypub-settings-accordion-heading">
|
||||||
<button aria-expanded="false" class="activitypub-event-bridge-settings-accordion-trigger" aria-controls="activitypub-event-bridge-help-accordion-mobilizon" type="button">
|
<button aria-expanded="false" class="event-bridge-for-activitypub-settings-accordion-trigger" aria-controls="event-bridge-for-activitypub-help-accordion-mobilizon" type="button">
|
||||||
<span class="title">
|
<span class="title">
|
||||||
2.
|
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">
|
<img src="<?php echo esc_url( plugins_url( '/assets/img/mobilizon.svg', EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE ) ); ?>" alt="Mastodon Icon" class="event-bridge-for-activitypub-settings-inline-icon">
|
||||||
<?php \esc_html_e( 'Using Your Mobilizon Account', 'activitypub-event-bridge' ); ?>
|
<?php \esc_html_e( 'Using Your Mobilizon Account', 'event-bridge-for-activitypub' ); ?>
|
||||||
</span>
|
</span>
|
||||||
<span class="icon"></span>
|
<span class="icon"></span>
|
||||||
</button>
|
</button>
|
||||||
</h4>
|
</h4>
|
||||||
<div id="activitypub-event-bridge-help-accordion-mobilizon" class="activitypub-event-bridge-settings-accordion-panel" hidden="hidden">
|
<div id="event-bridge-for-activitypub-help-accordion-mobilizon" class="event-bridge-for-activitypub-settings-accordion-panel" hidden="hidden">
|
||||||
<ol class="activitypub-event-bridge-settings-numbered-list">
|
<ol class="event-bridge-for-activitypub-settings-numbered-list">
|
||||||
<li><?php \esc_html_e( 'Log into your Mobilizon account.', 'activitypub-event-bridge' ); ?></li>
|
<li><?php \esc_html_e( 'Log into your Mobilizon account.', 'event-bridge-for-activitypub' ); ?></li>
|
||||||
<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' ); ?>
|
<?php \esc_html_e( 'In the search bar, type or copy the full URL of one of your event pages. For example:', 'event-bridge-for-activitypub' ); ?>
|
||||||
<code class="activitypub-event-bridge-settings-example-url"><?php echo \esc_url( $example_event_post ); ?></code>
|
<code class="event-bridge-for-activitypub-settings-example-url"><?php echo \esc_url( $example_event_post ); ?></code>
|
||||||
</li>
|
</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>
|
<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.', 'event-bridge-for-activitypub' ); ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="activitypub-event-bridge-settings-accordion-heading">
|
<h4 class="event-bridge-for-activitypub-settings-accordion-heading">
|
||||||
<button aria-expanded="false" class="activitypub-event-bridge-settings-accordion-trigger" aria-controls="activitypub-event-bridge-help-accordion-fediverse" type="button">
|
<button aria-expanded="false" class="event-bridge-for-activitypub-settings-accordion-trigger" aria-controls="event-bridge-for-activitypub-help-accordion-fediverse" type="button">
|
||||||
<span class="title">
|
<span class="title">
|
||||||
3.
|
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">
|
<img src="<?php echo esc_url( plugins_url( '/assets/img/fediverse.svg', EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE ) ); ?>" alt="Mastodon Icon" class="event-bridge-for-activitypub-settings-inline-icon">
|
||||||
<?php \esc_html_e( 'Using Any Other Fediverse Application', 'activitypub-event-bridge' ); ?>
|
<?php \esc_html_e( 'Using Any Other Fediverse Application', 'event-bridge-for-activitypub' ); ?>
|
||||||
</span>
|
</span>
|
||||||
<span class="icon"></span>
|
<span class="icon"></span>
|
||||||
</button>
|
</button>
|
||||||
</h4>
|
</h4>
|
||||||
<div id="activitypub-event-bridge-help-accordion-fediverse" class="activitypub-event-bridge-settings-accordion-panel" hidden="hidden">
|
<div id="event-bridge-for-activitypub-help-accordion-fediverse" class="event-bridge-for-activitypub-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>
|
<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.', 'event-bridge-for-activitypub' ); ?></p>
|
||||||
<ol class="activitypub-event-bridge-settings-numbered-list">
|
<ol class="event-bridge-for-activitypub-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( 'Log into your account on any Fediverse app.', 'event-bridge-for-activitypub' ); ?></li>
|
||||||
<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' ); ?>
|
<?php \esc_html_e( 'In the search bar, type or copy the full URL of one of your event pages. For example:', 'event-bridge-for-activitypub' ); ?>
|
||||||
<code class="activitypub-event-bridge-settings-example-url"><?php echo \esc_url( $example_event_post ); ?></code>
|
<code class="event-bridge-for-activitypub-settings-example-url"><?php echo \esc_url( $example_event_post ); ?></code>
|
||||||
</li>
|
</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>
|
<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.', 'event-bridge-for-activitypub' ); ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="activitypub-event-bridge-settings-accordion-heading">
|
<h4 class="event-bridge-for-activitypub-settings-accordion-heading">
|
||||||
<button aria-expanded="false" class="activitypub-event-bridge-settings-accordion-trigger" aria-controls="activitypub-event-bridge-help-accordion-advanced" type="button">
|
<button aria-expanded="false" class="event-bridge-for-activitypub-settings-accordion-trigger" aria-controls="event-bridge-for-activitypub-help-accordion-advanced" type="button">
|
||||||
<span class="title">
|
<span class="title">
|
||||||
4.
|
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">
|
<img src="<?php echo esc_url( plugins_url( '/assets/img/activitypub.svg', EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_FILE ) ); ?>" alt="Mastodon Icon" class="event-bridge-for-activitypub-settings-inline-icon">
|
||||||
<?php \esc_html_e( 'Advanced: Verifying the ActivityStreams JSON', 'activitypub-event-bridge' ); ?></span>
|
<?php \esc_html_e( 'Advanced: Verifying the ActivityStreams JSON', 'event-bridge-for-activitypub' ); ?></span>
|
||||||
<span class="icon"></span>
|
<span class="icon"></span>
|
||||||
</button>
|
</button>
|
||||||
</h4>
|
</h4>
|
||||||
<div id="activitypub-event-bridge-help-accordion-advanced" class="activitypub-event-bridge-settings-accordion-panel" hidden="hidden">
|
<div id="event-bridge-for-activitypub-help-accordion-advanced" class="event-bridge-for-activitypub-settings-accordion-panel" hidden="hidden">
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
// Assume $event_url contains the dynamic URL, and '?activitypub' is appended to it.
|
// Assume $event_url contains the dynamic URL, and '?activitypub' is appended to it.
|
||||||
|
@ -202,7 +202,7 @@ WP_Filesystem();
|
||||||
|
|
||||||
// Translator comment to explain the placeholder.
|
// 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 */
|
/* 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 );
|
$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).', 'event-bridge-for-activitypub' ), $activitypub_query, $activitypub_url_html );
|
||||||
|
|
||||||
// Allowed HTML tags in the string (only <code> and <a>).
|
// Allowed HTML tags in the string (only <code> and <a>).
|
||||||
$allowed_html = array(
|
$allowed_html = array(
|
||||||
|
@ -223,10 +223,10 @@ WP_Filesystem();
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<h2><?php \esc_html_e( 'Changelog', 'activitypub-event-bridge' ); ?></h2>
|
<h2><?php \esc_html_e( 'Changelog', 'event-bridge-for-activitypub' ); ?></h2>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
$changelog = $wp_filesystem->get_contents( ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . '/CHANGELOG.md' );
|
$changelog = $wp_filesystem->get_contents( EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_DIR . '/CHANGELOG.md' );
|
||||||
echo esc_html( substr( $changelog, strpos( $changelog, "\n", 180 ) + 1 ) );
|
echo esc_html( substr( $changelog, strpos( $changelog, "\n", 180 ) + 1 ) );
|
||||||
?>
|
?>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* PHPUnit bootstrap file.
|
* PHPUnit bootstrap file.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$_tests_dir = getenv( 'WP_TESTS_DIR' );
|
$_tests_dir = getenv( 'WP_TESTS_DIR' );
|
||||||
|
@ -35,10 +35,10 @@ function _manually_load_plugin() {
|
||||||
require_once $plugin_dir . 'activitypub/activitypub.php';
|
require_once $plugin_dir . 'activitypub/activitypub.php';
|
||||||
|
|
||||||
// Capture the --filter argument.
|
// Capture the --filter argument.
|
||||||
$activitypub_event_bridge_integration_filter = null;
|
$event_bridge_for_activitypub_integration_filter = null;
|
||||||
foreach ( $_SERVER['argv'] as $arg ) {
|
foreach ( $_SERVER['argv'] as $arg ) {
|
||||||
if ( strpos( $arg, '--filter=' ) === 0 ) {
|
if ( strpos( $arg, '--filter=' ) === 0 ) {
|
||||||
$activitypub_event_bridge_integration_filter = substr( $arg, strlen( '--filter=' ) );
|
$event_bridge_for_activitypub_integration_filter = substr( $arg, strlen( '--filter=' ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ function _manually_load_plugin() {
|
||||||
|
|
||||||
$plugin_file = null;
|
$plugin_file = null;
|
||||||
// See if we want to run integration tests for a specific event-plugin.
|
// See if we want to run integration tests for a specific event-plugin.
|
||||||
switch ( $activitypub_event_bridge_integration_filter ) {
|
switch ( $event_bridge_for_activitypub_integration_filter ) {
|
||||||
case 'the_events_calendar':
|
case 'the_events_calendar':
|
||||||
$plugin_file = 'the-events-calendar/the-events-calendar.php';
|
$plugin_file = 'the-events-calendar/the-events-calendar.php';
|
||||||
break;
|
break;
|
||||||
|
@ -90,21 +90,21 @@ function _manually_load_plugin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hot fix that allows using Events Manager within unit tests, because the em_init() is later not run as admin.
|
// 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' === $event_bridge_for_activitypub_integration_filter ) {
|
||||||
require_once $plugin_dir . 'events-manager/em-install.php';
|
require_once $plugin_dir . 'events-manager/em-install.php';
|
||||||
em_create_events_table();
|
em_create_events_table();
|
||||||
em_create_events_meta_table();
|
em_create_events_meta_table();
|
||||||
em_create_locations_table();
|
em_create_locations_table();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'modern_events_calendar_lite' === $activitypub_event_bridge_integration_filter ) {
|
if ( 'modern_events_calendar_lite' === $event_bridge_for_activitypub_integration_filter ) {
|
||||||
require_once $plugin_dir . 'modern-events-calendar-lite/app/libraries/factory.php';
|
require_once $plugin_dir . 'modern-events-calendar-lite/app/libraries/factory.php';
|
||||||
$mec_factory = new MEC_factory();
|
$mec_factory = new MEC_factory();
|
||||||
$mec_factory->install();
|
$mec_factory->install();
|
||||||
}
|
}
|
||||||
|
|
||||||
// At last manually load our WordPress plugin.
|
// At last manually load our WordPress plugin.
|
||||||
require dirname( __DIR__ ) . '/activitypub-event-bridge.php';
|
require dirname( __DIR__ ) . '/event-bridge-for-activitypub.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Test class for the integration of the Event Organiser.
|
* Test class for the integration of the Event Organiser.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,7 +20,7 @@ class Test_Event_Organiser extends WP_UnitTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that ActivityPub support is enabled.
|
// Make sure that ActivityPub support is enabled.
|
||||||
$aec = \ActivityPub_Event_Bridge\Setup::get_instance();
|
$aec = \Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
$aec->activate_activitypub_support_for_active_event_plugins();
|
$aec->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
|
||||||
// Run the install script just in time which makes sure the custom tables exist and more.
|
// Run the install script just in time which makes sure the custom tables exist and more.
|
||||||
|
@ -37,7 +37,7 @@ class Test_Event_Organiser extends WP_UnitTestCase {
|
||||||
// We only test for one event plugin being active at the same time,
|
// We only test for one event plugin being active at the same time,
|
||||||
// even though we support multiple onces in theory.
|
// even though we support multiple onces in theory.
|
||||||
// But testing all combinations is beyond scope.
|
// But testing all combinations is beyond scope.
|
||||||
$active_event_plugins = \ActivityPub_Event_Bridge\Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = \Event_Bridge_For_ActivityPub\Setup::get_instance()->get_active_event_plugins();
|
||||||
$this->assertEquals( 1, count( $active_event_plugins ) );
|
$this->assertEquals( 1, count( $active_event_plugins ) );
|
||||||
|
|
||||||
// Enable ActivityPub support for the event plugin.
|
// Enable ActivityPub support for the event plugin.
|
||||||
|
@ -62,7 +62,7 @@ class Test_Event_Organiser extends WP_UnitTestCase {
|
||||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( get_post( $post_id ) );
|
$transformer = \Activitypub\Transformer\Factory::get_transformer( get_post( $post_id ) );
|
||||||
|
|
||||||
// Check that we got the right transformer.
|
// Check that we got the right transformer.
|
||||||
$this->assertInstanceOf( \ActivityPub_Event_Bridge\Activitypub\Transformer\Event_Organiser::class, $transformer );
|
$this->assertInstanceOf( \Event_Bridge_For_ActivityPub\Activitypub\Transformer\Event_Organiser::class, $transformer );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Tests for WP Event Solution.
|
* Tests for WP Event Solution.
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,7 +36,7 @@ class Test_Eventin extends WP_UnitTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
||||||
$aec = \ActivityPub_Event_Bridge\Setup::get_instance();
|
$aec = \Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
$aec->activate_activitypub_support_for_active_event_plugins();
|
$aec->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
|
||||||
// Delete all posts afterwards.
|
// Delete all posts afterwards.
|
||||||
|
@ -50,7 +50,7 @@ class Test_Eventin extends WP_UnitTestCase {
|
||||||
// We only test for one event plugin being active at the same time,
|
// We only test for one event plugin being active at the same time,
|
||||||
// even though we support multiple onces in theory.
|
// even though we support multiple onces in theory.
|
||||||
// But testing all combinations is beyond scope.
|
// But testing all combinations is beyond scope.
|
||||||
$active_event_plugins = \ActivityPub_Event_Bridge\Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = \Event_Bridge_For_ActivityPub\Setup::get_instance()->get_active_event_plugins();
|
||||||
$this->assertEquals( 1, count( $active_event_plugins ) );
|
$this->assertEquals( 1, count( $active_event_plugins ) );
|
||||||
|
|
||||||
// Enable ActivityPub support for the event plugin.
|
// Enable ActivityPub support for the event plugin.
|
||||||
|
@ -64,7 +64,7 @@ class Test_Eventin extends WP_UnitTestCase {
|
||||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( get_post( $event->id ) );
|
$transformer = \Activitypub\Transformer\Factory::get_transformer( get_post( $event->id ) );
|
||||||
|
|
||||||
// Check that we got the right transformer.
|
// Check that we got the right transformer.
|
||||||
$this->assertInstanceOf( \ActivityPub_Event_Bridge\Activitypub\Transformer\Eventin::class, $transformer );
|
$this->assertInstanceOf( \Event_Bridge_For_ActivityPub\Activitypub\Transformer\Eventin::class, $transformer );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Class SampleTest
|
* Class SampleTest
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,7 +34,7 @@ class Test_EventPrime extends WP_UnitTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
||||||
$aeb = \ActivityPub_Event_Bridge\Setup::get_instance();
|
$aeb = \Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
$aeb->activate_activitypub_support_for_active_event_plugins();
|
$aeb->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
|
||||||
// Delete all posts afterwards.
|
// Delete all posts afterwards.
|
||||||
|
@ -76,7 +76,7 @@ class Test_EventPrime extends WP_UnitTestCase {
|
||||||
// We only test for one event plugin being active at the same time,
|
// We only test for one event plugin being active at the same time,
|
||||||
// even though we support multiple onces in theory.
|
// even though we support multiple onces in theory.
|
||||||
// But testing all combinations is beyond scope.
|
// But testing all combinations is beyond scope.
|
||||||
$active_event_plugins = \ActivityPub_Event_Bridge\Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = \Event_Bridge_For_ActivityPub\Setup::get_instance()->get_active_event_plugins();
|
||||||
$this->assertEquals( 1, count( $active_event_plugins ) );
|
$this->assertEquals( 1, count( $active_event_plugins ) );
|
||||||
|
|
||||||
// Enable ActivityPub support for the event plugin.
|
// Enable ActivityPub support for the event plugin.
|
||||||
|
@ -93,7 +93,7 @@ class Test_EventPrime extends WP_UnitTestCase {
|
||||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
||||||
|
|
||||||
// Check that we got the right transformer.
|
// Check that we got the right transformer.
|
||||||
$this->assertInstanceOf( \ActivityPub_Event_Bridge\Activitypub\Transformer\EventPrime::class, $transformer );
|
$this->assertInstanceOf( \Event_Bridge_For_ActivityPub\Activitypub\Transformer\EventPrime::class, $transformer );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Class SampleTest
|
* Class SampleTest
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +23,7 @@ class Test_Events_Manager extends WP_UnitTestCase {
|
||||||
update_option( 'dbem_events_anonymous_submissions', true );
|
update_option( 'dbem_events_anonymous_submissions', true );
|
||||||
|
|
||||||
// Make sure that ActivityPub support is enabled for Events Manager.
|
// Make sure that ActivityPub support is enabled for Events Manager.
|
||||||
$aec = \ActivityPub_Event_Bridge\Setup::get_instance();
|
$aec = \Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
$aec->activate_activitypub_support_for_active_event_plugins();
|
$aec->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
|
||||||
// Delete all posts afterwards.
|
// Delete all posts afterwards.
|
||||||
|
@ -37,7 +37,7 @@ class Test_Events_Manager extends WP_UnitTestCase {
|
||||||
// We only test for one event plugin being active at the same time,
|
// We only test for one event plugin being active at the same time,
|
||||||
// even though we support multiple onces in theory.
|
// even though we support multiple onces in theory.
|
||||||
// But testing all combinations is beyond scope.
|
// But testing all combinations is beyond scope.
|
||||||
$active_event_plugins = \ActivityPub_Event_Bridge\Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = \Event_Bridge_For_ActivityPub\Setup::get_instance()->get_active_event_plugins();
|
||||||
$this->assertEquals( 1, count( $active_event_plugins ) );
|
$this->assertEquals( 1, count( $active_event_plugins ) );
|
||||||
|
|
||||||
// Enable ActivityPub support for the event plugin.
|
// Enable ActivityPub support for the event plugin.
|
||||||
|
@ -61,7 +61,7 @@ class Test_Events_Manager extends WP_UnitTestCase {
|
||||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
||||||
|
|
||||||
// Check that we got the right transformer.
|
// Check that we got the right transformer.
|
||||||
$this->assertInstanceOf( \ActivityPub_Event_Bridge\Activitypub\Transformer\Events_Manager::class, $transformer );
|
$this->assertInstanceOf( \Event_Bridge_For_ActivityPub\Activitypub\Transformer\Events_Manager::class, $transformer );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Class SampleTest
|
* Class SampleTest
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +23,7 @@ class Test_GatherPress extends WP_UnitTestCase {
|
||||||
GatherPress\Core\Setup::get_instance()->activate_gatherpress_plugin( false );
|
GatherPress\Core\Setup::get_instance()->activate_gatherpress_plugin( false );
|
||||||
|
|
||||||
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
||||||
$aec = \ActivityPub_Event_Bridge\Setup::get_instance();
|
$aec = \Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
$aec->activate_activitypub_support_for_active_event_plugins();
|
$aec->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
|
||||||
// Delete all posts afterwards.
|
// Delete all posts afterwards.
|
||||||
|
@ -37,7 +37,7 @@ class Test_GatherPress extends WP_UnitTestCase {
|
||||||
// We only test for one event plugin being active at the same time,
|
// We only test for one event plugin being active at the same time,
|
||||||
// even though we support multiple onces in theory.
|
// even though we support multiple onces in theory.
|
||||||
// But testing all combinations is beyond scope.
|
// But testing all combinations is beyond scope.
|
||||||
$active_event_plugins = \ActivityPub_Event_Bridge\Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = \Event_Bridge_For_ActivityPub\Setup::get_instance()->get_active_event_plugins();
|
||||||
$this->assertEquals( 1, count( $active_event_plugins ) );
|
$this->assertEquals( 1, count( $active_event_plugins ) );
|
||||||
|
|
||||||
// Enable ActivityPub support for the event plugin.
|
// Enable ActivityPub support for the event plugin.
|
||||||
|
@ -65,7 +65,7 @@ class Test_GatherPress extends WP_UnitTestCase {
|
||||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( $event->event );
|
$transformer = \Activitypub\Transformer\Factory::get_transformer( $event->event );
|
||||||
|
|
||||||
// Check that we got the right transformer.
|
// Check that we got the right transformer.
|
||||||
$this->assertInstanceOf( \ActivityPub_Event_Bridge\Activitypub\Transformer\GatherPress::class, $transformer );
|
$this->assertInstanceOf( \Event_Bridge_For_ActivityPub\Activitypub\Transformer\GatherPress::class, $transformer );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Tests or Modern Events Calendar Lite
|
* Tests or Modern Events Calendar Lite
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +27,7 @@ class Test_Modern_Events_Calendar_Lite extends WP_UnitTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
||||||
$aec = \ActivityPub_Event_Bridge\Setup::get_instance();
|
$aec = \Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
$aec->activate_activitypub_support_for_active_event_plugins();
|
$aec->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
|
||||||
$this->mec_main = \MEC::getInstance( 'app.libraries.main' );
|
$this->mec_main = \MEC::getInstance( 'app.libraries.main' );
|
||||||
|
@ -43,7 +43,7 @@ class Test_Modern_Events_Calendar_Lite extends WP_UnitTestCase {
|
||||||
// We only test for one event plugin being active at the same time,
|
// We only test for one event plugin being active at the same time,
|
||||||
// even though we support multiple onces in theory.
|
// even though we support multiple onces in theory.
|
||||||
// But testing all combinations is beyond scope.
|
// But testing all combinations is beyond scope.
|
||||||
$active_event_plugins = \ActivityPub_Event_Bridge\Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = \Event_Bridge_For_ActivityPub\Setup::get_instance()->get_active_event_plugins();
|
||||||
$this->assertEquals( 1, count( $active_event_plugins ) );
|
$this->assertEquals( 1, count( $active_event_plugins ) );
|
||||||
|
|
||||||
// Enable ActivityPub support for the event plugin.
|
// Enable ActivityPub support for the event plugin.
|
||||||
|
@ -74,7 +74,7 @@ class Test_Modern_Events_Calendar_Lite extends WP_UnitTestCase {
|
||||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
||||||
|
|
||||||
// Check that we got the right transformer.
|
// Check that we got the right transformer.
|
||||||
$this->assertInstanceOf( \ActivityPub_Event_Bridge\Activitypub\Transformer\Modern_Events_Calendar_Lite::class, $transformer );
|
$this->assertInstanceOf( \Event_Bridge_For_ActivityPub\Activitypub\Transformer\Modern_Events_Calendar_Lite::class, $transformer );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Class SampleTest
|
* Class SampleTest
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -62,7 +62,7 @@ class Test_The_Events_Calendar extends WP_UnitTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
||||||
$aec = \ActivityPub_Event_Bridge\Setup::get_instance();
|
$aec = \Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
$aec->activate_activitypub_support_for_active_event_plugins();
|
$aec->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
|
||||||
// Delete all posts afterwards.
|
// Delete all posts afterwards.
|
||||||
|
@ -76,7 +76,7 @@ class Test_The_Events_Calendar extends WP_UnitTestCase {
|
||||||
// We only test for one event plugin being active at the same time,
|
// We only test for one event plugin being active at the same time,
|
||||||
// even though we support multiple onces in theory.
|
// even though we support multiple onces in theory.
|
||||||
// But testing all combinations is beyond scope.
|
// But testing all combinations is beyond scope.
|
||||||
$active_event_plugins = \ActivityPub_Event_Bridge\Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = \Event_Bridge_For_ActivityPub\Setup::get_instance()->get_active_event_plugins();
|
||||||
$this->assertEquals( 1, count( $active_event_plugins ) );
|
$this->assertEquals( 1, count( $active_event_plugins ) );
|
||||||
|
|
||||||
// Enable ActivityPub support for the event plugin.
|
// Enable ActivityPub support for the event plugin.
|
||||||
|
@ -91,7 +91,7 @@ class Test_The_Events_Calendar extends WP_UnitTestCase {
|
||||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
||||||
|
|
||||||
// Check that we got the right transformer.
|
// Check that we got the right transformer.
|
||||||
$this->assertInstanceOf( \ActivityPub_Event_Bridge\Activitypub\Transformer\The_Events_Calendar::class, $transformer );
|
$this->assertInstanceOf( \Event_Bridge_For_ActivityPub\Activitypub\Transformer\The_Events_Calendar::class, $transformer );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -128,10 +128,10 @@ class Test_The_Events_Calendar extends WP_UnitTestCase {
|
||||||
$category_id_theatre = wp_insert_term( 'Theatre', Tribe__Events__Main::TAXONOMY, array( 'slug' => 'theatre' ) );
|
$category_id_theatre = wp_insert_term( 'Theatre', Tribe__Events__Main::TAXONOMY, array( 'slug' => 'theatre' ) );
|
||||||
|
|
||||||
// Set default mapping for event categories.
|
// Set default mapping for event categories.
|
||||||
update_option( 'activitypub_event_bridge_default_event_category', 'MUSIC' );
|
update_option( 'event_bridge_for_activitypub_default_event_category', 'MUSIC' );
|
||||||
|
|
||||||
// Set an override for the category with the slug theatre.
|
// Set an override for the category with the slug theatre.
|
||||||
update_option( 'activitypub_event_bridge_event_category_mappings', array( 'theatre' => 'THEATRE' ) );
|
update_option( 'event_bridge_for_activitypub_event_category_mappings', array( 'theatre' => 'THEATRE' ) );
|
||||||
|
|
||||||
// Create a The Events Calendar event with the music category.
|
// Create a The Events Calendar event with the music category.
|
||||||
$wp_object = tribe_events()
|
$wp_object = tribe_events()
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Class SampleTest
|
* Class SampleTest
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,7 +20,7 @@ class Test_VS_Event_List extends WP_UnitTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
||||||
$aec = \ActivityPub_Event_Bridge\Setup::get_instance();
|
$aec = \Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
$aec->activate_activitypub_support_for_active_event_plugins();
|
$aec->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
|
||||||
// Delete all posts afterwards.
|
// Delete all posts afterwards.
|
||||||
|
@ -34,7 +34,7 @@ class Test_VS_Event_List extends WP_UnitTestCase {
|
||||||
// We only test for one event plugin being active at the same time,
|
// We only test for one event plugin being active at the same time,
|
||||||
// even though we support multiple onces in theory.
|
// even though we support multiple onces in theory.
|
||||||
// But testing all combinations is beyond scope.
|
// But testing all combinations is beyond scope.
|
||||||
$active_event_plugins = \ActivityPub_Event_Bridge\Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = \Event_Bridge_For_ActivityPub\Setup::get_instance()->get_active_event_plugins();
|
||||||
$this->assertEquals( 1, count( $active_event_plugins ) );
|
$this->assertEquals( 1, count( $active_event_plugins ) );
|
||||||
|
|
||||||
// Enable ActivityPub support for the event plugin.
|
// Enable ActivityPub support for the event plugin.
|
||||||
|
@ -58,7 +58,7 @@ class Test_VS_Event_List extends WP_UnitTestCase {
|
||||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
||||||
|
|
||||||
// Check that we got the right transformer.
|
// Check that we got the right transformer.
|
||||||
$this->assertInstanceOf( \ActivityPub_Event_Bridge\Activitypub\Transformer\VS_Event_List::class, $transformer );
|
$this->assertInstanceOf( \Event_Bridge_For_ActivityPub\Activitypub\Transformer\VS_Event_List::class, $transformer );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -173,10 +173,10 @@ class Test_VS_Event_List extends WP_UnitTestCase {
|
||||||
$category_id_theatre = wp_insert_term( 'Theatre', 'event_cat', array( 'slug' => 'theatre' ) );
|
$category_id_theatre = wp_insert_term( 'Theatre', 'event_cat', array( 'slug' => 'theatre' ) );
|
||||||
|
|
||||||
// Set default mapping for event categories.
|
// Set default mapping for event categories.
|
||||||
update_option( 'activitypub_event_bridge_default_event_category', 'MUSIC' );
|
update_option( 'event_bridge_for_activitypub_default_event_category', 'MUSIC' );
|
||||||
|
|
||||||
// Set an override for the category with the slug theatre.
|
// Set an override for the category with the slug theatre.
|
||||||
update_option( 'activitypub_event_bridge_event_category_mappings', array( 'theatre' => 'THEATRE' ) );
|
update_option( 'event_bridge_for_activitypub_event_category_mappings', array( 'theatre' => 'THEATRE' ) );
|
||||||
|
|
||||||
// Create a VS Event List event with the music category.
|
// Create a VS Event List event with the music category.
|
||||||
$wp_post_id = wp_insert_post(
|
$wp_post_id = wp_insert_post(
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Class SampleTest
|
* Class SampleTest
|
||||||
*
|
*
|
||||||
* @package ActivityPub_Event_Bridge
|
* @package Event_Bridge_For_ActivityPub
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,7 +20,7 @@ class Test_WP_Event_Manager extends WP_UnitTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
// Make sure that ActivityPub support is enabled for The Events Calendar.
|
||||||
$aec = \ActivityPub_Event_Bridge\Setup::get_instance();
|
$aec = \Event_Bridge_For_ActivityPub\Setup::get_instance();
|
||||||
$aec->activate_activitypub_support_for_active_event_plugins();
|
$aec->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
|
||||||
// Delete all posts afterwards.
|
// Delete all posts afterwards.
|
||||||
|
@ -34,7 +34,7 @@ class Test_WP_Event_Manager extends WP_UnitTestCase {
|
||||||
// We only test for one event plugin being active at the same time,
|
// We only test for one event plugin being active at the same time,
|
||||||
// even though we support multiple onces in theory.
|
// even though we support multiple onces in theory.
|
||||||
// But testing all combinations is beyond scope.
|
// But testing all combinations is beyond scope.
|
||||||
$active_event_plugins = \ActivityPub_Event_Bridge\Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = \Event_Bridge_For_ActivityPub\Setup::get_instance()->get_active_event_plugins();
|
||||||
$this->assertEquals( 1, count( $active_event_plugins ) );
|
$this->assertEquals( 1, count( $active_event_plugins ) );
|
||||||
|
|
||||||
// Enable ActivityPub support for the event plugin.
|
// Enable ActivityPub support for the event plugin.
|
||||||
|
@ -58,7 +58,7 @@ class Test_WP_Event_Manager extends WP_UnitTestCase {
|
||||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
$transformer = \Activitypub\Transformer\Factory::get_transformer( $wp_object );
|
||||||
|
|
||||||
// Check that we got the right transformer.
|
// Check that we got the right transformer.
|
||||||
$this->assertInstanceOf( \ActivityPub_Event_Bridge\Activitypub\Transformer\WP_Event_Manager::class, $transformer );
|
$this->assertInstanceOf( \Event_Bridge_For_ActivityPub\Activitypub\Transformer\WP_Event_Manager::class, $transformer );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -134,7 +134,7 @@ class Test_WP_Event_Manager extends WP_UnitTestCase {
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
array(
|
array(
|
||||||
'type' => 'Link',
|
'type' => 'Link',
|
||||||
'name' => __( 'Video URL', 'activitypub-event-bridge' ),
|
'name' => __( 'Video URL', 'event-bridge-for-activitypub' ),
|
||||||
'href' => 'https://event-federation.eu/meeting-room',
|
'href' => 'https://event-federation.eu/meeting-room',
|
||||||
'mediaType' => 'text/html',
|
'mediaType' => 'text/html',
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue