updated plugin Event Bridge for ActivityPub version 1.3.0

This commit is contained in:
2026-06-03 21:28:57 +00:00
committed by Gitium
parent 1f3438440f
commit f2d6714572
84 changed files with 1721 additions and 1361 deletions

View File

@ -13,10 +13,11 @@
namespace Event_Bridge_For_ActivityPub\Integrations;
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
\defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
use Event_Bridge_For_ActivityPub\ActivityPub\Transformer\Event\GatherPress as GatherPress_Transformer;
use Event_Bridge_For_ActivityPub\ActivityPub\Transmogrifier\GatherPress as GatherPress_Transmogrifier;
use WP_Post;
/**
* GatherPress.
@ -66,10 +67,10 @@ final class GatherPress extends Event_Plugin_Integration implements Feature_Even
/**
* Returns the ActivityPub transformer for a GatherPress event post.
*
* @param \WP_Post $post The WordPress post object of the Event.
* @param WP_Post $post The WordPress post object of the Event.
* @return GatherPress_Transformer
*/
public static function get_activitypub_event_transformer( $post ): GatherPress_Transformer {
public static function get_activitypub_event_transformer( WP_Post $post ): GatherPress_Transformer {
return new GatherPress_Transformer( $post, self::get_event_category_taxonomy() );
}
@ -80,6 +81,15 @@ final class GatherPress extends Event_Plugin_Integration implements Feature_Even
return GatherPress_Transmogrifier::class;
}
/**
* GatherPress uses a taxonomy to store venues.
*
* @return string
*/
public static function get_place_taxonomy() {
return '_gatherpress_venue';
}
/**
* Get a list of Post IDs of events that have ended.
*
@ -87,11 +97,12 @@ final class GatherPress extends Event_Plugin_Integration implements Feature_Even
*
* @return array
*/
public static function get_cached_remote_events( $ends_before_time ): array {
public static function get_cached_remote_events( int $ends_before_time ): array {
global $wpdb;
$ends_before_time_string = gmdate( 'Y-m-d H:i:s', $ends_before_time );
// phpcs:disable WordPress.DB.DirectDatabaseQuery
$results = $wpdb->get_results(
$wpdb->prepare(
"SELECT DISTINCT {$wpdb->prefix}posts.ID