Make WordPress Core


Ignore:
Timestamp:
07/01/2009 08:12:39 AM (15 years ago)
Author:
azaozz
Message:

Use new jQuery methods when adding, editing and deleting tags with AJAX, fix warning when deleting tags, see #10239

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-tags.php

    r11481 r11676  
    3535        wp_die(__('Cheatin’ uh?'));
    3636
    37     $ret = wp_insert_term($_POST['name'], $taxonomy, $_POST);
     37    $ret = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST);
    3838    if ( $ret && !is_wp_error( $ret ) ) {
    3939        wp_redirect('edit-tags.php?message=1#addtag');
     
    156156<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
    157157endif; ?>
     158<div id="ajax-response"></div>
    158159
    159160<form class="search-form" action="" method="get">
     
    275276<div class="form-wrap">
    276277<h3><?php _e('Add a New Tag'); ?></h3>
    277 <div id="ajax-response"></div>
    278 <form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">
    279 <input type="hidden" name="action" value="addtag" />
     278<form id="addtag" method="post" action="edit-tags.php" class="validate">
     279<input type="hidden" name="action" value="add-tag" />
    280280<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
    281 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field('add-tag'); ?>
     281<?php wp_nonce_field('add-tag'); ?>
    282282
    283283<div class="form-field form-required">
    284     <label for="name"><?php _e('Tag name') ?></label>
    285     <input name="name" id="name" type="text" value="" size="40" aria-required="true" />
     284    <label for="tag-name"><?php _e('Tag name') ?></label>
     285    <input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
    286286    <p><?php _e('The name is how the tag appears on your site.'); ?></p>
    287287</div>
     
    299299</div>
    300300
    301 <p class="submit"><input type="submit" class="button" name="submit" value="<?php esc_attr_e('Add Tag'); ?>" /></p>
     301<p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php esc_attr_e('Add Tag'); ?>" /></p>
    302302<?php do_action('add_tag_form'); ?>
    303303</form></div>
Note: See TracChangeset for help on using the changeset viewer.