Skip to content

activitypub_files_media_markup

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

Filters the media markup for ActivityPub file-based attachments.

Allows plugins to provide custom markup for file-based 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 file-based attachments.
 * 
 * Allows plugins to provide custom markup for file-based attachments.
 * If this filter returns a non-empty string, it will be used instead of
 * the default block markup.
 *
 * @param string $markup 
 * @param array  $files 
 * @return string The filtered value.
 */
function my_activitypub_files_media_markup_callback( string $markup, array $files ) {
    // Your code here.
    return $markup;
}
add_filter( 'activitypub_files_media_markup', 'my_activitypub_files_media_markup_callback', 10, 2 );

Parameters

  • string $markup The custom markup. Default empty string.
  • array $files Array of file data arrays.

Files

\apply_filters( 'activitypub_files_media_markup', '', $files )

← All Hooks

Users

Developers

Clone this wiki locally