Skip to content

activitypub_attachments_media_markup

github-actions[bot] edited this page Oct 29, 2025 · 2 revisions

Filters the media markup for ActivityPub attachments.

Allows plugins to provide custom markup for attachments. If this filter returns a non-empty string, it will be used instead of the default block markup.

Auto-generated Example

/**
 * Filters the media markup for ActivityPub attachments.
 * 
 * Allows plugins to provide custom markup for attachments.
 * If this filter returns a non-empty string, it will be used instead of
 * the default block markup.
 *
 * @param string            $markup 
 * @param Activitypub\int[] $attachment_ids 
 * @return string The filtered value.
 */
function my_activitypub_attachments_media_markup_callback( string $markup, Activitypub\int[] $attachment_ids ) {
    // Your code here.
    return $markup;
}
add_filter( 'activitypub_attachments_media_markup', 'my_activitypub_attachments_media_markup_callback', 10, 2 );

Parameters

  • string $markup The custom markup. Default empty string.
  • Activitypub\int[] $attachment_ids Array of attachment IDs.

Files

\apply_filters( 'activitypub_attachments_media_markup', '', $attachment_ids )

← All Hooks

Users

Developers

Clone this wiki locally