]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/edit-link-categories.php
Wordpress 2.9
[autoinstalls/wordpress.git] / wp-admin / edit-link-categories.php
index 691f326697dd06dca856ab23794cced2c6915c08..90dcce6646c23b90b035796a1a208adb9d3e266d 100644 (file)
@@ -18,13 +18,14 @@ if ( isset($_GET['action']) && isset($_GET['delete']) ) {
                wp_die(__('Cheatin’ uh?'));
 
        if ( 'delete' == $doaction ) {
-               foreach( (array) $_GET['delete'] as $cat_ID ) {
-                       $cat_name = get_term_field('name', $cat_ID, 'link_category');
-                       $default_cat_id = get_option('default_link_category');
+               $cats = (array) $_GET['delete'];
+               $default_cat_id = get_option('default_link_category');
 
+               foreach( $cats as $cat_ID ) {
+                       $cat_ID = (int) $cat_ID;
                        // Don't delete the default cats.
                        if ( $cat_ID == $default_cat_id )
-                               wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
+                               wp_die( sprintf( __("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), get_term_field('name', $cat_ID, 'link_category') ) );
 
                        wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id));
                }
@@ -209,6 +210,7 @@ if ( $page_links )
 <div class="form-field">
        <label for="description"><?php _e('Description (optional)') ?></label>
        <textarea name="description" id="description" rows="5" cols="40"></textarea>
+       <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p>
 </div>
 
 <p class="submit"><input type="submit" class="button" name="submit" value="<?php esc_attr_e('Add Category'); ?>" /></p>