apply_filters( 'comment_form_submit_button', string $submit_button, array $args )

Filters the submit button for the comment form to display.


Description Description


Parameters Parameters

$submit_button

(string) HTML markup for the submit button.

$args

(array) Arguments passed to comment_form().


Top ↑

Source Source

File: wp-includes/comment-template.php

View on Trac


Top ↑

Changelog Changelog

Changelog
Version Description
4.2.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by Prasad Nevase

    Example: Following example shows how you can use this filter to change submit button markup of comment form.

    // define the comment_form_submit_button callback
    function filter_comment_form_submit_button( $submit_button, $args ) {
        // make filter magic happen here...
        $submit_before = '<div class="form-group">';
        $submit_after = '</div>';
        return $submit_before . $submit_button . $submit_after;
    };
    
    // add the filter
    add_filter( 'comment_form_submit_button', 'filter_comment_form_submit_button', 10, 2 );

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