Skip to content

mastodon_api_account_followers

Alex Kirk edited this page Feb 8, 2025 · 16 revisions

Modify the account followers.

Example

apply_filters( 'mastodon_api_account_followers', function ( $followers, $user_id, $request ) {
   $account     = new Entity\Account();
   $account->id = $user_id

   $followers[] = $account;

   return $followers;
} );

## Parameters

- *`array`* `$followers` The account followers.
- *`string`* `$user_id` The user ID.
- *`WP_REST_Request`* `$request` The request object.

## Returns

`array` The modified account followers.

## Files

- [includes/class-mastodon-api.php:2483](https://github.com/akirk/enable-mastodon-apps/blob/main/includes/class-mastodon-api.php#L2483)
```php
\apply_filters( 'mastodon_api_account_followers', array(), $user_id, $request )

Hooks

Clone this wiki locally