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-tags.php

    r40146 r40655  
    6666}
    6767$referer = remove_query_arg( array( '_wp_http_referer', '_wpnonce', 'error', 'message', 'paged' ), $referer );
    68 
    6968switch ( $wp_list_table->current_action() ) {
    7069
     
    107106
    108107    $location = add_query_arg( 'message', 2, $referer );
     108
     109    // When deleting a term, prevent the action from redirecting back to a term that no longer exists.
     110    $location = remove_query_arg( array( 'tag_ID', 'action' ), $location );
    109111
    110112    break;
Note: See TracChangeset for help on using the changeset viewer.