WordPress.org

Make WordPress Core

Ticket #9777: 9777.3.diff

File 9777.3.diff, 1.9 KB (added by cklosows, 6 years ago)

Properly handling the redirections after deletes by removing the query args of deleted term ID as well as the action, after the wp_delete_term

  • wp-admin/css/common.css

     
    822822.submitbox .submitdelete,
    823823#media-items a.delete,
    824824#media-items a.delete-permanently,
    825 #nav-menu-footer .menu-delete {
     825#nav-menu-footer .menu-delete,
     826#delete-link a.delete  {
    826827        color: #a00;
    827828}
    828829
     
    838839.submitbox .submitdelete:hover,
    839840#media-items a.delete:hover,
    840841#media-items a.delete-permanently:hover,
    841 #nav-menu-footer .menu-delete:hover {
     842#nav-menu-footer .menu-delete:hover,
     843#delete-link a.delete:hover {
    842844        color: #f00;
    843845        text-decoration: none;
    844846        border: none;
     
    862864        float: left;
    863865}
    864866
     867#delete-link {
     868        line-height: 28px;
     869        vertical-align: middle;
     870        text-align: left;
     871}
     872
    865873#publishing-action {
    866874        text-align: right;
    867875        float: right;
  • wp-admin/edit-tag-form.php

     
    195195 */
    196196do_action( "{$taxonomy}_edit_form", $tag, $taxonomy );
    197197
    198 submit_button( __('Update') );
     198submit_button( __('Update'), 'primary', NULL, false, NULL );
    199199?>
     200<span id="delete-link">
     201        <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>
     202</span>
    200203</form>
    201204</div>
    202205<script type="text/javascript">
  • wp-admin/edit-tags.php

     
    8888        wp_delete_term( $tag_ID, $taxonomy );
    8989
    9090        $location = add_query_arg( 'message', 2, $location );
     91        $location = remove_query_arg( array( 'tag_ID', 'action' ), $location );
    9192
    9293        break;
    9394