Go to file
Drew Jaynes 1a7298861b Comments: Introduce two new filters, `notify_moderator` and `notify_post_author`, both of which make it possible to selectively override site notification email settings for new comments.
The `notify_moderator` filter makes it possible to override the value for the `moderation_notify` option, which controls whether to send new comment emails to "site moderators", that is to say, the owner of the admin email for the site and the post author if they have the ability to modify the comment.

The `notify_post_author` filter likewise makes it possible to override the value for the `comments_notify` option, which controls whether to send new comment emails to the post author. If the post author is the comment author, default behavior is not to send the notification. Note: enabling or disabling notifications via this hook could also affect other recipients added via the 'comment_notification_recipients' filter in `wp_notify_postauthor()`, if hooked.

Passing a falsey value to either of the new filters will prevent notifications from being sent, regardless of their corresponding option values.

Adds tests.

Props coffee2code, adamsilverstein, DrewAPicture.
Fixes #761.


git-svn-id: https://develop.svn.wordpress.org/trunk@35339 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-21 18:34:06 +00:00
src Comments: Introduce two new filters, `notify_moderator` and `notify_post_author`, both of which make it possible to selectively override site notification email settings for new comments. 2015-10-21 18:34:06 +00:00
tests Comments: Introduce two new filters, `notify_moderator` and `notify_post_author`, both of which make it possible to selectively override site notification email settings for new comments. 2015-10-21 18:34:06 +00:00
tools/i18n i18n tools: Use https for `msgid-bugs-address` URLs. 2015-07-27 19:37:13 +00:00
.editorconfig Use HTTPS URLs for codex.wordpress.org. 2015-04-12 21:28:58 +00:00
.gitignore Remove an IDE-specific rule in `.gitignore`. These should be managed in the user's `~/.gitignore_global` file. 2015-10-18 00:15:23 +00:00
.jshintrc Update `grunt-contrib-jshint` to `0.11.0` 2015-03-06 21:07:35 +00:00
.travis.yml Travis CI: Use a pinned version of the object cache drop-in. 2015-10-16 14:15:18 +00:00
Gruntfile.js Replace Autoprefixer Core with Autoprefixer 2015-10-21 16:47:21 +00:00
package.json Update grunt-browserify 2015-10-21 16:58:37 +00:00
phpunit.xml.dist Unit Tests: add `SpeedTrapListener` to `phpunit/includes` and add the config node to `phpunit.xml.dist`. 2015-10-16 00:27:28 +00:00
wp-cli.yml Introduce default `wp-cli.yml` for core development. 2014-04-30 21:35:18 +00:00
wp-config-sample.php Lightly clean up and improve inline documentation in wp-config-sample.php. 2015-05-10 00:05:30 +00:00
wp-tests-config-sample.php Update wp-tests-config-sample.php to run with WP_DEBUG by default. see #25282. 2013-09-23 16:17:59 +00:00