Make WordPress Core

Ticket #9777: 9777.9.patch

File 9777.9.patch, 3.2 KB (added by cklosows, 8 years ago)

Patch refresh

  • src/wp-admin/css/common.css

    diff --git src/wp-admin/css/common.css src/wp-admin/css/common.css
    index 9b127c5..48a183e 100644
    hr { 
    874874.submitbox .submitdelete,
    875875#media-items a.delete,
    876876#media-items a.delete-permanently,
    877 #nav-menu-footer .menu-delete {
     877#nav-menu-footer .menu-delete,
     878#delete-link a.delete  {
    878879        color: #a00;
    879880}
    880881
    span.required, 
    890891.submitbox .submitdelete:hover,
    891892#media-items a.delete:hover,
    892893#media-items a.delete-permanently:hover,
    893 #nav-menu-footer .menu-delete:hover {
     894#nav-menu-footer .menu-delete:hover,
     895#delete-link a.delete:hover {
    894896        color: #f00;
    895897        border: none;
    896898}
    span.required, 
    915917        line-height: 28px;
    916918}
    917919
     920#delete-link {
     921        line-height: 28px;
     922        vertical-align: middle;
     923        text-align: left;
     924        margin-left: 8px;
     925}
     926
     927#delete-link a {
     928        text-decoration: none;
     929}
     930
    918931#publishing-action {
    919932        text-align: right;
    920933        float: right;
  • src/wp-admin/css/edit.css

    diff --git src/wp-admin/css/edit.css src/wp-admin/css/edit.css
    index d33f107..1934cba 100644
    p.popular-tags a { 
    11131113        text-decoration: underline;
    11141114}
    11151115
     1116#edittag {
     1117        max-width: 800px;
     1118}
     1119
     1120.edit-tag-actions {
     1121        margin-top: 20px;
     1122        overflow: hidden;
     1123        padding: 10px;
     1124        margin-right: 10px;
     1125}
     1126
    11161127/* Comments */
    11171128
    11181129.comment-php .wp-editor-area {
    table.links-table { 
    13671378}
    13681379
    13691380@media screen and ( max-width: 782px ) {
     1381        .wp-core-ui .edit-tag-actions .button-primary {
     1382                margin-bottom: 0;
     1383        }
     1384
    13701385        #post-body-content {
    13711386                min-width: 0;
    13721387        }
  • src/wp-admin/edit-tag-form.php

    diff --git src/wp-admin/edit-tag-form.php src/wp-admin/edit-tag-form.php
    index d233b30..b0d43b3 100644
    if ( 'category' == $taxonomy ) { 
    252252 * @param string $taxonomy Current taxonomy slug.
    253253 */
    254254do_action( "{$taxonomy}_edit_form", $tag, $taxonomy );
    255 
    256 submit_button( __('Update') );
    257255?>
     256
     257<div class="edit-tag-actions">
     258
     259        <?php submit_button( __( 'Update' ), 'primary', null, false ); ?>
     260
     261        <?php if ( $tag_ID !== (int) get_option( 'default_category' ) ) : ?>
     262                <span id="delete-link">
     263                        <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>
     264                </span>
     265        <?php endif; ?>
     266
     267</div>
     268
    258269</form>
    259270</div>
    260271
  • src/wp-admin/edit-tags.php

    diff --git src/wp-admin/edit-tags.php src/wp-admin/edit-tags.php
    index e90a87f..8351397 100644
    case 'delete': 
    106106        wp_delete_term( $tag_ID, $taxonomy );
    107107
    108108        $location = add_query_arg( 'message', 2, $referer );
     109        $location = remove_query_arg( array( 'tag_ID', 'action' ), $location );
    109110
    110111        break;
    111112
  • src/wp-admin/js/tags.js

    diff --git src/wp-admin/js/tags.js src/wp-admin/js/tags.js
    index 333a2eb..b10c0cc 100644
    jQuery(document).ready(function($) { 
    2828                return false;
    2929        });
    3030
     31        $( '#edittag' ).on( 'click', '.delete', function() {
     32                if ( 'undefined' === typeof showNotice ) {
     33                        return true;
     34                }
     35                return showNotice.warn();
     36        });
     37
    3138        $('#submit').click(function(){
    3239                var form = $(this).parents('form');
    3340