[wp-trac] Re: [WordPress Trac] #10221: Limit Categories by Parent

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 19 22:09:52 GMT 2009


#10221: Limit Categories by Parent
-----------------------------+----------------------------------------------
 Reporter:  utahcon          |       Owner:  filosofo                                        
     Type:  feature request  |      Status:  new                                             
 Priority:  normal           |   Milestone:  Unassigned                                      
Component:  Taxonomy         |     Version:  2.8                                             
 Severity:  normal           |    Keywords:  wp_list_categories, number, categories, taxonomy
-----------------------------+----------------------------------------------

Comment(by utahcon):

 I forgot to add that in the file '''wp-includes/taxonomy.php''' the
 following should be added to accomodate the parent filter:

 {{{
 if ( $parent ) {
      $hierarchy = _get_term_hierarchy($taxonomies[0]);
      if ( !isset($hierarchy[$parent]) )
           return $empty_array;
      }
 }
 }}}

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


More information about the wp-trac mailing list