Direct a user to the main site to install importers, fixes #17990

git-svn-id: http://svn.automattic.com/wordpress/trunk@18535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
duck_ 2011-08-11 20:49:47 +00:00
parent e8f9ea22eb
commit f98e622c39
1 changed files with 8 additions and 2 deletions

View File

@ -113,10 +113,16 @@ if (empty ($importers)) {
'"title="' . esc_attr__('Activate importer') . '"">' . $data[0] . '</a>';
}
}
if ( empty($action) )
$action = '<a href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug .
if ( empty($action) ) {
if ( is_main_site() ) {
$action = '<a href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug .
'&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox" title="' .
esc_attr__('Install importer') . '">' . $data[0] . '</a>';
} else {
$action = $data[0];
$data[1] = sprintf( __( 'This importer is not installed. Please install importers from <a href="%s">the main site</a>.' ), get_admin_url( $current_site->blog_id, 'import.php' ) );
}
}
} else {
$action = "<a href='" . esc_url("admin.php?import=$id") . "' title='" . esc_attr( wptexturize(strip_tags($data[1])) ) ."'>{$data[0]}</a>";
}