Make WordPress Core


Ignore:
Timestamp:
04/18/2010 03:54:45 PM (16 years ago)
Author:
nacin
Message:

Use is_post_type_hierarchical and is_taxonomy_hierarchical when we're fetching a post/tax object only to check the hierarchical flag. fixes #12950.

File:
1 edited

Legend:

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

    r14133 r14155  
    25112511    // Hierarchical taxonomies must always pass IDs rather than names so that children with the same
    25122512    // names but different parents aren't confused.
    2513     $taxonomy_obj = get_taxonomy( $taxonomy );
    2514     if ( $taxonomy_obj->hierarchical ) {
     2513    if ( is_taxonomy_hierarchical( $taxonomy ) ) {
    25152514        $tags = array_map( 'intval', $tags );
    25162515        $tags = array_unique( $tags );
Note: See TracChangeset for help on using the changeset viewer.