Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Admin bar: do not count interactions on posts from folks you follow in the comment bubble of the admin bar.
11 changes: 6 additions & 5 deletions includes/class-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,12 @@ public static function comment_query( $query ) {
return;
}

// Do only exclude interactions of `ap_post` post type.
if ( \is_admin() ) {
$query->query_vars['post_type'] = array_diff( \get_post_types_by_support( 'comments' ), self::hide_for() );
return;
}
/*
* Exclude interactions of `ap_post` post type from all comment queries
* (except ActivityPub and REST requests), so they are not shown in
* standard comment listings (including admin screens and frontend).
*/
$query->query_vars['post_type'] = array_diff( \get_post_types_by_support( 'comments' ), self::hide_for() );
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will cause the existing test test_ap_post_comments_shown_on_frontend to fail. The test expects ap_post comments to be visible on the frontend, but with this change, ap_post comments will now be excluded from all comment queries (except ActivityPub and REST requests), including frontend queries.

If the intent is to hide ap_post comments on the frontend as well, the test needs to be updated or removed. However, if ap_post comments should still be visible on the frontend, then this logic change needs to be reconsidered or additional conditional logic needs to be added.

Copilot uses AI. Check for mistakes.

// Do not exclude likes and reposts on non-singular pages.
if ( ! \is_singular() ) {
Expand Down
Loading