Skip to content

mastodon_api_tag

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

Modify the tag data returned for /api/v1/tags/:name requests.

Auto-generated Example

add_filter(
    'mastodon_api_tag',
    function (
        Enable_Mastodon_Apps\Entity\Tag $tag = null,
        WP_REST_Request $request
    ) {
        // Your code here
        return $tag;
    },
    10,
    2
);

Parameters

  • Enable_Mastodon_Apps\Entity\Tag|null $tag The tag data.
  • WP_REST_Request $request The request object.

Returns

Enable_Mastodon_Apps\Entity\Tag The tag data.

Files

\apply_filters( 'mastodon_api_tag', null, $request )

Hooks

Clone this wiki locally