Skip to content

mastodon_api_media_attachment

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

Filters the media attachment returned by the API.

Auto-generated Example

add_filter(
    'mastodon_api_media_attachment',
    function (
        array $media_attachment,
        int $attachment_id
    ) {
        // Your code here
        return $media_attachment;
    },
    10,
    2
);

Parameters

  • array $media_attachment The media attachment.
  • int $attachment_id The attachment ID.

Returns

Enable_Mastodon_Apps\Entity\Media_Attachment The media attachment.

Files

apply_filters( 'mastodon_api_media_attachment', null, $media_id )
apply_filters( 'mastodon_api_media_attachment', null, $attachment_id )

Hooks

Clone this wiki locally