Skip to content

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.

Auto-generated Example

/**
 * 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 );

Parameters

  • Activitypub\string[] $excluded_types The comment type slugs to exclude.
  • int $post_id The post ID.

Files

\apply_filters( 'activitypub_excluded_comment_types', $excluded_types, $post_id )

← All Hooks

Users

Developers

Clone this wiki locally