-
Notifications
You must be signed in to change notification settings - Fork 6
mastodon_api_media_attachment
Alex Kirk edited this page Nov 25, 2024
·
12 revisions
Filters the media attachment returned by the API.
add_filter(
'mastodon_api_media_attachment',
function (
array $media_attachment,
int $attachment_id
) {
// Your code here
return $media_attachment;
},
10,
2
);
-
array
$media_attachment
The media attachment. -
int
$attachment_id
The attachment ID.
Enable_Mastodon_Apps\Entity\Media_Attachment
The media attachment.
apply_filters( 'mastodon_api_media_attachment', null, $media_id )
apply_filters( 'mastodon_api_media_attachment', null, $attachment_id )