Skip to content

mastodon_api_instance_peers

Alex Kirk edited this page Nov 25, 2024 · 11 revisions

Modify the instance peers returned for /api/instance/peers requests.

Example

add_filter( 'mastodon_api_instance_peers', function( $peers ) {
    $peers[] = 'https://example.com';

    return $peers;
} );

Parameters

  • array $peers The instance peers.

Returns

array The modified instance peers.

Files

apply_filters( 'mastodon_api_instance_peers', $peers )

Hooks

Clone this wiki locally