array( __('Blogger'), __('Install the Blogger importer to import posts, comments, and users from a Blogger blog.'), 'install' ),
'livejournal' => array( __( 'LiveJournal' ), __( 'Install the LiveJounral importer to import posts from LiveJournal using their API.' ), 'install' ),
'mt' => array( __('Movable Type and TypePad'), __('Install the Movable Type importer to import posts and comments from a Movable Type or TypePad blog.'), 'install' ),
'opml' => array( __('Blogroll'), __('Install the blogroll importer to import links in OPML format.'), 'install' ),
'rss' => array( __('RSS'), __('Install the RSS importer to import posts from an RSS feed.'), 'install' ),
'wordpress' => array( 'WordPress', __('Install the WordPress importer to import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.'), 'install' )
);
$importers = get_importers();
// If a popular importer is not registered, create a dummy registration that links to the plugin installer.
foreach ( array_keys($popular_importers) as $pop_importer ) {
if ( isset($importers[$pop_importer] ) )
continue;
$importers[$pop_importer] = $popular_importers[$pop_importer];
}
uasort($importers, create_function('$a, $b', 'return strcmp($a[0], $b[0]);'));
if (empty ($importers)) {
echo ''.__('No importers are available.').'
'; // TODO: make more helpful
} else {
?>
$data) {
$style = ('class="alternate"' == $style || 'class="alternate active"' == $style) ? '' : 'alternate';
if ( 'install' == $data[2] ) {
$plugin_slug = $id . '-importer';
$action = '' . $data[0] . '';
} else {
$action = "{$data[0]}";
}
if ($style != '')
$style = 'class="'.$style.'"';
echo "
$action |
{$data[1]} |
";
}
?>
' . sprintf('If the importer you need is not listed, search the plugins directory to see if an importer is available.', admin_url('plugin-install.php?tab=search&type=tag&s=importer') ) . '';
?>