Make WordPress Core

Changeset 7326


Ignore:
Timestamp:
03/15/2008 11:16:28 PM (16 years ago)
Author:
westi
Message:

Import mt tags/keywords. See #4472 props shacker.

File:
1 edited

Legend:

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

    r7104 r7326  
    2424<div class="narrow">
    2525<p><?php _e('Howdy! We&#8217;re about to begin importing all of your Movable Type or Typepad entries into WordPress. To begin, either choose a file to upload and click "Upload file and import," or use FTP to upload your MT export file as <code>mt-export.txt</code> in your <code>/wp-content/</code> directory and then click "Import mt-export.txt"'); ?></p>
     26
    2627<?php wp_import_upload_form( add_query_arg('step', 1) ); ?>
    2728<form method="post" action="<?php echo add_query_arg('step', 1); ?>" class="import-upload-form">
     29
    2830<?php wp_nonce_field('import-upload'); ?>
    2931<p>
     
    222224            if ( 0 != count($post->categories) ) {
    223225                wp_create_categories($post->categories, $post_id);
     226            }
     227           
     228             // Add tags or keywords
     229            if ( 1 < strlen($post->post_keywords) ) {
     230                // Keywords exist.
     231                printf(__('<br />Adding tags <i>%s</i>...'), stripslashes($post->post_keywords));
     232                wp_add_post_tags($post_id, $post->post_keywords);
    224233            }
    225234        }
     
    397406                } else if ( 'excerpt' == $context ) {
    398407                    $post->post_excerpt .= $line;
     408                } else if ( 'keywords' == $context ) {
     409                    $post->post_keywords .= $line;
    399410                } else if ( 'comment' == $context ) {
    400411                    $comment->comment_content .= $line;
Note: See TracChangeset for help on using the changeset viewer.