WordPress.org

Make WordPress Core

Changeset 38779


Ignore:
Timestamp:
10/11/16 04:05:34 (7 months ago)
Author:
boonebgorges
Message:

Taxonomy: Specify taxonomy when populating cached object terms.

[38776] introduced a call to get_term() using only the term ID. This
causes problems in cases where shared terms have not been split. Since
we have the taxonomy available, there's no harm in passing it along to
get_term().

Props dd32.
See #37291.

File:
1 edited

Legend:

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

    r38776 r38779  
    30433043    $terms = array(); 
    30443044    foreach ( $term_ids as $term_id ) { 
    3045         $term = get_term( $term_id ); 
     3045        $term = get_term( $term_id, $taxonomy ); 
    30463046        if ( is_wp_error( $term ) ) { 
    30473047            return $term; 
Note: See TracChangeset for help on using the changeset viewer.