-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Ignore flood and duplicate check for notes #10448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
adamsilverstein
wants to merge
9
commits into
WordPress:trunk
from
adamsilverstein:fix/skip-flooding-check-for-notes
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0c25783
Ignore flood check for notes
adamsilverstein 90c7b1e
Edit implies logged in
adamsilverstein 757dbbd
Ensure comment_post_ID set
adamsilverstein 5fa675b
Merge branch 'trunk' into fix/skip-flooding-check-for-notes
adamsilverstein 4555a40
undo original approach
adamsilverstein 77bdf0d
Skip flood and duplicate checks for notes
adamsilverstein 5c7fd93
whitespace
adamsilverstein 43c4e46
whitespace
adamsilverstein 61f9221
remove unneeded duplicate enabling code in wp_allow_comment
adamsilverstein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wp_allow_comment()invokes iswp_check_comment_data()which "checks whether comment data passes internal checks or has disallowed content." This is mainly around looking for disallowed words and characters, checking for the presence of too many links in the comment's content, and whether the author has previously approved comments.I think skipping all of, including the
pre_comment_approvedfilter this is fine. The filter can't really be used to change a Note's status anyway (because "resolved" status is logged in comment meta). But just wanted to mention this so this is being done intentionally in case someone finds this PR in the future.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed spam plugins like Akismet hook into this filter, so we might not want to fire it for notes. If anything we could fire a new note specific filter instead.
Ps. the comment meta is only used to store resolution meta data - who resolved or reopened a thread and when. The 'comment_approved' field for notes indicates if the note is open or resolved (and thus mainly applies to the parent note of a thread). So filtering could still be useful.