WordPress.org

Plugin Directory

Changeset 485059


Ignore:
Timestamp:
01/05/12 13:26:10 (2 years ago)
Author:
duck_
Message:

Double check the post_type of pre-existing posts before blocking it from being imported as a duplicate, see #WP19218.

File:
1 edited

Legend:

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

    r439635 r485059  
    540540 
    541541            $post_exists = post_exists( $post['post_title'], '', $post['post_date'] ); 
    542             if ( $post_exists ) { 
     542            if ( $post_exists && get_post_type( $post_exists ) == $post['post_type'] ) { 
    543543                printf( __('%s “%s” already exists.', 'wordpress-importer'), $post_type_object->labels->singular_name, esc_html($post['post_title']) ); 
    544544                echo '<br />'; 
Note: See TracChangeset for help on using the changeset viewer.