- 
                Notifications
    
You must be signed in to change notification settings  - Fork 83
 
activitypub_max_image_attachments
        github-actions[bot] edited this page Jul 29, 2025 
        ·
        20 revisions
      
    Filters the maximum number of media attachments allowed in a post.
Despite the name suggesting only images, this filter controls the maximum number of all media attachments (images, audio, and video) that can be included in an ActivityPub post. The name is maintained for backwards compatibility.
add_filter(
    'activitypub_max_image_attachments',
    function (
        int $max_media,
        WP_Comment $item
    ) {
        // Your code here
        return $max_media;
    },
    10,
    2
);- 
int$max_mediaMaximum number of media attachments. - 
WP_Comment$itemThe comment object. 
\apply_filters( 'activitypub_max_image_attachments', $max_media, $this->item )\apply_filters( 'activitypub_max_image_attachments', $max_media )Follow @[email protected] for updates and news.