comment_form_field_{$name} WordPress Filter Hook

The `comment_form_field_{$name}` hook is used to add additional fields to the comment form. This hook is useful for customizing the comment form to include additional data, such as a rating or custom fields.

apply_filters( "comment_form_field_{$name}", string $field ) #

Filters a comment form field for display.


Description

The dynamic portion of the hook name, $name, refers to the name of the comment form field.

Possible hook names include:

  • comment_form_field_comment
  • comment_form_field_author
  • comment_form_field_email
  • comment_form_field_url
  • comment_form_field_cookies

Top ↑

Parameters

$field

(string)The HTML-formatted output of the comment form field.


Top ↑

Source

File: wp-includes/comment-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.0.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