Make WordPress Core


Ignore:
Timestamp:
06/03/2007 05:28:27 PM (17 years ago)
Author:
ryan
Message:

Fix link category dropdown and filter. Add some back compat to get_categories. see #4189

File:
1 edited

Legend:

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

    r5599 r5642  
    1313
    1414function &get_categories($args = '') {
    15     // TODO Add back compat fields into each object.
    16     // Set taxonomy to link_category if type=link
    17     return get_terms('category', $args);
     15    $defaults = array('type' => 'category');
     16    $args = wp_parse_args($args, $defaults);
     17
     18    $taxonomy = 'category';
     19    if ( 'link' == $args['type'] )
     20        $taxonomy = 'link_category';
     21    return get_terms($taxonomy, $args);
    1822}
    1923
Note: See TracChangeset for help on using the changeset viewer.