-
Notifications
You must be signed in to change notification settings - Fork 80
activitypub_add_to_outbox_failed
github-actions[bot] edited this page Sep 12, 2025
·
15 revisions
Action triggered when adding an object to the outbox fails.
/**
* Action triggered when adding an object to the outbox fails.
*
* @param WP_Error $activity
* @param Activitypub\mixed $data
* @param string $activity_type
* @param int $user_id
* @param string $content_visibility
* @return WP_Error The filtered value.
*/
function my_activitypub_add_to_outbox_failed_callback( WP_Error $activity, Activitypub\mixed $data, string $activity_type = null, int $user_id, string $content_visibility ) {
// Your code here.
return $activity;
}
add_filter( 'activitypub_add_to_outbox_failed', 'my_activitypub_add_to_outbox_failed_callback', 10, 5 );
-
WP_Error
$activity
The error object or false. -
Activitypub\mixed
$data
The object that failed to be added to the outbox. -
string|null
$activity_type
The type of the Activity or null if$data
is an Activity. -
int
$user_id
The User ID. -
string
$content_visibility
The visibility of the content. Seeconstants.php
for possible values:ACTIVITYPUB_CONTENT_VISIBILITY_*
.
\do_action( 'activitypub_add_to_outbox_failed', $activity, $data, $activity_type, $user_id, $content_visibility )
\do_action( 'activitypub_add_to_outbox_failed', $outbox_activity_id, $data, $activity_type, $user_id, $content_visibility )
Follow @[email protected] for updates and news.