Ticket #11937: 11937.3.patch
File 11937.3.patch, 3.0 KB (added by , 15 years ago) |
---|
-
wp-admin/admin-ajax.php
556 556 if ( !current_user_can( 'manage_categories' ) ) 557 557 die('-1'); 558 558 559 if ( '' === trim($_POST[' name']) ) {559 if ( '' === trim($_POST['link_name']) ) { 560 560 $x = new WP_Ajax_Response( array( 561 561 'what' => 'link-cat', 562 562 'id' => new WP_Error( 'name', __('You did not enter a category name.') ) … … 564 564 $x->send(); 565 565 } 566 566 567 $r = wp_insert_term($_POST[' name'], 'link_category', $_POST );567 $r = wp_insert_term($_POST['link_name'], 'link_category', $_POST ); 568 568 if ( is_wp_error( $r ) ) { 569 569 $x = new WP_AJAX_Response( array( 570 570 'what' => 'link-cat', -
wp-admin/edit-link-categories.php
197 197 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field('add-link-category'); ?> 198 198 199 199 <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 202 </div> 203 203 <?php if ( !is_multisite() ) { ?> 204 204 <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" /> 207 207 <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p> 208 208 </div> 209 209 <?php } ?> 210 210 <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> 213 213 <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p> 214 214 </div> 215 215 -
wp-admin/link-category.php
23 23 if ( !current_user_can('manage_categories') ) 24 24 wp_die(__('Cheatin’ uh?')); 25 25 26 if ( wp_insert_term($_POST[' name'], 'link_category', $_POST ) ) {26 if ( wp_insert_term($_POST['link_name'], 'link_category', $_POST ) ) { 27 27 wp_redirect('edit-link-categories.php?message=1#addcat'); 28 28 } else { 29 29 wp_redirect('edit-link-categories.php?message=4#addcat');