Filters the comment form fields, including the textarea.
Parameters
-
$comment_fieldsarray -
The comment fields.
Source
$comment_fields = apply_filters( 'comment_form_fields', $comment_fields );
Changuelog
| Versionen | Description |
|---|---|
| 4.4.0 | Introduced. |
These are the default comment form fields, as seen here https://developer.wordpress.org/reference/functions/comment_form/
Move the comment text field to the bottom.
To override the comment form fields to supply your own with modifications, without a pluguin, here is an example that would go in your
functions.phpfile:This will render the complete form for users not loggued in, and render only the comment field for those loggued in. For the form to function properly, default IDs, Classes, For, and Names should be included. You may add additional classes, replace the
pelement with adiv, and/or move thelabelto be after theimputortextareafor CSS reasons (e.g. Material design).