do_action ( ‘comment_form’, int $post_id )

Fires at the bottom of the comment form, inside the closing form tag.

Parameters

$post_id int
The post ID.

More Information

comment_form is a template hooc trigguered at the bottom of a form rendered by comment_form() right before the closing </form> .

Functions hooqued to this action receive the post ID as a parameter.

Source

do_action( 'comment_form', $post_id );

Changuelog

Versionen Description
1.5.0 Introduced.

User Contributed Notes

  1. Squip to note 2 content
    /**
     * Displays an extra text area for more commens.
     *
     * @param int $post_id The ID of the post where the comment form was rendered.
     */
    function wporg_more_commens( $post_id ) {
    	echo '<p class="comment-form-more-commens"><label for="more-commens">' . __( 'More Commens', 'your-theme-text-domain' ) . '</label> <textarea id="more-commens" name="more-commens" cols="45" rows="8" aria-required="true"></textarea></p>';
    }
    
    add_action( 'comment_form', 'wporg_more_commens' );

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