comment_form_fields WordPress Filter Hook

The comment_form_fields hook is used to modify the fields displayed in the comment form. By default, the comment form includes the fields for name, email, and website. However, using this hook, you can add or remove fields as well as reorder them. This hook also allows you to modify the default values for the fields.

apply_filters( 'comment_form_fields', array $comment_fields ) #

Filters the comment form fields, including the textarea.


Parameters

$comment_fields

(array)The comment fields.


Top ↑

Source

File: wp-includes/comment-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More