Filter hook 'comment_form_submit_field'

in WP Core File wp-includes/comment-template.php at line 2890

View Source

comment_form_submit_field

Filter Hook
Description
Filters the submit field for the comment form to display. The submit field includes the submit button, hidden fields for the comment form, and any wrapper markup.

Hook Information

File Location wp-includes/comment-template.php View on GitHub
Hook Type Filter
Line Number 2890

Hook Parameters

Type Name Description
string $submit_field HTML markup for the submit field.
array $args Arguments passed to comment_form().

Usage Examples

Basic Usage
<?php
// Hook into comment_form_submit_field
add_filter('comment_form_submit_field', 'my_custom_filter', 10, 2);

function my_custom_filter($submit_field, $args) {
    // Your custom filtering logic here
    return $submit_field;
}

Source Code Context

wp-includes/comment-template.php:2890 - How this hook is used in WordPress core
<?php
2885  			 * @since 4.2.0
2886  			 *
2887  			 * @param string $submit_field HTML markup for the submit field.
2888  			 * @param array  $args         Arguments passed to comment_form().
2889  			 */
2890  			echo apply_filters( 'comment_form_submit_field', $submit_field, $args );
2891  
2892  			/**
2893  			 * Fires at the bottom of the comment form, inside the closing form tag.
2894  			 *
2895  			 * @since 1.5.0

PHP Documentation

<?php
/**
			 * Filters the submit field for the comment form to display.
			 *
			 * The submit field includes the submit button, hidden fields for the
			 * comment form, and any wrapper markup.
			 *
			 * @since 4.2.0
			 *
			 * @param string $submit_field HTML markup for the submit field.
			 * @param array  $args         Arguments passed to comment_form().
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/comment-template.php
Related Hooks

Related hooks will be displayed here in future updates.