updated plugin ActivityPub version 3.3.3

This commit is contained in:
2024-10-09 12:44:17 +00:00
committed by Gitium
parent fb4b27bbc6
commit c54fa007bd
106 changed files with 7070 additions and 2918 deletions

View File

@ -1,4 +1,9 @@
<?php
/**
* Notification file.
*
* @package Activitypub
*/
namespace Activitypub;
@ -37,15 +42,15 @@ class Notification {
/**
* Notification constructor.
*
* @param string $type The type of the notification.
* @param string $actor The actor URL.
* @param array $object The Activity object.
* @param int $target The WordPress User-Id.
* @param string $type The type of the notification.
* @param string $actor The actor URL.
* @param array $activity The Activity object.
* @param int $target The WordPress User-Id.
*/
public function __construct( $type, $actor, $object, $target ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.objectFound
$this->type = $type;
$this->actor = $actor;
$this->object = $object;
public function __construct( $type, $actor, $activity, $target ) {
$this->type = $type;
$this->actor = $actor;
$this->object = $activity;
$this->target = $target;
}
@ -53,6 +58,9 @@ class Notification {
* Send the notification.
*/
public function send() {
$type = \strtolower( $this->type );
do_action( 'activitypub_notification', $this );
do_action( "activitypub_notification_{$type}", $this );
}
}