-
Notifications
You must be signed in to change notification settings - Fork 80
activitypub_max_image_attachments
github-actions[bot] edited this page Aug 18, 2025
·
10 revisions
Filters the maximum number of media attachments allowed in a comment.
/**
* Filters the maximum number of media attachments allowed in a comment.
*
* @param int $max_media
* @param WP_Comment $item
* @return int The filtered value.
*/
function my_activitypub_max_image_attachments_callback( int $max_media, WP_Comment $item = null ) {
// Your code here.
return $max_media;
}
add_filter( 'activitypub_max_image_attachments', 'my_activitypub_max_image_attachments_callback' );
-
int
$max_media
Maximum number of media attachments. -
WP_Comment
$item
The comment object.
\apply_filters( 'activitypub_max_image_attachments', $max_media )
\apply_filters( 'activitypub_max_image_attachments', $max_media, $this->item )
Follow @[email protected] for updates and news.