WordPress.org

Make WordPress Core

Ticket #5045: delete_post_nonce.diff

File delete_post_nonce.diff, 2.1 KB (added by markjaquith, 11 years ago)
  • wp-admin/wp-admin.css

     
    1515        text-decoration: none;
    1616}
    1717
    18 a.delete:hover {
     18a.delete:hover, a#deletepost:hover {
    1919        background: #c00;
    2020        color: #fff;
    2121}
    2222
     23a#deletepost {
     24        display: block;
     25        padding: 5px 0;
     26        text-align: center;
     27}
     28
    2329#devnews h4 {
    2430        font-family: Georgia, "Times New Roman", Times, serif;
    2531        font-size: 18px;
  • wp-admin/edit-form-advanced.php

     
    254254
    255255</div>
    256256
    257 <?php if ('edit' == $action) : $delete_nonce = wp_create_nonce( 'delete-post_' . $post_ID ); ?>
    258 <input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php echo ( 'draft' == $post->post_status ) ? __('Delete this draft') : __('Delete this post'); ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />
     257<p><?php if ('edit' == $action) : $delete_nonce = wp_create_nonce( 'delete-post_' . $post_ID ); ?>
     258<a href="<?php echo wp_nonce_url('post.php?action=delete&post=' . $post_ID, 'delete-post_' . $post_ID); ?>"
     259class="button" id="deletepost" tabindex="10"
     260<?php echo "onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\"";?>>
     261<?php echo ( 'draft' == $post->post_status ) ? __('Delete this draft') : __('Delete this post'); ?>
     262</a></p>
    259263<?php endif; ?>
    260264
    261265</div>