Plugin Directory

Changeset 740762


Ignore:
Timestamp:
07/15/2013 01:50:13 AM (13 years ago)
Author:
ReadyMadeWeb
Message:

Fixes issue with multiple identical categories and tags.

Location:
readymade-wordpress-importer-061/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • readymade-wordpress-importer-061/trunk/readme.txt

    r729520 r740762  
    55Requires at least: 3.0
    66Tested up to: 3.5
    7 Stable tag: 0.6.7
     7Stable tag: 0.6.8
    88
    99Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file.
     
    3232
    3333== Changelog ==
     34
     35= 0.6.8 =
     36* Fix issue with posts and tags being added multiple times (original importer bug)
    3437
    3538= 0.6.7 =
  • readymade-wordpress-importer-061/trunk/wordpress-importer.php

    r729520 r740762  
    66Author: wordpressdotorg, snyderp@gmail.com
    77Author URI: http://readymadeweb.com
    8 Version: 0.6.7
     8Version: 0.6.8
    99Text Domain: wordpress-importer
    1010License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    398398        foreach ( $this->categories as $cat ) {
    399399            // if the category already exists leave it alone
    400             $term_id = term_exists( $cat['category_nicename'], 'category' );
     400            $term_id = term_exists( $cat['cat_name'], 'category' );
     401
    401402            if ( $term_id ) {
    402403                if ( is_array($term_id) ) $term_id = $term_id['term_id'];
     
    442443        foreach ( $this->tags as $tag ) {
    443444            // if the tag already exists leave it alone
    444             $term_id = term_exists( $tag['tag_slug'], 'post_tag' );
     445            $term_id = term_exists( $tag['tag_name'], 'post_tag' );
    445446            if ( $term_id ) {
    446447                if ( is_array($term_id) ) $term_id = $term_id['term_id'];
     
    633634                    // back compat with WXR 1.0 map 'tag' to 'post_tag'
    634635                    $taxonomy = ( 'tag' == $term['domain'] ) ? 'post_tag' : $term['domain'];
    635                     $term_exists = term_exists( $term['slug'], $taxonomy );
     636                    $term_exists = term_exists( $term['name'], $taxonomy );
    636637                    $term_id = is_array( $term_exists ) ? $term_exists['term_id'] : $term_exists;
    637638                    if ( ! $term_id ) {
Note: See TracChangeset for help on using the changeset viewer.