false, 'test_type' => false);
$file = wp_handle_upload($_FILES['userfile'], $overrides);
if ( isset($file['error']) )
die($file['error']);
$url = $file['url'];
$opml_url = $file['file'];
$blogrolling = false;
}
if (isset($opml_url) && $opml_url != '') {
$opml = wp_remote_fopen($opml_url);
include_once('link-parse-opml.php');
$link_count = count($names);
for ($i = 0; $i < $link_count; $i++) {
if ('Last' == substr($titles[$i], 0, 4))
$titles[$i] = '';
if ('http' == substr($titles[$i], 0, 4))
$titles[$i] = '';
// FIXME: Use wp_insert_link().
$query = "INSERT INTO $wpdb->links (link_url, link_name, link_target, link_category, link_description, link_owner, link_rss)
VALUES('{$urls[$i]}', '".$wpdb->escape($names[$i])."', '', $cat_id, '".$wpdb->escape($descriptions[$i])."', $user_ID, '{$feeds[$i]}')\n";
$result = $wpdb->query($query);
echo sprintf('
'.__('Inserted %s').'
', $names[$i]);
}
?>
manage those links.'), $link_count, $cat_id, 'link-manager.php') ?>
" . __("You need to supply your OPML url. Press back on your browser and try again") . "\n";
} // end else
if ( ! $blogrolling )
@unlink($opml_url);
?>