X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/177fd6fefd2e3d5a0ea6591c71d660cabdb3c1a4..4f4e083f6f77639c41e2b1ddb200de8e34301cee:/wp-admin/link-category.php diff --git a/wp-admin/link-category.php b/wp-admin/link-category.php index a67cf2b6..bcfbf2e8 100644 --- a/wp-admin/link-category.php +++ b/wp-admin/link-category.php @@ -1,4 +1,15 @@ %s category: this is the default one"), $cat_name)); - wp_delete_term($cat_ID, 'link_category'); + wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); $location = 'edit-link-categories.php'; if ( $referer = wp_get_original_referer() ) { @@ -49,8 +61,8 @@ case 'delete': break; case 'edit': - $title = __('Categories'); - $parent_file = 'edit.php'; + $title = __('Edit Category'); + $parent_file = 'link-manager.php'; $submenu_file = 'edit-link-categories.php'; require_once ('admin-header.php'); $cat_ID = (int) $_GET['cat_ID']; @@ -73,7 +85,9 @@ case 'editedcat': $location = $referer; } - if ( wp_update_term($cat_ID, 'link_category', $_POST) ) + $update = wp_update_term($cat_ID, 'link_category', $_POST); + + if ( $update && !is_wp_error($update) ) $location = add_query_arg('message', 3, $location); else $location = add_query_arg('message', 5, $location);