Joy
(@joyously)
I created this function, is this correct?
function modify_comment_field_548 ($arg) {
$arg['comment_field'] = '<p class="comment-form-comment"><label for="comment">Comment</label> <textarea id="comment" name="comment" cols="45" rows="6" maxlength="65525" required="required"></textarea></p>';
return $arg;
}
add_filter('comment_form_defaults', 'modify_comment_field_548');
Thanks
-
This reply was modified 6 years, 11 months ago by
muchmuch11.
It works but I don’t know if I do it corectly. lol
Joy
(@joyously)
Well, you are setting it to exactly what you want, whereas you could simply adjust whatever is there. It depends on whether you are creating it for one site or to work on all sites.
If you don’t use any plugins that affect comments, and this matches your theme, then that’s good enough for that site.
If you are putting it into a plugin you will distribute, it would be better to do a replace on the number instead of forcing it to look like you have it hard-coded.