comment_form_fields

comment_form_fields

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('comment_form_fields') is found 1 times:

  • /wp-includes/comment-template.php line 2783
    2779
    2780
    2781
    2782
    2783
    2784
    2785
    2786
    2787
    2788
    2789
    * @since 4.4.0
     *
     * @param array $comment_fields The comment fields.
     */
    $comment_fields = apply_filters( 'comment_form_fields', $comment_fields );
     
    // Get an array of field names, excluding the textarea.
    $comment_field_keys = array_diff( array_keys( $comment_fields ), array( 'comment' ) );
     
    // Get the first and the last field name, excluding the textarea.
    $first_field = reset( $comment_field_keys );