Created
November 28, 2016 20:27
-
-
Save BenSibley/8b08558d4f306adbcce349ccefc7eb97 to your computer and use it in GitHub Desktop.
Add Placeholder to Comment Form
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
function my_update_comment_field( $comment_field ) { | |
$comment_field = | |
'<p class="comment-form-comment"> | |
<label for="comment">' . __( "Comment", "text-domain" ) . '</label> | |
<textarea required id="comment" name="comment" placeholder="' . esc_attr__( "Enter comment here...", "text-domain" ) . '" cols="45" rows="8" aria-required="true"></textarea> | |
</p>'; | |
return $comment_field; | |
} | |
add_filter( 'comment_form_field_comment', 'my_update_comment_field' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment