]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/edit-link-category-form.php
Wordpress 2.5.1
[autoinstalls/wordpress.git] / wp-admin / edit-link-category-form.php
1 <?php
2 if ( ! empty($cat_ID) ) {
3         $heading = __('Edit Category');
4         $submit_text = __('Edit Category');
5         $form = '<form name="editcat" id="editcat" method="post" action="link-category.php" class="validate">';
6         $action = 'editedcat';
7         $nonce_action = 'update-link-category_' . $cat_ID;
8         do_action('edit_link_category_form_pre', $category);
9 } else {
10         $heading = __('Add Category');
11         $submit_text = __('Add Category');
12         $form = '<form name="addcat" id="addcat" class="add:the-list: validate" method="post" action="link-category.php">';
13         $action = 'addcat';
14         $nonce_action = 'add-link-category';
15         do_action('add_link_category_form_pre', $category);
16 }
17 ?>
18
19 <div class="wrap">
20 <h2><?php echo $heading ?></h2>
21 <div id="ajax-response"></div>
22 <?php echo $form ?>
23 <input type="hidden" name="action" value="<?php echo $action ?>" />
24 <input type="hidden" name="cat_ID" value="<?php echo $category->term_id ?>" />
25 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field($nonce_action); ?>
26         <table class="form-table">
27                 <tr class="form-field form-required">
28                         <th scope="row" valign="top"><label for="name"><?php _e('Category name') ?></label></th>
29                         <td><input name="name" id="name" type="text" value="<?php echo $category->name; ?>" size="40" /></td>
30                 </tr>
31                 <tr class="form-field">
32                         <th scope="row" valign="top"><label for="slug"><?php _e('Category slug') ?></label></th>
33                         <td><input name="slug" id="slug" type="text" value="<?php echo $category->slug; ?>" size="40" />
34             <?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td>
35                 </tr>
36                 <tr class="form-field">
37                         <th scope="row" valign="top"><label for="description"><?php _e('Description (optional)') ?></label></th>
38                         <td><textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"><?php echo $category->description; ?></textarea></td>
39                 </tr>
40         </table>
41 <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text ?>" /></p>
42 <?php do_action('edit_link_category_form', $category); ?>
43 </form>
44 </div>