More specific moderation emails for {ping|track}backs. Fixes #4986 props Otto42.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
251a2ffa0c
commit
86c55d6d67
|
@ -869,16 +869,37 @@ function wp_notify_moderator($comment_id) {
|
|||
$comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
|
||||
$comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
|
||||
|
||||
$notify_message = sprintf( __('A new comment on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n";
|
||||
$notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
|
||||
$notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
|
||||
$notify_message .= sprintf( __('E-mail : %s'), $comment->comment_author_email ) . "\r\n";
|
||||
$notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
|
||||
$notify_message .= sprintf( __('Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP ) . "\r\n";
|
||||
$notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
|
||||
switch ($comment->comment_type)
|
||||
{
|
||||
case 'trackback':
|
||||
$notify_message = sprintf( __('A new trackback on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n";
|
||||
$notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
|
||||
$notify_message .= sprintf( __('Website : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
|
||||
$notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
|
||||
$notify_message .= __('Tracback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
|
||||
break;
|
||||
case 'pingback':
|
||||
$notify_message = sprintf( __('A new pingback on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n";
|
||||
$notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
|
||||
$notify_message .= sprintf( __('Website : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
|
||||
$notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
|
||||
$notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
|
||||
break;
|
||||
default: //Comments
|
||||
$notify_message = sprintf( __('A new comment on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n";
|
||||
$notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
|
||||
$notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
|
||||
$notify_message .= sprintf( __('E-mail : %s'), $comment->comment_author_email ) . "\r\n";
|
||||
$notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
|
||||
$notify_message .= sprintf( __('Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP ) . "\r\n";
|
||||
$notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
|
||||
break;
|
||||
}
|
||||
|
||||
$notify_message .= sprintf( __('Approve it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=mac&c=$comment_id" ) . "\r\n";
|
||||
$notify_message .= sprintf( __('Delete it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&c=$comment_id" ) . "\r\n";
|
||||
$notify_message .= sprintf( __('Spam it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&dt=spam&c=$comment_id" ) . "\r\n";
|
||||
|
||||
$strCommentsPending = sprintf( __ngettext('%s comment', '%s comments', $comments_waiting), $comments_waiting );
|
||||
$notify_message .= sprintf( __('Currently %s are waiting for approval. Please visit the moderation panel:'), $strCommentsPending ) . "\r\n";
|
||||
$notify_message .= get_option('siteurl') . "/wp-admin/moderation.php\r\n";
|
||||
|
|
Loading…
Reference in New Issue