Make WordPress Core

Ticket #2727: 2727.diff

File 2727.diff, 949 bytes (added by mdawaffe, 20 years ago)

Fix for categories in WP import

  • wp-admin/import/wordpress.php

     
    220220                                $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt', 'guid', 'post_parent', 'post_type');
    221221                                $comment_post_ID = $post_id = wp_insert_post($postdata);
    222222                                // Add categories.
    223                                 if (0 != count($post_categories)) {
    224                                         wp_create_categories($post_categories, $post_id);
     223                                if (0 != count($categories)) {
     224                                        wp_create_categories($categories, $post_id);
    225225                                }
    226226                        }
    227227
     
    308308
    309309register_importer('wordpress', 'WordPress', __('Import posts from a WordPress export file'), array ($wp_import, 'dispatch'));
    310310
    311 ?>
    312  No newline at end of file
     311?>