Fix comment auto-approval for authors/admins. http://mosquito.wordpress.org/view.php?id=1291 Props: kim, coffee2code
git-svn-id: http://svn.automattic.com/wordpress/trunk@2576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ebdf64dce2
commit
3e8d9d0cf0
|
@ -502,14 +502,16 @@ function wp_new_comment( $commentdata, $spam = false ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( $userdata && ( $user_id == $post_author || $userdata->user_level >= 9 ) ) {
|
||||
$approved = 1;
|
||||
} else {
|
||||
if ( check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type) )
|
||||
$approved = 1;
|
||||
else
|
||||
$approved = 0;
|
||||
if ( wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) )
|
||||
$approved = 'spam';
|
||||
if ( $userdata && ( $user_id == $post_author || $userdata['user_level'] >= 9 ) )
|
||||
$approved = 1;
|
||||
}
|
||||
|
||||
$approved = apply_filters('pre_comment_approved', $approved);
|
||||
|
||||
|
|
Loading…
Reference in New Issue