Ticket #11937: 11937.4.diff
| File 11937.4.diff, 4.8 KB (added by , 16 years ago) |
|---|
-
wp-admin/admin-ajax.php
502 502 if ( !current_user_can( 'manage_categories' ) ) 503 503 die('-1'); 504 504 505 if ( '' === trim($_POST[' name']) ) {505 if ( '' === trim($_POST['link_name']) ) { 506 506 $x = new WP_Ajax_Response( array( 507 507 'what' => 'link-cat', 508 508 'id' => new WP_Error( 'name', __('You did not enter a category name.') ) … … 510 510 $x->send(); 511 511 } 512 512 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']) ); 514 514 if ( is_wp_error( $r ) ) { 515 515 $x = new WP_AJAX_Response( array( 516 516 'what' => 'link-cat', … … 541 541 if ( !current_user_can( $tax->edit_cap ) ) 542 542 die('-1'); 543 543 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']) ); 545 545 546 546 if ( !$tag || is_wp_error($tag) || (!$tag = get_term( $tag['term_id'], $taxonomy )) ) { 547 547 echo '<div class="error"><p>' . __('An error has occured. Please reload the page and try again.') . '</p></div>'; -
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 <p><?php _e('The name of the link category. This is very prominent when using the “links” widget.'); ?></p> 202 203 </div> 203 204 <?php if ( !is_multisite() ) { ?> 204 205 <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" /> 207 208 <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 209 </div> 209 210 <?php } ?> 210 211 <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> 213 214 <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p> 214 215 </div> 215 216 -
wp-admin/edit-tags.php
310 310 </div> 311 311 <?php if ( !is_multisite() ) { ?> 312 312 <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" /> 315 315 <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> 316 316 </div> 317 317 <?php } ?> … … 323 323 </div> 324 324 <?php } ?> 325 325 <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> 328 328 <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p> 329 329 </div> 330 330 -
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');