From 69e0975c2f19cc7566645b9f8b4d146f088dc21f Mon Sep 17 00:00:00 2001 From: saxmatt Date: Mon, 4 Oct 2004 08:54:04 +0000 Subject: [PATCH] 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 --- wp-comments-post.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-comments-post.php b/wp-comments-post.php index 0a8df47a5..5492bc6e2 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -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);