-
Notifications
You must be signed in to change notification settings - Fork 84
activitypub_followers_post_follow
github-actions[bot] edited this page Nov 14, 2025
·
10 revisions
DEPRECATED This hook was deprecated in version 7.5.0. Use
activitypub_handled_followinstead.
Fires after a new follower has been added.
/**
* Fires after a new follower has been added.
*
* @param string $actor
* @param array $activity
* @param int $user_id
* @param mixed $\WP_Post|\WP_Error
*/
function my_activitypub_followers_post_follow_callback( string $actor, array $activity, int $user_id, \WP_Post|\WP_Error ) {
// Your code here.
}
add_action( 'activitypub_followers_post_follow', 'my_activitypub_followers_post_follow_callback', 10, 4 );-
string$actorThe URL of the actor (follower) who initiated the follow. -
array$activityThe complete activity data of the follow request. -
int$user_idThe ID of the WordPress user being followed. -
\WP_Post|\WP_Error$remote_actor The Actor object containing the new follower's data.
\do_action_deprecated( 'activitypub_followers_post_follow', array( $activity['actor'], $activity, $user_id, $remote_actor ), '7.5.0', 'activitypub_handled_follow' )Follow @activitypub.blog@activitypub.blog for updates and news.