Skip to content

activitypub_attachment

github-actions[bot] edited this page Aug 18, 2025 · 10 revisions

Filter the attachment for a post.

Auto-generated Example

/**
 * Filter the attachment for a post.
 *
 * @param array $attachment 
 * @param int   $id 
 * @return array The filtered attachment.
 */
function my_activitypub_attachment_callback( array $attachment, int $id ) {
    // Your code here.
    return $attachment;
}
add_filter( 'activitypub_attachment', 'my_activitypub_attachment_callback', 10, 2 );

Parameters

  • array $attachment The attachment.
  • int $id The attachment ID.

Returns

array The filtered attachment.

Files

\apply_filters( 'activitypub_attachment', $attachment, $id )

← All Hooks

Users

Developers

Clone this wiki locally