Changes in trunk/wp-admin/import/mt.php [4370:3387]
- File:
-
- 1 edited
-
trunk/wp-admin/import/mt.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/mt.php
r4370 r3387 12 12 function header() { 13 13 echo '<div class="wrap">'; 14 echo '<h2>'.__('Import Movable Type and TypePad').'</h2>';14 echo '<h2>'.__('Import Movable Type').'</h2>'; 15 15 } 16 16 … … 22 22 $this->header(); 23 23 ?> 24 <div class="narrow">25 24 <p><?php _e('Howdy! We’re about to begin the process to import all of your Movable Type entries into WordPress. To begin, select a file to upload and click Import.'); ?></p> 26 25 <?php wp_import_upload_form( add_query_arg('step', 1) ); ?> 27 26 <p><?php _e('The importer is smart enough not to import duplicates, so you can run this multiple times without worry if—for whatever reason—it doesn\'t finish. If you get an <strong>out of memory</strong> error try splitting up the import file into pieces.'); ?> </p> 28 </div>29 27 <?php 30 28 $this->footer(); … … 35 33 $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY ID"); 36 34 ?><select name="userselect[<?php echo $n; ?>]"> 37 <option value="#NONE#"> <?php _e('- Select -') ?></option>35 <option value="#NONE#">- Select -</option> 38 36 <?php 39 37 … … 137 135 function mt_authors_form() { 138 136 ?> 139 <div class="wrap">140 <h2><?php _e('Assign Authors'); ?></h2>141 137 <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> 142 138 <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> … … 151 147 foreach ($authors as $author) { 152 148 ++ $j; 153 echo '<li> '.__('Current author:').' <strong>'.$author.'</strong><br />'.sprintf(__('Create user %1$s or map to existing'), ' <input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30"> <br />');149 echo '<li><i>'.$author.'</i><br />'.'<input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30">'; 154 150 $this->users_form($j); 155 151 echo '</li>'; 156 152 } 157 153 158 echo '<input type="submit" value=" '.__('Submit').'">'.'<br/>';154 echo '<input type="submit" value="Submit">'.'<br/>'; 159 155 echo '</form>'; 160 echo '</ol></div>'; 161 156 echo '</ol>'; 157 158 flush(); 162 159 } 163 160 … … 165 162 $file = wp_import_handle_upload(); 166 163 if ( isset($file['error']) ) { 167 $this->header(); 168 echo '<p>'.__('Sorry, there has been an error').'.</p>'; 169 echo '<p><strong>' . $file['error'] . '</strong></p>'; 170 $this->footer(); 164 echo $file['error']; 171 165 return; 172 166 } … … 181 175 global $wpdb; 182 176 $i = -1; 183 echo "< div class='wrap'><ol>";177 echo "<ol>"; 184 178 foreach ($this->posts as $post) { 185 179 if ('' != trim($post)) { … … 200 194 // We want the excerpt 201 195 preg_match("|-----\nEXCERPT:(.*)|s", $post, $excerpt); 202 $ post_excerpt = $wpdb->escape(trim($excerpt[1]));196 $excerpt = $wpdb->escape(trim($excerpt[1])); 203 197 $post = preg_replace("|(-----\nEXCERPT:.*)|s", '', $post); 204 198 … … 337 331 } 338 332 if ( $num_comments ) 339 printf( ' '.__('(%s comments)'), $num_comments);333 printf(__('(%s comments)'), $num_comments); 340 334 341 335 // Finally the pings … … 385 379 } 386 380 if ( $num_pings ) 387 printf( ' '.__('(%s pings)'), $num_pings);388 381 printf(__('(%s pings)'), $num_pings); 382 389 383 echo "</li>"; 390 384 } 385 flush(); 391 386 } 392 387 … … 395 390 wp_import_cleanup($this->id); 396 391 397 echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3> </div>';392 echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3>'; 398 393 } 399 394 400 395 function import() { 401 396 $this->id = (int) $_GET['id']; 402 403 397 $this->file = get_attached_file($this->id); 404 398 $this->get_authors_from_post(); … … 427 421 428 422 function MT_Import() { 429 // Nothing. 423 // Nothing. 430 424 } 431 425 } … … 433 427 $mt_import = new MT_Import(); 434 428 435 register_importer('mt', __('Movable Type and TypePad'), __('Imports <strong>posts and comments</strong> from your Movable Type or TypePadblog'), array ($mt_import, 'dispatch'));429 register_importer('mt', 'Movable Type', __('Import posts and comments from your Movable Type blog'), array ($mt_import, 'dispatch')); 436 430 ?>
Note: See TracChangeset
for help on using the changeset viewer.