Skip to content

activitypub_attachment_ids

github-actions[bot] edited this page Sep 12, 2025 · 13 revisions

Filter the attachment IDs for a post.

Auto-generated Example

/**
 * Filter the attachment IDs for a post.
 *
 * @param array   $media 
 * @param WP_Post $item 
 * @return array The filtered attachment IDs.
 */
function my_activitypub_attachment_ids_callback( array $media, WP_Post $item ) {
    // Your code here.
    return $media;
}
add_filter( 'activitypub_attachment_ids', 'my_activitypub_attachment_ids_callback', 10, 2 );

Parameters

  • array $media The media array grouped by type.
  • WP_Post $item The post object.

Returns

array The filtered attachment IDs.

Files

\apply_filters( 'activitypub_attachment_ids', $media, $this->item )

← All Hooks

Users

Developers

Clone this wiki locally