query("INSERT INTO $wpdb->linkcategories (cat_id, cat_name, auto_toggle, show_images, show_description, \n" . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, text_after_all, list_limit) \n" . " VALUES ('0', '$cat_name', '$auto_toggle', '$show_images', '$show_description', \n" . " '$show_rating', '$show_updated', '$sort_order', '$sort_desc', '$text_before_link', '$text_after_link', \n" . " '$text_after_all', $list_limit)"); header('Location: link-categories.php'); break; } // end addcat case 'Delete': { $cat_id = (int) $_GET['cat_id']; check_admin_referer('delete-link-category' . $cat_id); $cat_name=get_linkcatname($cat_id); if ($cat_id=="1") die(sprintf(__("Can't delete the %s link category: this is the default one"), $cat_name)); if ( !current_user_can('manage_links') ) die (__("Cheatin' uh ?")); $wpdb->query("DELETE FROM $wpdb->linkcategories WHERE cat_id='$cat_id'"); $wpdb->query("UPDATE $wpdb->links SET link_category=1 WHERE link_category='$cat_id'"); header('Location: link-categories.php'); break; } // end delete case 'Edit': { include_once ('admin-header.php'); $cat_id = (int) $_GET['cat_id']; $row = $wpdb->get_row("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, " . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, " . " text_after_all, list_limit FROM $wpdb->linkcategories WHERE cat_id=$cat_id"); if ($row) { if ($row->list_limit == -1) { $row->list_limit = ''; } ?>
cat_name)?> | cat_id?> | auto_toggle == 'Y' ? __('Yes') : __('No') ?> | show_images == 'Y' ? __('Yes') : __('No') ?> | show_description == 'Y' ? __('Yes') : __('No') ?> | show_rating == 'Y' ? __('Yes') : __('No') ?> | show_updated == 'Y' ? __('Yes') : __('No') ?> | sort_order ?> | sort_desc == 'Y' ? __('Yes') : __('No') ?> | text_before_link)?> | text_after_link)?> | text_after_all)?> | list_limit ?> | cat_id?>&action=Delete", 'delete-link-category' . $row->cat_id) ?>" "onclick="return deleteSomething( 'link category', cat_id . ", '" . sprintf(__("You are about to delete the "%s" link category.\\n"Cancel" to stop, "OK" to delete."), wp_specialchars($row->cat_name,1)); ?>' );" class="delete"> |
It will just set them back to the default category %s.'), get_linkcatname(1)) ?>