]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/edit-category-form.php
Wordpress 2.9.2
[autoinstalls/wordpress.git] / wp-admin / edit-category-form.php
index 2e37f796411048e53141c9babd159fb01db5c6bf..a37f82e47110b0ca641a1758cfd3faa9f598bd95 100644 (file)
@@ -6,6 +6,13 @@
  * @subpackage Administration
  */
 
+// don't load directly
+if ( !defined('ABSPATH') )
+       die('-1');
+
+if ( !current_user_can('manage_categories') )
+       wp_die(__('You do not have sufficient permissions to edit categories for this blog.'));
+
 /**
  * @var object
  */
@@ -49,8 +56,7 @@ _fill_empty_category($category);
        <table class="form-table">
                <tr class="form-field form-required">
                        <th scope="row" valign="top"><label for="cat_name"><?php _e('Category Name') ?></label></th>
-                       <td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /><br />
-            <span class="description"><?php _e('The name is used to identify the category almost everywhere, for example under the post or in the category widget.'); ?></span></td>
+                       <td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /></td>
                </tr>
                <tr class="form-field">
                        <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>
@@ -60,14 +66,14 @@ _fill_empty_category($category);
                <tr class="form-field">
                        <th scope="row" valign="top"><label for="category_parent"><?php _e('Category Parent') ?></label></th>
                        <td>
-                               <?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'hierarchical' => true, 'show_option_none' => __('None'))); ?><br />
+                               <?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'exclude' => $category->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?><br />
                 <span class="description"><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></span>
                        </td>
                </tr>
                <tr class="form-field">
                        <th scope="row" valign="top"><label for="category_description"><?php _e('Description') ?></label></th>
                        <td><textarea name="category_description" id="category_description" rows="5" cols="50" style="width: 97%;"><?php echo esc_html($category->description); ?></textarea><br />
-            <span class="description"><?php _e('The description is not prominent by default, however some themes may show it.'); ?></span></td>
+            <span class="description"><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></span></td>
                </tr>
                <?php do_action('edit_category_form_fields', $category); ?>
        </table>