admin管理员组文章数量:1332403
I have a customer post type called video. I want wordpress to send an email notification to one user who is going to check and approve the comments, when ever someone comments on that post type video.
Please help me how to set it up.
Below code is not working and also custom post type is missing
//Custom notification function se_comment_moderation_recipients( $emails, $comment_id ) { $comment = get_comment( $comment_id ); $post = get_post( $comment->comment_post_ID ); $user = get_user_by( 'id', '615895' ); // Return only the post author if the author can modify. if ( user_can( $user->ID, 'edit_published_posts' ) && ! empty( $user->user_email ) ) { $emails = array( $user->user_email ); } return $emails; } add_filter( 'comment_moderation_recipients', 'se_comment_moderation_recipients', 11, 2 ); add_filter( 'comment_notification_recipients', 'se_comment_moderation_recipients', 11, 2 );
本文标签: Email notification to an email address other than admin for custom type post comments in wordpress
版权声明:本文标题:Email notification to an email address other than admin for custom type post comments in wordpress 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742278451a2445642.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论