Skip to content

activitypub_attachments

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

Filter the attachments for a post.

Auto-generated Example

/**
 * Filter the attachments for a post.
 *
 * @param array   $attachments 
 * @param WP_Post $item 
 * @return array The filtered attachments.
 */
function my_activitypub_attachments_callback( array $attachments, WP_Post $item ) {
    // Your code here.
    return $attachments;
}
add_filter( 'activitypub_attachments', 'my_activitypub_attachments_callback', 10, 2 );

Parameters

  • array $attachments The attachments.
  • WP_Post $item The post object.

Returns

array The filtered attachments.

Files

\apply_filters( 'activitypub_attachments', $attachments, $this->item )

← All Hooks

Users

Developers

Clone this wiki locally