Skip to content

mastodon_api_account_following

github-actions[bot] edited this page Apr 14, 2026 · 12 revisions

Modify the account following.

Example

add_filter( 'mastodon_api_account_following', function ( $following, $user_id, $request ) {
   $account     = new Entity\Account();
   $account->id = $user_id;

   $following[] = $account;

   return $following;
}, 10, 3 );

Parameters

  • Enable_Mastodon_Apps\Entity\Account[] $following The account following.
  • string $user_id The user ID.
  • WP_REST_Request $request The request object.

Returns

Enable_Mastodon_Apps\Entity\Account[] The modified account following.

Files

\apply_filters( 'mastodon_api_account_following', array(), $user_id, $request )

Hooks

Clone this wiki locally