Make WordPress Core

Ticket #1578: pluggable-functions.php.diff

File pluggable-functions.php.diff, 2.0 KB (added by markjaquith, 19 years ago)

Patch against current /branches/1.5/

  • pluggable-functions.php

     
    209209        }
    210210        $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n";
    211211        $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    212 
     212       
    213213        if ('' == $comment->comment_author_email || '' == $comment->comment_author) {
    214214                $from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>';
    215215        } else {
     
    220220                . "$from\n"
    221221                . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
    222222
     223        $notify_message = apply_filters('comment_notification_text', $notify_message);
     224        $subject = apply_filters('comment_notification_subject', $subject);
     225        $message_headers = apply_filters('comment_notification_headers', $message_headers);
     226
    223227        @wp_mail($user->user_email, $subject, $notify_message, $message_headers);
    224228   
    225229        return true;
     
    240244   
    241245        $comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
    242246        $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
    243         $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID='$post->post_author' LIMIT 1");
    244247
    245248        $comment_author_domain = gethostbyaddr($comment->comment_author_IP);
    246249        $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
     
    259262
    260263        $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), get_settings('blogname'), $post->post_title );
    261264        $admin_email = get_settings("admin_email");
     265       
     266        $notify_message = apply_filters('comment_moderation_text', $notify_message);
     267        $subject = apply_filters('comment_moderation_subject', $subject);
    262268
    263269        @wp_mail($admin_email, $subject, $notify_message);
    264270