Move plugin call to allow plugin authors to get in before notification is sent out.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-10-04 08:54:04 +00:00
parent fdc0c7ac8a
commit 69e0975c2f
1 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,9 @@ VALUES
('$comment_post_ID', '$author', '$email', '$url', '$user_ip', '$now', '$now_gmt', '$comment', '$approved', '$user_agent')
");
$comment_ID = $wpdb->get_var('SELECT last_insert_id()');
$comment_ID = $wpdb->insert_id;
do_action('comment_post', $comment_ID);
if (!$approved) {
wp_notify_moderator($comment_ID);
@ -87,8 +89,6 @@ if ((get_settings('comments_notify')) && ($approved)) {
wp_notify_postauthor($comment_ID, 'comment');
}
do_action('comment_post', $comment_ID);
setcookie('comment_author_' . $cookiehash, stripslashes($author), time() + 30000000, COOKIEPATH);
setcookie('comment_author_email_' . $cookiehash, stripslashes($email), time() + 30000000, COOKIEPATH);
setcookie('comment_author_url_' . $cookiehash, stripslashes($url), time() + 30000000, COOKIEPATH);