Created
March 27, 2015 17:20
-
-
Save generatepress/c72d28622a695ca78f5e to your computer and use it in GitHub Desktop.
Add "will not be published" to the Email input in comment fields
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
add_filter( 'comment_form_default_fields', 'generate_custom_comment_fields' ); | |
function generate_custom_comment_fields() | |
{ | |
$fields = array( | |
'author' => '<input placeholder="' . __( 'Name','generate' ) . ' *" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" />', | |
'email' => '<input placeholder="' . __( 'Email (will not be published)','generate' ) . ' *" id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" />', | |
'url' => '<input placeholder="' . __( 'Website','generate' ) . '" id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" />', | |
); | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment