Skip to content

Commit 0976a01

Browse files
authored
Missed to add a param! (#1952)
1 parent e581cf5 commit 0976a01

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

includes/collection/class-followers.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ public static function add_follower( $user_id, $actor ) {
7373
* @return bool True on success, false on failure.
7474
*/
7575
public static function remove( $post_id, $user_id ) {
76-
$remote_actor = \get_post( $post_id );
76+
$post = \get_post( $post_id );
7777

78-
if ( ! $remote_actor ) {
78+
if ( ! $post ) {
7979
return false;
8080
}
8181

@@ -84,10 +84,11 @@ public static function remove( $post_id, $user_id ) {
8484
/**
8585
* Fires before a Follower is removed.
8686
*
87-
* @param \WP_Post $remote_actor The remote Actor object.
88-
* @param int $user_id The ID of the WordPress User.
87+
* @param \WP_Post $post The remote Actor object.
88+
* @param int $user_id The ID of the WordPress User.
89+
* @param \Activitypub\Actors\Actor $actor The Actor object.
8990
*/
90-
\do_action( 'activitypub_followers_pre_remove_follower', $remote_actor, $user_id );
91+
\do_action( 'activitypub_followers_pre_remove_follower', $post, $user_id, Actors::get_actor( $post ) );
9192

9293
return \delete_post_meta( $post_id, self::FOLLOWER_META_KEY, $user_id );
9394
}

0 commit comments

Comments
 (0)