-
Notifications
You must be signed in to change notification settings - Fork 7
mastodon_api_relationship
Alex Kirk edited this page Feb 8, 2025
·
15 revisions
Modify the account relationship.
apply_filters( 'mastodon_api_relationship', function ( $relationship, $user_id, $request ) {
$user = get_user_by( 'ID', $user_id );
$relationship = new Entity\Relationship();
$relationship->id = strval( $user->ID );
return $relationship;
}, 10, 3 );
-
array
$relationship
The account relationship. -
string
$user_id
The user ID. -
WP_REST_Request
$request
The request object.
Enable_Mastodon_Apps\Entity\Relationship
The relationship entity.
apply_filters( 'mastodon_api_relationship', null, $user_id, $request )