* @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
*/
<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>
<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>
<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); ?>