-
+ 771C5DF8D4D6BA39BFA5FF42E982A6A62B392C7FA82F745F4569942BD1E719A1032E534E15A2270D5A451011E8AF630CD46D3329550C1D31E0103C2C21D28629
mp-wp/wp-admin/edit-category-form.php
(0 . 0)(1 . 76)
9802 <?php
9803 /**
9804 * Edit category form for inclusion in administration panels.
9805 *
9806 * @package WordPress
9807 * @subpackage Administration
9808 */
9809
9810 /**
9811 * @var object
9812 */
9813 if ( ! isset( $category ) )
9814 $category = (object) array();
9815
9816 /**
9817 * @ignore
9818 * @since 2.7
9819 * @internal Used to prevent errors in page when no category is being edited.
9820 *
9821 * @param object $category
9822 */
9823 function _fill_empty_category(&$category) {
9824 if ( ! isset( $category->name ) )
9825 $category->name = '';
9826
9827 if ( ! isset( $category->slug ) )
9828 $category->slug = '';
9829
9830 if ( ! isset( $category->parent ) )
9831 $category->parent = '';
9832
9833 if ( ! isset( $category->description ) )
9834 $category->description = '';
9835 }
9836
9837 do_action('edit_category_form_pre', $category);
9838
9839 _fill_empty_category($category);
9840 ?>
9841
9842 <div class="wrap">
9843 <?php screen_icon(); ?>
9844 <h2><?php _e('Edit Category'); ?></h2>
9845 <div id="ajax-response"></div>
9846 <form name="editcat" id="editcat" method="post" action="categories.php" class="validate">
9847 <input type="hidden" name="action" value="editedcat" />
9848 <input type="hidden" name="cat_ID" value="<?php echo $category->term_id ?>" />
9849 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field('update-category_' . $cat_ID); ?>
9850 <table class="form-table">
9851 <tr class="form-field form-required">
9852 <th scope="row" valign="top"><label for="cat_name"><?php _e('Category Name') ?></label></th>
9853 <td><input name="cat_name" id="cat_name" type="text" value="<?php echo attribute_escape($category->name); ?>" size="40" aria-required="true" /><br />
9854 <?php _e('The name is used to identify the category almost everywhere, for example under the post or in the category widget.'); ?></td>
9855 </tr>
9856 <tr class="form-field">
9857 <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>
9858 <td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo attribute_escape(apply_filters('editable_slug', $category->slug)); ?>" size="40" /><br />
9859 <?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td>
9860 </tr>
9861 <tr class="form-field">
9862 <th scope="row" valign="top"><label for="category_parent"><?php _e('Category Parent') ?></label></th>
9863 <td>
9864 <?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'hierarchical' => true, 'show_option_none' => __('None'))); ?><br />
9865 <?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.'); ?>
9866 </td>
9867 </tr>
9868 <tr class="form-field">
9869 <th scope="row" valign="top"><label for="category_description"><?php _e('Description') ?></label></th>
9870 <td><textarea name="category_description" id="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->description); ?></textarea><br />
9871 <?php _e('The description is not prominent by default, however some themes may show it.'); ?></td>
9872 </tr>
9873 </table>
9874 <p class="submit"><input type="submit" class="button-primary" name="submit" value="<?php _e('Update Category'); ?>" /></p>
9875 <?php do_action('edit_category_form', $category); ?>
9876 </form>
9877 </div>