[wp-trac] [WordPress Trac] #23797: Hard coded HTML marking in comment_form()

WordPress Trac noreply at wordpress.org
Sat Mar 16 21:16:24 UTC 2013


#23797: Hard coded HTML marking in comment_form()
-----------------------------+-------------------------
 Reporter:  Marie-Aude       |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Comments
  Version:  3.5.1            |   Severity:  normal
 Keywords:                   |
-----------------------------+-------------------------
 Hello

 it seems so ugly hard coding has slipped in the comment form.

 On line 1554 of comment-template.php, there is some hard-coded html :
  {{{
 <h3 id="reply-title">
 <?php comment_form_title( $args['title_reply'], $args['title_reply_to'] );
 ?>
 <small><?php cancel_comment_reply_link( $args['cancel_reply_link'] );
 ?></small>
 </h3>
  }}}

 Semantically speaking, a H3 is far from being optimal.
 Also, filters exists for all other elements of the comment form.
 The h3 and small should not be hardcoded.

 A new value could be included in the defaults :

  {{{
 'comment_reply_markup' =>
     '<h3 id="reply-title">%1$s <small>%2$s</small></h3>',
  }}}

 and line 1554 replaced by :

  {{{
 <?php printf( $args['comment_reply_markup'],
 comment_form_title( $args['title_reply'],
 $args['title_reply_to'] ), cancel_comment_reply_link(
 $args['cancel_reply_link'] ); ?>
  }}}

 Thanks a lot, hope you'll take it :)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23797>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list