Ticket #13972: 13972.4.patch
| File 13972.4.patch, 3.3 KB (added by , 13 years ago) |
|---|
-
wp-admin/includes/meta-boxes.php
396 396 397 397 <div id="<?php echo $taxonomy; ?>-all" class="tabs-panel"> 398 398 <?php 399 $name = ( $taxonomy == 'category' ) ? 'post_category' : 'tax_input[' . $taxonomy . ']';400 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.401 ?>399 $name = ( $taxonomy == 'category' ) ? 'post_category' : 'tax_input[' . $taxonomy . ']'; 400 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. 401 ?> 402 402 <ul id="<?php echo $taxonomy; ?>checklist" data-wp-lists="list:<?php echo $taxonomy?>" class="categorychecklist form-no-clear"> 403 403 <?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?> 404 404 </ul> 405 405 </div> 406 <?php if ( current_user_can($tax->cap->edit_terms) ) : ?>406 <?php if ( current_user_can( $tax->cap->edit_terms ) ) : ?> 407 407 <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children"> 408 408 <h4> 409 409 <a id="<?php echo $taxonomy; ?>-add-toggle" href="#<?php echo $taxonomy; ?>-add" class="hide-if-no-js"> … … 723 723 * @param object $link 724 724 */ 725 725 function link_categories_meta_box($link) { 726 $taxonomy = get_taxonomy( 'link_category' ); 726 727 ?> 727 728 <div id="taxonomy-linkcategory" class="categorydiv"> 728 729 <ul id="category-tabs" class="category-tabs"> … … 747 748 </ul> 748 749 </div> 749 750 750 <div id="category-adder" class="wp-hidden-children"> 751 <h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4> 752 <p id="link-category-add" class="wp-hidden-child"> 753 <label class="screen-reader-text" for="newcat"><?php _e( '+ Add New Category' ); ?></label> 754 <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" aria-required="true" /> 755 <input type="button" id="link-category-add-submit" data-wp-lists="add:categorychecklist:link-category-add" class="button" value="<?php esc_attr_e( 'Add' ); ?>" /> 756 <?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?> 757 <span id="category-ajax-response"></span> 758 </p> 759 </div> 751 <?php if ( current_user_can( $taxonomy->cap->manage_terms ) ) : ?> 752 <div id="category-adder" class="wp-hidden-children"> 753 <h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4> 754 <p id="link-category-add" class="wp-hidden-child"> 755 <label class="screen-reader-text" for="newcat"><?php _e( '+ Add New Category' ); ?></label> 756 <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" aria-required="true" /> 757 <input type="button" id="link-category-add-submit" data-wp-lists="add:categorychecklist:link-category-add" class="button" value="<?php esc_attr_e( 'Add' ); ?>" /> 758 <?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?> 759 <span id="category-ajax-response"></span> 760 </p> 761 </div> 762 <?php endif; ?> 760 763 </div> 761 764 <?php 762 765 }