Filter hook 'comment_form_submit_button'

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

View Source

comment_form_submit_button

Filter Hook
Description
Filters the submit button for the comment form to display.

Hook Information

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

Hook Parameters

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

Usage Examples

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

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

Source Code Context

wp-includes/comment-template.php:2871 - How this hook is used in WordPress core
<?php
2866  			 * @since 4.2.0
2867  			 *
2868  			 * @param string $submit_button HTML markup for the submit button.
2869  			 * @param array  $args          Arguments passed to comment_form().
2870  			 */
2871  			$submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args );
2872  
2873  			$submit_field = sprintf(
2874  				$args['submit_field'],
2875  				$submit_button,
2876  				get_comment_id_fields( $post_id )

PHP Documentation

<?php
/**
			 * Filters the submit button for the comment form to display.
			 *
			 * @since 4.2.0
			 *
			 * @param string $submit_button HTML markup for the submit button.
			 * @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.