Skip to content

activitypub_comment_image_limit

github-actions[bot] edited this page Oct 29, 2026 · 3 revisions

Filters the maximum number of image attachments displayed in a Fediverse comment.

Auto-generated Example

/**
 * Filters the maximum number of image attachments displayed in a Fediverse comment.
 *
 * @param int   $limit 
 * @param array $activity_object 
 * @return int The filtered value.
 */
function my_activitypub_comment_image_limit_callback( int $limit, array $activity_object ) {
    // Your code here.
    return $limit;
}
add_filter( 'activitypub_comment_image_limit', 'my_activitypub_comment_image_limit_callback', 10, 2 );

Parameters

  • int $limit Maximum number of images. Default 3. Zero disables image attachments.
  • array $activity_object The ActivityPub object.

Files

\apply_filters( 'activitypub_comment_image_limit', 3, $activity_object )

← All Hooks

Users

Developers

Clone this wiki locally