Changes from trunk/wp-admin/link-category.php at r7537 to branches/2.6/wp-admin/link-category.php at r8392
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/wp-admin/link-category.php
r7537 r8392 29 29 30 30 $cat_name = get_term_field('name', $cat_ID, 'link_category'); 31 $default_cat_id = get_option('default_link_category'); 31 32 32 33 // Don't delete the default cats. 33 if ( $cat_ID == get_option('default_link_category'))34 if ( $cat_ID == $default_cat_id ) 34 35 wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 35 36 36 wp_delete_term($cat_ID, 'link_category' );37 wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); 37 38 38 39 $location = 'edit-link-categories.php'; … … 74 75 } 75 76 76 if ( wp_update_term($cat_ID, 'link_category', $_POST) ) 77 $update = wp_update_term($cat_ID, 'link_category', $_POST); 78 79 if ( $update && !is_wp_error($update) ) 77 80 $location = add_query_arg('message', 3, $location); 78 81 else
Note: See TracChangeset
for help on using the changeset viewer.