WordPress.org

Make WordPress Core

Changeset 12224


Ignore:
Timestamp:
11/19/09 19:42:52 (4 years ago)
Author:
markjaquith
Message:

Do not use the unreliable in_the_loop() when grabbing terms. fixes #11189

File:
1 edited

Legend:

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

    r12014 r12224  
    868868    $id = (int) $id; 
    869869 
    870     if ( ! $id && ! in_the_loop() ) 
    871         return false; // in-the-loop function 
    872  
    873     if ( !$id ) 
    874         $id = (int) $post->ID; 
     870    if ( !$id ) { 
     871        if ( !$post->ID ) 
     872            return false; 
     873        else 
     874            $id = (int) $post->ID; 
     875    } 
    875876 
    876877    $terms = get_object_term_cache( $id, $taxonomy ); 
Note: See TracChangeset for help on using the changeset viewer.