Ticket #26409: 26409.diff
File 26409.diff, 2.9 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/meta-boxes.php
386 386 extract( wp_parse_args($args, $defaults), EXTR_SKIP ); 387 387 $tax_name = esc_attr($taxonomy); 388 388 $taxonomy = get_taxonomy($taxonomy); 389 $user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms );390 389 $comma = _x( ',', 'tag delimiter' ); 390 391 if ( current_user_can( $taxonomy->cap->assign_terms ) ) : 391 392 ?> 392 393 <div class="tagsdiv" id="<?php echo $tax_name; ?>"> 393 394 <div class="jaxtag"> 394 395 <div class="nojs-tags hide-if-js"> 395 396 <p><?php echo $taxonomy->labels->add_or_remove_items; ?></p> 396 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php disabled( ! $user_can_assign_terms ); ?>><?php echo str_replace( ',', $comma . ' ', get_terms_to_edit( $post->ID, $tax_name ) ); // textarea_escaped by esc_attr() ?></textarea></div> 397 <?php if ( $user_can_assign_terms ) : ?> 397 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>"><?php echo str_replace( ',', $comma . ' ', get_terms_to_edit( $post->ID, $tax_name ) ); // textarea_escaped by esc_attr() ?></textarea></div> 398 398 <div class="ajaxtag hide-if-no-js"> 399 399 <label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label> 400 400 <div class="taghint"><?php echo $taxonomy->labels->add_new_item; ?></div> … … 402 402 <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" /></p> 403 403 </div> 404 404 <p class="howto"><?php echo $taxonomy->labels->separate_items_with_commas; ?></p> 405 <?php endif; ?>406 405 </div> 407 406 <div class="tagchecklist"></div> 408 407 </div> 409 <?php if ( $user_can_assign_terms ) : ?>410 408 <p class="hide-if-no-js"><a href="#titlediv" class="tagcloud-link" id="link-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->choose_from_most_used; ?></a></p> 411 <?php endif; ?>412 409 <?php 410 endif; 413 411 } 414 412 415 413 /** … … 428 426 extract( wp_parse_args($args, $defaults), EXTR_SKIP ); 429 427 $tax = get_taxonomy($taxonomy); 430 428 429 if ( current_user_can( $tax->cap->assign_terms ) ) : 431 430 ?> 432 431 <div id="taxonomy-<?php echo $taxonomy; ?>" class="categorydiv"> 433 432 <ul id="<?php echo $taxonomy; ?>-tabs" class="category-tabs"> … … 450 449 <?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?> 451 450 </ul> 452 451 </div> 453 <?php if ( current_user_can($tax->cap->edit_terms) ) : ?>454 452 <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children"> 455 453 <h4> 456 454 <a id="<?php echo $taxonomy; ?>-add-toggle" href="#<?php echo $taxonomy; ?>-add" class="hide-if-no-js"> … … 472 470 <span id="<?php echo $taxonomy; ?>-ajax-response"></span> 473 471 </p> 474 472 </div> 475 <?php endif; ?>476 473 </div> 477 474 <?php 475 endif; 478 476 } 479 477 480 478 /**