Make WordPress Core

Changeset 11257


Ignore:
Timestamp:
05/11/2009 04:45:39 AM (17 years ago)
Author:
ryan
Message:

Pass IDs, not objects, to get_category_link(). fixes #9784

File:
1 edited

Legend:

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

    r11255 r11257  
    21592159    global $wp_rewrite;
    21602160
    2161     // use legacy functions for core taxonomies until they are fully plugged in
    2162     if ( $taxonomy == 'category' )
    2163         return get_category_link($term);
    2164     if ( $taxonomy == 'post_tag' )
    2165         return get_tag_link($term);
    2166 
    2167     $termlink = $wp_rewrite->get_extra_permastruct($taxonomy);
    2168 
    21692161    if ( !is_object($term) ) {
    21702162        if ( is_int($term) ) {
     
    21762168    if ( is_wp_error( $term ) )
    21772169        return $term;
     2170
     2171    // use legacy functions for core taxonomies until they are fully plugged in
     2172    if ( $taxonomy == 'category' )
     2173        return get_category_link((int) $term->term_id);
     2174    if ( $taxonomy == 'post_tag' )
     2175        return get_tag_link((int) $term->term_id);
     2176
     2177    $termlink = $wp_rewrite->get_extra_permastruct($taxonomy);
    21782178
    21792179    $slug = $term->slug;
Note: See TracChangeset for help on using the changeset viewer.