Skip to content

Instantly share code, notes, and snippets.

@timwhitlock
Created June 19, 2012 12:45
Show Gist options
  • Save timwhitlock/2953937 to your computer and use it in GitHub Desktop.
Save timwhitlock/2953937 to your computer and use it in GitHub Desktop.
Boot any comment bot that fills in the author website field
<?php
/**
* Boot any comment bot that fills in the author website field.
*/
function _tw_intercept_comment( array $data ){
if( empty($data['comment_author_url']) ){
return $data;
}
get_header();
echo 'See ya';
get_footer();
exit(0);
}
add_filter('preprocess_comment','_tw_intercept_comment');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment