Make WordPress Core


Ignore:
Timestamp:
01/11/2010 07:27:44 PM (17 years ago)
Author:
ryan
Message:

Show custom hierarchical taxonomies in the menus. Props dd32. see #11838

File:
1 edited

Legend:

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

    r12515 r12694  
    3838 */
    3939function &get_categories( $args = '' ) {
    40         $defaults = array( 'type' => 'category' );
     40        $defaults = array( 'taxonomy' => 'category' );
    4141        $args = wp_parse_args( $args, $defaults );
    4242
    43         $taxonomy = apply_filters( 'get_categories_taxonomy', 'category', $args );
    44         if ( 'link' == $args['type'] )
    45                 $taxonomy = 'link_category';
     43        $taxonomy = apply_filters( 'get_categories_taxonomy', $args['taxonomy'], $args );
     44
     45        if ( isset($args['type']) && 'link' == $args['type'] ) //Back compat
     46                $taxonomy = $args['taxonomy'] = 'link_category';
     47
    4648        $categories = (array) get_terms( $taxonomy, $args );
    4749
Note: See TracChangeset for help on using the changeset viewer.