WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/10/2006 08:34:17 PM (16 years ago)
Author:
matt
Message:

New import and export, v0.1

File:
1 edited

Legend:

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

    r3749 r3769  
    1212    function header() {
    1313        echo '<div class="wrap">';
    14         echo '<h2>'.__('Import Movable Type').'</h2>';
     14        echo '<h2>'.__('Import Movable Type and Typepad').'</h2>';
    1515    }
    1616
     
    149149        foreach ($authors as $author) {
    150150            ++ $j;
    151             echo '<li><i>'.$author.'</i><br />'.'<input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30">';
     151            echo '<li>Current author: <strong>'.$author.'</strong><br />'.'Create user <input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30"> <br /> or map to existing ';
    152152            $this->users_form($j);
    153153            echo '</li>';
     
    163163        $file = wp_import_handle_upload();
    164164        if ( isset($file['error']) ) {
    165             echo $file['error'];
     165            $this->header();
     166            echo '<p>Sorry, there has been an error.</p>';
     167            echo '<p><strong>' . $file['error'] . '</strong></p>';
     168            $this->footer();
    166169            return;
    167170        }
     
    332335                }
    333336                if ( $num_comments )
    334                     printf(__('(%s comments)'), $num_comments);
     337                    printf(__(' (%s comments)'), $num_comments);
    335338
    336339                // Finally the pings
     
    380383                }
    381384                if ( $num_pings )
    382                     printf(__('(%s pings)'), $num_pings);
     385                    printf(__(' (%s pings)'), $num_pings);
    383386
    384387                echo "</li>";
     
    395398    function import() {
    396399        $this->id = (int) $_GET['id'];
     400       
    397401        $this->file = get_attached_file($this->id);
    398402        $this->get_authors_from_post();
     
    427431$mt_import = new MT_Import();
    428432
    429 register_importer('mt', 'Movable Type', __('Import posts and comments from your Movable Type blog'), array ($mt_import, 'dispatch'));
     433register_importer('mt', 'Movable Type and Typepad', __('Imports <strong>posts and comments</strong> from your Movable Type or Typepad blog'), array ($mt_import, 'dispatch'));
    430434?>
Note: See TracChangeset for help on using the changeset viewer.