Make WordPress Core


Ignore:
Timestamp:
08/04/2009 09:46:42 PM (16 years ago)
Author:
westi
Message:

Add support for sticky posts to the WXR exporter and importer. Fixes #10462 props josephscott.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/wordpress.php

    r11321 r11774  
    379379        $post_type      = $this->get_tag( $post, 'wp:post_type' );
    380380        $post_password  = $this->get_tag( $post, 'wp:post_password' );
     381        $is_sticky      = $this->get_tag( $post, 'wp:is_sticky' );
    381382        $guid           = $this->get_tag( $post, 'guid' );
    382383        $post_author    = $this->get_tag( $post, 'dc:creator' );
     
    449450                printf(__('Importing post <em>%s</em>...'), stripslashes($post_title));
    450451                $comment_post_ID = $post_id = wp_insert_post($postdata);
     452                if ( $post_id && $is_sticky == 1 )
     453                    stick_post( $post_id );
     454
    451455            }
    452456
Note: See TracChangeset for help on using the changeset viewer.