Changeset 3933

Show
Ignore:
Timestamp:
06/27/06 07:02:49 (2 years ago)
Author:
ryan
Message:

Add delete page nonce. fixes #2847

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/wp-admin/edit-page-form.php

    r3923 r3933  
    220220</div> 
    221221 
    222 <?php if ('edit' == $action) : ?> 
    223         <input name="deletepost" class="delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"return confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n  \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "')\""; ?> /> 
     222<?php if ('edit' == $action) : 
     223    $delete_nonce = wp_create_nonce( 'delete-page_' . $post_ID ); ?> 
     224    <input name="deletepost" class="button" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n  \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> 
    224225<?php endif; ?> 
    225226</form>