Make WordPress Core

Ticket #11937: 11937.4.diff

File 11937.4.diff, 4.8 KB (added by ShaneF, 16 years ago)
  • wp-admin/admin-ajax.php

     
    502502        if ( !current_user_can( 'manage_categories' ) )
    503503                die('-1');
    504504
    505         if ( '' === trim($_POST['name']) ) {
     505        if ( '' === trim($_POST['link_name']) ) {
    506506                $x = new WP_Ajax_Response( array(
    507507                        'what' => 'link-cat',
    508508                        'id' => new WP_Error( 'name', __('You did not enter a category name.') )
     
    510510                $x->send();
    511511        }
    512512
    513         $r = wp_insert_term($_POST['name'], 'link_category', $_POST );
     513        $r = wp_insert_term($_POST['link_name'], 'link_category', array('description' => $_POST['link_description'], 'slug' => $_POST['link_slug']) );
    514514        if ( is_wp_error( $r ) ) {
    515515                $x = new WP_AJAX_Response( array(
    516516                        'what' => 'link-cat',
     
    541541        if ( !current_user_can( $tax->edit_cap ) )
    542542                die('-1');
    543543
    544         $tag = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST );
     544        $tag = wp_insert_term($_POST['tag-name'], $taxonomy, array('description' => $_POST['tag-description'], 'slug' => $_POST['tag-slug']) );
    545545
    546546        if ( !$tag || is_wp_error($tag) || (!$tag = get_term( $tag['term_id'], $taxonomy )) ) {
    547547                echo '<div class="error"><p>' . __('An error has occured. Please reload the page and try again.') . '</p></div>';
  • wp-admin/edit-link-categories.php

     
    197197<?php wp_original_referer_field(true, 'previous'); wp_nonce_field('add-link-category'); ?>
    198198
    199199<div class="form-field form-required">
    200         <label for="name"><?php _e('Link Category name') ?></label>
    201         <input name="name" id="name" type="text" value="" size="40" aria-required="true" />
     200        <label for="link_name"><?php _e('Link Category name') ?></label>
     201        <input name="link_name" id="link_name" type="text" value="" size="40" aria-required="true" />
     202        <p><?php _e('The name of the link category. This is very prominent when using the &#8220;links&#8221; widget.'); ?></p>
    202203</div>
    203204<?php if ( !is_multisite() ) { ?>
    204205<div class="form-field">
    205         <label for="slug"><?php _e('Link Category slug') ?></label>
    206         <input name="slug" id="slug" type="text" value="" size="40" />
     206        <label for="link_slug"><?php _e('Link Category slug') ?></label>
     207        <input name="link_slug" id="link_slug" type="text" value="" size="40" />
    207208        <p><?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.'); ?></p>
    208209</div>
    209210<?php } ?>
    210211<div class="form-field">
    211         <label for="description"><?php _e('Description (optional)') ?></label>
    212         <textarea name="description" id="description" rows="5" cols="40"></textarea>
     212        <label for="link_description"><?php _e('Description (optional)') ?></label>
     213        <textarea name="link_description" id="link_description" rows="5" cols="40"></textarea>
    213214        <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p>
    214215</div>
    215216
  • wp-admin/edit-tags.php

     
    310310</div>
    311311<?php if ( !is_multisite() ) { ?>
    312312<div class="form-field">
    313         <label for="slug"><?php _e('Tag slug') ?></label>
    314         <input name="slug" id="slug" type="text" value="" size="40" />
     313        <label for="tag-slug"><?php _e('Tag slug') ?></label>
     314        <input name="tag-slug" id="tag-slug" type="text" value="" size="40" />
    315315        <p><?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.'); ?></p>
    316316</div>
    317317<?php } ?>
     
    323323</div>
    324324<?php } ?>
    325325<div class="form-field">
    326         <label for="description"><?php _e('Description') ?></label>
    327         <textarea name="description" id="description" rows="5" cols="40"></textarea>
     326        <label for="tag-description"><?php _e('Description') ?></label>
     327        <textarea name="tag-description" id="tag-description" rows="5" cols="40"></textarea>
    328328        <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p>
    329329</div>
    330330
  • wp-admin/link-category.php

     
    2323        if ( !current_user_can('manage_categories') )
    2424                wp_die(__('Cheatin&#8217; uh?'));
    2525
    26         if ( wp_insert_term($_POST['name'], 'link_category', $_POST ) ) {
     26        if ( wp_insert_term($_POST['link_name'], 'link_category', $_POST ) ) {
    2727                wp_redirect('edit-link-categories.php?message=1#addcat');
    2828        } else {
    2929                wp_redirect('edit-link-categories.php?message=4#addcat');