WordPress.org

Make WordPress Core

Changeset 6091


Ignore:
Timestamp:
09/12/07 02:53:27 (10 years ago)
Author:
ryan
Message:

Add echo or return option to wp_list_categories. Props Otto42. fixes #4182

File:
1 edited

Legend:

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

    r6026 r6091  
    242242        'child_of' => 0, 'feed' => '', 
    243243        'feed_image' => '', 'exclude' => '', 
    244         'hierarchical' => true, 'title_li' => __('Categories') 
     244        'hierarchical' => true, 'title_li' => __('Categories'), 
     245        'echo' => 1 
    245246    ); 
    246247 
     
    291292        $output .= '</ul></li>'; 
    292293 
    293     echo apply_filters('wp_list_categories', $output); 
     294    $output = apply_filters('wp_list_categories', $output); 
     295 
     296    if ( $echo ) 
     297        echo $output; 
     298    else 
     299        return $output; 
    294300} 
    295301 
Note: See TracChangeset for help on using the changeset viewer.