Created
November 24, 2017 07:12
-
-
Save nczz/9cf4be396d8456513133ebef1912279e to your computer and use it in GitHub Desktop.
[WordPress] 客製化留言迴響信件通知其他收件人
This file contains 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
<?php | |
//functions.php | |
function mxp_comment_moderation_recipients($emails, $comment_id) { | |
// 以此類推新增收件人 | |
$emails = array('user1@example.com', 'user2@example.com', 'user3@example.com'); | |
return $emails; | |
} | |
add_filter('comment_moderation_recipients', 'mxp_comment_moderation_recipients', 11, 2); | |
add_filter('comment_notification_recipients', 'mxp_comment_moderation_recipients', 11, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment