- md5
- b7e90a55f3eee674530912768bdf46c7
- sha1
- 3a6dac87345b9caadaa900193daa637304794e52
- sha256
- d15468fb5c1ad3d0c806a054c96dd75cbd5d278fafe52628abf8972c7d84774c
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
<?php
/**
* Import WordPress Administration Panel
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Bootstrap */
require_once ('admin.php');
$title = __('Import');
require_once ('admin-header.php');
?>
<div class="wrap">
<h2><?php echo wp_specialchars( $title ); ?></h2>
<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>
<?php
// Load all importers so that they can register.
$import_loc = 'wp-admin/import';
$import_root = ABSPATH.$import_loc;
$imports_dir = @ opendir($import_root);
if ($imports_dir) {
while (($file = readdir($imports_dir)) !== false) {
if ($file{0} == '.') {
continue;
} elseif (substr($file, -4) == '.php') {
require_once($import_root . '/' . $file);
}
}
}
@closedir($imports_dir);
$importers = get_importers();
if (empty ($importers)) {
echo '<p>'.__('No importers are available.').'</p>'; // TODO: make more helpful
} else {
?>
<table class="widefat">
<?php
$style = '';
foreach ($importers as $id => $data) {
$style = ('class="alternate"' == $style || 'class="alternate active"' == $style) ? '' : 'alternate';
$action = "<a href='admin.php?import=$id' title='".wptexturize(strip_tags($data[1]))."'>{$data[0]}</a>";
if ($style != '')
$style = 'class="'.$style.'"';
echo "
<tr $style>
<td class='import-system row-title'>$action</td>
<td class='desc'>{$data[1]}</td>
</tr>";
}
?>
</table>
<?php
}
?>
</div>
<?php
include ('admin-footer.php');
?>
The same content is in 3 releases, WordPress 2.7-beta1 to 2.7-beta3. See them all, or every version of this file.