From 2a0b33bae43025cb38d2ac4c20ec5ecb63a6cdef Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 20 Mar 2008 20:32:18 +0000 Subject: [PATCH] don't time-throttle comments from Administrators git-svn-id: https://develop.svn.wordpress.org/trunk@7425 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 3c7ec2d95d..94479fbb04 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -377,6 +377,8 @@ function wp_allow_comment($commentdata) { */ function check_comment_flood_db( $ip, $email, $date ) { global $wpdb; + if ( current_user_can( 'manage_options' ) ) + return; // don't throttle admins if ( $lasttime = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_author_IP = '$ip' OR comment_author_email = '$email' ORDER BY comment_date DESC LIMIT 1") ) { $time_lastcomment = mysql2date('U', $lasttime); $time_newcomment = mysql2date('U', $date);