WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 3 months ago

#41009 new enhancement

Add filter to comment form class

Reported by: cjbj Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Comments Keywords: has-patch
Focuses: Cc:
PR Number:

Description

Almost all html of the comment_form function can be customized using filters, except for this line (current 2285 in comment-template.php), which is the wrapping div of the comment form:

<div id="respond" class="comment-respond">

I feel there are legitimate reasons for wanting at least the class to be filterable. For instance if you are using the clearfix class throughout your design to clear floats. So I would like to propose changing this line to this:

$respond_class = 'comment-respond';
$respond_class = apply_filters ('comment_form_respond_class' ,$respond_class);
echo '<div id="respond" class="' . esc_attr($respond_class) . '">';

Attachments (1)

41009.patch (677 bytes) - added by yahil 2 years ago.

Download all attachments as: .zip

Change History (3)

#1 @cjbj
2 years ago

  • Keywords has-patch added
  • Type changed from feature request to enhancement

@yahil
2 years ago

#2 @earnjam
3 months ago

  • Version 4.7 deleted
Note: See TracTickets for help on using tickets.