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