Make WordPress Core

Opened 13 years ago

Closed 11 years ago

#27080 closed enhancement (wontfix)

Missing action 'comment_form_after_comment'

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

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
13 years ago

  • Description modified (diff)
  • Focuses template added
  • Type feature requestenhancement

#2 @SergeyBiryukov
13 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.


12 years ago

#5 @chriscct7
11 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

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.