Skip to content

Instantly share code, notes, and snippets.

@edalis
Last active October 17, 2016 07:33
Show Gist options
  • Save edalis/3763b5591afab9bc9c0e to your computer and use it in GitHub Desktop.
Save edalis/3763b5591afab9bc9c0e to your computer and use it in GitHub Desktop.
WP: Modify Text Before & After Comments Form
// From http://wpsites.net/web-design/modify-text-before-after-comment-form/
function wpsites_change_note_after_comment_form($arg) {
$arg['comment_notes_after'] = '<p class="comment-notes">' . __( 'Thanks for leaving an awesome comment!' ) . '</p>';
return $arg;
}
add_filter('comment_form_defaults', 'wpsites_change_note_after_comment_form');
function wpsites_modify_text_before_comment_form($arg) {
$arg['comment_notes_before'] = '<p class="comment-notes">' . __( 'We respect your privacy and will not publish your personal details.' ) . '</p>';
return $arg;
}
add_filter('comment_form_defaults', 'wpsites_modify_text_before_comment_form');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment