-
Notifications
You must be signed in to change notification settings - Fork 85
activitypub_excluded_comment_types
github-actions[bot] edited this page Feb 13, 2026
·
1 revision
Filters the comment types excluded from the comment count.
Runs at priority 5 on pre_wp_update_comment_count_now so that
a single query can exclude types from multiple plugins. Other
plugins can hook here to add their own comment types.
/**
* Filters the comment types excluded from the comment count.
*
* Runs at priority 5 on `pre_wp_update_comment_count_now` so that
* a single query can exclude types from multiple plugins. Other
* plugins can hook here to add their own comment types.
*
* @param Activitypub\string[] $excluded_types
* @param int $post_id
* @return Activitypub\string[] The filtered value.
*/
function my_activitypub_excluded_comment_types_callback( Activitypub\string[] $excluded_types, int $post_id ) {
// Your code here.
return $excluded_types;
}
add_filter( 'activitypub_excluded_comment_types', 'my_activitypub_excluded_comment_types_callback', 10, 2 );-
Activitypub\string[]$excluded_typesThe comment type slugs to exclude. -
int$post_idThe post ID.
\apply_filters( 'activitypub_excluded_comment_types', $excluded_types, $post_id )Follow @activitypub.blog@activitypub.blog for updates and news.