Changeset 2414
- Timestamp:
- 03/07/2005 12:16:06 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-functions.php
r2397 r2414 728 728 729 729 $mod_keys = trim( get_settings('moderation_keys') ); 730 if ('' == $mod_keys ) 731 return true; // If moderation keys are empty 732 $words = explode("\n", $mod_keys ); 733 734 foreach ($words as $word) { 735 $word = trim($word); 736 737 // Skip empty lines 738 if (empty($word)) { continue; } 739 740 // Do some escaping magic so that '#' chars in the 741 // spam words don't break things: 742 $word = preg_quote($word, '#'); 730 if ( !empty($mod_keys) ) { 731 $words = explode("\n", $mod_keys ); 732 733 foreach ($words as $word) { 734 $word = trim($word); 735 736 // Skip empty lines 737 if (empty($word)) { continue; } 738 739 // Do some escaping magic so that '#' chars in the 740 // spam words don't break things: 741 $word = preg_quote($word, '#'); 743 742 744 $pattern = "#$word#i"; 745 if ( preg_match($pattern, $author) ) return false; 746 if ( preg_match($pattern, $email) ) return false; 747 if ( preg_match($pattern, $url) ) return false; 748 if ( preg_match($pattern, $comment) ) return false; 749 if ( preg_match($pattern, $user_ip) ) return false; 750 if ( preg_match($pattern, $user_agent) ) return false; 743 $pattern = "#$word#i"; 744 if ( preg_match($pattern, $author) ) return false; 745 if ( preg_match($pattern, $email) ) return false; 746 if ( preg_match($pattern, $url) ) return false; 747 if ( preg_match($pattern, $comment) ) return false; 748 if ( preg_match($pattern, $user_ip) ) return false; 749 if ( preg_match($pattern, $user_agent) ) return false; 750 } 751 751 } 752 752
Note: See TracChangeset
for help on using the changeset viewer.