%s category: this is the default one"), $cat_name)); wp_delete_term($cat_ID, 'link_category'); } $location = 'edit-link-categories.php'; if ( $referer = wp_get_referer() ) { if ( false !== strpos($referer, 'edit-link-categories.php') ) $location = $referer; } $location = add_query_arg('message', 6, $location); wp_redirect($location); exit(); } elseif ( !empty($_GET['_wp_http_referer']) ) { wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); exit; } $title = __('Link Categories'); $parent_file = 'edit.php'; wp_enqueue_script( 'admin-categories' ); wp_enqueue_script('admin-forms'); require_once ('admin-header.php'); $messages[1] = __('Category added.'); $messages[2] = __('Category deleted.'); $messages[3] = __('Category updated.'); $messages[4] = __('Category not added.'); $messages[5] = __('Category not updated.'); $messages[6] = __('Categories deleted.'); if (isset($_GET['message'])) : ?>

add new)'), '#addcat') ?>


add_query_arg( 'pagenum', '%#%' ), 'format' => '', 'total' => ceil(wp_count_terms('link_category') / $catsperpage), 'current' => $pagenum )); if ( $page_links ) echo "
$page_links
"; ?>


$start, 'number' => $catsperpage, 'hide_empty' => 0); if ( !empty( $_GET['s'] ) ) $args['search'] = $_GET['s']; $categories = get_terms( 'link_category', $args ); if ( $categories ) { $output = ''; foreach ( $categories as $category ) { $category = sanitize_term($category, 'link_category', 'display'); $output .= link_cat_row($category); } $output = apply_filters('cat_rows', $output); echo $output; unset($category); } ?>
$page_links
"; ?>

Note:
Deleting a category does not delete the links in that category. Instead, links that were only assigned to the deleted category are set to the category %s.'), get_term_field('name', get_option('default_link_category'), 'link_category')) ?>