Skip to content

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_follow instead.

Fires after a new follower has been added.

Auto-generated Example

/**
 * 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 );

Parameters

  • string $actor The URL of the actor (follower) who initiated the follow.
  • array $activity The complete activity data of the follow request.
  • int $user_id The ID of the WordPress user being followed.
  • \WP_Post|\WP_Error $remote_actor The Actor object containing the new follower's data.

Files

\do_action_deprecated( 'activitypub_followers_post_follow', array( $activity['actor'], $activity, $user_id, $remote_actor ), '7.5.0', 'activitypub_handled_follow' )

← All Hooks

Users

Developers

Clone this wiki locally