-
Notifications
You must be signed in to change notification settings - Fork 80
activitypub_comment_attachments
github-actions[bot] edited this page Aug 18, 2025
·
8 revisions
Filter the attachments for a comment.
/**
* Filter the attachments for a comment.
*
* @param array $attachments
* @param WP_Comment $item
* @return array The filtered attachments.
*/
function my_activitypub_comment_attachments_callback( array $attachments, WP_Comment $item ) {
// Your code here.
return $attachments;
}
add_filter( 'activitypub_comment_attachments', 'my_activitypub_comment_attachments_callback', 10, 2 );
-
array
$attachments
The attachments. -
WP_Comment
$item
The comment object.
array
The filtered attachments.
\apply_filters( 'activitypub_comment_attachments', $attachments, $this->item )
Follow @[email protected] for updates and news.