Make WordPress Core

Opened 11 years ago

Closed 9 years ago

#27080 closed enhancement (wontfix)

Missing action 'comment_form_after_comment'

Reported by: bjoerne's profile bjoerne Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8.1
Component: Comments Keywords: needs-patch
Focuses: template Cc:

Description (last modified by TobiasBg)

It's nice to have action hooks for the comment form like comment_form_after_fields or comment_form. But I miss an action comment_form_after_comment which is called between the comment field note and the submit button. Like this:

<?php echo $args['comment_notes_after']; ?>
<?php do_action( 'comment_form_after_comment' ); ?>
<p class="form-submit">
	<input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />
	<?php comment_id_fields( $post_id ); ?>
</p>

Change History (5)

#1 @TobiasBg
11 years ago

  • Description modified (diff)
  • Focuses template added
  • Type changed from feature request to enhancement

#2 @SergeyBiryukov
11 years ago

You can use comment_form_defaults filter to append your text to $args['comment_notes_after']:

function comment_form_after_comment_27080( $defaults ) {
	$defaults['comment_notes_after'] .= '<p>your content</p>';
	return $defaults;
}
add_filter( 'comment_form_defaults', 'comment_form_after_comment_27080' );

This ticket was mentioned in IRC in #wordpress-dev by SergeyBiryukov. View the logs.


11 years ago

#5 @chriscct7
9 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Closing as wontfix. Complete lack of interest on the feature on the ticket over the last 2 years, with a workable workaround suggested in comment:2. Feel free to reopen when more interest re-emerges (particularly if there's a patch)

Note: See TracTickets for help on using tickets.