Check action type to avoid warnings. Props sirzooro. fixes #11203

git-svn-id: http://svn.automattic.com/wordpress/trunk@12272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-11-24 16:46:23 +00:00
parent 9f2fbbc2f9
commit 049b5321d6
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
<?php do_action('post_submitbox_start'); ?>
<div id="delete-action">
<?php
if ( current_user_can("delete_${post_type}", $post->ID) ) {
if ( ( 'edit' == $action ) && current_user_can("delete_${post_type}", $post->ID) ) {
if ( !EMPTY_TRASH_DAYS ) {
$delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" );
$delete_text = __('Delete Permanently');