-
Notifications
You must be signed in to change notification settings - Fork 84
activitypub_max_image_attachments
github-actions[bot] edited this page Sep 15, 2025
·
20 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_mediaMaximum number of media attachments. -
WP_Comment$itemThe 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.