Index: wp-admin/import.php
===================================================================
--- wp-admin/import.php	(revision 19602)
+++ wp-admin/import.php	(working copy)
@@ -31,20 +31,79 @@
 );
 
 $popular_importers = array();
-if ( current_user_can('install_plugins') )
-	$popular_importers = array(
-		'blogger' => array( __('Blogger'), __('Install the Blogger importer to import posts, comments, and users from a Blogger blog.'), 'install' ),
-		'wpcat2tag' => array(__('Categories and Tags Converter'), __('Install the category/tag converter to convert existing categories to tags or tags to categories, selectively.'), 'install', 'wp-cat2tag' ),
-		'livejournal' => array( __( 'LiveJournal' ), __( 'Install the LiveJournal importer to import posts from LiveJournal using their API.' ), 'install' ),
-		'movabletype' => array( __('Movable Type and TypePad'), __('Install the Movable Type importer to import posts and comments from a Movable Type or TypePad blog.'), 'install', 'mt' ),
-		'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' ),
-		'tumblr' => array( __('Tumblr'), __('Install the Tumblr importer to import posts &amp; media from Tumblr using their API.'), 'install' ),
-		'wordpress' => array( 'WordPress', __('Install the WordPress importer to import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.'), 'install' )
-	);
+if ( current_user_can('install_plugins') ) {
 
-if ( ! empty( $_GET['invalid'] ) && !empty($popular_importers[$_GET['invalid']][3]) ) {
-	wp_redirect( admin_url('import.php?import=' . $popular_importers[$_GET['invalid']][3]) );
+	$popular_importers = get_site_transient( 'popular_importers' );
+	if ( empty( $popular_importers ) ) {
+		$popular_importers = maybe_unserialize( wp_remote_retrieve_body( wp_remote_get( 'http://api.wordpress.org/core/importers/1.0/' ) ) );
+
+		if ( $popular_importers ) {
+			false && update_site_transient( 'popular_importers', $popular_importers, 604800 ); // week
+
+			foreach ( $popular_importers as &$importer ) {
+				// API: importer slug => name, description, register_importer() id
+				// $wp_importers: importer slug => name, description, callback
+				if ( isset( $importer[2] ) )
+					$importer[3] = $importer[2];
+				$importer[2] = 'install'; // dummy callback
+				$importer[1] = translate( $importer[1] );
+			}
+			unset( $importer );
+
+		} else {
+			// importer slug => name, description, 'install', register_importer() id (if not slug)
+			$popular_importers = array(
+				'blogger' => array(
+					__('Blogger'),
+					__('Install the Blogger importer to import posts, comments, and users from a Blogger blog.'),
+					'install',
+				),
+				'wpcat2tag' => array(
+					__('Categories and Tags Converter'),
+					__('Install the category/tag converter to convert existing categories to tags or tags to categories, selectively.'),
+					'install',
+					'wp-cat2tag',
+				),
+				'livejournal' => array(
+					__( 'LiveJournal' ),
+					__( 'Install the LiveJournal importer to import posts from LiveJournal using their API.' ),
+					'install',
+				),
+				'movabletype' => array(
+					__('Movable Type and TypePad'),
+					__('Install the Movable Type importer to import posts and comments from a Movable Type or TypePad blog.'),
+					'install',
+					'mt',
+				),
+				'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',
+					'rss',
+				),
+				'tumblr' => array(
+					__('Tumblr'),
+					__('Install the Tumblr importer to import posts &amp; media from Tumblr using their API.'),
+					'install',
+				),
+				'wordpress' => array(
+					'WordPress',
+					__('Install the WordPress importer to import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.'),
+					'install',
+				)
+			);
+		}
+	}
+}
+
+// Redirect invalid importers.
+if ( ! empty( $_GET['invalid'] ) && ! empty( $popular_importers[ $_GET['invalid'] ][3] ) ) {
+	wp_redirect( admin_url('import.php?import=' . $popular_importers[ $_GET['invalid'] ][3] ) );
 	exit;
 }
 
@@ -69,16 +128,16 @@
 
 // If a popular importer is not registered, create a dummy registration that links to the plugin installer.
 foreach ( $popular_importers as $pop_importer => $pop_data ) {
-	if ( isset( $importers[$pop_importer] ) )
+	if ( isset( $importers[ $pop_importer ] ) )
 		continue;
 	if ( isset( $pop_data[3] ) && isset( $importers[ $pop_data[3] ] ) )
 		continue;
 
-	$importers[$pop_importer] = $popular_importers[$pop_importer];
+	$importers[ $pop_importer ] = $popular_importers[ $pop_importer ];
 }
 
-if ( empty($importers) ) {
-	echo '<p>'.__('No importers are available.').'</p>'; // TODO: make more helpful
+if ( empty( $importers ) ) {
+	echo '<p>' . __('No importers are available.') . '</p>'; // TODO: make more helpful
 } else {
 	uasort($importers, create_function('$a, $b', 'return strcmp($a[0], $b[0]);'));
 ?>
@@ -86,11 +145,11 @@
 
 <?php
 	$style = '';
-	foreach ($importers as $id => $data) {
+	foreach ($importers as $importer_id => $data) {
 		$style = ('class="alternate"' == $style || 'class="alternate active"' == $style) ? '' : 'alternate';
 		$action = '';
 		if ( 'install' == $data[2] ) {
-			$plugin_slug = $id . '-importer';
+			$plugin_slug = $importer_id . '-importer';
 			if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_slug ) ) {
 				// Looks like Importer is installed, But not active
 				$plugins = get_plugins( '/' . $plugin_slug );
@@ -112,7 +171,7 @@
 				}
 			}
 		} else {
-			$action = "<a href='" . esc_url("admin.php?import=$id") . "' title='" . esc_attr( wptexturize(strip_tags($data[1])) ) ."'>{$data[0]}</a>";
+			$action = "<a href='" . esc_url("admin.php?import=$importer_id") . "' title='" . esc_attr( wptexturize(strip_tags($data[1])) ) ."'>{$data[0]}</a>";
 		}
 
 		if ($style != '')
