summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-admin/import/mt.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-inst/wp-admin/import/mt.php')
-rw-r--r--wp-inst/wp-admin/import/mt.php38
1 files changed, 16 insertions, 22 deletions
diff --git a/wp-inst/wp-admin/import/mt.php b/wp-inst/wp-admin/import/mt.php
index 08bd343..0bdfd6d 100644
--- a/wp-inst/wp-admin/import/mt.php
+++ b/wp-inst/wp-admin/import/mt.php
@@ -11,7 +11,7 @@ class MT_Import {
function header() {
echo '<div class="wrap">';
- echo '<h2>'.__('Import Movable Type').'</h2>';
+ echo '<h2>'.__('Import Movable Type and Typepad').'</h2>';
}
function footer() {
@@ -32,6 +32,7 @@ class MT_Import {
global $wpdb, $testing;
$users = get_users_of_blog($wpdb->blogid);
?><select name="userselect[<?php echo $n; ?>]">
+ <option value="#NONE#">- Select -</option>
<?php
@@ -132,11 +133,12 @@ class MT_Import {
}
function mt_authors_form() {
- $this->header();
?>
-<h2><?php _e('Select Authors'); ?></h2>
+<div class="wrap">
+<h2><?php _e('Assign Authors'); ?></h2>
<p><?php _e('To make it easier for you to edit and save the imported posts and drafts, you may want to change the name of the author of the posts. For example, you may want to import all the entries as <code>admin</code>s entries.'); ?></p>
-<p><?php _e('Below, you can see the names of the authors of the MovableType posts in <i>italics</i>. For each of these names, pick an author from your blog from the menu'); ?></p>
+<p><?php _e('Below, you can see the names of the authors of the MovableType posts in <i>italics</i>. For each of these names, you can either pick an author in your WordPress installation from the menu, or enter a name for the author in the textbox.'); ?></p>
+<p><?php _e('If a new user is created by WordPress, the password will be set, by default, to "changeme". Quite suggestive, eh? ;)'); ?></p>
<?php
@@ -146,23 +148,17 @@ class MT_Import {
$j = -1;
foreach ($authors as $author) {
++ $j;
- echo '<li><i>'.$author.'</i><br />';
+ echo '<li><i>'.$author.'</i><br />'.'<input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30">';
$this->users_form($j);
echo '</li>';
}
echo '<input type="submit" value="Submit">'.'<br/>';
echo '</form>';
- echo '</ol>';
+ echo '</ol></div>';
- flush();
- $this->footer();
-?>
-<?php
}
-
-
function select_authors() {
$file = wp_import_handle_upload();
if ( isset($file['error']) ) {
@@ -178,9 +174,8 @@ class MT_Import {
function process_posts() {
global $wpdb;
- $this->header();
$i = -1;
- echo "<ol>";
+ echo "<div class='wrap'><ol>";
foreach ($this->posts as $post) {
if ('' != trim($post)) {
++ $i;
@@ -336,7 +331,7 @@ class MT_Import {
}
}
if ( $num_comments )
- printf(__('(%s comments)'), $num_comments);
+ printf(__(' (%s comments)'), $num_comments);
// Finally the pings
// fix the double newline on the first one
@@ -384,23 +379,22 @@ class MT_Import {
}
}
if ( $num_pings )
- printf(__('(%s pings)'), $num_pings);
-
+ printf(__(' (%s pings)'), $num_pings);
+
echo "</li>";
}
- flush();
}
echo '</ol>';
wp_import_cleanup($this->id);
- echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3>';
- $this->footer();
+ echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3></div>';
}
function import() {
$this->id = (int) $_GET['id'];
+
$this->file = get_attached_file($this->id);
$this->get_authors_from_post();
$this->get_entries();
@@ -427,11 +421,11 @@ class MT_Import {
}
function MT_Import() {
- // Nothing.
+ // Nothing.
}
}
$mt_import = new MT_Import();
-register_importer('mt', 'Movable Type / Typepad', __('Import posts and comments from your Movable Type or Typepad blog from their export file.'), array ($mt_import, 'dispatch'));
+register_importer('mt', 'Movable Type and Typepad', __('Imports <strong>posts and comments</strong> from your Movable Type or Typepad blog'), array ($mt_import, 'dispatch'));
?>