[wp-trac] [WordPress Trac] #10742: Using 'style' => 'ol' in wp_list_comments breaks js

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 7 15:46:07 UTC 2009


#10742: Using 'style' => 'ol' in wp_list_comments breaks js
--------------------------+-------------------------------------------------
 Reporter:  esmi          |       Owner:  junsuijin
     Type:  defect (bug)  |      Status:  assigned 
 Priority:  low           |   Milestone:  2.8.5    
Component:  Comments      |     Version:  2.8.4    
 Severity:  trivial       |    Keywords:  comments 
--------------------------+-------------------------------------------------
Changes (by junsuijin):

  * status:  new => assigned
  * severity:  normal => trivial
  * component:  General => Comments
  * priority:  normal => low
  * milestone:  Unassigned => 2.8.5
  * owner:  => junsuijin


Comment:

 I have also encountered this error. While the comment walker can be
 entirely overridden to bypass the issue, by default the comment walker
 will not form ol lists the same as ul lists because of the following bits
 of code in the function start_el:


 {{{
                 <?php if ( 'ul' == $args['style'] ) : ?>
                 <div id="div-comment-<?php comment_ID() ?>" class
 ="comment-body">
                 <?php endif; ?>
 [...]
                 <?php if ( 'ul' == $args['style'] ) : ?>
                 </div>
                 <?php endif; ?>
 }}}

 a simple change to the following will prevent users having to override the
 comment walker to achieve an ol with js functionality:

 {{{
                 <?php if ( 'div' != $args['style'] ) : ?>
                 <div id="div-comment-<?php comment_ID() ?>" class
 ="comment-body">
                 <?php endif; ?>
 [...]
                 <?php if ( 'div' != $args['style'] ) : ?>
                 </div>
                 <?php endif; ?>
 }}}

 I will attach a patch.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10742#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list