Changeset 3881

Show
Ignore:
Timestamp:
06/17/06 00:05:00 (3 years ago)
Author:
ryan
Message:

Use wp_list_categories() in templates.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-content/themes/classic/sidebar.php

    r3880 r3881  
    44 
    55<ul> 
    6     <?php wp_list_pages(); ?> 
    7     <?php wp_list_bookmarks(); ?> 
    8  <li id="categories"><?php _e('Categories:'); ?> 
    9     <ul> 
    10     <?php wp_list_cats(); ?> 
    11     </ul> 
    12  </li> 
     6    <?php wp_list_pages('title_li=' . __('Pages:')); ?> 
     7    <?php wp_list_bookmarks('title_after=&title_before='); ?> 
     8    <?php wp_list_categories('title_li=' . __('Categories:')); ?> 
    139 <li id="search"> 
    1410   <label for="s"><?php _e('Search:'); ?></label> 
  • trunk/wp-content/themes/default/sidebar.php

    r3880 r3881  
    4747            </li> 
    4848 
    49             <li><h2>Categories</h2> 
    50                 <ul> 
    51                 <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> 
    52                 </ul> 
    53             </li> 
     49            <?php wp_list_categories('sort_column=name&optioncount=1&hierarchical=0&title_li=<h2>Categories</h2>'); ?> 
    5450 
    5551            <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> 
  • trunk/wp-includes/category-template.php

    r3843 r3881  
    213213        parse_str($args, $r); 
    214214 
    215     $defaults = array('show_option_all' => '', 'orderby' => 'ID', 
    216         'order' => 'asc', 'style' => 'list', 'show_last_update' => 0
     215    $defaults = array('show_option_all' => '', 'orderby' => 'name', 
     216        'order' => 'ASC', 'show_last_update' => 0, 'style' => 'list'
    217217        'show_count' => 0, 'hide_empty' => 1, 'use_desc_for_title' => 1, 
    218218        'child_of' => 0, 'feed' => '', 'feed_image' => '', 'exclude' => '', 
    219         'hierarchical' => true, 'title_li' => ''); 
     219        'hierarchical' => true, 'title_li' => __('Categories')); 
    220220    $r = array_merge($defaults, $r); 
    221221    $r['include_last_update_time'] = $r['show_date']; 
     
    225225     
    226226    $output = ''; 
    227     if ( $title_li && $list
     227    if ( $title_li && 'list' == $style
    228228            $output = '<li class="categories">' . $r['title_li'] . '<ul>'; 
    229229 
     
    244244    } 
    245245 
    246     if ( $title_li && $list
     246    if ( $title_li && 'list' == $style
    247247        $output .= '</ul></li>'; 
    248248             
  • trunk/wp-includes/deprecated.php

    r3878 r3881  
    431431    if ( !empty($r['list']) ) 
    432432        $r['style'] = 'break'; 
     433    $r['title_li'] = ''; 
    433434 
    434435    return wp_list_categories($r);