-
Notifications
You must be signed in to change notification settings - Fork 1
atmosphere_resolve_comment_mentions
github-actions[bot] edited this page Jul 7, 2026
·
1 revision
#mention facets.
Off by default: the comment body is third-party (commenter-supplied) content, and mention resolution issues live DNS + HTTPS lookups to the mentioned host, so resolving here would let an approved comment steer the server's outbound requests at an arbitrary public host. Link and hashtag facets, which never touch the network, are emitted regardless. A site that trusts its (already moderated) commenters and wants their mentions to notify can return true to opt back in.
/**
* `#mention` facets.
*
* Off by default: the comment body is third-party (commenter-supplied)
* content, and mention resolution issues live DNS + HTTPS lookups to the
* mentioned host, so resolving here would let an approved comment steer
* the server's outbound requests at an arbitrary public host. Link and
* hashtag facets, which never touch the network, are emitted regardless.
* A site that trusts its (already moderated) commenters and wants their
* mentions to notify can return true to opt back in.
*
* @param bool $resolve
* @param WP_Comment $comment
* @return bool The filtered value.
*/
function my_atmosphere_resolve_comment_mentions_callback( bool $resolve, WP_Comment $comment ) {
// Your code here.
return $resolve;
}
add_filter( 'atmosphere_resolve_comment_mentions', 'my_atmosphere_resolve_comment_mentions_callback', 10, 2 );-
bool$resolveWhether to resolve comment mentions. Default false. -
WP_Comment$commentThe comment being transformed.
\apply_filters( 'atmosphere_resolve_comment_mentions', false, $comment )