Skip to content

Instantly share code, notes, and snippets.

@vijujohns
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijujohns/48d02f2a54ce979d6a9c to your computer and use it in GitHub Desktop.
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/
//* 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