WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/16/2010 02:29:10 AM (12 years ago)
Author:
nacin
Message:

Add $force_delete to get_delete_post_link(). Remove unnecessary argument. props scribu, fixes #12708

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r13905 r14099  
    195195<?php
    196196if ( current_user_can( "delete_post", $post->ID ) ) {
    197     if ( !EMPTY_TRASH_DAYS ) {
    198         $delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID), admin_url( 'post.php' ) ), "delete-${post_type}_{$post->ID}" );
     197    if ( !EMPTY_TRASH_DAYS )
    199198        $delete_text = __('Delete Permanently');
    200     } else {
    201         $delete_url = wp_nonce_url( add_query_arg( array('action' => 'trash', 'post' => $post->ID), admin_url( 'post.php' ) ), "trash-${post_type}_{$post->ID}" );
     199    else
    202200        $delete_text = __('Move to Trash');
    203     } ?>
    204 <a class="submitdelete deletion" href="<?php echo $delete_url; ?>"><?php echo $delete_text; ?></a><?php
     201    ?>
     202<a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php
    205203} ?>
    206204</div>
Note: See TracChangeset for help on using the changeset viewer.