您需要使用的是comment_form_defaults
具有大型和嵌套$defaults
已传递数组。该数组中(除其他外)将包含以下内容:
fields
author << this will have something like <span class="required">*</span> in it
email << this will have something like <span class="required">*</span> in it
url
comment_notes_before << this will have something like Required fields are marked<span class="required">*</span> in it
所以,在过滤器中,需要更改数组中的这些字段,然后返回整个数组。