Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#26395 closed enhancement (wontfix)

New comment_form_after_textarea action.

Reported by: pross's profile pross Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Comments Keywords: has-patch
Focuses: Cc:


Adding a new action into comment_form() to make it easier to add simple captcha above the submit button.

Attachments (1)

comment-form.patch (730 bytes) - added by pross 9 years ago.

Download all attachments as: .zip

Change History (7)

9 years ago

#1 @pross
9 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
9 years ago

  • Version changed from trunk to 3.7

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

9 years ago

#4 @SergeyBiryukov
9 years ago

Related: #27080

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

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

#5 @rachelbaker
8 years ago

  • Keywords close added
  • Version 3.7 deleted

In addition to the comment_form_defaults filter mentioned by @SergeyBiryukov, there is also 2 actions for users that aren't logged in:
do_action( 'comment_form_before_fields' );
do_action( 'comment_form_after_fields' );

Recommending this request be closed as a wontfix.

#6 @DrewAPicture
8 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I agree with @rachelbaker, existing hooks provide ample enough flexibility. Closing as wontfix.

Note: See TracTickets for help on using tickets.