-
+ 897774B9D3F8540845FB15ECEE11B90E2AFE56017750628C7B28A28F10CD15BFACC4D640DA4407D1064D28BF868F01DF283CFBF144468AFFD79F08588B7D09E1
mp-wp/wp-admin/import.php
(0 . 0)(1 . 73)
22642 <?php
22643 /**
22644 * Import WordPress Administration Panel
22645 *
22646 * @package WordPress
22647 * @subpackage Administration
22648 */
22649
22650 /** Load WordPress Bootstrap */
22651 require_once ('admin.php');
22652 $title = __('Import');
22653 require_once ('admin-header.php');
22654 $parent_file = 'tools.php';
22655 ?>
22656
22657 <div class="wrap">
22658 <?php screen_icon(); ?>
22659 <h2><?php echo wp_specialchars( $title ); ?></h2>
22660 <p><?php _e('If you have posts or comments in another system, WordPress can import those into this blog. To get started, choose a system to import from below:'); ?></p>
22661
22662 <?php
22663
22664 // Load all importers so that they can register.
22665 $import_loc = 'wp-admin/import';
22666 $import_root = ABSPATH.$import_loc;
22667 $imports_dir = @ opendir($import_root);
22668 if ($imports_dir) {
22669 while (($file = readdir($imports_dir)) !== false) {
22670 if ($file{0} == '.') {
22671 continue;
22672 } elseif (substr($file, -4) == '.php') {
22673 require_once($import_root . '/' . $file);
22674 }
22675 }
22676 }
22677 @closedir($imports_dir);
22678
22679 $importers = get_importers();
22680
22681 if (empty ($importers)) {
22682 echo '<p>'.__('No importers are available.').'</p>'; // TODO: make more helpful
22683 } else {
22684 ?>
22685 <table class="widefat" cellspacing="0">
22686
22687 <?php
22688 $style = '';
22689 foreach ($importers as $id => $data) {
22690 $style = ('class="alternate"' == $style || 'class="alternate active"' == $style) ? '' : 'alternate';
22691 $action = "<a href='admin.php?import=$id' title='".wptexturize(strip_tags($data[1]))."'>{$data[0]}</a>";
22692
22693 if ($style != '')
22694 $style = 'class="'.$style.'"';
22695 echo "
22696 <tr $style>
22697 <td class='import-system row-title'>$action</td>
22698 <td class='desc'>{$data[1]}</td>
22699 </tr>";
22700 }
22701 ?>
22702
22703 </table>
22704 <?php
22705 }
22706 ?>
22707
22708 </div>
22709
22710 <?php
22711
22712 include ('admin-footer.php');
22713 ?>
22714