web/wp-admin/import/mt.php
branchwordpress
changeset 132 4d4862461b8d
parent 109 03b0d1493584
equal deleted inserted replaced
131:a4642baaf829 132:4d4862461b8d
     1 <?php
     1 <?php
     2 /**
     2 /**
     3  * Movable Type and Typepad Importer
     3  * Movable Type and TypePad Importer
     4  *
     4  *
     5  * @package WordPress
     5  * @package WordPress
     6  * @subpackage Importer
     6  * @subpackage Importer
     7  */
     7  */
     8 
     8 
     9 /**
     9 /**
    10  * Moveable Type and Typepad Importer class
    10  * Moveable Type and TypePad Importer class
    11  *
    11  *
    12  * Upload your exported Movable Type or Typepad entries into WordPress.
    12  * Upload your exported Movable Type or TypePad entries into WordPress.
    13  *
    13  *
    14  * @since unknown
    14  * @since unknown
    15  */
    15  */
    16 class MT_Import {
    16 class MT_Import {
    17 
    17 
    34 
    34 
    35 	function greet() {
    35 	function greet() {
    36 		$this->header();
    36 		$this->header();
    37 ?>
    37 ?>
    38 <div class="narrow">
    38 <div class="narrow">
    39 <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 &#8220;Upload file and import&#8221;, 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>
    39 <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 &#8220;Upload file and import&#8221;, 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>
    40 
    40 
    41 <?php wp_import_upload_form( add_query_arg('step', 1) ); ?>
    41 <?php wp_import_upload_form( add_query_arg('step', 1) ); ?>
    42 <form method="post" action="<?php echo esc_attr(add_query_arg('step', 1)); ?>" class="import-upload-form">
    42 <form method="post" action="<?php echo esc_attr(add_query_arg('step', 1)); ?>" class="import-upload-form">
    43 
    43 
    44 <?php wp_nonce_field('import-upload'); ?>
    44 <?php wp_nonce_field('import-upload'); ?>
   508 	}
   508 	}
   509 }
   509 }
   510 
   510 
   511 $mt_import = new MT_Import();
   511 $mt_import = new MT_Import();
   512 
   512 
   513 register_importer('mt', __('Movable Type and TypePad'), __('Import posts and comments from a Movable Type or Typepad blog.'), array ($mt_import, 'dispatch'));
   513 register_importer('mt', __('Movable Type and TypePad'), __('Import posts and comments from a Movable Type or TypePad blog.'), array ($mt_import, 'dispatch'));
   514 ?>
   514 ?>