From e7b40483e98b93c2576e0412e03d130026c8649d Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 24 Nov 2009 16:46:23 +0000 Subject: [PATCH] Check action type to avoid warnings. Props sirzooro. fixes #11203 git-svn-id: https://develop.svn.wordpress.org/trunk@12272 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/meta-boxes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 0198e4c543..8109eee613 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -184,7 +184,7 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
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');