Add WordPress 6.9+ Block Notes compatibility to disable comments feature#190
Merged
Conversation
When the disable comments feature is enabled, Block Notes (introduced in WordPress 6.9) now continue to function correctly. Block Notes are stored as WP_Comments with a comment_type of 'note' and are used for collaborative feedback within the block editor. Changes: - Add get_allowed_comment_types() helper method to centralize allowed types - Update filter_comments_pre_query() to check comment type before short-circuiting - Update disable_comments_hide_existing_comments() to preserve Block Notes - Fix method signatures to match WordPress filter parameter expectations - Add comprehensive inline documentation with references to WP 6.9 dev notes New filter: - tenup_experience_disable_comments_allowed_types: Allows extending the list of comment types that bypass the disable comments feature This ensures editorial teams can use Block Notes for collaboration while keeping traditional comments disabled for site visitors. Fixes compatibility with WordPress 6.9+ See: https://make.wordpress.org/core/2025/11/15/notes-feature-in-wordpress-6-9/
There was a problem hiding this comment.
Pull request overview
This PR adds compatibility for WordPress 6.9+ Block Notes feature with the existing "disable comments" functionality. The implementation ensures that Block Notes (comment type note) continue to work for editorial collaboration even when traditional comments are disabled site-wide.
Key Changes:
- Introduced a new
get_allowed_comment_types()method that returns comment types that should bypass the disable comments feature, withnoteincluded by default - Modified comment filtering logic to preserve allowed comment types while blocking traditional comments
- Added a new filter
tenup_experience_disable_comments_allowed_typesfor extensibility
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| includes/classes/Comments/Comments.php | Core implementation: adds allowed comment types logic and updates comment query/display filters to preserve Block Notes |
| README.md | Documents the Block Notes compatibility and the new extensibility filter with usage examples |
| CHANGELOG.md | Documents the new feature and bug fixes for the unreleased version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| #### WordPress 6.9+ Block Notes Compatibility | ||
|
|
||
| As of version 1.17.0, the disable comments feature is fully compatible with Block Notes introduced in WordPress 6.9. Block Notes are a collaborative feedback feature that allows teams to leave contextual comments on blocks within the editor. |
# Conflicts: # CHANGELOG.md
darylldoyle
requested changes
Jan 8, 2026
darylldoyle
left a comment
Contributor
There was a problem hiding this comment.
@fabiankaegy this is a great first pass. I've left some comments, but not tested anything at this time.
Contributor
|
@fabiankaegy was wondering if you'd had a chance to review the feedback here? |
Co-authored-by: Daryll Doyle <daryll.doyle@10up.com>
# Conflicts: # CHANGELOG.md
claytoncollie
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds full compatibility with the new WordPress 6.9+ Block Notes feature while the "disable comments" option is enabled. It ensures that Block Notes (which use a different comment type) continue to function for editorial collaboration, even when traditional comments are disabled. Additionally, a new filter allows developers to specify which comment types should bypass the disable comments feature. Several code changes improve how comment queries and the frontend handle these exceptions.
WordPress 6.9+ Block Notes compatibility:
note) are now allowed and work as expected even when comments are disabled, both in the editor and on the frontend. [1] [2]Extensibility for allowed comment types:
tenup_experience_disable_comments_allowed_types, allowing plugins to specify additional comment types that should remain functional when comments are disabled. [1] [2]Bug fixes and improved filtering:
Documentation updates:
CHANGELOG.mdandREADME.mdto document the Block Notes compatibility, new filter, and related changes. [1] [2] [3]Closes #189