Make WordPress Core


Ignore:
Timestamp:
11/01/2008 10:28:34 PM (15 years ago)
Author:
westi
Message:

Redirect correctly on page deletion. Fixes #8030.

File:
1 edited

Legend:

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

    r9451 r9468  
    180180<div id="delete-action">
    181181<?php
    182 if ( ( 'edit' == $action ) && current_user_can('delete_post', $post->ID) ) { ?>
    183 <a class="submitdelete deletion" href="<?php echo wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID); ?>" onclick="if ( confirm('<?php echo 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 page '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a>
     182if ( ( 'edit' == $action ) && current_user_can('delete_page', $post->ID) ) { ?>
     183<a class="submitdelete deletion" href="<?php echo wp_nonce_url("page.php?action=delete&amp;post=$post->ID", 'delete-page_' . $post->ID); ?>" onclick="if ( confirm('<?php echo 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 page '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a>
    184184<?php } ?>
    185185</div>
Note: See TracChangeset for help on using the changeset viewer.