Make WordPress Core


Ignore:
Timestamp:
05/12/2017 07:25:43 PM (9 years ago)
Author:
adamsilverstein
Message:

Taxonomy: Add a "delete" button on term edit page.

Add a 'delete' link next to the update button on the term edit screen so you can delete a term while you are reviewing it's details.

Props cklosows, bradt, ocean90, johnbillion, DrewAPicture, ryan, MatheusGimenez, maguiar.
Fixes #9777.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tag-form.php

    r40146 r40655  
    255255 */
    256256do_action( "{$taxonomy}_edit_form", $tag, $taxonomy );
    257 
    258 submit_button( __('Update') );
    259257?>
     258
     259<div class="edit-tag-actions">
     260
     261    <?php submit_button( __( 'Update' ), 'primary', null, false ); ?>
     262
     263    <?php if ( current_user_can( 'delete_term', $tag->term_id ) ) : ?>
     264        <span id="delete-link">
     265            <a class="delete" href="<?php echo admin_url( wp_nonce_url( "edit-tags.php?action=delete&taxonomy=$taxonomy&tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ) ) ?>"'><?php _e( 'Delete' ); ?></a>
     266        </span>
     267    <?php endif; ?>
     268
     269</div>
     270
    260271</form>
    261272</div>
Note: See TracChangeset for help on using the changeset viewer.