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

@ -12,11 +12,12 @@ namespace Event_Bridge_For_ActivityPub\Integrations;
use Event_Bridge_For_ActivityPub\ActivityPub\Transformer\Event\EventPrime as EventPrime_Event_Transformer;
use Event_Bridge_For_ActivityPub\ActivityPub\Transformer\Place\EventPrime as EventPrime_Place_Transformer;
use Eventprime_Basic_Functions;
use WP_Post;
use function Activitypub\is_activitypub_request;
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
\defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
/**
* This class defines which information is necessary for the EventPrime event plugin.
@ -72,10 +73,10 @@ final class EventPrime extends Event_Plugin_Integration {
/**
* Returns the ActivityPub transformer.
*
* @param \WP_Post $post The WordPress post object of the Event.
* @param WP_Post $post The WordPress post object of the Event.
* @return EventPrime_Event_Transformer
*/
public static function get_activitypub_event_transformer( $post ): EventPrime_Event_Transformer {
public static function get_activitypub_event_transformer( WP_Post $post ): EventPrime_Event_Transformer {
return new EventPrime_Event_Transformer( $post, self::get_event_category_taxonomy() );
}
@ -150,7 +151,7 @@ final class EventPrime extends Event_Plugin_Integration {
* @return bool|int The post ID, or term ID if found, false otherwise.
*/
private static function get_object_id( $type = 'event' ) {
if ( ! in_array( $type, array( 'venue', 'event' ), true ) ) {
if ( ! \in_array( $type, array( 'venue', 'event' ), true ) ) {
return false;
}