-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Notes: Add email notification #73645
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
Conversation
| ) | ||
| ); | ||
|
|
||
| add_settings_field( |
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.
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.
We only need to register this setting for WP < 6.9. I think it's currently registered for all versions.
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 thought we could check if the settings were already registered via get_registered_settings, but apparently that's not the case. Fixed in 1a34a21.
|
Flaky tests detected in 667c0c4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/20050507215
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
adamsilverstein
left a comment
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.
Nice work! left some small nitpick feedback. Also, I only reviewed the code, it would be good to have some manual testing which I did not do.
Mamaduka
left a comment
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.
Tested using WP Mail Debugger and this is working as expected.
|
Thanks both of you for the reviews! |


What?
This PR will add email notifications for notes to the Gutenberg plugin, which was implemented in core.
Why?
Backward compatibility.
How?
This PR is broadly divided into the following three hooks:
gutenberg_register_wp_notes_notify_setting: Registers a note notification setting to the Discussion screen.gutenberg_new_comment_via_rest_notify_postauthor: Send an email when a comment is inserted via the REST APIgutenberg_filter_note_notification_text,gutenberg_filter_note_notification_subject: Filter an email subject and contentTesting Instructions
Note: The email notification feature has been implemented in the latest WordPress core, so don't forget to downgrade the WordPress version to 6.8 and test it.
To test this PR, you'll need to set up an SMTP server in your wp-env environment. One way to do this is to temporarily set up Gmail's SMTP server: