Make WordPress Core

Ticket #31086: 31086.patch

File 31086.patch, 1.0 KB (added by joshlevinson, 11 years ago)
  • wp-includes/category-template.php

     
    13051305
    13061306        $terms = get_object_term_cache( $post->ID, $taxonomy );
    13071307        if ( false === $terms ) {
    1308                 $terms = wp_get_object_terms( $post->ID, $taxonomy );
     1308                $terms = wp_get_object_terms( $post->ID, $taxonomy, array('fields' => 'all_with_object_id') );
    13091309                wp_cache_add($post->ID, $terms, $taxonomy . '_relationships');
    13101310        }
    13111311
  • wp-includes/taxonomy.php

     
    37833783
    37843784        $object_terms = array();
    37853785        foreach ( (array) $terms as $term )
    3786                 $object_terms[$term->object_id][$term->taxonomy][$term->term_id] = $term;
     3786                $object_terms[$term->object_id][$term->taxonomy][] = $term;
    37873787
    37883788        foreach ( $ids as $id ) {
    37893789                foreach ( $taxonomies as $taxonomy ) {