WordPress.org

Plugin Directory

Changeset 253977


Ignore:
Timestamp:
06/18/10 00:36:58 (4 years ago)
Author:
nacin
Message:

Use term_exists instead of is_term. props duck_, see WP ticket 13871.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wpcat2tag-importer/trunk/wpcat2tag-importer.php

    r253970 r253977  
    5757        foreach ( $categories as $category ) { 
    5858            $this->all_categories[] = $category; 
    59             if ( is_term( $category->slug, 'post_tag' ) ) 
     59            if ( term_exists( $category->slug, 'post_tag' ) ) 
    6060                $this->hybrids_ids[] = $category->term_id; 
    6161        } 
     
    6767        foreach ( $tags as $tag ) { 
    6868            $this->all_tags[] = $tag; 
    69             if ( is_term( $tag->slug, 'category' ) ) 
     69            if ( term_exists( $tag->slug, 'category' ) ) 
    7070                $this->hybrids_ids[] = $tag->term_id; 
    7171        } 
     
    272272                if ( $default_cat == $category->term_id ) { 
    273273 
    274                     if ( ! ($id = is_term( $category->slug, 'post_tag' ) ) ) 
     274                    if ( ! ($id = term_exists( $category->slug, 'post_tag' ) ) ) 
    275275                        $id = wp_insert_term($category->name, 'post_tag', array('slug' => $category->slug)); 
    276276 
Note: See TracChangeset for help on using the changeset viewer.