Skip to content

Comments: Add filter for comment types excluded from queries by default - #12310

Open
adamsilverstein wants to merge 47 commits into
WordPress:trunkfrom
adamsilverstein:feature/65537-excluded-comment-types-filter
Open

adamsilverstein wants to merge 47 commits into
WordPress:trunkfrom
adamsilverstein:feature/65537-excluded-comment-types-filter

Conversation

@adamsilverstein

@adamsilverstein adamsilverstein commented Jun 24, 2026 •

Copy link
Copy Markdown
Member

Stack: Custom Comment Types (#35214)

PR Change Builds on
#12311 register_comment_type() registration API trunk
#51 REST /wp/v2/comment-types endpoint #12311
#52 Capabilities object (advisory) #12311
#55 Enforce type capabilities in map_meta_cap() adamsilverstein#52
#56 Type-aware REST moderation adamsilverstein#55
#57 Type-aware admin comment dimming adamsilverstein#56
#53 render_callback display callback #12311
#54 is_ping ping grouping adamsilverstein#53
👉 #12310 default_excluded_comment_types filter (this PR) trunk
#58 wp_update_comment_counts() recount helper #12310

#12311 and #12310 are on WordPress/wordpress-develop; the rest are fork PRs targeting their parent branch and will retarget to trunk as their base lands.

I asked Claude to tighten up this description, here it is:

Comments: Add a filter for the comment types excluded from queries by default.

What

Adds a default_excluded_comment_types filter, read through a new wp_get_default_excluded_comment_types() accessor, so plugins can keep their own comment types out of standard comment lists, counts and feeds the same way core already does for note and reaction.

Fixes https://core.trac.wordpress.org/ticket/65537

Why

Core hides notes and reactions everywhere by hard-coding array( 'note', 'reaction' ) in a handful of places. A plugin with its own private comment type has no hook for that, so it has to rewrite the SQL through comments_clauses in every context and re-check it every release. The Alpaca issue tracker plugin keeps a whole library just for this: https://github.com/rareview/alpaca-issue-tracker/blob/main/lib/private-comments.php

This is a small, standalone step toward custom comment types (https://core.trac.wordpress.org/ticket/35214). Once the registry from #12311 lands, registering a type with 'internal' => true is enough and the filter is left for exceptions.

add_filter( 'default_excluded_comment_types', function ( $types ) {
	$types[] = 'my_private_type';
	return $types;
} );

How

  • wp_get_default_excluded_comment_types() in wp-includes/comment.php starts from note, reaction and any type registered as internal (behind a function_exists() guard, so this PR lands on its own), applies the filter, and normalizes the result: strings only, no empties or duplicates, and the WP_Comment_Query aliases (all, comment, comments, pings) stripped.
  • wp_get_excluded_comment_types_clause() builds a prepared AND comment_type NOT IN (...) condition (column quoted with %i) for the queries that don't go through WP_Comment_Query.
  • Every place that excluded notes now reads the same set:
    • WP_Comment_Query::get_comment_ids() - an excluded type is still returned when requested by name, via type__in, an alias, or 'all'.
    • WP_Comment_Query::get_comments() - the resolved set is part of the cache key, so a persistent object cache doesn't serve results from before the set changed.
    • The three comment feed queries in WP_Query.
    • wp_update_comment_count_now(), get_pending_comments_num() and get_lastcommentmodified().
    • WP_Comments_List_Table - the requested type is kept, so a plugin can list its own excluded type via admin_comment_types_dropdown. Notes and reactions still can't be requested there.
    • get_page_of_comment() - with 'type' => 'all' it now leaves out the excluded types, so a comment's permalink points at the page it actually renders on. Before this, two notes ahead of a comment could push its cpage to the wrong page.

Excluding a type is a default-visibility setting, not access control. Over REST it only changes the default collection, and excluded types can still be queried explicitly.

Backward compatibility

With no filter the set is note and reaction, the same as trunk, so nothing changes for sites that don't use it. The one behavior change is the get_page_of_comment() fix above.

Stored comment_count values and the counts cache only refresh when a comment changes, so a plugin that starts excluding a type that already has comments should call wp_update_comment_count_now() for the affected posts on activation and deactivation. The filter docblock says so.

Testing

Test in Playground: https://playground.wordpress.net/wordpress.html?pr=12310

Automated:

vendor/bin/phpunit --group comment
vendor/bin/phpunit --group feeds
vendor/bin/phpunit --group query
vendor/bin/phpunit --group admin --filter Tests_Admin_wpCommentsListTable
vendor/bin/phpunit --group restapi --filter WP_Test_REST_Comments_Controller

One test is skipped until register_comment_type() lands, since it needs the registry.

Manual:

  1. Add the filter snippet above in an mu-plugin.
  2. wp comment create --comment_post_ID=1 --comment_type=my_private_type --comment_approved=1
  3. Check that the comment doesn't show on the post, in /comments/feed/, in Comments > All, or in the post's comment count (run wp eval 'wp_update_comment_count_now( 1 );' first).
  4. Visit wp-admin/edit-comments.php?comment_type=my_private_type and check that it is listed there.
  5. Remove the filter, recount, and check the comment comes back.

Out of scope / follow-ups

  • No registration object, labels, capabilities or admin UI - that is the rest of #35214.
  • The REST controller's notes-specific permission checks still name note and reaction directly. Those are about permissions, not default visibility, and are handled in the capability PRs.
  • A helper to recount posts after the excluded set changes is in the follow-up wp_update_comment_counts() PR.

Test in WordPress Playground

Trac ticket: https://core.trac.wordpress.org/ticket/35214, https://core.trac.wordpress.org/ticket/65537

AI Use

Claude Code drafted the code and this description, and I steered. I will review and test.

WP_Comment_Query hard-codes the exclusion of the 'note' comment type
(introduced in 6.9) with no extension point. Plugins that add their own
"private" comment types must instead rewrite query SQL through
comments_clauses in every context and re-verify it on each release.

Introduce a default_excluded_comment_types filter so extenders can
contribute additional comment types to the default-excluded set,
generalizing the existing 'note' handling. The default value of
array( 'note' ) preserves current behavior exactly.

See #65537.
@github-actions

github-actions Bot commented Jun 24, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props adamsilverstein, swissspidy, pfefferle, peterwilsoncc.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@github-actions

Copy link
Copy Markdown

Hi there! 👋

Thank you for your contribution to WordPress! 💖

It looks like this is your first pull request to wordpress-develop. Here are a few things to be aware of that may help you out!

No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description.

Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making.

More information about how GitHub pull requests can be used to contribute to WordPress can be found in the Core Handbook.

Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook.

If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook.

The Developer Hub also documents the various coding standards that are followed:

Thank you,
The WordPress Project

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Comment thread tests/phpunit/tests/comment/query.php Resolved
Comment thread tests/phpunit/tests/comment/query.php Resolved
…cess control.

The filter docblock described excluded types as "private", which could
be read as a security boundary. The exclusion only governs default
visibility; excluded types remain retrievable via explicit 'type' or
'all' requests, so document that callers must enforce capability checks
wherever comment data is displayed or exposed.
wp_update_comment_count_now() recalculated a post's stored comment_count
with a hard-coded 'AND comment_type != note', bypassing the
default_excluded_comment_types filter that hides those types from
WP_Comment_Query. A type that opted out of listings still inflated
comment_count and therefore get_comments_number().

Apply the same filtered exclusion set to the counter so the listings and
the stored count stay consistent, removing the need for plugins to also
re-implement the count via pre_wp_update_comment_count_now.

See #35214, #65537.
get_pending_comments_num() recomputed the admin pending-comments count with
a hard-coded 'AND comment_type != note', the same gap fixed in
wp_update_comment_count_now(): a type that opts out of default listings via
default_excluded_comment_types still inflated the pending bubble shown next
to each post in the admin list tables.

Derive the excluded set from the same filter so the pending count stays
consistent with the listings and the stored comment count.

See #35214, #65537.
adamsilverstein and others added 6 commits July 11, 2026 10:58
The default-excluded set plus filter application was triplicated across
WP_Comment_Query, wp_update_comment_count_now(), and
get_pending_comments_num(), each with subtly different normalization.
Centralize it in one accessor that all three call, which is also the
seam where a future comment type registry can derive the default from
internal types.

The accessor additionally strips the special type tokens understood by
WP_Comment_Query ('all', 'comment', 'comments', 'pings'): previously a
filter returning the 'pings' alias excluded nothing from the count
functions but zeroed out an explicit type => 'pingback' query, because
the explicit-request guard compares raw tokens while the query expansion
resolves aliases.

Also document the registration-timing contract (register the filter
unconditionally rather than toggling per call - the query cache key does
not include filter output), widen the null-context description, hoist
the invariant 'all' check out of the per-type loop, add the missing
@SInCE entry to wp_update_comment_count_now(), and make the
no-duplication test capture the WHERE clause via comments_clauses
instead of asserting against $wpdb->last_query.
…pes.

When default_excluded_comment_types excludes a literal ping type (for
example 'pingback'), a query requesting the 'pings' alias built
`comment_type IN ('pingback','trackback') AND comment_type NOT IN
('pingback')`, silently dropping the explicitly requested pingbacks. The
guard compared excluded literals against the raw request tokens, so an
alias never matched the literal it stands for.

Expand the request's special tokens ('comment', 'comments', 'pings') to
their literal comment_type values before deciding what to exclude, so a
type requested via an alias is honored. This also drops the redundant
NOT IN membership check, since the list is deduplicated with
array_unique() before the clause is built.
The normalization in wp_get_default_excluded_comment_types() ran the
filtered list through array_filter() with no callback, which drops the
string '0' along with empty strings. A comment type literally named '0'
could therefore never be excluded through the filter.

Filter on strlen() instead, so only empty strings are removed and '0'
survives as a valid literal type.
The default_excluded_comment_types docblock said the filter keeps types
out of listings, counts, "or feeds". Comment feeds are served by
WP_Query's raw SQL, which does not consult this filter, so the promise
does not hold. Describe only the surfaces the filter actually covers.
The list table hardcoded `type__not_in => array( 'note' )` for its row
query while the status count bubbles (via wp_count_comments()) now honor
default_excluded_comment_types. A plugin that removed 'note' from the
filter would therefore see the count include notes while the rows still
hid them, so "All (N)" disagreed with the visible list.

Source the row query's exclusions from wp_get_default_excluded_comment_types()
so the list and its counts stay in agreement.
array_filter() with 'strlen' was doing the right thing at runtime - dropping ''
while keeping a type literally named '0' - but strlen() returns an int, not a
bool, so PHPStan reports the callback as the wrong type and the static analysis
job fails. Say what the filter means instead.

See #65537.
…ath.

get_page_of_comment() counted older comments with 'type' => 'all', which is the
one value that makes WP_Comment_Query skip its default exclusions, while
comments_template() renders the same post with those exclusions applied. Every
excluded-type comment older than the target therefore inflated the count, so a
'#comment-' permalink could point at a page the visitor never sees. Two notes
ahead of a comment on a two-per-page post were enough to send its permalink to
page 2 while the comment renders on page 1.

Default the argument to '' instead, which is WP_Comment_Query's own default and
so counts exactly what the comment list shows. Callers wanting the old behavior
can still pass 'all' explicitly. get_comment_link() forwards its arguments here
and carried the same default, so it moves too, otherwise the fix would never
reach the permalinks that need it.

This predates the exclusion filter - it has been reachable since 6.9 gave core
the note type - but the filter generalizes it to any private type a plugin
registers.

See #65537.
The branch was written while trunk was 7.1-alpha; trunk is now
7.2-alpha, so the eleven @SInCE tags this branch adds pointed at a
release that will never contain them. Docblock-only change.

See #65537.
Comment on lines +813 to +818
// Unless all types are requested, exclude each default-excluded type
// that the query does not explicitly request. The special type tokens
// in the request ('comment', 'comments', 'pings') are first expanded to
// the literal comment_type values they represent, so a type requested
// via an alias (for example 'pings' for 'pingback' and 'trackback') is
// still treated as explicitly requested and is not excluded.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
// Unless all types are requested, exclude each default-excluded type
// that the query does not explicitly request. The special type tokens
// in the request ('comment', 'comments', 'pings') are first expanded to
// the literal comment_type values they represent, so a type requested
// via an alias (for example 'pings' for 'pingback' and 'trackback') is
// still treated as explicitly requested and is not excluded.
/*
* Unless all types are requested, exclude each default-excluded type
* that the query does not explicitly request. The special type tokens
* in the request ('comment', 'comments', 'pings') are first expanded to
* the literal comment_type values they represent, so a type requested
* via an alias (for example 'pings' for 'pingback' and 'trackback') is
* still treated as explicitly requested and is not excluded.
*/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applied in 280fcd6. I swept the rest of the diff for the same thing and converted two more: the switch in WP_Comments_List_Table::prepare_items() and the 'pings' alias note in the query tests. The remaining two-line runs are a prose line followed by a phpcs:ignore directive, which has to stay //, so I left those alone.

The WordPress inline documentation standards call for the /* */ block
format once a comment runs past a single line.
The requested type is subtracted from the default-excluded set with
array_diff(), which casts its arguments to strings. A request such as
comment_type[]=review raised an "Array to string conversion" warning and
could skip the exclusion it named.

@peterwilsoncc peterwilsoncc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've added a few notes inline.

I'm a little worried about the subtly introduced between "all" and "" for some of hte comment APIs.

It seems risky for themes that have copied over the default value to the functions call in the past.

Comment thread src/wp-includes/comment.php Outdated
}

$placeholders = implode( ', ', array_fill( 0, count( $excluded_types ), '%s' ) );
$clause = sprintf( ' AND %s NOT IN ( %s )', $column, $placeholders );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Column name is an identifier:

Suggested change
$clause = sprintf( ' AND %s NOT IN ( %s )', $column, $placeholders );
$clause = sprintf( ' AND %i NOT IN ( %s )', $column, $placeholders );

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good call, switched in 94dc58f.

Claude caught a snag with the straight swap:

%i quotes the whole value as one identifier, so the feed call sites passing "{$wpdb->comments}.comment_type" would have come out as `wp_comments.comment_type` - a single column name that doesn't exist. The helper now splits on the dot and uses one %i per part, giving `wp_comments`.`comment_type`. There's a new test covering both the plain and the qualified forms.

Comment on lines +111 to +112
remove_filter( 'default_excluded_comment_types', '__return_false' );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Removed by base test class.

Suggested change
remove_filter( 'default_excluded_comment_types', '__return_false' );

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Dropped these here and in the other test files in 14dc7d6.


$counts = get_pending_comments_num( array( $post_a, $post_b ) );

$this->assertSame(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->assertSame(
$this->assertSameSets(

🔢 This applies in a few places so I won't repeat myself.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Switched in 14dc7d6. This one uses assertSameSetsWithIndex(), since plain assertSameSets() sorts away the post ID keys the test is checking.

Comment thread tests/phpunit/tests/comment/query.php Outdated
Comment on lines +5771 to +5781
$filter_args = array();

add_filter(
'default_excluded_comment_types',
static function ( $types, $query ) use ( &$filter_args ) {
$filter_args = array( $types, $query );
return $types;
},
10,
2
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This could use MockAction

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Switched to MockAction in 14dc7d6.

Comment thread tests/phpunit/tests/comment/query.php Outdated
)
);

$this->assertSame( array( $comments['pingback'] ), array_map( 'intval', $found ) );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tests with multiple assertions will need to contain a unique $message parameter for each to aid debugging for future contributors.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added messages across the new tests in 14dc7d6.

Comment thread tests/phpunit/tests/comment/query.php Outdated
Comment on lines +6061 to +6069
$runs = 0;

add_filter(
'default_excluded_comment_types',
static function ( array $types ) use ( &$runs ): array {
++$runs;
return $types;
}
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could use MockAction too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done, also in 14dc7d6.

Comment thread src/wp-includes/comment.php Outdated
* @return string Prepared ` AND <column> NOT IN (...)` condition, or an empty string when
* no comment types are excluded.
*/
function _wp_get_excluded_comment_types_clause( $column = 'comment_type' ) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For a while, WordPress has been avoiding the underscore for private functions as they can often change status.

Suggested change
function _wp_get_excluded_comment_types_clause( $column = 'comment_type' ) {
function wp_get_excluded_comment_types_clause( $column = 'comment_type' ) {

Requires changes elsewhere...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oh, I had no idea we were changing that! THANKS!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Renamed to wp_get_excluded_comment_types_clause() in 94dc58f.

adamsilverstein and others added 8 commits October 12, 2026 12:26
Trunk moved the singular comment feed query below the post status checks (r-791c7fc07e). Re-apply the excluded comment types clause to the relocated block.

Claude-Session: https://claude.ai/code/session_01RmMwj4CN9cF8b1Sx58Pvik
…ed-comment-types-filter

# Conflicts:
#	src/wp-admin/includes/class-wp-comments-list-table.php
#	src/wp-admin/includes/comment.php
#	src/wp-includes/class-wp-comment-query.php
#	src/wp-includes/class-wp-query.php
#	src/wp-includes/comment.php
#	tests/phpunit/tests/query/commentFeed.php
…core.

The column passed to the clause helper is an identifier, so prepare it with %i
rather than interpolating it. A table-qualified name is split on the dot and
each part quoted on its own, since `wp_comments.comment_type` as one quoted
identifier would name a column that does not exist.

Core is moving away from underscore-prefixed private functions, as they tend to
become public later, so rename the helper to wp_get_excluded_comment_types_clause().

See #65537.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018vwYjUikEZMVw2seRAHMXe
Changing the get_page_of_comment() and get_comment_link() defaults from 'all'
to '' made the two values count differently, so a theme that copied the old
default into its own call would keep counting excluded types. Walker_Comment
does exactly that: it forwards the wp_list_comments() arguments, whose 'type' is
'all', so the comment permalinks rendered in the list still pointed at the
wrong page.

Restore the 'all' default and leave the default-excluded types out of the count
when 'all' is requested instead. comments_template() never renders those types,
so counting them only ever moved a permalink to a page the visitor does not
see. A type requested by name is still counted.

See #65537.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018vwYjUikEZMVw2seRAHMXe
Use MockAction for the filter spies, assertSameSets() where order does not
matter, and a message on every assertion in tests with more than one. Drop the
remove_filter() calls the base test class already handles, and cover the
quoting of the excluded types clause.

See #65537.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018vwYjUikEZMVw2seRAHMXe
Trunk renamed the shared test comment helper and now excludes reactions by
default alongside notes.
…es-filter' into pr12310-feedback

# Conflicts:
#	tests/phpunit/tests/comment/query.php
…es-filter' into pr12310-feedback

# Conflicts:
#	tests/phpunit/tests/comment/query.php
@adamsilverstein

Copy link
Copy Markdown
Member Author

Thanks for the review @peterwilsoncc! The inline notes are all addressed now, and you were right to be worried about 'all' vs ''.

Claude dug into how that change actually played out, here is what it found:

It was worse than the theme case: Walker_Comment forwards the wp_list_comments() arguments to get_comment_link(), and those default to 'type' => 'all'. So the permalinks rendered in the comment list itself kept counting excluded types, and only the bare get_comment_link( $comment ) calls got the fix.

d4c6e2f restores 'all' as the default for both get_page_of_comment() and get_comment_link(). Instead, when 'all' is requested, get_page_of_comment() adds the default-excluded types as type__not_in on its count query. comments_template() never renders those types, so counting them only ever pushed a permalink onto a page the visitor doesn't see. 'all' and '' now give the same page, and a type asked for by name (eg. 'type' => 'note') is still counted. get_page_of_comment_query_args gets a @since note for the new arg.

Tests cover the default, explicit 'all', explicit '', an explicit excluded type, and get_comment_link() with 'type' => 'all'.

Does that approach work for you? It keeps the defaults untouched, the only behavior change is that 'all' page math stops counting types that never render.

Trunk's last-modified query hard-codes the 'note' and 'reaction'
exclusion, so a type added through the 'default_excluded_comment_types'
filter still moved the comment feed's Last-Modified date, and emptying
the filter did not bring notes back. Route it through
wp_get_excluded_comment_types_clause() like the feeds and counters.

The cached value keeps its fixed 'lastcommentmodified:<tz>' key, since
the comment status handlers clear it by that name. A changed excluded
set is therefore picked up the next time a comment changes status.

See #65537, #35214.
The docblocks and inline comments around the excluded comment types
had grown into design notes, some of them stale: the accessor and
filter docs still described 'note' as the only built-in default and
did not mention 'reaction' or get_lastcommentmodified(). Trim them to
what a caller needs and bring them in line with trunk.

Also drop the list table's 'comment'/'comments' alias branch, which
could never subtract anything because the accessor strips those
tokens, and filter the registry's internal type names to strings so
the merged default set is typed for array_unique().

See #65537, #35214.
New test methods and data providers need native types to pass PHPStan
at level 10.

See #65537.
Trunk is in the 7.2 beta, so these additions can no longer ship in 7.2.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants