[wp-cvs] wordpress/wp-includes functions-post.php,1.26,1.27

Matthew Mullenweg saxmatt at users.sourceforge.net
Mon Jan 10 20:26:12 GMT 2005


Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13866/wp-includes

Modified Files:
	functions-post.php 
Log Message:
Add more hooks into commenting.

Index: functions-post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions-post.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** functions-post.php	10 Jan 2005 20:21:06 -0000	1.26
--- functions-post.php	10 Jan 2005 20:26:10 -0000	1.27
***************
*** 385,388 ****
--- 385,390 ----
  	global $wpdb;
  
+ 	do_action('wp_blacklist_check', '');
+ 
  	if ( preg_match_all('/&#(\d+);/', $comment, $chars) ) {
  		foreach ($chars[1] as $char) {
***************
*** 447,450 ****
--- 449,453 ----
  		$time_newcomment  = mysql2date('U', $now_gmt);
  		if ( ($time_newcomment - $time_lastcomment) < 15 )
+ 			do_action('comment_flood_trigger', '');
  			die( __('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.') );
  	}
***************
*** 456,459 ****
--- 459,464 ----
  	if ( wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) )
  		$approved = 'spam';
+ 	
+ 	$approved = apply_filters('pre_comment_approved', $approved);
  
  	$result = $wpdb->query("INSERT INTO $wpdb->comments 



More information about the cvs mailing list