Make WordPress Core


Ignore:
Timestamp:
05/15/2010 09:59:15 AM (15 years ago)
Author:
markjaquith
Message:

Do not show dummy default category output when calling the_category on a post_type that does not support the category taxonomy (like pages). Fix TwentyTen theme to not display wrapping text if there are no categories. fixes #10333

File:
1 edited

Legend:

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

    r14404 r14660  
    176176    global $wp_rewrite;
    177177    $categories = get_the_category( $post_id );
     178    if ( !is_object_in_taxonomy( get_post_type( $post_id ), 'category' ) )
     179        return apply_filters( 'the_category', '', $separator, $parents );
     180
    178181    if ( empty( $categories ) )
    179182        return apply_filters( 'the_category', __( 'Uncategorized' ), $separator, $parents );
Note: See TracChangeset for help on using the changeset viewer.