[wp-trac] Re: [WordPress Trac] #4182: Add ability to return list for wp_list_categories..

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 23 20:49:13 GMT 2007


#4182: Add ability to return list for wp_list_categories..
--------------------------+-------------------------------------------------
 Reporter:  profdeadmeat  |        Owner:  anonymous
     Type:  enhancement   |       Status:  new      
 Priority:  normal        |    Milestone:  2.2      
Component:  Template      |      Version:  2.1.3    
 Severity:  normal        |   Resolution:           
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by Otto42):

  * severity:  major => normal
  * component:  Administration => Template
  * summary:  bug with wp_list_catories => Add ability to return list for
              wp_list_categories..
  * priority:  high => normal
  * version:  2.1.2 => 2.1.3
  * milestone:  2.1.4 => 2.2
  * type:  defect => enhancement

Comment:

 This would make it similar to the functionality in wp_list_pages (and
 probably elsewhere too). Changes required are minimal.

 At the end of wp_list_categories(), change the echo statement to this:
 {{{
 $output = apply_filters('list_cats', $output);
 if ( $r['echo'] ) echo $output;
 else return $output;
 }}}

 Add this to the $defaults array:
 {{{
 'echo' => 1
 }}}

 And there you go. This will allow an "echo" parameter similar to
 wp_list_pages() echo parameter.

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


More information about the wp-trac mailing list