-
Notifications
You must be signed in to change notification settings - Fork 83
activitypub_inbox_{$type}
github-actions[bot] edited this page Nov 14, 2025
·
1 revision
ActivityPub inbox action for specific activity types.
/**
* ActivityPub inbox action for specific activity types.
*
* @param array $data
* @param int $user_id
* @param Activitypub\Activity|\WP_Error $activity
* @param string $context
*/
function my_activitypub_inbox_{$type}_callback( array $data = null, int $user_id = null, Activitypub\Activity|\WP_Error $activity = null, string $context = null ) {
// Your code here.
}
add_action( 'activitypub_inbox_*', 'my_activitypub_inbox_{$type}_callback' );-
array$dataThe data array. -
int$user_idThe user ID. -
Activitypub\Activity|\WP_Error$activityThe Activity object. -
string$contextThe context of the request (shared_inbox when called from shared inbox endpoint).
\do_action( 'activitypub_inbox_' . $type, $data, $user_id, $activity, Inbox::CONTEXT_INBOX )\do_action( 'activitypub_inbox_' . $type, $data, $user_id, $activity, Inbox::CONTEXT_SHARED_INBOX )Follow @[email protected] for updates and news.