WordPress.org

Make WordPress Core

Ticket #4009: blogger.php.diff

File blogger.php.diff, 751 bytes (added by clwill, 8 years ago)

Blogger update to add postid field

  • wp-admin/import/blogger.php

     
    526526                        add_post_meta( $post_id, 'blogger_blog', $this->blogs[$importing_blog]['host'], true ); 
    527527                        add_post_meta( $post_id, 'blogger_author', $author, true ); 
    528528                        add_post_meta( $post_id, 'blogger_permalink', $entry->old_permalink, true ); 
     529                        preg_match('/post-?(\d+)/', $entry->id, $matches); 
     530                        if ("" != $matches[1]) { 
     531                                add_post_meta( $post_id, 'blogger_postid', $matches[1], true ); 
     532                        } 
    529533 
    530534                        $this->blogs[$importing_blog]['posts'][$entry->old_permalink] = $post_id; 
    531535                        ++$this->blogs[$importing_blog]['posts_done'];