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