Repository navigation
activitypub_allowed_comment_types
github-actions[bot] edited this page Nov 3, 2026
·
3 revisions
Filters the comment types that are federated.
Remove a type to keep it local, add a custom type to federate it.
/**
* Filters the comment types that are federated.
*
* Remove a type to keep it local, add a custom type to federate it.
*
* @param Activitypub\string[] $allowed_types
* @param WP_Comment $comment
* @return Activitypub\string[] The filtered value.
*/
function my_activitypub_allowed_comment_types_callback( Activitypub\string[] $allowed_types, WP_Comment $comment ) {
// Your code here.
return $allowed_types;
}
add_filter( 'activitypub_allowed_comment_types', 'my_activitypub_allowed_comment_types_callback', 10, 2 );-
Activitypub\string[]$allowed_typesComment type slugs that are federated. -
WP_Comment$commentThe comment being processed.
\apply_filters( 'activitypub_allowed_comment_types', $allowed_types, $comment )Follow @activitypub.blog@activitypub.blog for updates and news.