-
Notifications
You must be signed in to change notification settings - Fork 83
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.
/**
* 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 );-
string$markupThe custom markup. Default empty string. -
array$filesArray of file data arrays.
\apply_filters( 'activitypub_files_media_markup', '', $files )Follow @[email protected] for updates and news.