WordPress.org

Make WordPress Core

Changeset 14606


Ignore:
Timestamp:
05/13/2010 07:16:09 PM (8 years ago)
Author:
ryan
Message:

get_term_by('id') -> get_term(). Add get_term filters to get_term_by.

File:
1 edited

Legend:

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

    r14593 r14606  
    527527        $field = 't.name';
    528528    } else {
    529         $field = 't.term_id';
    530         $value = (int) $value;
     529        return get_term( (int) $value, $taxonomy, $output, $filter);
    531530    }
    532531
     
    537536    wp_cache_add($term->term_id, $term, $taxonomy);
    538537
     538    $term = apply_filters('get_term', $term, $taxonomy);
     539    $term = apply_filters("get_$taxonomy", $term, $taxonomy);
    539540    $term = sanitize_term($term, $taxonomy, $filter);
    540541
Note: See TracChangeset for help on using the changeset viewer.