Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[WordPress] 客製化留言迴響信件通知其他收件人
<?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