2 require_once ('admin.php');
4 $parent_file = 'edit.php';
5 require_once ('admin-header.php');
9 <h2><?php _e('Import'); ?></h2>
10 <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>
14 // Load all importers so that they can register.
15 $import_loc = 'wp-admin/import';
16 $import_root = ABSPATH.$import_loc;
17 $imports_dir = @ opendir($import_root);
19 while (($file = readdir($imports_dir)) !== false) {
20 if ($file{0} == '.') {
22 } elseif (substr($file, -4) == '.php') {
23 require_once($import_root . '/' . $file);
27 @closedir($imports_dir);
29 $importers = get_importers();
31 if (empty ($importers)) {
32 echo '<p>'.__('No importers are available.').'</p>'; // TODO: make more helpful
35 <table class="widefat">
39 foreach ($importers as $id => $data) {
40 $style = ('class="alternate"' == $style || 'class="alternate active"' == $style) ? '' : 'alternate';
41 $action = "<a href='admin.php?import=$id' title='".wptexturize(strip_tags($data[1]))."'>{$data[0]}</a>";
44 $style = 'class="'.$style.'"';
47 <td class='import-system row-title'>$action</td>
48 <td class='desc'>{$data[1]}</td>
62 include ('admin-footer.php');