Skip to content

activitypub_max_image_attachments

github-actions[bot] edited this page Jul 29, 2025 · 13 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.

Auto-generated Example

add_filter(
    'activitypub_max_image_attachments',
    function (
        int $max_media,
        WP_Comment $item
    ) {
        // Your code here
        return $max_media;
    },
    10,
    2
);

Parameters

  • int $max_media Maximum number of media attachments.
  • WP_Comment $item The comment object.

Files

\apply_filters( 'activitypub_max_image_attachments', $max_media, $this->item )
\apply_filters( 'activitypub_max_image_attachments', $max_media )

Hooks

Users

Developers

Clone this wiki locally