All pastes #896826 Raw Edit

Something

public php v1 · immutable
·published 2008-02-09 00:05 UTC
rendered paste body
<?php/*Plugin Name: Skip CommentDescription: Skip comments based on a pattern match in comment text.	Skip Comment is released under the GNU General Public License, version 2 (GPL2)	http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt	This is a WordPress plugin (http://wordpress.org).*/function skip_comments($comments) {	foreach( $comments as $comment ) {		if( false === strpos($comment->comment_content, 'WordPress sucks') ) {			$comments_skip[] = $comment;		}	}	return $comments_skip;}add_filter('comments_array', 'skip_comments');?>