this works fine in 2.9, but not in 3.0 and 3.0.1
when creating categories with children, it doesnt show up in the manage category section, but if you goto make a post it shows up fine, when you goto categories, you have to edit the parent, and click update, then they show up in the category list.
here is a trac entry from months ago, see it wasnt resolved.
http://core.trac.wordpress.org/ticket/14471
the format is as follows
Finance/Mutual Funds
Finance/Personal Finance
Finance/Real Estate
here is the code
<?php
add_action('admin_menu', 'bulk_cat_menu');
function bulk_cat_menu() {
add_management_page('Category Import', 'Category Import', 10, __FILE__, 'bulk_add_cat');
}
function bulk_add_cat() {
global $wpdb;
$cats = $_POST['bulk_category_list'];
$s = split("\n", $cats);
foreach($s as $cat){
$cat = trim(preg_replace("![\r\n]+!", '', $cat));
$cats = split('\/', $cat);
$last_id = 0;
foreach($cats as $c2){
$last_id = wp_create_category($c2, $last_id);
}
}
?>
<div class="wrap nosubsub">
<div class="icon32" id="icon-edit"><br/></div>
<h2>Bulk Category Import</h2>
<form name="bulk_categories" action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']) ?>" method="post">
<br/>
<strong>Enter a list of category names, one per line:</strong>
<br/>
<textarea name="bulk_category_list" rows="20" style="width: 99%;"></textarea>
<br/>
<p class="submit"><input type="submit" name="submit" value="Add categories"/></p>
</form>
</div>
<?php
}
?>