-
Notifications
You must be signed in to change notification settings - Fork 83
activitypub_extract_mentions
github-actions[bot] edited this page Jul 25, 2025
·
26 revisions
Filter the mentions in the post content.
add_filter(
'activitypub_extract_mentions',
function (
array $mentions,
string $content,
WP_Post $post
) {
// Your code here
return $mentions;
},
10,
3
);-
array$mentionsThe mentions. -
string$contentThe post content. -
WP_Post$postThe post object.
array The filtered mentions.
apply_filters(
'activitypub_extract_mentions',
array(),
$content,
$this->item
)apply_filters( 'activitypub_extract_mentions', array(), $this->item->comment_content, $this->item )apply_filters(
'activitypub_extract_mentions',
array(),
$this->item->post_content . ' ' . $this->item->post_excerpt,
$this->item
)apply_filters(
'activitypub_extract_mentions',
array(),
$this->item->get_content() . ' ' . $this->item->get_summary(),
$this->item
)Follow @[email protected] for updates and news.