WordPress.org

Make WordPress Core

Changeset 5594


Ignore:
Timestamp:
05/29/07 21:50:00 (8 years ago)
Author:
ryan
Message:

Fix listing of categories with parents. see #4189

File:
1 edited

Legend:

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

    r5593 r5594  
    66$wp_taxonomies['link_category'] = (object) array('name' => 'link_category', 'object_type' => 'link', 'hierarchical' => false); 
    77 
    8 //error_log(var_export($wp_taxonomies, true), 0); 
    98function is_taxonomy( $taxonomy ) { 
    109    global $wp_taxonomies; 
     
    715714 
    716715    foreach ( $terms as $term ) { 
     716        $use_id = false; 
     717        if ( !is_object($term) ) { 
     718            $term = get_term($term, $taxonomy); 
     719            $use_id = true; 
     720        } 
     721 
    717722        if ( $term->term_id == $term_id ) 
    718723            continue; 
    719724 
    720725        if ( $term->parent == $term_id ) { 
    721             $term_list[] = $term; 
     726            if ( $use_id ) 
     727                $term_list[] = $term->term_id; 
     728            else 
     729                $term_list[] = $term; 
    722730 
    723731            if ( !isset($has_children[$term->term_id]) ) 
Note: See TracChangeset for help on using the changeset viewer.