WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/04/2012 10:44:19 PM (10 years ago)
Author:
ryan
Message:

Introduce term_is_ancestor_of(). Finish taxonomy support for wp_insert_category(). Props garyc40. fixes #15581

File:
1 edited

Legend:

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

    r19593 r19678  
    118118        $parent = 0;
    119119
    120     if ( empty($parent) || !category_exists( $parent ) || ($cat_ID && cat_is_ancestor_of($cat_ID, $parent) ) )
     120    if ( empty( $parent ) || ! term_exists( $parent, $taxonomy ) || ( $cat_ID && term_is_ancestor_of( $cat_ID, $parent, $taxonomy ) ) )
    121121        $parent = 0;
    122122
Note: See TracChangeset for help on using the changeset viewer.