Make WordPress Core


Ignore:
Timestamp:
01/25/2007 02:02:21 AM (17 years ago)
Author:
ryan
Message:

Don't output ul when title_li is empty. Props m0n5t3r. fixes #3664

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/bookmark-template.php

    r4656 r4800  
    345345       
    346346        if ( !empty($bookmarks) ) {
    347             $output .= str_replace(array('%id', '%class'), array("linkuncat", $class), $category_before);
    348             $output .= "$title_before$title_li$title_after\n\t<ul>\n";
    349             $output .= _walk_bookmarks($bookmarks, $r);
    350             $output .= "\n\t</ul>\n$category_after\n";
     347            if ( !empty( $title_li ) ){
     348                $output .= str_replace(array('%id', '%class'), array("linkcat-$category", $class), $category_before);
     349                $output .= "$title_before$title_li$title_after\n\t<ul>\n";
     350                $output .= _walk_bookmarks($bookmarks, $r);
     351                $output .= "\n\t</ul>\n$category_after\n";
     352            } else {
     353                $output .= _walk_bookmarks($bookmarks, $r);
     354            }
    351355        }
    352356    }
Note: See TracChangeset for help on using the changeset viewer.