apply_filters( 'comment_form_defaults', array $defaults )

Filters the comment form default arguments.


Description Description

Use ‘comment_form_default_fields’ to filter the comment fields.


Parameters Parameters

$defaults

(array) The default comment form arguments.


Top ↑

Source Source

File: wp-includes/comment-template.php

View on Trac


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by jqz

    Example for overriding the title of the comment form (default ‘Leave a Reply’) from within a theme’s functions.php in the theme setup function:

      function wpdocs_comment_form_defaults( $defaults ) {
        $defaults['title_reply'] = __( 'Add a Comment' );
        return $defaults;
      }
      add_filter( 'comment_form_defaults', 'wpdocs_comment_form_defaults' );
    

You must log in before being able to contribute a note or feedback.