Ticket #28836: meta-boxes.php.patch
File meta-boxes.php.patch, 5.3 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/meta-boxes.php
465 465 $taxonomy = $r['taxonomy']; 466 466 $tax = get_taxonomy( $taxonomy ); 467 467 ?> 468 <div id="taxonomy-<?php echo $taxonomy; ?>" class="categorydiv">469 <ul id="<?php echo $taxonomy; ?>-tabs" class="category-tabs">470 <li class="tabs"><a href="#<?php echo $taxonomy; ?>-all"><?php echo $tax->labels->all_items; ?></a></li>471 <li class="hide-if-no-js"><a href="#<?php echo $taxonomy; ?>-pop"><?php _e( 'Most Used' ); ?></a></li>468 <div id="taxonomy-<?php echo esc_attr( $taxonomy ); ?>" class="categorydiv"> 469 <ul id="<?php echo esc_attr( $taxonomy ); ?>-tabs" class="category-tabs"> 470 <li class="tabs"><a href="#<?php echo esc_attr( $taxonomy ); ?>-all"><?php echo esc_html( $tax->labels->all_items ); ?></a></li> 471 <li class="hide-if-no-js"><a href="#<?php echo esc_attr( $taxonomy ); ?>-pop"><?php _e( 'Most Used' ); ?></a></li> 472 472 </ul> 473 473 474 <div id="<?php echo $taxonomy; ?>-pop" class="tabs-panel" style="display: none;">475 <ul id="<?php echo $taxonomy; ?>checklist-pop" class="categorychecklist form-no-clear" >474 <div id="<?php echo esc_attr( $taxonomy ); ?>-pop" class="tabs-panel" style="display: none;"> 475 <ul id="<?php echo esc_attr( $taxonomy ); ?>checklist-pop" class="categorychecklist form-no-clear" > 476 476 <?php $popular_ids = wp_popular_terms_checklist($taxonomy); ?> 477 477 </ul> 478 478 </div> 479 479 480 <div id="<?php echo $taxonomy; ?>-all" class="tabs-panel">480 <div id="<?php echo esc_attr( $taxonomy ); ?>-all" class="tabs-panel"> 481 481 <?php 482 $name = ( $taxonomy == 'category' ) ? 'post_category' : 'tax_input[' . $taxonomy. ']';482 $name = ( $taxonomy == 'category' ) ? 'post_category' : 'tax_input[' . esc_attr( $taxonomy ) . ']'; 483 483 echo "<input type='hidden' name='{$name}[]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks. 484 484 ?> 485 <ul id="<?php echo $taxonomy; ?>checklist" data-wp-lists="list:<?php echo $taxonomy?>" class="categorychecklist form-no-clear">485 <ul id="<?php echo esc_attr( $taxonomy ) ; ?>checklist" data-wp-lists="list:<?php echo esc_attr( $taxonomy ); ?>" class="categorychecklist form-no-clear"> 486 486 <?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?> 487 487 </ul> 488 488 </div> 489 489 <?php if ( current_user_can($tax->cap->edit_terms) ) : ?> 490 <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children">490 <div id="<?php echo esc_attr( $taxonomy ); ?>-adder" class="wp-hidden-children"> 491 491 <h4> 492 <a id="<?php echo $taxonomy; ?>-add-toggle" href="#<?php echo $taxonomy; ?>-add" class="hide-if-no-js">492 <a id="<?php echo esc_attr( $taxonomy ); ?>-add-toggle" href="#<?php echo esc_attr( $taxonomy ); ?>-add" class="hide-if-no-js"> 493 493 <?php 494 494 /* translators: %s: add new taxonomy label */ 495 495 printf( __( '+ %s' ), $tax->labels->add_new_item ); … … 496 496 ?> 497 497 </a> 498 498 </h4> 499 <p id="<?php echo $taxonomy; ?>-add" class="category-add wp-hidden-child">500 <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>"><?php echo $tax->labels->add_new_item; ?></label>501 <input type="text" name="new<?php echo $taxonomy; ?>" id="new<?php echo $taxonomy; ?>" class="form-required form-input-tip" value="<?php echo esc_attr( $tax->labels->new_item_name ); ?>" aria-required="true"/>502 <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>_parent">503 <?php echo $tax->labels->parent_item_colon; ?>499 <p id="<?php echo esc_attr( $taxonomy ); ?>-add" class="category-add wp-hidden-child"> 500 <label class="screen-reader-text" for="new<?php echo esc_attr( $taxonomy ); ?>"><?php echo $tax->labels->add_new_item; ?></label> 501 <input type="text" name="new<?php echo esc_attr( $taxonomy ); ?>" id="new<?php echo esc_attr( $taxonomy ); ?>" class="form-required form-input-tip" value="<?php echo esc_attr( $tax->labels->new_item_name ); ?>" aria-required="true"/> 502 <label class="screen-reader-text" for="new<?php echo esc_attr( $taxonomy ); ?>_parent"> 503 <?php echo esc_html( $tax->labels->parent_item_colon ); ?> 504 504 </label> 505 505 <?php wp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —' ) ); ?> 506 <input type="button" id="<?php echo $taxonomy; ?>-add-submit" data-wp-lists="add:<?php echo $taxonomy?>checklist:<?php echo $taxonomy ?>-add" class="button category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" />506 <input type="button" id="<?php echo esc_attr( $taxonomy ); ?>-add-submit" data-wp-lists="add:<?php echo esc_attr( $taxonomy ) ?>checklist:<?php echo $taxonomy ?>-add" class="button category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /> 507 507 <?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy, false ); ?> 508 <span id="<?php echo $taxonomy; ?>-ajax-response"></span>508 <span id="<?php echo esc_attr( $taxonomy ); ?>-ajax-response"></span> 509 509 </p> 510 510 </div> 511 511 <?php endif; ?>