Skip to content

Instantly share code, notes, and snippets.

@SiGaCode
Last active August 29, 2015 14:13
Show Gist options
  • Save SiGaCode/7bac7a20b4dc2cd05561 to your computer and use it in GitHub Desktop.
Save SiGaCode/7bac7a20b4dc2cd05561 to your computer and use it in GitHub Desktop.
Remove allowed HTML tags from the comments. Goes to Dynamik Custom - Functions
function remove_comment_form_allowed_tags() {
add_filter('comment_form_defaults','wordpress_comment_form_defaults');
}
add_action('after_setup_theme','remove_comment_form_allowed_tags');
/**
* @author Brad Dalton - WP Sites
* @learn more http://wp.me/p1lTu0-9Yd
*/
function wordpress_comment_form_defaults($default) {
unset($default['comment_notes_after']);
unset($default['comment_notes_before']);
return $default;
}
//* Remove comment form allowed tags
add_filter( 'comment_form_defaults', 'bg_remove_comment_form_allowed_tags' );
function bg_remove_comment_form_allowed_tags( $defaults ) {
$defaults['comment_notes_after'] = '';
return $defaults;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment