Compare commits
6 commits
main
...
gatherpres
Author | SHA1 | Date | |
---|---|---|---|
a627e02354 | |||
999dce3bf2 | |||
18e17d7a45 | |||
58295f7278 | |||
73dcdfe982 | |||
d89a1cddc2 |
6 changed files with 89 additions and 6 deletions
|
@ -9,7 +9,7 @@
|
||||||
* Text Domain: activitypub-event-extensions
|
* Text Domain: activitypub-event-extensions
|
||||||
* License: AGPL-3.0-or-later
|
* License: AGPL-3.0-or-later
|
||||||
*
|
*
|
||||||
* ActivityPub tested up to: 2.0.1
|
* ActivityPub tested up to: 2.2.0
|
||||||
*
|
*
|
||||||
* @package activitypub-event-extensions
|
* @package activitypub-event-extensions
|
||||||
* @license AGPL-3.0-or-later
|
* @license AGPL-3.0-or-later
|
||||||
|
@ -55,6 +55,22 @@ add_filter(
|
||||||
3
|
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';
|
// require_once __DIR__ . '/admin/class-admin-notices.php';
|
||||||
// new \Admin_Notices();
|
// new \Admin_Notices();
|
||||||
|
|
||||||
|
|
41
composer.json
Normal file
41
composer.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?php
|
||||||
|
// Handling Event Joins
|
24
includes/activitypub/transformer/class-gatherpress.php
Normal file
24
includes/activitypub/transformer/class-gatherpress.php
Normal 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 {
|
||||||
|
|
||||||
|
}
|
|
@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly.
|
exit; // Exit if accessed directly.
|
||||||
}
|
}
|
||||||
|
|
||||||
use Activitypub\Activity\Event;
|
use Activitypub\Activity\Extended_Object\Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ActivityPub Tribe Transformer
|
* ActivityPub Tribe Transformer
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
=== ActivityPub Event Extensions ===
|
=== ActivityPub Event Extensions ===
|
||||||
Contributors: menrath
|
Contributors: menrath
|
||||||
Tags: events, fediverse, activitypub, activitystream
|
Tags: events, fediverse, activitypub, activitystream
|
||||||
Requires at least: 6.4
|
Requires at least: 5.5
|
||||||
Tested up to: 6.4
|
Tested up to: 6.4
|
||||||
Stable tag: 1.0.0
|
Stable tag: 1.0.0
|
||||||
Requires PHP: 5.6
|
Requires PHP: 7.4
|
||||||
License: AGPL-3.0-or-later
|
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
|
The ActivityPub Event Extensions
|
||||||
|
|
||||||
== Description ==
|
== Description ==
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|
Loading…
Reference in a new issue