Make WordPress Core

Ticket #4558: 4558.diff

File 4558.diff, 527 bytes (added by robmil, 16 years ago)
  • category-template.php

     
    158158function in_category( $category ) { // Check if the current post is in the given category
    159159        global $object_term_cache, $post, $blog_id;
    160160
     161        if ( !is_numeric($category) ) {
     162                $category = get_cat_ID($category);
     163        }
     164
    161165        if ( isset( $object_term_cache[$blog_id][$post->ID]['category'][$category] ) )
    162166                return true;
    163167        else