Changeset 12317 for trunk/wp-admin/edit-link-categories.php
- Timestamp:
- 12/03/2009 01:43:49 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-link-categories.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-link-categories.php
r12228 r12317 19 19 20 20 if ( 'delete' == $doaction ) { 21 foreach( (array) $_GET['delete'] as $cat_ID ) { 22 $cat_name = get_term_field('name', $cat_ID, 'link_category'); 23 $default_cat_id = get_option('default_link_category'); 24 21 $cats = (array) $_GET['delete']; 22 $default_cat_id = get_option('default_link_category'); 23 24 foreach( $cats as $cat_ID ) { 25 $cat_ID = (int) $cat_ID; 25 26 // Don't delete the default cats. 26 27 if ( $cat_ID == $default_cat_id ) 27 wp_die( sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name));28 wp_die( sprintf( __("Can’t delete the <strong>%s</strong> category: this is the default one"), get_term_field('name', $cat_ID, 'link_category') ) ); 28 29 29 30 wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id));
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)