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’t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
+ wp_die( sprintf( __("Can’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));
}
<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>