Skip to content

activitypub_attachments

github-actions[bot] edited this page Jul 29, 2025 · 13 revisions

Filter the attachments for a post.

Auto-generated Example

add_filter(
    'activitypub_attachments',
    function (
        array $attachments,
        WP_Post $item
    ) {
        // Your code here
        return $attachments;
    },
    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 )

Hooks

Users

Developers

Clone this wiki locally