WordPress.org

Make WordPress Core

Ticket #11937: 11937.3.patch

File 11937.3.patch, 3.0 KB (added by ShaneF, 5 years ago)
  • wp-admin/admin-ajax.php

     
    556556        if ( !current_user_can( 'manage_categories' ) ) 
    557557                die('-1'); 
    558558 
    559         if ( '' === trim($_POST['name']) ) { 
     559        if ( '' === trim($_POST['link_name']) ) { 
    560560                $x = new WP_Ajax_Response( array( 
    561561                        'what' => 'link-cat', 
    562562                        'id' => new WP_Error( 'name', __('You did not enter a category name.') ) 
     
    564564                $x->send(); 
    565565        } 
    566566 
    567         $r = wp_insert_term($_POST['name'], 'link_category', $_POST ); 
     567        $r = wp_insert_term($_POST['link_name'], 'link_category', $_POST ); 
    568568        if ( is_wp_error( $r ) ) { 
    569569                $x = new WP_AJAX_Response( array( 
    570570                        'what' => 'link-cat', 
  • 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" /> 
    202202</div> 
    203203<?php if ( !is_multisite() ) { ?> 
    204204<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" /> 
     205        <label for="link_slug"><?php _e('Link Category slug') ?></label> 
     206        <input name="link_slug" id="link_slug" type="text" value="" size="40" /> 
    207207        <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> 
    208208</div> 
    209209<?php } ?> 
    210210<div class="form-field"> 
    211         <label for="description"><?php _e('Description (optional)') ?></label> 
    212         <textarea name="description" id="description" rows="5" cols="40"></textarea> 
     211        <label for="link_description"><?php _e('Description (optional)') ?></label> 
     212        <textarea name="link_description" id="link_description" rows="5" cols="40"></textarea> 
    213213        <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p> 
    214214</div> 
    215215 
  • 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');