WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 5 months ago

#41009 new enhancement

Add filter to comment form class

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

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 5 months ago.

Download all attachments as: .zip

Change History (2)

#1 @cjbj
5 months ago

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

@yahil
5 months ago

Note: See TracTickets for help on using tickets.