Plugin Directory

Changeset 1409742 for wordpress-importer


Ignore:
Timestamp:
05/03/2016 04:45:05 PM (10 years ago)
Author:
Otto42
Message:

Bump to 0.6.2. Add filter from https://core.trac.wordpress.org/ticket/33721, update tested line to 4.5.

Location:
wordpress-importer
Files:
6 added
2 edited

Legend:

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

    r1172282 r1409742  
    11=== WordPress Importer ===
    22Contributors: wordpressdotorg
    3 Donate link:
    43Tags: importer, wordpress
    54Requires at least: 3.0
    6 Tested up to: 4.3
    7 Stable tag: 0.6.1
     5Tested up to: 4.5
     6Stable tag: 0.6.2
    87License: GPLv2 or later
    98License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3938
    4039== Changelog ==
     40
     41= 0.6.2 =
     42* Add wp_import_existing_post filter. See: https://core.trac.wordpress.org/ticket/33721
    4143
    4244= 0.6 =
  • wordpress-importer/trunk/wordpress-importer.php

    r1157097 r1409742  
    66Author: wordpressdotorg
    77Author URI: http://wordpress.org/
    8 Version: 0.6.1
     8Version: 0.6.2
    99Text Domain: wordpress-importer
    1010License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    554554
    555555            $post_exists = post_exists( $post['post_title'], '', $post['post_date'] );
     556           
     557            /**
     558            * Filter ID of the existing post corresponding to post currently importing.
     559            *
     560            * Return 0 to force the post to be imported. Filter the ID to be something else
     561            * to override which existing post is mapped to the imported post.
     562            *
     563            * @see post_exists()
     564            * @since 0.6.2
     565            *
     566            * @param int   $post_exists  Post ID, or 0 if post did not exist.
     567            * @param array $post         The post array to be inserted.
     568            */
     569            $post_exists = apply_filters( 'wp_import_existing_post', $post_exists, $post );
     570           
    556571            if ( $post_exists && get_post_type( $post_exists ) == $post['post_type'] ) {
    557572                printf( __('%s “%s” already exists.', 'wordpress-importer'), $post_type_object->labels->singular_name, esc_html($post['post_title']) );
    558573                echo '<br />';
    559574                $comment_post_ID = $post_id = $post_exists;
     575                $this->processed_posts[ intval( $post['post_id'] ) ] = intval( $post_exists );
    560576            } else {
    561577                $post_parent = (int) $post['post_parent'];
Note: See TracChangeset for help on using the changeset viewer.