]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/link-category.php
Wordpress 3.0.6
[autoinstalls/wordpress.git] / wp-admin / link-category.php
index ea6479138a86003309ad7199e920c36254eb76be..caf73923e803d10a3b9667a4d83ffae838fe2e2a 100644 (file)
@@ -1,5 +1,16 @@
 <?php
-require_once('admin.php');
+/**
+ * Manage link category administration actions.
+ *
+ * This page is accessed by the link management pages and handles the forms and
+ * AJAX processes for category actions.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+/** Load WordPress Administration Bootstrap */
+require_once('./admin.php');
 
 wp_reset_vars(array('action', 'cat'));
 
@@ -31,7 +42,7 @@ case 'delete':
        $default_cat_id = get_option('default_link_category');
 
        // Don't delete the default cats.
-    if ( $cat_ID == $default_cat_id )
+       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_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id));
@@ -50,14 +61,14 @@ case 'delete':
 break;
 
 case 'edit':
-       $title = __('Categories');
-       $parent_file = 'edit.php';
+       $title = __('Edit Category');
+       $parent_file = 'link-manager.php';
        $submenu_file = 'edit-link-categories.php';
        require_once ('admin-header.php');
        $cat_ID = (int) $_GET['cat_ID'];
        $category = get_term_to_edit($cat_ID, 'link_category');
-       include('edit-link-category-form.php');
-       include('admin-footer.php');
+       include('./edit-link-category-form.php');
+       include('./admin-footer.php');
        exit;
 break;