Make WordPress Core

Ticket #43666: 43666.patch

File 43666.patch, 603 bytes (added by mukesh27, 7 years ago)
  • wordpress-importer.php

    diff -Naur wordpress-importer.php wordpress-importer.php
     
    825825                                                if ( ! $value )
    826826                                                        $value = maybe_unserialize( $meta['value'] );
    827827
    828                                                 add_post_meta( $post_id, $key, $value );
     828                                                if ( ! add_post_meta( $post_id, $key, $value, true ) ) {
     829                                                   update_post_meta( $post_id, $key, $value );
     830                                                }
    829831                                                do_action( 'import_post_meta', $post_id, $key, $value );
    830832
    831833                                                // if the post has a featured image, take note of this in case of remap