[wp-trac] [WordPress Trac] #3734: sidebar class not displayed correctly

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 2 14:07:46 GMT 2007


#3734: sidebar class not displayed correctly
---------------------+------------------------------------------------------
 Reporter:  jsekera  |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.3      
Component:  General  |     Version:           
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 File: template-functions-post.php[[BR]]
 Line: 417

 The class for a selected page is being incorrectly written into the list
 element.
 This generates the following incorrect class entry in the sidebar for
 selected page.

 {{{
 <li class="page_item current_page_item">...
 }}}


 if the correct html solution is to look something like this

 {{{
 <li class="current_page_item">
 }}}


 the below solution works just fine


 Looks as though the error stems from line 417 of  template-functions-
 post.php

 The following entry

 {{{
         415     $css_class = 'page_item';
         416     if ( $page_id == $queried_obj->ID )
         417             $css_class .= ' current_page_item';
 //                                 ^   ^
 }}}


 Corrected reads something like this:

 {{{
         415     $css_class = 'page_item';
         416     if ( $page_id == $queried_obj->ID )
         417     $css_class = 'current_page_item';

 }}}

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


More information about the wp-trac mailing list