| [ Index ] |
WordPress Source Cross Reference |
[Summary view] [Print] [Text view]
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="categories.php">'; 6 $action = 'editedcat'; 7 $nonce_action = 'update-category_' . $cat_ID; 8 } else { 9 $heading = __('Add Category'); 10 $submit_text = __('Add Category »'); 11 $form = '<form name="addcat" id="addcat" method="post" action="categories.php">'; 12 $action = 'addcat'; 13 $nonce_action = 'add-category'; 14 } 15 ?> 16 17 <div class="wrap"> 18 <h2><?php echo $heading ?></h2> 19 <?php echo $form ?> 20 <input type="hidden" name="action" value="<?php echo $action ?>" /> 21 <input type="hidden" name="cat_ID" value="<?php echo $category->cat_ID ?>" /> 22 <?php wp_nonce_field($nonce_action); ?> 23 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 24 <tr> 25 <th width="33%" scope="row" valign="top"><label for="cat_name"><?php _e('Category name:') ?></label></th> 26 <td width="67%"><input name="cat_name" id="cat_name" type="text" value="<?php echo wp_specialchars($category->cat_name); ?>" size="40" /></td> 27 </tr> 28 <tr> 29 <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category slug:') ?></label></th> 30 <td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo wp_specialchars($category->category_nicename); ?>" size="40" /></td> 31 </tr> 32 <tr> 33 <th scope="row" valign="top"><label for="category_parent"><?php _e('Category parent:') ?></label></th> 34 <td> 35 <select name='category_parent' id='category_parent'> 36 <option value='0' <?php if (!$category->category_parent) echo " selected='selected'"; ?>><?php _e('None') ?></option> 37 <?php wp_dropdown_cats($category->cat_ID, $category->category_parent); ?> 38 </select></td> 39 </tr> 40 <tr> 41 <th scope="row" valign="top"><label for="category_description"><?php _e('Description: (optional)') ?></label></th> 42 <td><textarea name="category_description" id="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->category_description, 1); ?></textarea></td> 43 </tr> 44 </table> 45 <p class="submit"><input type="submit" name="submit" value="<?php echo $submit_text ?>" /></p> 46 <div id="ajax-response"></div> 47 </form> 48 </div>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sat Jul 15 11:57:04 2006 | Courtesy of Taragana |