Fire an action before a follower is removed (#937)

This commit is contained in:
Alex Kirk 2024-10-11 13:40:39 +02:00 committed by GitHub
parent 4fae81792b
commit 17f99cd36a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,6 +80,15 @@ class Followers {
return false; return false;
} }
/**
* Fires before a Follower is removed.
*
* @param \Activitypub\Model\Follower $follower The Follower object.
* @param int $user_id The ID of the WordPress User.
* @param string $actor The Actor URL.
*/
do_action( 'activitypub_followers_pre_remove_follower', $follower, $user_id, $actor );
return delete_post_meta( $follower->get__id(), 'activitypub_user_id', $user_id ); return delete_post_meta( $follower->get__id(), 'activitypub_user_id', $user_id );
} }