Changeset 1737 for trunk/wp-includes/functions.php
- Timestamp:
- 10/04/2004 08:49:45 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r1734 r1737 1474 1474 1475 1475 function check_comment($author, $email, $url, $comment, $user_ip) { 1476 global $wpdb; 1477 1476 1478 if (1 == get_settings('comment_moderation')) return false; // If moderation is set to manual 1477 1479 … … 1479 1481 return false; // Check # of external links 1480 1482 1481 if ('' == trim( get_settings('moderation_keys') ) ) return true; // If moderation keys are empty 1482 $words = explode("\n", get_settings('moderation_keys') ); 1483 // Comment whitelisting: 1484 if ( 1 == get_settings('comment_whitelist')) { 1485 $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author_email = '$email' and comment_approved = '1' "); 1486 if ( 1 == $ok_to_comment && false === strpos( $email, get_settings('moderation_keys')) ) 1487 return true 1488 return false; 1489 } 1490 1491 $mod_keys = trim( get_settings('moderation_keys') ); 1492 if ('' == $mod_keys ) 1493 return true; // If moderation keys are empty 1494 $words = explode("\n", $mod_keys ); 1495 1483 1496 foreach ($words as $word) { 1484 1497 $word = trim($word);
Note: See TracChangeset
for help on using the changeset viewer.