Make WordPress Core


Ignore:
Timestamp:
06/11/2010 03:53:41 PM (16 years ago)
Author:
ryan
Message:

Deprecate is_term, is_taxonomy, is_post_type for *_exists(). Props nacin. fixes #13747

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r15178 r15220  
    238238                if ( '' === $category_nicename )
    239239                        continue;
    240                 if ( !($cat_id = is_term($cat_name, $taxonomy->name, $parent)) ) {
     240                if ( !($cat_id = term_exists($cat_name, $taxonomy->name, $parent)) ) {
    241241                        $new_term = wp_insert_term($cat_name, $taxonomy->name, array('parent' => $parent));
    242242                        $cat_id = $new_term['term_id'];
     
    502502                if ( '' === $slug )
    503503                        continue;
    504                 if ( !$cat_id = is_term( $cat_name, 'link_category' ) ) {
     504                if ( !$cat_id = term_exists( $cat_name, 'link_category' ) ) {
    505505                        $cat_id = wp_insert_term( $cat_name, 'link_category' );
    506506                }
Note: See TracChangeset for help on using the changeset viewer.