Ticket #7316: 7316.diff
| File 7316.diff, 1.6 KB (added by , 18 years ago) |
|---|
-
wp-admin/edit-link-categories.php
10 10 11 11 foreach( (array) $_GET['delete'] as $cat_ID ) { 12 12 $cat_name = get_term_field('name', $cat_ID, 'link_category'); 13 13 $default_cat_id = get_option('default_link_category'); 14 14 15 // Don't delete the default cats. 15 if ( $cat_ID == get_option('default_link_category'))16 if ( $cat_ID == $default_cat_id ) 16 17 wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 17 18 18 wp_delete_term($cat_ID, 'link_category' );19 wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); 19 20 } 20 21 21 22 $location = 'edit-link-categories.php'; -
wp-admin/link-category.php
28 28 wp_die(__('Cheatin’ uh?')); 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'; 39 40 if ( $referer = wp_get_original_referer() ) {