Created
June 19, 2012 12:45
-
-
Save timwhitlock/2953937 to your computer and use it in GitHub Desktop.
Boot any comment bot that fills in the author website field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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