- 
                Notifications
    You must be signed in to change notification settings 
- Fork 84
activitypub_inbox_shared
        github-actions[bot] edited this page Oct 23, 2025 
        ·
        1 revision
      
    ActivityPub shared inbox action.
This hook fires once per activity with all recipients. Preferred for new implementations to avoid duplication.
/**
 * ActivityPub shared inbox action.
 * 
 * This hook fires once per activity with all recipients.
 * Preferred for new implementations to avoid duplication.
 *
 * @param array                          $data 
 * @param array                          $recipients 
 * @param string                         $type 
 * @param Activitypub\Activity|\WP_Error $activity 
 * @param string                         $context 
 * @return array The filtered value.
 */
function my_activitypub_inbox_shared_callback( array $data, array $recipients, string $type, Activitypub\Activity|\WP_Error $activity, string $context ) {
    // Your code here.
    return $data;
}
add_filter( 'activitypub_inbox_shared', 'my_activitypub_inbox_shared_callback', 10, 5 );- 
array$dataThe data array.
- 
array$recipientsArray of user IDs.
- 
string$typeThe type of the activity.
- 
Activitypub\Activity|\WP_Error$activityThe Activity object.
- 
string$contextThe context of the request.
\do_action( 'activitypub_inbox_shared', $data, $allowed_recipients, $type, $activity, Inbox::CONTEXT_SHARED_INBOX )Follow @[email protected] for updates and news.