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

git-svn-id: https://develop.svn.wordpress.org/trunk@18535 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave 2011-08-11 20:49:47 +00:00
parent f55ab7feaa
commit 707ab6c656

View File

@ -113,10 +113,16 @@ if (empty ($importers)) {
'"title="' . esc_attr__('Activate importer') . '"">' . $data[0] . '</a>'; '"title="' . esc_attr__('Activate importer') . '"">' . $data[0] . '</a>';
} }
} }
if ( empty($action) ) if ( empty($action) ) {
$action = '<a href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . 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="' . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox" title="' .
esc_attr__('Install importer') . '">' . $data[0] . '</a>'; 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 { } 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=$id") . "' title='" . esc_attr( wptexturize(strip_tags($data[1])) ) ."'>{$data[0]}</a>";
} }