Last active
August 29, 2015 14:26
-
-
Save vijujohns/48d02f2a54ce979d6a9c to your computer and use it in GitHub Desktop.
Remove unwanted text and URL from WordPress comment form http://www.wppicker.com/10-quick-settings-to-reduce-spam-comments-on-wordpress/
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
//* Remove Comment Form Website URL Field | |
add_filter('comment_form_default_fields','wpp_remove_comment_url'); | |
function wpp_remove_comment_url($fields) { | |
unset($fields['url']); | |
return $fields; | |
} | |
//* Remove comment form allowed tags | |
add_filter( 'comment_form_defaults', 'wpp_remove_comment_form_allowed_tags' ); | |
function wpp_remove_comment_form_allowed_tags( $defaults ) { | |
$defaults['comment_notes_after'] = ''; | |
$defaults['comment_notes_before'] = ''; | |
return $defaults; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment