comment_form_submit_button
Filters the submit button for the comment form to display.
Description
Parameters (2)
- 0. $submit_button (string)
- HTML markup for the submit button.
- 1. $args (array)
- Arguments passed to
comment_form(…)
..
Usage
- To run the hook, copy the example below.
- $submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args );
- if ( !empty( $submit_button ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the comment_form_submit_button callback
- function filter_comment_form_submit_button( $submit_button, $args ) {
- // make filter magic happen here...
- return $submit_button;
- };
- // add the filter
- add_filter( 'comment_form_submit_button', 'filter_comment_form_submit_button', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'comment_form_submit_button', 'filter_comment_form_submit_button', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/comment-template.php
- $submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args );