Changeset 9538 for trunk/wp-admin/edit-category-form.php
- Timestamp:
- 11/05/2008 10:52:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-category-form.php
r9294 r9538 12 12 if ( ! isset( $category ) ) 13 13 $category = (object) array(); 14 15 if ( ! empty($cat_ID) ) {16 /**17 * @var string18 */19 $heading = '';20 $submit_text = __('Edit Category');21 $form = '<form name="editcat" id="editcat" method="post" action="categories.php" class="validate">';22 $action = 'editedcat';23 $nonce_action = 'update-category_' . $cat_ID;24 do_action('edit_category_form_pre', $category);25 } else {26 $heading = '<h2>' . __('Add Category') . '</h2>';27 $submit_text = __('Add Category');28 $form = '<form name="addcat" id="addcat" method="post" action="categories.php" class="add:the-list: validate">';29 $action = 'addcat';30 $nonce_action = 'add-category';31 do_action('add_category_form_pre', $category);32 }33 14 34 15 /** … … 53 34 } 54 35 36 do_action('edit_category_form_pre', $category); 37 55 38 _fill_empty_category($category); 56 39 ?> 57 40 58 41 <div class="wrap"> 59 < ?php echo $heading ?>42 <h2><?php _e('Edit Category'); ?></h2> 60 43 <div id="ajax-response"></div> 61 < ?php echo $form ?>62 <input type="hidden" name="action" value=" <?php echo $action ?>" />44 <form name="editcat" id="editcat" method="post" action="categories.php" class="validate"> 45 <input type="hidden" name="action" value="editedcat" /> 63 46 <input type="hidden" name="cat_ID" value="<?php echo $category->term_id ?>" /> 64 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field( $nonce_action); ?>47 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field('update-category_' . $cat_ID); ?> 65 48 <table class="form-table"> 66 49 <tr class="form-field form-required"> … … 87 70 </tr> 88 71 </table> 89 <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text?>" /></p>72 <p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Edit Category'); ?>" /></p> 90 73 <?php do_action('edit_category_form', $category); ?> 91 74 </form>
Note: See TracChangeset
for help on using the changeset viewer.