Compare commits

...

6 commits

6 changed files with 89 additions and 6 deletions

View file

@ -9,7 +9,7 @@
* Text Domain: activitypub-event-extensions
* License: AGPL-3.0-or-later
*
* ActivityPub tested up to: 2.0.1
* ActivityPub tested up to: 2.2.0
*
* @package activitypub-event-extensions
* @license AGPL-3.0-or-later
@ -55,6 +55,22 @@ add_filter(
3
);
/**
* Activate the plugin.
*/
function activitypub_event_extensions_activate() {
// Don't allow plugin activation, when the ActivityPub plugin is not activated yet.
if( ! class_exists( 'ActivtiyPub' ) ) {
deactivate_plugins( plugin_basename( __FILE__ ) );
wp_die( __( 'Please install and Activate ActivityPub.', 'activitypub-event-extensions' ), 'Plugin dependency check', array( 'back_link' => true ) );
}
}
register_activation_hook( __FILE__, 'activitypub_event_extensions_activate' );
// TODO:
// require_once __DIR__ . '/admin/class-admin-notices.php';
// new \Admin_Notices();

41
composer.json Normal file
View file

@ -0,0 +1,41 @@
{
"name": "menrath/wordpress-activitypub-event-extensions",
"description": "The ActivityPub Event Extensions help for event custom post types to federate properly.",
"type": "wordpress-plugin",
"require": {
"php": ">=5.6.0",
"composer/installers": "^1.0 || ^2.0"
},
"require-dev": {
"phpcompatibility/php-compatibility": "*",
"phpcompatibility/phpcompatibility-wp": "*",
"squizlabs/php_codesniffer": "3.*",
"wp-coding-standards/wpcs": "dev-develop",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
"sirbrillig/phpcs-variable-analysis": "^2.11"
},
"config": {
"allow-plugins": true
},
"allow-plugins": {
"composer/installers": true
},
"license": "AGPL",
"authors": [
{
"name": "André Menrath",
"email": "andre.menrath@event-federation.eu"
}
],
"extra": {
"installer-name": "activitypub-event-extensions"
},
"scripts": {
"lint": [
"vendor/bin/phpcs -n -q"
],
"lint:fix": [
"vendor/bin/phpcbf"
]
}
}

View file

@ -0,0 +1,2 @@
<?php
// Handling Event Joins

View file

@ -0,0 +1,24 @@
<?php
/**
* ActivityPub GatherPress Event Transformer
*
* @package activity-event-transformers
* @license AGPL-3.0-or-later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
use Activitypub\Transformer\Post;
use Activitypub\Activity\Extended_Object\Event;
use Activitypub\Activity\Extended_Object\Place;
/**
* ActivityPub GatherPress Event Transformer
*
* @since 1.0.0
*/
class Gatherpress extends Post {
}

View file

@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
use Activitypub\Activity\Event;
use Activitypub\Activity\Extended_Object\Event;
/**
* ActivityPub Tribe Transformer

View file

@ -1,15 +1,15 @@
=== ActivityPub Event Extensions ===
Contributors: menrath
Tags: events, fediverse, activitypub, activitystream
Requires at least: 6.4
Requires at least: 5.5
Tested up to: 6.4
Stable tag: 1.0.0
Requires PHP: 5.6
Requires PHP: 7.4
License: AGPL-3.0-or-later
License URI: http://opensource.org/licenses/MIT
License URI: https://www.gngnuu.org/licenses/agpl-3.0.html
The ActivityPub Event Extensions
== Description ==
TODO