]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/edit-category-form.php
Wordpress 2.9
[autoinstalls/wordpress.git] / wp-admin / edit-category-form.php
index 02289aa5c255334d5adb6e31fbdc1d20562324cb..53c60b57984c413f6db43269f28c7c0e92517437 100644 (file)
@@ -6,6 +6,13 @@
  * @subpackage Administration
  */
 
  * @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
  */
 /**
  * @var object
  */
@@ -50,7 +57,6 @@ _fill_empty_category($category);
                <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 />
                <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>
                </tr>
                <tr class="form-field">
                        <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>
                </tr>
                <tr class="form-field">
                        <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>
@@ -60,15 +66,16 @@ _fill_empty_category($category);
                <tr class="form-field">
                        <th scope="row" valign="top"><label for="category_parent"><?php _e('Category Parent') ?></label></th>
                        <td>
                <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('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>
                </tr>
+               <?php do_action('edit_category_form_fields', $category); ?>
        </table>
 <p class="submit"><input type="submit" class="button-primary" name="submit" value="<?php esc_attr_e('Update Category'); ?>" /></p>
 <?php do_action('edit_category_form', $category); ?>
        </table>
 <p class="submit"><input type="submit" class="button-primary" name="submit" value="<?php esc_attr_e('Update Category'); ?>" /></p>
 <?php do_action('edit_category_form', $category); ?>